]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): The Portland group's
authorPeter O'Gorman <peter@pogma.com>
Fri, 25 Feb 2005 14:14:20 +0000 (14:14 +0000)
committerPeter O'Gorman <peter@pogma.com>
Fri, 25 Feb 2005 14:14:20 +0000 (14:14 +0000)
compiler does not pass --whole-archive. Move gnu ld check for
the flag to the top so it can be overridden.
(AC_LIBTOOL_LANG_CXX_CONFIG): Unset whole_archive_flag_spec for
the portland group's c++ compiler too.
Reported by Jeff Squyres <jsquyres@lam-mpi.org>

ChangeLog
libtool.m4

index b9968c441f5feaded4c7646151197851f77f6631..108268f3cab7232d5effb628209d68978c05dd17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
-2005-02-25  Gary V. Vaughan  <gary@gnu.org>
+2005-02-24  Peter O'Gorman  <peter@pogma.com>
 
-       * Makefile.am (install-data-hook):  Remove call to
-       local-install-files, which is no longer required.
+       * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): The Portland group's 
+       compiler does not pass --whole-archive. Move gnu ld check for 
+       the flag to the top so it can be overridden.
+       (AC_LIBTOOL_LANG_CXX_CONFIG): Unset whole_archive_flag_spec for
+       the portland group's c++ compiler too.
+       Reported by Jeff Squyres <jsquyres@lam-mpi.org>
 
 2005-02-24  Gary V. Vaughan  <gary@gnu.org>
 
index 6cf99729f4fa858d95d1ce9d9ad6c71a5b953b41..f4d0d5a896ca7ff9098639ba61006a0ad94d5d53 100644 (file)
@@ -3178,6 +3178,7 @@ case $host_os in
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
         ;;
       cxx)
        # Compaq C++
@@ -5137,7 +5138,8 @@ ifelse([$1],[CXX],[
   # rely on this symbol name, it's probably fine to never include it in
   # preloaded symbol tables.
   extract_expsyms_cmds=
-
+  # Just being paranoid about ensuring that cc_basename is set.
+  cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
   case $host_os in
   cygwin* | mingw* | pw32*)
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
@@ -5156,7 +5158,28 @@ ifelse([$1],[CXX],[
   if test "$with_gnu_ld" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
-
+    
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+    
     # See if GNU ld supports shared libraries.
     case $host_os in
     aix3* | aix4* | aix5*)
@@ -5266,8 +5289,12 @@ EOF
   linux*)
     if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
       tmp_addflag=
-      case $CC,$host_cpu in
+      case $cc_basename,$host_cpu in
+      pgcc*)                           # Portland Group C compiler
+        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+       ;;
       pgf77* | pgf90* )                        # Portland Group f77 and f90 compilers
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
         tmp_addflag=' -fpic' ;;
       ecc*,ia64* | icc*,ia64*)         # Intel C compiler on ia64
         tmp_addflag=' -i_dynamic' ;;
@@ -5277,14 +5304,7 @@ EOF
        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
-        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-        *\ 2.11.*) ;; # other 2.11 versions
-        *) supports_anon_versioning=yes ;;
-      esac
+
       if test $supports_anon_versioning = yes; then
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
@@ -5308,16 +5328,11 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
       ;;
     esac
 
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
-      runpath_var=LD_RUN_PATH
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-      fi
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)