From: Ralf Wildenhues Date: Sat, 16 Aug 2008 15:28:30 +0000 (+0200) Subject: Avoid test failure due to broken dlpreloading of shared library. X-Git-Tag: v2.2.6~14 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=649567ed497902046abecd01a2fa0c5206d51730;p=thirdparty%2Flibtool.git Avoid test failure due to broken dlpreloading of shared library. * tests/lt_dladvise.at (lt_dlopenadvise library loading): Drop some newlines in AT_CHECK commands, for better 'testsuite -x' output. Only create a static installable libpreload.la, to avoid exposing the bug libtool currently has with preloading of shared libraries. Add a note to revisit this later. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 2ee10ae1c..fa0448200 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-08-16 Ralf Wildenhues + + Avoid test failure due to broken dlpreloading of shared library. + * tests/lt_dladvise.at (lt_dlopenadvise library loading): Drop + some newlines in AT_CHECK commands, for better 'testsuite -x' + output. Only create a static installable libpreload.la, to + avoid exposing the bug libtool currently has with preloading of + shared libraries. Add a note to revisit this later. + 2008-08-12 Ralf Wildenhues Parallel make testsuite fixes. diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at index c0cd768ea..dccb122b7 100644 --- a/tests/lt_dladvise.at +++ b/tests/lt_dladvise.at @@ -327,8 +327,8 @@ cygwin* | mingw*) CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1" dlopenable="$dlopen depend" $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c - AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la \ - moddepend.lo -rpath /foo -avoid-version], [], [ignore], [ignore]) + AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la ]dnl + [moddepend.lo -rpath /foo -avoid-version], [], [ignore], [ignore]) ;; esac @@ -340,9 +340,16 @@ LDFLAGS="$LDFLAGS -no-undefined" $CC $CPPFLAGS $CFLAGS -c main.c for name in resident local global preload; do + # FIXME: adding -static to libpreload shouldn't be necessary. + # Fix this properly in ltmain, then remove this workaround. + if test $name = preload; then + st=-static + else + st= + fi $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c mod$name.c - AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \ - mod$name.lo -rpath /foo -avoid-version], [], [ignore], [ignore]) + AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la ]dnl + [mod$name.lo $st -rpath /foo -avoid-version], [], [ignore], [ignore]) done preloaded= @@ -360,7 +367,7 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $preloa # Remove loadable libpreload module, so we know it is the preloaded module # that is being executed by a successful test invocation: -$LIBTOOL --mode=clean rm libpreload.la +AT_CHECK([$LIBTOOL --mode=clean rm -f libpreload.la], [], [ignore], [ignore]) LT_AT_NOINST_EXEC_CHECK([./main], [$modules], [], [expout], [])