This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[Patch] libstdc++/31621: configure test for --gc-sections
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Cc: Daniel Jacobowitz <drow at false dot org>
- Date: Sun, 20 May 2007 11:45:57 +0200
- Subject: [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])