libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC up to 2.95 can't build shared libraries on AIX 4.1


From: Alexandre Oliva
Subject: GCC up to 2.95 can't build shared libraries on AIX 4.1
Date: 03 Mar 2001 19:02:39 -0300
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

This patch arranges for shared libraries to be disabled on AIX 4.1 if
a GCC version that is not a recent enough GCC snapshots is detected.
This may be needed on AIX 4.2 too, but I don't have a machine to
test.  Ok to install?  (I've got adjusted patches for MLB and 1.3)

Index: ChangeLog
from  Alexandre Oliva  <address@hidden>

        * libtool.m4 (can_build_shared) [AIX 4.[01], GCC]: GCC up to
        2.96 can't build shared libraries reliably.  Disable them.

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.143
diff -u -p -r1.143 libtool.m4
--- libtool.m4 2001/03/03 21:41:29 1.143
+++ libtool.m4 2001/03/03 22:00:16
@@ -1769,6 +1769,22 @@ aix4*)
   # and later linker supports .so
   library_names_spec='${libname}${release}.so$versuffix 
${libname}${release}.so$major $libname.a'
   shlibpath_var=LIBPATH
+  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
   ;;
 
 amigaos*)
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

[Prev in Thread] Current Thread [Next in Thread]