]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS)
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 29 Jan 2005 15:10:40 +0000 (15:10 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 29 Jan 2005 15:10:40 +0000 (15:10 +0000)
[linux]: Update for Intel Compiler icc/icpc/ifort: add -i_dynamic and
-nofor_main, if necessary.  Simplify logic somewhat.

ChangeLog
libtool.m4

index 81003ea73ae2bfa1f73718bddfe4d6c163902ba7..3f89c98d96deec9da8faf8f52c4ea6c947973c0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * 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  <peter@pogma.com>
 
        * AUTHORS, THANKS: Copy from cvs HEAD.
index 498b86cf0341eed9c3e56eda5b7011e1ab215362..48b4490c6be04be60abd9197e23d387da31c2ea4 100644 (file)
@@ -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