]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_LIBTOOL_PROG_COMPILER_PIC, AC_LIBTOOL_PROG_LD_SHLIBS)
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 23 Apr 2005 15:46:26 +0000 (15:46 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 23 Apr 2005 15:46:26 +0000 (15:46 +0000)
[solaris]: Update wl for Sun Studio f77/f90/f95.  Fix
whole_archive_flag_spec for cc and f77/f90/f95 to prevent reordering in
case we link with $CC.

ChangeLog
libtool.m4

index 96e24f453a0d0ea2fcd28460ab2645d2f16537bc..7914fa21f589ca09bbb56b643e47955a416c5ad7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-04-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libtool.m4 (AC_LIBTOOL_PROG_COMPILER_PIC, AC_LIBTOOL_PROG_LD_SHLIBS)
+       [solaris]: Update wl for Sun Studio f77/f90/f95.  Fix
+       whole_archive_flag_spec for cc and f77/f90/f95 to prevent reordering in
+       case we link with $CC.
+
 2005-04-23  Gary Kumfert <kumfert@llnl.gov>
 
        * libtool.m4 (AC_LIBTOOL_LANG_F77_CONFIG) [ aix4, aix5 ]:
index ba09dfd7695d6acd21966ba48452719d6b9c4c50..e5c18a4a1afc313b9dad3e8dda0a98bd58713de5 100644 (file)
@@ -5086,9 +5086,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
       ;;
 
     solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
       ;;
 
     sunos4*)
@@ -5851,8 +5856,18 @@ EOF
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       case $host_os in
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="${wlarc}-z ${wlarc}allextract\$convenience ${wlarc}-z ${wlarc}defaultextract" ;;
+      *)
+       # 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.
+       # 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 ;;
       esac
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
       ;;