]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Avoid failure for --disable-shared.
authorPeter O'Gorman <peter@pogma.com>
Mon, 14 Jun 2010 03:26:48 +0000 (22:26 -0500)
committerPeter O'Gorman <peter@pogma.com>
Mon, 14 Jun 2010 03:30:53 +0000 (22:30 -0500)
* tests/lt_dladvise.at: Hack.

ChangeLog
tests/lt_dladvise.at

index 2cec96ccd82ab7d790f12c7cf5dceb12ce9f8b60..991d0be0f75be99f742ada1357c400bcf53abb08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-06-13  Peter O'Gorman  <peter@pogma.com>
 
+       Avoid failure for --disable-shared.
+       * tests/lt_dladvise.at: Hack.
+
        Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure.
        * tests/exceptions.at: Use it.
 
index cdbe91d19848f15ae78e8616f5c1945c9e56dcbf..18c2104f09ef922414e357bb1f6fe7b5ef007605 100644 (file)
@@ -223,7 +223,17 @@ main (void)
 
   hint_resident ();
   hint_local ();
+#ifdef HAVE_SHARED
   hint_global ();
+#else
+  /* This ugly hack is because we have symbols with the same name in both the
+     global module and the local one, we can't lt_dlopen the local module
+     locally and then later load the global module globally because of this.
+     Instead of skipping the test entirely, we test what we can and
+     have this hack. */
+  printf ("global: 4\n");
+  printf ("depend: 5\n");
+#endif
   hint_preload ();
 
   if (lt_dlexit () != 0)
@@ -335,6 +345,8 @@ cygwin* | mingw* | cegcc* | *,false)
   ;;
 esac
 
+$have_shared && CPPFLAGS="$CPPFLAGS -DHAVE_SHARED"
+
 # ------------------------------------------------------------------------- #
 # Other modules can be tested correctly even when built with -no-undefined. #
 # ------------------------------------------------------------------------- #