]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) [solaris]:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 23 Apr 2005 15:44:27 +0000 (15:44 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 23 Apr 2005 15:44:27 +0000 (15:44 +0000)
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
m4/libtool.m4

index be461c4ce93e796be713f201b91314af75c57b84..a78ab79c5f736fd30409d44f6f04f3ae7112c9b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-04-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_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.
+
        * m4/libtool.m4: Audit use of echo vs $ECHO.
        * TODO: Update.
        Reported by Robert Ă–gren <lists@roboros.com> and others.
index 82968eb04be57c533ef645b931450e49662f0fcc..f85ac52a87f8087d0a9530ff199a5d7c38f2f80e 100644 (file)
@@ -3438,9 +3438,14 @@ m4_if([$1], [CXX], [
       ;;
 
     solaris*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
       ;;
 
     sunos4*)
@@ -4273,8 +4278,18 @@ _LT_EOF
       _LT_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_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_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 ;;
       esac
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;