From: bkoz Date: Thu, 31 Aug 2006 22:20:09 +0000 (+0000) Subject: 2006-08-31 Benjamin Kosnik X-Git-Tag: upstream/4.9.2~53234 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b1464a381267c7927aa6c32469e5f5245d65ffd;p=platform%2Fupstream%2Flinaro-gcc.git 2006-08-31 Benjamin Kosnik PR libstdc++/28671 continued * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't use CXXFLAGS when checking for atomic builtins. * configure: Regenerate. * include/bits/atomicity.h: Revert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116608 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8fe4374..705b2ca 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2006-08-31 Benjamin Kosnik + + PR libstdc++/28671 continued + * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't use + CXXFLAGS when checking for atomic builtins. + * configure: Regenerate. + * include/bits/atomicity.h: Revert. + 2006-08-31 Richard Guenther * include/ext/mt_allocator.h: Remove volatile qualifiers diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index a904427..8fe294d 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2007,7 +2007,7 @@ int main() } EOF old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -S" + CXXFLAGS=-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 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index cdabc3b..0050af3 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -8025,7 +8025,7 @@ int main() } EOF old_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -S" + CXXFLAGS=-S if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? diff --git a/libstdc++-v3/include/bits/atomicity.h b/libstdc++-v3/include/bits/atomicity.h index 75d9893..79af99e 100644 --- a/libstdc++-v3/include/bits/atomicity.h +++ b/libstdc++-v3/include/bits/atomicity.h @@ -41,6 +41,15 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +#ifdef _GLIBCXX_ATOMIC_BUILTINS + static inline _Atomic_word + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __sync_fetch_and_add(__mem, __val); } + + static inline void + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __sync_fetch_and_add(__mem, __val); } +#else _Atomic_word __attribute__ ((__unused__)) __exchange_and_add(volatile _Atomic_word* __mem, int __val); @@ -48,6 +57,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void __attribute__ ((__unused__)) __atomic_add(volatile _Atomic_word* __mem, int __val); +#endif static inline _Atomic_word __exchange_and_add_single(_Atomic_word* __mem, int __val)