]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Avoid test failure due to broken dlpreloading of shared library.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 16 Aug 2008 15:28:30 +0000 (17:28 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 16 Aug 2008 15:28:30 +0000 (17:28 +0200)
* 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 <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/lt_dladvise.at

index 2ee10ae1cd6a0665d388b56abf8e29c063f92f06..fa044820004d331bad79300aaa5470f7bb7a0b38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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  <Ralf.Wildenhues@gmx.de>
 
        Parallel make testsuite fixes.
index c0cd768ead311d520762754d200b280e1b16309f..dccb122b714d62c1a1649015e381eeecb0ea0ced 100644 (file)
@@ -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], [])