libtool-patches
[Top][All Lists]
Advanced

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

Re: fail.at woes


From: Bob Friesenhahn
Subject: Re: fail.at woes
Date: Fri, 3 Feb 2006 14:30:48 -0600 (CST)

On Fri, 3 Feb 2006, Ralf Wildenhues wrote:

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?

Please do!

Bob

       * 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



======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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