From 8edb93c4239c39fa64436840a5813cda17f4678c Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Mon, 14 Apr 2008 23:53:15 +0000 Subject: [PATCH] re PR libstdc++/35816 (libstdc++ build during bootstrap is optimizing away atomic builtin check) 2008-04-14 Benjamin Kosnik PR libstdc++/35816 * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Set CXXFLAGS to -O0 when checking for atomic builtins. * configure: Regenerate. From-SVN: r134297 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/acinclude.m4 | 4 ++-- libstdc++-v3/configure | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 358da48de70..fb3e6224579 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2008-04-14 Benjamin Kosnik + + PR libstdc++/35816 + * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Set CXXFLAGS to + -O0 when checking for atomic builtins. + * configure: Regenerate. + 2008-04-14 Benjamin Kosnik * include/bits/c++config: Guard _LDBL_ macros with __cplusplus. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index e1712b77d80..b25c5add572 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2292,7 +2292,7 @@ int main() } EOF old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS=-S + CXXFLAGS='-O0 -S' if AC_TRY_EVAL(ac_compile); then if grep __sync_fetch_and_add conftest.s >/dev/null 2>&1 ; then enable_atomic_builtins=no @@ -2303,6 +2303,7 @@ EOF atomicity_dir=cpu/generic/atomicity_builtins fi fi + AC_MSG_RESULT($enable_atomic_builtins) CXXFLAGS="$old_CXXFLAGS" rm -f conftest* @@ -2311,7 +2312,6 @@ EOF atomicity_dir=cpu/generic/atomicity_mutex fi AC_LANG_RESTORE - AC_MSG_RESULT($enable_atomic_builtins) ]) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 6e6e1996e62..8ce34b20a93 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -18104,7 +18104,7 @@ int main() } EOF old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS=-S + CXXFLAGS='-O0 -S' if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -18122,6 +18122,8 @@ _ACEOF atomicity_dir=cpu/generic/atomicity_builtins fi fi + echo "$as_me:$LINENO: result: $enable_atomic_builtins" >&5 +echo "${ECHO_T}$enable_atomic_builtins" >&6 CXXFLAGS="$old_CXXFLAGS" rm -f conftest* @@ -18135,8 +18137,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - echo "$as_me:$LINENO: result: $enable_atomic_builtins" >&5 -echo "${ECHO_T}$enable_atomic_builtins" >&6 if test $atomicity_dir = cpu/generic/atomicity_mutex ; then { echo "$as_me:$LINENO: WARNING: No native atomic operations are provided for this platform." >&5 -- 2.30.2