]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 [ solaris ] (AC_LIBTOOL_LANG_CXX_CONFIG)
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 3 Feb 2006 20:05:00 +0000 (20:05 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 3 Feb 2006 20:05:00 +0000 (20:05 +0000)
(AC_LIBTOOL_PROG_LD_SHLIBS) < whole_archive_flag_spec >:
Fix this once and for all, for both the SUN compiler suite
(cc/CC/f77/f90/f95) and GCC.
Reported by Yuri Pukhalsky <pooh@cryptopro.ru>.

ChangeLog
libtool.m4

index a41492b87801b330b49086f551ef3beee21a9f5e..9ecbc3d8b001f0d4cd4896bfc7bea0ea758f0d52 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-02-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * libtool.m4 [ solaris ] (AC_LIBTOOL_LANG_CXX_CONFIG)
+       (AC_LIBTOOL_PROG_LD_SHLIBS) < whole_archive_flag_spec >:
+       Fix this once and for all, for both the SUN compiler suite
+       (cc/CC/f77/f90/f95) and GCC.
+       Reported by Yuri Pukhalsky <pooh@cryptopro.ru>.
+
        * cdemo/Makefile.am: Remove broken use of undocumented
        Automake variable `$(OBJECTS)'.
        * demo/Makefile.am, depdemo/Makefile.am: Likewise.
index 5d80b6b58ec4c0c0f4365546a2b77d07f0c63072..f082bdd78a2cbe3f975f8655379f1ed9a28b98cc 100644 (file)
@@ -3577,15 +3577,10 @@ case $host_os in
        case $host_os in
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
          *)
-           # The C++ compiler is used as linker so we must use $wl
-           # flag to pass the commands to the underlying system
-           # linker. We must also pass each convience library through
-           # to the system linker between allextract/defaultextract.
-           # The C++ compiler will combine linker options so we
-           # cannot just pass the convience library names through
-           # without $wl.
+           # The compiler driver will combine and reorder linker options,
+           # but understands `-z linker_flag'.
            # Supported since Solaris 2.6 (maybe 2.5.1?)
-           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
            ;;
        esac
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
@@ -3632,6 +3627,12 @@ case $host_os in
          fi
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+         case $host_os in
+         solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+         *)
+           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+           ;;
+         esac
        fi
        ;;
     esac
@@ -6107,17 +6108,16 @@ _LT_EOF
       case $host_os in
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
-       # The compiler driver will combine linker options so we
-       # cannot just pass the convience library names through
-       # without $wl, iff we do not link with $LD.
-       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # The compiler driver will combine and reorder linker options,
+       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but is careful enough not to reorder.
        # Supported since Solaris 2.6 (maybe 2.5.1?)
-       case $wlarc in
-       '')
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
-       *)
-         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
-       esac ;;
+       if test "$GCC" = yes; then
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       else
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+       fi
+       ;;
       esac
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
       ;;