Ping^2: [Patch] PR 37454 - Fix -rdynamic check in gcc/configure

Steve Ellcey sje@cup.hp.com
Sat Jan 9 19:44:00 GMT 2010


On Sat, 2010-01-09 at 13:36 +0100, Richard Guenther wrote:

> > Appearantly there is still LDFLAGS setting where you removed the
> > save/restore parts:
> >
> > pluginlibs=
> > if test x"$enable_plugin" = x"yes"; then
> >
> > ...
> >  # Check that we can build shared objects with -fPIC -shared
> >  LDFLAGS="$LDFLAGS -fPIC -shared"
> >  AC_MSG_CHECKING([for -fPIC -shared])
> > ...
> > fi
> >
> > Richard.

Yes, I am not sure why this didn't show up when I tested on x86.  It is
probably due to the fact that clean builds seem to work.  Here is a 
patch to save/restore LDFLAGS, I will check it in as obvious once I have
done a build and test.

2010-01-09  Steve Ellcey  <sje@cup.hp.com>

        PR target/37454
        * configure.ac: Save and restore LDFLAGS
        * configure: Regenerate.


Index: configure.ac
===================================================================
--- configure.ac        (revision 155753)
+++ configure.ac        (working copy)
@@ -4320,6 +4320,7 @@ if test x"$enable_plugin" = x"yes"; then
   fi

   # 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 +4331,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