]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix failure test in the presence of --with-pic or -prefer-pic.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 6 Sep 2009 10:42:34 +0000 (12:42 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 6 Sep 2009 10:42:34 +0000 (12:42 +0200)
* tests/fail.at (Failure tests): Run non-PIC failure test only
if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
and also -prefer-pic has not been passed in $CFLAGS.
* THANKS: Update.
Report by Donn Washburn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
THANKS
tests/fail.at

index 599d33e06593536329740f53f6ef199d6a400e6f..60bf373750f8e6b5ff2eae6e0130267f18b09b76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-09-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Fix failure test in the presence of --with-pic or -prefer-pic.
+       * tests/fail.at (Failure tests): Run non-PIC failure test only
+       if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
+       and also -prefer-pic has not been passed in $CFLAGS.
+       * THANKS: Update.
+       Report by Donn Washburn.
+
        Add testsuite exposure for passing of compiler and linker flags.
        * tests/flags.at (passing flags through libtool): New file, new
        test, for bug fixed in previous commit.
diff --git a/THANKS b/THANKS
index e976ba8768f43f0fddac1f2fa4aa783ae2c66a2e..93538859828af6ef6e4f5b6a03aae6f085fd8bd9 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -88,6 +88,7 @@
   Daniel Reed                  n@ml.org
   Daniel Richard G.            skunk@iSKUNK.ORG
   DJ Delorie                   dj@delorie.com
+  Donn Washburn                        n5xwb@comcast.net
   Edouard G. Parmelan          Edouard.Parmelan@France.NCR.COM
   Erez Zadok                   ezk@shekel.mcl.cs.columbia.edu
   Eric Estievenart             eric@via.ecp.fr
index fb05f8cfc498fb24426e1e3133c0854ea6c44426..cec954b3db8e4651e73fa7337a42e2daeea85dab 100644 (file)
@@ -50,15 +50,20 @@ FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c])
 AT_CHECK([test -f a.lo], [1])
 
 # non-PIC compile failure
-case $pic_mode in default | yes)
-  case $build_old_libs,$pic_flag in yes,*-DPIC*)
-    AT_DATA([a.c], [[
+case $pic_mode in default | no)
+  case " $CFLAGS " in
+   *\ -prefer-pic\ *) ;;
+   *)
+    case $build_old_libs,$pic_flag in yes,*-DPIC*)
+      AT_DATA([a.c], [[
 #ifndef PIC
   choke me
 #endif
 ]])
-    FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c])
-    AT_CHECK([test -f a.lo], [1])
+      FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c])
+      AT_CHECK([test -f a.lo], [1])
+      ;;
+    esac
     ;;
   esac
   ;;