From: Ralf Wildenhues Date: Sat, 23 Apr 2005 15:46:26 +0000 (+0000) Subject: * libtool.m4 (AC_LIBTOOL_PROG_COMPILER_PIC, AC_LIBTOOL_PROG_LD_SHLIBS) X-Git-Tag: release-1-5-16~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37fe0adbba5bc0da1fd4fdaa6a99332bc9e3b363;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 96e24f453..7914fa21f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-23 Ralf Wildenhues + + * 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 * libtool.m4 (AC_LIBTOOL_LANG_F77_CONFIG) [ aix4, aix5 ]: diff --git a/libtool.m4 b/libtool.m4 index ba09dfd76..e5c18a4a1 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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 ;;