From: Ralf Wildenhues Date: Sat, 29 Jan 2005 15:10:40 +0000 (+0000) Subject: * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS) X-Git-Tag: release-1-5-12~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=261f809877dfc0682b688f25e9c2ca211999ded5;p=thirdparty%2Flibtool.git * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS) [linux]: Update for Intel Compiler icc/icpc/ifort: add -i_dynamic and -nofor_main, if necessary. Simplify logic somewhat. --- diff --git a/ChangeLog b/ChangeLog index 81003ea73..3f89c98d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-29 Ralf Wildenhues + + * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS) + [linux]: Update for Intel Compiler icc/icpc/ifort: add -i_dynamic and + -nofor_main, if necessary. Simplify logic somewhat. + 2005-01-29 Peter O'Gorman * AUTHORS, THANKS: Copy from cvs HEAD. diff --git a/libtool.m4 b/libtool.m4 index 498b86cf0..48b4490c6 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -3158,8 +3158,12 @@ case $host_os in _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no @@ -5256,12 +5260,18 @@ EOF linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - # Portland Group f77 and f90 compilers require an additonal -fpic - if test "$CC" = "pgf77" -o "$CC" = "pgf90"; then - tmp_archive_cmds="$tmp_archive_cmds -fpic" - fi - _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" + tmp_addflag= + case $CC,$host_cpu in + pgf77* | pgf90* ) # Portland Group f77 and f90 compilers + tmp_addflag=' -fpic' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 @@ -5274,9 +5284,9 @@ EOF _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1) fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no