]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltconfig.in (can_build_shared) [AIX 4.[01], GCC]: GCC up to
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 6 Mar 2001 11:17:20 +0000 (11:17 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 6 Mar 2001 11:17:20 +0000 (11:17 +0000)
2.96 can't build shared libraries reliably.  Disable them.

ChangeLog
ltconfig.in

index a930d16204a0a21bdff195df7731f9ebda71c7a9..e85fb27da8aa6ab946410431dc23e1d7f7a0818a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-2001-03-06  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
+2001-03-06  Alexandre Oliva  <aoliva@redhat.com>
+
+       * ltconfig.in (can_build_shared) [AIX 4.[01], GCC]: GCC up to
+       2.96 can't build shared libraries reliably.  Disable them.
 
        * ltmain.in: When dropping dependencies of a -no-undefined
        library, give up on building a shared library.
index 9fefbba3404c137df5b2b0774c85284cadcfe491..a16de3f55166dc8be02d914a45652e4eb6537ca0 100755 (executable)
@@ -1005,7 +1005,23 @@ aix4* | aix5*)
       export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
     fi
     shlibpath_var=LIBPATH
-    deplibs_check_method='pass_all'
+    deplibs_check_method=pass_all
+    case $host_os in
+    aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+       :
+      else
+       # With GCC up to 2.95.x, collect2 would create an import file
+       # for dependence libraries.  The import file would start with
+       # the line `#! .'.  This would cause the generated library to
+       # depend on `.', always an invalid library.  This was fixed in
+       # development snapshots of GCC prior to 3.0.
+        can_build_shared=no
+      fi
+      ;;
+    esac
   fi
   ;;