]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/demo-hardcode.test [solaris]: Use dumpstabs if available,
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 17 Apr 2005 07:58:57 +0000 (07:58 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 17 Apr 2005 07:58:57 +0000 (07:58 +0000)
to avoid false failure caused by debug section which contains
command line (Solaris cc).

ChangeLog
tests/demo-hardcode.test

index 9e9165717697ba0ffb835d33f70b79d96c942262..bff4fc45f1f53b118b9777de40aa1252c6782f87 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * tests/demo-hardcode.test [solaris]:  Use dumpstabs if available,
+       to avoid false failure caused by debug section which contains
+       command line (Solaris cc).
+
 2005-04-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
 
        * libtoolize.m4sh (func_copy_cb): Fix syntax typo.
index 97e9c9877ea3c289dce22280cc99d9855279355e..d2456b56463b56acf49cb4ba6ccc92b25663d444 100755 (executable)
@@ -35,6 +35,9 @@ test -z "$library_names" \
 
 func_make "hardcode"
 
+# Extra tools we might need
+: ${DUMPSTABS=dumpstabs}
+
 # Suck in all the hardcode_* variable settings.
 func_msg "Finding libtool.m4's guesses at hardcoding values"
 func_get_config 'hardcode_direct
@@ -65,6 +68,16 @@ for file in hc-*; do
   # Discover whether the objdir really was hardcoded.
   hardcoded=no
 
+  # Solaris cc may store the command line in a debugging section,
+  # which leads to false positives.  Unfortunately, Solaris strip
+  # is not capable to remove the section (unlike GNU binutils strip).
+  # So we use dumpstabs if it seems to work.
+  if { $DUMPSTABS -d $file; } >/dev/null 2>&1; then
+    if $DUMPSTABS -d $file 2>/dev/null | $FGREP "$objdir" >/dev/null 2>&1; then
+      hardcoded=yes
+    else
+      hardcoded=no
+    fi
   # At least AIX fgrep doesn't work for binary files, and AIX also
   # doesn't have strings(1), so we need this strange conversion
   # (which only works on ASCII).