diff options
author | Paolo Carlini <pcarlini@suse.de> | 2007-11-09 15:54:33 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-11-09 15:54:33 +0000 |
commit | 18f310b7d377ba5391fb3e81c10e3bba172be375 (patch) | |
tree | aa8b68b6180c6bc37e6a51bf0590f7ce0a68aef6 /libstdc++-v3/acinclude.m4 | |
parent | 76e910c6b72b46e017d7be9a6494113ebae72f85 (diff) | |
download | gcc-18f310b7d377ba5391fb3e81c10e3bba172be375.zip gcc-18f310b7d377ba5391fb3e81c10e3bba172be375.tar.gz gcc-18f310b7d377ba5391fb3e81c10e3bba172be375.tar.bz2 |
re PR libstdc++/34032 (-std=c++0x causes undeclared symbols errors on cygwin)
2007-11-09 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/34032
* acinclude.m4 ([GLIBCXX_ENABLE_C99], [GLIBCXX_CHECK_C99_TR1]):
Use -std=c++98 instead of the default -std=gnu++98.
* configure: Regenerate.
From-SVN: r130047
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 2ca902f..b85a2a8 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -763,9 +763,13 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ AC_LANG_SAVE AC_LANG_CPLUSPLUS - # Use -fno-exceptions so that the C driver can link these tests without - # hitting undefined references to personality routines. + # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__ + # undefined and fake C99 facilities - like pre-standard snprintf - may be + # spuriously enabled. + # Long term, -std=c++0x could be even better, could manage to explicitely + # request C99 facilities to the underlying C headers. ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -std=c++98" ac_save_LIBS="$LIBS" ac_save_gcc_no_link="$gcc_no_link" @@ -996,6 +1000,11 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [ AC_LANG_SAVE AC_LANG_CPLUSPLUS + # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__ + # undefined and fake C99 facilities may be spuriously enabled. + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -std=c++98" + # Check for the existence of <complex.h> complex math functions used # by tr1/complex. AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no) @@ -1266,6 +1275,7 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [ # Check for the existence of the <stdbool.h> header. AC_CHECK_HEADERS(stdbool.h) + CXXFLAGS="$ac_save_CXXFLAGS" AC_LANG_RESTORE ]) |