From 2608336df7c79bc18e4521f017058b9030739b21 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 3 Feb 2006 20:43:24 +0000 Subject: [PATCH] * 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. --- ChangeLog | 4 ++++ tests/fail.at | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fec41d075..445c73af8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-02-03 Ralf Wildenhues + * 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 diff --git a/tests/fail.at b/tests/fail.at index b72915f89..5934315a0 100644 --- a/tests/fail.at +++ b/tests/fail.at @@ -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 -- 2.47.3