]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/m4/libtool.m4 [ solaris ] (_LT_LINKER_SHLIBS)
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 3 Feb 2006 20:03:54 +0000 (20:03 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 3 Feb 2006 20:03:54 +0000 (20:03 +0000)
(_LT_LANG_CXX_CONFIG) < 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
libltdl/m4/libtool.m4

index 370dc0905179a07c079ef34005e015a7b3728607..fec41d075a920c8e09b1db1b69fb389789acfef2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-02-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * libltdl/m4/libtool.m4 [ solaris ] (_LT_LINKER_SHLIBS)
+       (_LT_LANG_CXX_CONFIG) < 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>.
+
        * tests/cdemo/Makefile.am: Remove broken use of undocumented
        Automake variable `$(OBJECTS)'.
        * tests/demo/Makefile.am, tests/depdemo/Makefile.am: Likewise.
index 0fdd554ab4e0f5dd52f064907e4fdd816ccc5fc4..51ea4e33f2ca625df0cd7be209f83f5fe0b98b67 100644 (file)
@@ -4714,17 +4714,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 convenience 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_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
-       *)
-         _LT_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_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       else
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+       fi
+       ;;
       esac
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
@@ -5936,15 +5935,10 @@ if test "$_lt_caught_CXX_error" != yes; then
            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 convenience library through
-               # to the system linker between allextract/defaultextract.
-               # The C++ compiler will combine linker options so we
-               # cannot just pass the convenience 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_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_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
                ;;
            esac
            _LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -5991,6 +5985,12 @@ if test "$_lt_caught_CXX_error" != yes; then
              fi
 
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+             case $host_os in
+               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+               *)
+                 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+                 ;;
+             esac
            fi
            ;;
         esac