From e8d2b9b75ed703c3e4a57967c46e6ddb217e6fad Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 27 May 2017 15:30:26 +0000 Subject: [PATCH] rebase of the patch --- .../clang-fix-cmpxchg8-detection-on-i386.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch b/debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch index 0f642e4b..868e76a5 100644 --- a/debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch +++ b/debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch @@ -9,11 +9,11 @@ can't tell program if libatomic is always lock free. Related bug: https://llvm.org/bugs/show_bug.cgi?id=19355 -Index: llvm-toolchain-snapshot_4.0~svn291557/clang/lib/Basic/Targets.cpp +Index: llvm-toolchain-snapshot_5.0~svn304075/clang/lib/Basic/Targets.cpp =================================================================== ---- llvm-toolchain-snapshot_4.0~svn291557.orig/clang/lib/Basic/Targets.cpp -+++ llvm-toolchain-snapshot_4.0~svn291557/clang/lib/Basic/Targets.cpp -@@ -2761,7 +2761,10 @@ class X86TargetInfo : public TargetInfo +--- llvm-toolchain-snapshot_5.0~svn304075.orig/clang/lib/Basic/Targets.cpp ++++ llvm-toolchain-snapshot_5.0~svn304075/clang/lib/Basic/Targets.cpp +@@ -2913,7 +2913,10 @@ class X86TargetInfo : public TargetInfo FP_SSE, FP_387 } FPMath = FP_Default; @@ -25,7 +25,7 @@ Index: llvm-toolchain-snapshot_4.0~svn291557/clang/lib/Basic/Targets.cpp public: X86TargetInfo(const llvm::Triple &Triple, const TargetOptions &) : TargetInfo(Triple) { -@@ -2882,6 +2885,8 @@ public: +@@ -3034,6 +3037,8 @@ public: // acceptable. // FIXME: This results in terrible diagnostics. Clang just says the CPU is // invalid without explaining *why*. @@ -34,16 +34,16 @@ Index: llvm-toolchain-snapshot_4.0~svn291557/clang/lib/Basic/Targets.cpp switch (CPU) { case CK_Generic: // No processor selected! -@@ -3949,7 +3954,7 @@ void X86TargetInfo::getTargetDefines(con +@@ -4163,7 +4168,7 @@ void X86TargetInfo::getTargetDefines(con Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); } - if (CPU >= CK_i586) + if (isCmpXChg8Supported()) Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); - } -@@ -4250,8 +4255,6 @@ public: + if (HasFloat128) +@@ -4469,8 +4474,6 @@ public: (1 << TargetInfo::LongDouble)); // x86-32 has atomics up to 8 bytes