]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/fail.at: Also pass a bogus object file to the linker so
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 3 Feb 2006 20:43:24 +0000 (20:43 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 3 Feb 2006 20:43:24 +0000 (20:43 +0000)
it fails more reliably; AIX and IRIX linkers ignore duplicate
symbol definitions.

ChangeLog
tests/fail.at

index fec41d075a920c8e09b1db1b69fb389789acfef2..445c73af89a247437f37f95a7a144f28537b958b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-02-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * tests/fail.at: Also pass a bogus object file to the linker so
+       it fails more reliably; AIX and IRIX linkers ignore duplicate
+       symbol definitions.
+
        * libltdl/m4/libtool.m4 [ solaris ] (_LT_LINKER_SHLIBS)
        (_LT_LANG_CXX_CONFIG) < whole_archive_flag_spec >:
        Fix this once and for all, for both the SUN compiler suite
index b72915f89992901619e507cdc2816d007fb8aa9c..5934315a0bf799725d6afb361e2a8843253aefb9 100644 (file)
@@ -61,7 +61,16 @@ case $build_libtool_libs in yes)
   echo 'double duplicate_name(double x) { return 2.*x; }' > b.c
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c
-  FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo -rpath /foo])
+  # Unfortunately, this may actually succeed on AIX and IRIX  :(
+  # So, also add a bogus object file to provoke more failure.
+  echo 'int whatever(void) { return 0;}' > c.c
+  $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c.c
+  (
+    . ./c.lo
+    test "$pic_object" != none && echo choke me >"$pic_object"
+    test "$non_pic_object" != none && echo choke me >"$non_pic_object"
+  )
+  FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo])
   AT_CHECK([test -f liba.la], [1])
   ;;
 esac