This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping^2: [Patch] PR 37454 - Fix -rdynamic check in gcc/configure
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: Ralf dot Wildenhues at gmx dot de, sje at cup dot hp dot com
- Cc: aoliva at redhat dot com, bonzini at gnu dot org, dj at redhat dot com, ebotcazou at adacore dot com, gcc-patches at gcc dot gnu dot org, hjl dot tools at gmail dot com, neroden at gcc dot gnu dot org, richard dot guenther at gmail dot com
- Date: Sun, 10 Jan 2010 12:25:19 -0800 (PST)
- Subject: Re: Ping^2: [Patch] PR 37454 - Fix -rdynamic check in gcc/configure
- Reply-to: sje at cup dot hp dot com
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