libtool-patches
[Top][All Lists]
Advanced

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

FYI: Solaris patches, branch-2-0 and HEAD (was: 2.0 branch: demo-make.te


From: Ralf Wildenhues
Subject: FYI: Solaris patches, branch-2-0 and HEAD (was: 2.0 branch: demo-make.test now fails under Solaris)
Date: Mon, 20 Dec 2004 09:18:53 +0100
User-agent: Mutt/1.4.1i

* Bob Friesenhahn wrote on Sun, Dec 19, 2004 at 08:48:46PM CET:
> The demo-make.test now fails under Solaris with the following errors:
> 
*snip*
> ld: fatal: relocations remain against allocatable but non-writable 
> sections
> collect2: ld returned 1 exit status

After Ralf Menzel reported success with these patches, I've checked in
the following three patches against branch-2-0 and HEAD.

Regards,
Ralf


2004-12-20  Ralf Wildenhues <address@hidden>

        * tests/demo-nopic.test [solaris, sunos]: Skip test.

Index: tests/demo-nopic.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/demo-nopic.test,v
retrieving revision 1.14
diff -u -r1.14 demo-nopic.test
--- tests/demo-nopic.test       22 Nov 2004 15:48:32 -0000      1.14
+++ tests/demo-nopic.test       20 Dec 2004 07:59:01 -0000
@@ -27,6 +27,9 @@
 hppa*|x86_64*|s390*)
        func_skip "$host doesn't like non-PIC shared libs"
        ;;
+*-solaris*|*-sunos*)
+       func_skip "libtool does not build non-PIC shared libs on $host_os"
+       ;;
 esac
 
 func_rmprefixdir



2004-12-20  Ralf Wildenhues <address@hidden>
 
        * m4/libtool.m4 [solaris] (_LT_LINKER_SHLIBS): Change no_undefined_flag
        back to ' -z defs'.  Problems with linking against libgcc.a will have
        to be resolved differently.

Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.146
diff -u -r1.146 libtool.m4
--- m4/libtool.m4       18 Dec 2004 21:53:01 -0000      1.146
+++ m4/libtool.m4       20 Dec 2004 08:04:57 -0000
@@ -4156,7 +4156,7 @@
       ;;
 
     solaris*)
-      _LT_TAGVAR(no_undefined_flag, $1)=' -z text'
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GCC" = yes; then
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib 
$libobjs $deplibs $compiler_flags'
        _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "{ global:" > $lib.exp~cat 
$export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$ECHO "local: *; };" >> 
$lib.exp~



2004-12-20  Ralf Wildenhues <address@hidden>
 
        * m4/libtool.m4 [solaris] (_LT_LINKER_SHLIBS): Add '${wl}-z ${wl}text'
        to archive_cmds and archive_expsyms_cmds.  I.e., do not allow nopic in
        shared libraries.

Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.147
diff -u -r1.147 libtool.m4
--- m4/libtool.m4       20 Dec 2004 08:06:21 -0000      1.147
+++ m4/libtool.m4       20 Dec 2004 08:14:09 -0000
@@ -4158,9 +4158,9 @@
     solaris*)
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib 
$libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h 
${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "{ global:" > $lib.exp~cat 
$export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$ECHO "local: *; };" >> 
$lib.exp~
-         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib 
$libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h 
${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)




reply via email to

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