summaryrefslogtreecommitdiff
path: root/extra/llvm/clang-3.2-fix-std-thread-with-libstdc++.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/llvm/clang-3.2-fix-std-thread-with-libstdc++.patch')
-rw-r--r--extra/llvm/clang-3.2-fix-std-thread-with-libstdc++.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/extra/llvm/clang-3.2-fix-std-thread-with-libstdc++.patch b/extra/llvm/clang-3.2-fix-std-thread-with-libstdc++.patch
new file mode 100644
index 000000000..6963603b1
--- /dev/null
+++ b/extra/llvm/clang-3.2-fix-std-thread-with-libstdc++.patch
@@ -0,0 +1,17 @@
+--- cfe/trunk/lib/Basic/Targets.cpp 2013/04/04 23:51:36 178815
++++ cfe/trunk/lib/Basic/Targets.cpp 2013/04/04 23:53:43 178816
+@@ -2730,6 +2730,14 @@
+ case NoMMX3DNow:
+ break;
+ }
++
++ if (CPU >= CK_i486) {
++ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
++ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
++ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
++ }
++ if (CPU >= CK_i586)
++ Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+ }
+
+ bool X86TargetInfo::hasFeature(StringRef Feature) const {