mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-10-17 16:09:07 +00:00
Fix a FTBFS with a duplicate declaration of shouldUseInlineAtomic
This commit is contained in:
parent
44f860ad0f
commit
597b73316a
38
debian/patches/removeduplicatedeclaration.diff
vendored
Normal file
38
debian/patches/removeduplicatedeclaration.diff
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
Index: llvm-toolchain-3.3-3.3/clang/lib/Basic/Targets.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-3.3-3.3.orig/clang/lib/Basic/Targets.cpp 2013-10-09 15:36:51.000000000 +0200
|
||||
+++ llvm-toolchain-3.3-3.3/clang/lib/Basic/Targets.cpp 2013-10-09 17:04:58.000000000 +0200
|
||||
@@ -3579,33 +3579,6 @@
|
||||
return Version >= 7;
|
||||
}
|
||||
|
||||
- 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:
|
||||
ARMTargetInfo(const std::string &TripleStr)
|
2
debian/patches/series
vendored
2
debian/patches/series
vendored
@ -38,3 +38,5 @@ kfreebsd_target_info_clang33.diff
|
||||
lldb-install-headers.diff
|
||||
atomic_library_1.diff
|
||||
atomic_library_2.diff
|
||||
removeduplicatedeclaration.diff
|
||||
python-clangpath.diff
|
||||
|
Loading…
Reference in New Issue
Block a user