libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fail.at woes


From: Ralf Wildenhues
Subject: fail.at woes
Date: Fri, 3 Feb 2006 17:39:41 +0100
User-agent: Mutt/1.5.11

fail.at fails on IRIX and AIX: their linkers will warn about duplicate
symbols when creating a shared library, but they will then go on to
happily discard the duplicate definitions and exit with zero.

So, since the aim of the test is not to exercise the linker, but the
libtool script failure mode, we'll just also pass a bogus object file
to the linker, to make it barf more reliably.  ;-)

OK to apply?

Cheers,
Ralf

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

Index: tests/fail.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/fail.at,v
retrieving revision 1.1
diff -u -r1.1 fail.at
--- tests/fail.at       3 Dec 2005 08:33:48 -0000       1.1
+++ tests/fail.at       3 Feb 2006 09:05:13 -0000
@@ -61,7 +62,16 @@
   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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]