libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MLB] Fix for hardcode.test on Solaris


From: Robert Boehne
Subject: Re: [MLB] Fix for hardcode.test on Solaris
Date: Tue, 06 Feb 2001 19:04:40 -0600

Alexandre Oliva wrote:
> 
> On Feb  6, 2001, Robert Boehne <address@hidden> wrote:
> 
> > In addition, hardcode_minus_L=yes and hardcode_direct=yes were added
> > as they were set to 'no' by default, fooling libtool.
> 
> I'm pretty sure yes is not right for Solaris with GCC, at least not
> Solaris with GCC and GNU ld.  I'm pretty sure I've also tested it
> regularly with GCC and the system linker, and with an old SPARC
> Compiler and the system linker, but all of them used to pass.
> 
> Perhaps we're going to have to test compiler versions?
> 

Alexandre:

On the assumption that the difference is GNU ld, here is a revised
patch for Solaris.  The only changes are to ltcf-c.sh, in ltcf-cxx.sh
only the section for Solaris CC was patched.  I would like to see
this patch tested on a machine with gcc and Solaris ld to see if
it works for that case.  Any volunteers?


-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden
ChangeLog entry:

2001-02-05  Robert Boehne  <address@hidden>

        * ltcf-cxx.sh: Set hardcode_shlibpath_var, hardcode_minus_L,
        and hardcode_direct to "yes" under Solaris to fix the failing
        hardcode.test under Solaris with the native compilers.
        * ltcf-c.sh: ditto.

Index: ltcf-cxx.sh
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltcf-cxx.sh,v
retrieving revision 1.1.2.30
diff -u -r1.1.2.30 ltcf-cxx.sh
--- ltcf-cxx.sh 2001/02/05 17:50:37     1.1.2.30
+++ ltcf-cxx.sh 2001/02/07 01:00:07
@@ -453,7 +453,9 @@
         $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname 
-o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm 
$lib.exp'
 
         hardcode_libdir_flag_spec='-R$libdir'
-        hardcode_shlibpath_var=no
+        hardcode_shlibpath_var=yes
+        hardcode_minus_L=yes
+        hardcode_direct=yes
         case "$host_os" in
           solaris2.[0-5] | solaris2.[0-5].*) ;;
           *)
Index: ltcf-c.sh
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltcf-c.sh,v
retrieving revision 1.1.2.25
diff -u -r1.1.2.25 ltcf-c.sh
--- ltcf-c.sh   2001/01/27 19:20:51     1.1.2.25
+++ ltcf-c.sh   2001/02/07 01:00:07
@@ -459,7 +459,15 @@
     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | 
sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib 
$libobjs $deplibs $linker_flags~$rm $lib.exp'
     hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_shlibpath_var=no
+    if test "$with_gnu_ld" = yes; then
+      hardcode_shlibpath_var=no
+      hardcode_minus_L=no
+      hardcode_direct=no
+    else
+      hardcode_shlibpath_var=yes
+      hardcode_minus_L=yes
+      hardcode_direct=yes
+    fi
     case "$host_os" in
     solaris2.[0-5] | solaris2.[0-5].*) ;;
     *) # Supported since Solaris 2.6 (maybe 2.5.1?)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]