aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-04-28 17:58:16 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-28 18:10:28 -0700
commitd7c9c7963a79b60e2247bd5a41decc80938023f4 (patch)
tree1356f86b3068e98dc6d6e34ea8295f8b7878bbf6 /gcc-4.7
parent16712a032061c7f8e9647004a10f8af866e57719 (diff)
downloadtoolchain_gcc-d7c9c7963a79b60e2247bd5a41decc80938023f4.tar.gz
toolchain_gcc-d7c9c7963a79b60e2247bd5a41decc80938023f4.tar.bz2
toolchain_gcc-d7c9c7963a79b60e2247bd5a41decc80938023f4.zip
Fix GNU4.7/4.8/4.9 libstdc++ for clang
1. Undo fix in ed7057a1ece24733fe30423cd94131deb8ccb2ca which precludes __atomic_fetch_add() now supported by clang >= 3.3 2. __float128 is supported by clang >= 3.4 Change-Id: Ic2856368d83d261e3a27e0e24ccc09743afdc68b
Diffstat (limited to 'gcc-4.7')
-rw-r--r--gcc-4.7/libstdc++-v3/include/ext/atomicity.h5
-rw-r--r--gcc-4.7/libstdc++-v3/include/std/type_traits2
2 files changed, 3 insertions, 4 deletions
diff --git a/gcc-4.7/libstdc++-v3/include/ext/atomicity.h b/gcc-4.7/libstdc++-v3/include/ext/atomicity.h
index 9f48b81c6..ed1bb6df6 100644
--- a/gcc-4.7/libstdc++-v3/include/ext/atomicity.h
+++ b/gcc-4.7/libstdc++-v3/include/ext/atomicity.h
@@ -42,9 +42,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// To abstract locking primitives across all thread policies, use:
// __exchange_and_add_dispatch
// __atomic_add_dispatch
-#if defined(_GLIBCXX_ATOMIC_BUILTINS) && (!defined(__clang__) || defined(__i386__))
- // NOTE: clang arm/mips can't compile the following two library calls yet.
- static inline _Atomic_word
+#ifdef _GLIBCXX_ATOMIC_BUILTINS
+ static inline _Atomic_word
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{ return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
diff --git a/gcc-4.7/libstdc++-v3/include/std/type_traits b/gcc-4.7/libstdc++-v3/include/std/type_traits
index 732f06a14..cbe732fc8 100644
--- a/gcc-4.7/libstdc++-v3/include/std/type_traits
+++ b/gcc-4.7/libstdc++-v3/include/std/type_traits
@@ -252,7 +252,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __is_floating_point_helper<long double>
: public true_type { };
-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__clang__)
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && (!defined(__clang__) || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4))
template<>
struct __is_floating_point_helper<__float128>
: public true_type { };