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.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
Ralf Wildenhues 2009-09-06 12:42:34 +02:00
parent 8c35d79757
commit 0805518173
3 changed files with 18 additions and 5 deletions

View File

@ -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.

1
THANKS
View File

@ -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

View 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
;;