Ping^2: [Patch] PR 37454 - Fix -rdynamic check in gcc/configure
Steve Ellcey
sje@cup.hp.com
Sun Jan 10 20:25:00 GMT 2010
Here is the patch I have checked in. It includes a save and restore of LIBS
as well as LDFLAGS. Tested on x86 linux with no regressions, sorry for the
problems.
Steve Ellcey
sje@cup.hp.com
2010-01-10 Steve Ellcey <sje@cup.hp.com>
PR target/37454
* configure.ac: Save and restore LDFLAGS and LIBS
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 155785)
+++ configure.ac (working copy)
@@ -4314,12 +4314,15 @@ if test x"$enable_plugin" = x"yes"; then
fi
# Check -ldl
+ saved_LIBS="$LIBS"
AC_SEARCH_LIBS([dlopen], [dl])
if test x"$ac_cv_search_dlopen" = x"-ldl"; then
pluginlibs="$pluginlibs -ldl"
fi
+ LIBS="$saved_LIBS"
# Check that we can build shared objects with -fPIC -shared
+ saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -fPIC -shared"
AC_MSG_CHECKING([for -fPIC -shared])
AC_TRY_LINK(
@@ -4330,6 +4333,7 @@ if test x"$enable_plugin" = x"yes"; then
pluginlibs=
enable_plugin=no
fi
+ LDFLAGS="$saved_LDFLAGS"
# If plugin support had been requested but not available, fail.
if test x"$enable_plugin" = x"no" ; then
More information about the Gcc-patches
mailing list