From 7b9d7e4af33bbd07f0836fa5a04b6eaac80f9bdd Mon Sep 17 00:00:00 2001 From: Peter O'Gorman Date: Sun, 13 Jun 2010 22:26:48 -0500 Subject: [PATCH] Avoid failure for --disable-shared. * tests/lt_dladvise.at: Hack. --- ChangeLog | 3 +++ tests/lt_dladvise.at | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2cec96ccd..991d0be0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-06-13 Peter O'Gorman + Avoid failure for --disable-shared. + * tests/lt_dladvise.at: Hack. + Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure. * tests/exceptions.at: Use it. diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at index cdbe91d19..18c2104f0 100644 --- a/tests/lt_dladvise.at +++ b/tests/lt_dladvise.at @@ -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. # # ------------------------------------------------------------------------- # -- 2.47.3