re PR libstdc++/35816 (libstdc++ build during bootstrap is optimizing away atomic...
authorBenjamin Kosnik <bkoz@redhat.com>
Mon, 14 Apr 2008 23:53:15 +0000 (23:53 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Mon, 14 Apr 2008 23:53:15 +0000 (23:53 +0000)
2008-04-14  Benjamin Kosnik  <bkoz@redhat.com>

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
libstdc++-v3/acinclude.m4
libstdc++-v3/configure

index 358da48de70a13666a9179acd301e759c3423c1a..fb3e6224579751ddd8183eae9517f18eabde6aee 100644 (file)
@@ -1,3 +1,10 @@
+2008-04-14  Benjamin Kosnik  <bkoz@redhat.com>
+
+       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  <bkoz@redhat.com>
 
        * include/bits/c++config: Guard _LDBL_ macros with __cplusplus.
index e1712b77d804ee1144ba1a596b807133c8cd77ed..b25c5add572a6959fca8df9fa4be13732489e093 100644 (file)
@@ -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)
 ])
 
 
index 6e6e1996e62d57298deb7c65258918e21d809fb1..8ce34b20a9330f01e44cbd963b64625df77c9cd4 100755 (executable)
@@ -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