mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-14 05:46:27 +00:00
update of the patch
This commit is contained in:
parent
ca537c1c3f
commit
1580fac587
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,10 +1,10 @@
|
||||
llvm-toolchain-snapshot (1:5.0~svn305653-2) UNRELEASED; urgency=medium
|
||||
llvm-toolchain-snapshot (1:6.0~svn309319-1) unstable; urgency=medium
|
||||
|
||||
* We moved from 5.0 to 6.0
|
||||
* Ship the opt-viewer new program as part of llvm-5.0 tools
|
||||
* ld.lld manpage wasn't installed
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 09 Jul 2017 17:36:10 +0200
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 27 Jul 2017 23:16:06 +0200
|
||||
|
||||
llvm-toolchain-snapshot (1:5.0~svn305653-1) unstable; urgency=medium
|
||||
|
||||
|
14
debian/patches/0044-soname.diff
vendored
14
debian/patches/0044-soname.diff
vendored
@ -3,10 +3,10 @@
|
||||
tools/llvm-shlib/CMakeLists.txt | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: llvm-toolchain-snapshot_5.0~svn307684/clang/tools/libclang/CMakeLists.txt
|
||||
Index: llvm-toolchain-snapshot_6.0~svn309319/clang/tools/libclang/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_5.0~svn307684.orig/clang/tools/libclang/CMakeLists.txt
|
||||
+++ llvm-toolchain-snapshot_5.0~svn307684/clang/tools/libclang/CMakeLists.txt
|
||||
--- llvm-toolchain-snapshot_6.0~svn309319.orig/clang/tools/libclang/CMakeLists.txt
|
||||
+++ llvm-toolchain-snapshot_6.0~svn309319/clang/tools/libclang/CMakeLists.txt
|
||||
@@ -84,7 +84,7 @@ else()
|
||||
set(output_name "clang")
|
||||
endif()
|
||||
@ -16,10 +16,10 @@ Index: llvm-toolchain-snapshot_5.0~svn307684/clang/tools/libclang/CMakeLists.txt
|
||||
OUTPUT_NAME ${output_name}
|
||||
${SOURCES}
|
||||
DEPENDS clang-headers
|
||||
Index: llvm-toolchain-snapshot_5.0~svn307684/tools/llvm-shlib/CMakeLists.txt
|
||||
Index: llvm-toolchain-snapshot_6.0~svn309319/tools/llvm-shlib/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_5.0~svn307684.orig/tools/llvm-shlib/CMakeLists.txt
|
||||
+++ llvm-toolchain-snapshot_5.0~svn307684/tools/llvm-shlib/CMakeLists.txt
|
||||
--- llvm-toolchain-snapshot_6.0~svn309319.orig/tools/llvm-shlib/CMakeLists.txt
|
||||
+++ llvm-toolchain-snapshot_6.0~svn309319/tools/llvm-shlib/CMakeLists.txt
|
||||
@@ -35,6 +35,7 @@ if(LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
|
||||
endif()
|
||||
|
||||
@ -27,4 +27,4 @@ Index: llvm-toolchain-snapshot_5.0~svn307684/tools/llvm-shlib/CMakeLists.txt
|
||||
+set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME
|
||||
|
||||
list(REMOVE_DUPLICATES LIB_NAMES)
|
||||
if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
|
||||
if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
|
||||
|
31
debian/patches/atomic_library_1.diff
vendored
31
debian/patches/atomic_library_1.diff
vendored
@ -3,31 +3,10 @@
|
||||
clang/test/CodeGen/linux-arm-atomic.c | 10 ++++++++++
|
||||
2 files changed, 24 insertions(+)
|
||||
|
||||
--- a/clang/lib/Basic/Targets.cpp
|
||||
+++ b/clang/lib/Basic/Targets.cpp
|
||||
@@ -4414,6 +4414,20 @@ protected:
|
||||
Builder.defineMacro("__ELF__");
|
||||
}
|
||||
|
||||
+ static bool shouldUseInlineAtomic(const llvm::Triple &T) {
|
||||
+ // On linux, binaries targeting old cpus call functions in libgcc to
|
||||
+ // perform atomic operations. The implementation in libgcc then calls into
|
||||
+ // the kernel which on armv6 and newer uses ldrex and strex. The net result
|
||||
+ // is that if we assume the kernel is at least as recent as the hardware,
|
||||
+ // it is safe to use atomic instructions on armv6 and newer.
|
||||
+ if (T.getOS() != llvm::Triple::Linux)
|
||||
+ return false;
|
||||
+ StringRef ArchName = T.getArchName();
|
||||
+ if (ArchName.startswith("armv6") || ArchName.startswith("armv7"))
|
||||
+ return true;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
public:
|
||||
RTEMSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
|
||||
: OSTargetInfo<Target>(Triple, Opts) {
|
||||
--- a/clang/test/CodeGen/linux-arm-atomic.c
|
||||
+++ b/clang/test/CodeGen/linux-arm-atomic.c
|
||||
Index: llvm-toolchain-snapshot_6.0~svn309319/clang/test/CodeGen/linux-arm-atomic.c
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_6.0~svn309319.orig/clang/test/CodeGen/linux-arm-atomic.c
|
||||
+++ llvm-toolchain-snapshot_6.0~svn309319/clang/test/CodeGen/linux-arm-atomic.c
|
||||
@@ -1,5 +1,15 @@
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
|
||||
@ -43,4 +22,4 @@
|
||||
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-unknown-linux | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-freebsd | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-bitrig | FileCheck %s
|
||||
|
||||
|
43
debian/patches/atomic_library_2.diff
vendored
43
debian/patches/atomic_library_2.diff
vendored
@ -1,43 +0,0 @@
|
||||
---
|
||||
clang/lib/Basic/Targets.cpp | 20 +++++++++++++++++---
|
||||
clang/test/CodeGen/linux-arm-atomic.c | 1 +
|
||||
2 files changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/clang/lib/Basic/Targets.cpp
|
||||
+++ b/clang/lib/Basic/Targets.cpp
|
||||
@@ -4423,9 +4423,23 @@ protected:
|
||||
if (T.getOS() != llvm::Triple::Linux)
|
||||
return false;
|
||||
StringRef ArchName = T.getArchName();
|
||||
- if (ArchName.startswith("armv6") || ArchName.startswith("armv7"))
|
||||
- return true;
|
||||
- return false;
|
||||
+ if (T.getArch() == llvm::Triple::arm) {
|
||||
+ if (!ArchName.startswith("armv"))
|
||||
+ return false;
|
||||
+ StringRef VersionStr = ArchName.substr(4);
|
||||
+ unsigned Version;
|
||||
+ if (VersionStr.getAsInteger(10, Version))
|
||||
+ return false;
|
||||
+ return Version >= 6;
|
||||
+ }
|
||||
+ assert(T.getArch() == llvm::Triple::thumb);
|
||||
+ if (!ArchName.startswith("thumbv"))
|
||||
+ return false;
|
||||
+ StringRef VersionStr = ArchName.substr(6);
|
||||
+ unsigned Version;
|
||||
+ if (VersionStr.getAsInteger(10, Version))
|
||||
+ return false;
|
||||
+ return Version >= 7;
|
||||
}
|
||||
|
||||
public:
|
||||
--- a/clang/test/CodeGen/linux-arm-atomic.c
|
||||
+++ b/clang/test/CodeGen/linux-arm-atomic.c
|
||||
@@ -1,5 +1,6 @@
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
|
||||
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-unknown-linux | FileCheck %s
|
||||
|
||||
typedef int _Atomic_word;
|
||||
_Atomic_word exchange_and_add(volatile _Atomic_word *__mem, int __val) {
|
@ -9,32 +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_5.0~svn304075/clang/lib/Basic/Targets.cpp
|
||||
Index: llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.cpp
|
||||
===================================================================
|
||||
--- 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;
|
||||
-
|
||||
+protected:
|
||||
+ bool isCmpXChg8Supported() const {
|
||||
+ return CPU >= CK_i586;
|
||||
+ }
|
||||
public:
|
||||
X86TargetInfo(const llvm::Triple &Triple, const TargetOptions &)
|
||||
: TargetInfo(Triple) {
|
||||
@@ -3034,6 +3037,8 @@ public:
|
||||
// acceptable.
|
||||
// FIXME: This results in terrible diagnostics. Clang just says the CPU is
|
||||
// invalid without explaining *why*.
|
||||
+ if (!isCmpXChg8Supported())
|
||||
+ MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
|
||||
switch (CPU) {
|
||||
case CK_Generic:
|
||||
// No processor selected!
|
||||
@@ -4163,7 +4168,7 @@ void X86TargetInfo::getTargetDefines(con
|
||||
--- llvm-toolchain-snapshot_6.0~svn309319.orig/clang/lib/Basic/Targets/X86.cpp
|
||||
+++ llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.cpp
|
||||
@@ -1133,7 +1133,7 @@ void X86TargetInfo::getTargetDefines(con
|
||||
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
|
||||
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
|
||||
}
|
||||
@ -43,12 +22,25 @@ Index: llvm-toolchain-snapshot_5.0~svn304075/clang/lib/Basic/Targets.cpp
|
||||
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
|
||||
|
||||
if (HasFloat128)
|
||||
@@ -4469,8 +4474,6 @@ public:
|
||||
(1 << TargetInfo::LongDouble));
|
||||
Index: llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_6.0~svn309319.orig/clang/lib/Basic/Targets/X86.h
|
||||
+++ llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.h
|
||||
@@ -281,6 +281,8 @@ class LLVM_LIBRARY_VISIBILITY X86TargetI
|
||||
// acceptable.
|
||||
// FIXME: This results in terrible diagnostics. Clang just says the CPU is
|
||||
// invalid without explaining *why*.
|
||||
+ if (!isCmpXChg8Supported())
|
||||
+ MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
|
||||
switch (Kind) {
|
||||
case CK_Generic:
|
||||
// No processor selected!
|
||||
@@ -548,8 +550,6 @@ public:
|
||||
(1 << TargetInfo::LongDouble));
|
||||
|
||||
// x86-32 has atomics up to 8 bytes
|
||||
- // FIXME: Check that we actually have cmpxchg8b before setting
|
||||
- // MaxAtomicInlineWidth. (cmpxchg8b is an i586 instruction.)
|
||||
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
|
||||
}
|
||||
BuiltinVaListKind getBuiltinVaListKind() const override {
|
||||
|
||||
|
40
debian/patches/removeduplicatedeclaration.diff
vendored
40
debian/patches/removeduplicatedeclaration.diff
vendored
@ -1,40 +0,0 @@
|
||||
---
|
||||
clang/lib/Basic/Targets.cpp | 27 ---------------------------
|
||||
1 file changed, 27 deletions(-)
|
||||
|
||||
--- a/clang/lib/Basic/Targets.cpp
|
||||
+++ b/clang/lib/Basic/Targets.cpp
|
||||
@@ -4414,33 +4414,6 @@ protected:
|
||||
Builder.defineMacro("__ELF__");
|
||||
}
|
||||
|
||||
- static bool shouldUseInlineAtomic(const llvm::Triple &T) {
|
||||
- // On linux, binaries targeting old cpus call functions in libgcc to
|
||||
- // perform atomic operations. The implementation in libgcc then calls into
|
||||
- // the kernel which on armv6 and newer uses ldrex and strex. The net result
|
||||
- // is that if we assume the kernel is at least as recent as the hardware,
|
||||
- // it is safe to use atomic instructions on armv6 and newer.
|
||||
- if (T.getOS() != llvm::Triple::Linux)
|
||||
- return false;
|
||||
- StringRef ArchName = T.getArchName();
|
||||
- if (T.getArch() == llvm::Triple::arm) {
|
||||
- if (!ArchName.startswith("armv"))
|
||||
- return false;
|
||||
- StringRef VersionStr = ArchName.substr(4);
|
||||
- unsigned Version;
|
||||
- if (VersionStr.getAsInteger(10, Version))
|
||||
- return false;
|
||||
- return Version >= 6;
|
||||
- }
|
||||
- assert(T.getArch() == llvm::Triple::thumb);
|
||||
- if (!ArchName.startswith("thumbv"))
|
||||
- return false;
|
||||
- StringRef VersionStr = ArchName.substr(6);
|
||||
- unsigned Version;
|
||||
- if (VersionStr.getAsInteger(10, Version))
|
||||
- return false;
|
||||
- return Version >= 7;
|
||||
- }
|
||||
|
||||
public:
|
||||
RTEMSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
|
2
debian/patches/series
vendored
2
debian/patches/series
vendored
@ -10,9 +10,7 @@ unwind-chain-inclusion.diff
|
||||
hurd-pathmax.diff
|
||||
silent-gold-test.diff
|
||||
atomic_library_1.diff
|
||||
atomic_library_2.diff
|
||||
python-clangpath.diff
|
||||
removeduplicatedeclaration.diff
|
||||
fix-clang-path-and-build.diff
|
||||
#force-gcc-header-obj.diff
|
||||
do-not-fail-on-unexpected-pass.diff
|
||||
|
Loading…
Reference in New Issue
Block a user