]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Altered AIX code so that it only checks for a broken collect2 under aix4.[012]
authorRobert Boehne <rboehne@ricardo-us.com>
Thu, 15 Feb 2001 16:15:46 +0000 (16:15 +0000)
committerRobert Boehne <rboehne@gnu.org>
Thu, 15 Feb 2001 16:15:46 +0000 (16:15 +0000)
ChangeLog
ltcf-c.sh
ltcf-cxx.sh
ltcf-gcj.sh

index 8f55107d7ece1e1927fa186115dab5406fb02cdc..04a86f3d9d02d4d6a1f85f6409772a43363d6902 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-02-15  Robert Boehne  <rboehne@ricardo-us.com>
+       
+       * ltcf-cxx.sh: Only check for broken collect2 under
+        AIX 4.[012], the check only works on these OS versions.
+       
+       * ltcf-c.sh: Ditto.
+       
+       * ltcf-gcj.sh: Ditto.
+
 2001-02-12  Robert Boehne  <rboehne@ricardo-us.com>
 
         * libtool.m4: Removed the AC_REQUIRE of
index 90477a9a565ffa7df227183222d95640619b1bf8..cd2ae2e7f1368bf0487cc969efdb6fc90a5fd32e 100644 (file)
--- a/ltcf-c.sh
+++ b/ltcf-c.sh
@@ -273,24 +273,29 @@ else
     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
     if test "$with_gcc" = yes; then
-      collect2name=`${CC} -print-prog-name=collect2`
-      if test -f "$collect2name" && \
-        strings "$collect2name" | grep resolve_lib_name >/dev/null
-      then
-       # We have reworked collect2
-       hardcode_direct=yes
-      else
-       # We have old collect2
-       hardcode_direct=unsupported
-       # It fails to find uninstalled libraries when the uninstalled
-       # path is not listed in the libpath.  Setting hardcode_minus_L
-       # to unsupported forces relinking
-       hardcode_minus_L=yes
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_libdir_separator=
-      fi
+      case "$host_os" in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+        collect2name=`${CC} -print-prog-name=collect2`
+        if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+        then
+         # We have reworked collect2
+         hardcode_direct=yes
+        else
+         # We have old collect2
+         hardcode_direct=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L=yes
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_libdir_separator=
+        fi
+      esac
       shared_flag='-shared'
     else
+      # not using gcc
       if test "$host_cpu" = ia64; then
         shared_flag='${wl}-G'
       else
index 64a3b62dae77389eb93efb0d30798924faf03284..f810889d08c29f70bfd764a31bd2e7cd37e4ff8d 100644 (file)
@@ -131,30 +131,36 @@ case "$host_os" in
     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
     if test "$with_gcc" = yes; then
-      collect2name=`${CC} -print-prog-name=collect2`
-      if test -f "$collect2name" && \
-        strings "$collect2name" | grep resolve_lib_name >/dev/null
-      then
-       # We have reworked collect2
-       hardcode_direct=yes
-      else
-       # We have old collect2
-       hardcode_direct=unsupported
-       # It fails to find uninstalled libraries when the uninstalled
-       # path is not listed in the libpath.  Setting hardcode_minus_L
-       # to unsupported forces relinking
-       hardcode_minus_L=yes
-       hardcode_libdir_flag_spec='-L$libdir'
-       hardcode_libdir_separator=
-      fi
+      case "$host_os" in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+        collect2name=`${CC} -print-prog-name=collect2`
+        if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+        then
+         # We have reworked collect2
+         hardcode_direct=yes
+        else
+         # We have old collect2
+         hardcode_direct=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L=yes
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_libdir_separator=
+        fi
+      esac
       shared_flag='-shared'
     else
+      # not using gcc
       if test "$host_cpu" = ia64; then
         shared_flag='${wl}-G'
       else
         shared_flag='${wl}-bM:SRE'
       fi
     fi
+
     if test "$host_cpu" = ia64; then
       # On IA64, the linker does run time linking by default, so we don't
       # have to do anything special.
index dbc1c6b48c70be72df4cd059ee04d56b170842a9..68d52705c319a7db1f042f890a5720a5461e65d8 100644 (file)
@@ -264,24 +264,29 @@ else
     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
     if test "$with_gcc" = yes; then
-      collect2name=`${CC} -print-prog-name=collect2`
-      if test -f "$collect2name" && \
-        strings "$collect2name" | grep resolve_lib_name >/dev/null
-      then
-        # We have reworked collect2
-        hardcode_direct=yes
-      else
-        # We have old collect2
-        hardcode_direct=unsupported
-        # It fails to find uninstalled libraries when the uninstalled
-        # path is not listed in the libpath.  Setting hardcode_minus_L
-        # to unsupported forces relinking
-        hardcode_minus_L=yes
-        hardcode_libdir_flag_spec='-L$libdir'
-        hardcode_libdir_separator=
-      fi
+      case "$host_os" in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+        collect2name=`${CC} -print-prog-name=collect2`
+        if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+        then
+         # We have reworked collect2
+         hardcode_direct=yes
+        else
+         # We have old collect2
+         hardcode_direct=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L=yes
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_libdir_separator=
+        fi
+      esac
       shared_flag='-shared'
     else
+      # not using gcc
       if test "$host_cpu" = ia64; then
         shared_flag='${wl}-G'
       else