Commit acb6e9be by Benjamin Kosnik Committed by Benjamin Kosnik

re PR libstdc++/25797 (almost all libstdc++ tests fail)


2006-01-16  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/25797
	* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Add -Werror to
	CFLAGS for --gc-sections test.  Correct compile test.
	* configure: Regenerated.

From-SVN: r109775
parent d1f37bc6
2006-01-16 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/25797
* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Add -Werror to
CFLAGS for --gc-sections test. Correct compile test.
* configure: Regenerated.
2006-01-15 Paolo Carlini <pcarlini@suse.de> 2006-01-15 Paolo Carlini <pcarlini@suse.de>
Gabriel Dos Reis <gdr@integrable-solutions.net> Gabriel Dos Reis <gdr@integrable-solutions.net>
......
...@@ -233,33 +233,28 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [ ...@@ -233,33 +233,28 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
if test x"$with_gnu_ld" = x"yes"; then if test x"$with_gnu_ld" = x"yes"; then
# GNU ld it is! Joy and bunny rabbits! # GNU ld it is! Joy and bunny rabbits!
# All these tests are for C++; save the language and the compiler flags. # 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++ # Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}" ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections' CFLAGS='-x c++ -Werror -Wl,--gc-sections'
# Check for -Wl,--gc-sections # Check for -Wl,--gc-sections
# Note: It's supposed to work now, so ease off until proven wrong...
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections]) AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
AC_TRY_COMPILE([ AC_TRY_LINK([ int one(void) { return 1; }
int main(void) int two(void) { return 2; }
{ ], [ two(); ] , [ac_gcsections=yes], [ac_gcsections=no])
try { throw 1; } if test "$ac_gcsections" = "yes"; then
catch (...) { }; SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
return 0; fi
} AC_MSG_RESULT($ac_gcsections)
], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
if test "$ac_test_CFLAGS" = set; then if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
else else
# this is the suspicious part # this is the suspicious part
CFLAGS='' CFLAGS=''
fi fi
if test "$ac_sectionLDflags" = "yes"; then
SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
fi
AC_MSG_RESULT($ac_sectionLDflags)
fi fi
# Set -z,relro. # Set -z,relro.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment