This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] libstdc++/31621: configure test for --gc-sections


Hi,

this problem is ultimately due to the fact that we were using the C++ compiler to check for --gc-sections support in the linker. I don't think we have a real reason to do that, but I'm CCing Daniel to be sure...

Tested an up-to-date x86_64-linux machine that the problem is fixed, and testsuite is still fine. Also double checked on an older x86-linux machine, which didn't show the problem.

Paolo.

/////////////////
2007-05-21  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/31621
	* acinclude.m4 ([GLIBCXX_CHECK_LINKER_FEATURES]): Use the C compiler.
	* configure: Regenerate.
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 124867)
+++ acinclude.m4	(working copy)
@@ -251,11 +251,9 @@
     # NB: This flag only works reliably after 2.16.1. Configure tests
     # for this are difficult, so hard wire a value that should work.
 
-    # All these tests are for C++, but run with the "C" compiler driver.
-    # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
     ac_test_CFLAGS="${CFLAGS+set}"
     ac_save_CFLAGS="$CFLAGS"
-    CFLAGS='-x c++ -Wl,--gc-sections'
+    CFLAGS='-Wl,--gc-sections'
 
     # Check for -Wl,--gc-sections
     AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]