llvm: update to 3.7.0.
- add patch debug messages - update patches - remove lld - replace __ptrace_request with int on musl - fix bug 22661 - include license
This commit is contained in:
parent
a698ba70c3
commit
e8e81d004e
|
@ -948,6 +948,7 @@ libclang.so clang-3.4.2_1
|
|||
liblldb.so lldb-3.5.1_1
|
||||
libLLVM-3.5.so libllvm-3.5.0_1
|
||||
libLLVM-3.6.so libllvm3.6-3.6.0_1
|
||||
libLLVM-3.7.so libllvm3.7-3.7.0_1
|
||||
libisofs.so.6 libisofs-0.6.24_1
|
||||
libbfd-2.22.so binutils-2.22_1<2.23_1
|
||||
libopcodes-2.22.so binutils-2.22_1<2.23_1
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
llvm
|
|
@ -1,7 +1,16 @@
|
|||
diff --git lib/Headers/stdint.h lib/Headers/stdint.h
|
||||
From fd3bcfddcdb11757e95bc3a625017cbf234b67ed Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:14:32 +0200
|
||||
Subject: [PATCH 1/7] fix stdint
|
||||
|
||||
---
|
||||
lib/Headers/stdint.h | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/Headers/stdint.h b/lib/Headers/stdint.h
|
||||
index 0303db9..8ca28df 100644
|
||||
--- lib/Headers/stdint.h
|
||||
+++ lib/Headers/stdint.h
|
||||
--- a/lib/Headers/stdint.h
|
||||
+++ b/lib/Headers/stdint.h
|
||||
@@ -22,8 +22,6 @@
|
||||
*
|
||||
\*===----------------------------------------------------------------------===*/
|
||||
|
@ -27,3 +36,6 @@ index 0303db9..8ca28df 100644
|
|||
-#endif /* __STDC_HOSTED__ */
|
||||
#endif /* __CLANG_STDINT_H */
|
||||
+#endif /* __STDC_HOSTED__ */
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
diff --git lib/Headers/unwind.h lib/Headers/unwind.h
|
||||
index 90aca16..ef96969 100644
|
||||
--- lib/Headers/unwind.h
|
||||
+++ lib/Headers/unwind.h
|
||||
From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:14:57 +0200
|
||||
Subject: [PATCH 2/7] fix unwind chain inclusion
|
||||
|
||||
---
|
||||
lib/Headers/unwind.h | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
|
||||
index 303d792..44e10cc 100644
|
||||
--- a/lib/Headers/unwind.h
|
||||
+++ b/lib/Headers/unwind.h
|
||||
@@ -23,9 +23,6 @@
|
||||
|
||||
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
|
||||
|
@ -31,3 +40,6 @@ index 90aca16..ef96969 100644
|
|||
#endif
|
||||
|
||||
-#endif /* __CLANG_UNWIND_H */
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,37 +1,47 @@
|
|||
diff --git lib/Driver/ToolChains.cpp lib/Driver/ToolChains.cpp
|
||||
index 07fc182..232f99e 100644
|
||||
--- lib/Driver/ToolChains.cpp
|
||||
+++ lib/Driver/ToolChains.cpp
|
||||
@@ -1296,7 +1296,10 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
|
||||
static const char *const ARMTriples[] = { "arm-linux-gnueabi",
|
||||
"arm-linux-androideabi" };
|
||||
static const char *const ARMHFTriples[] = { "arm-linux-gnueabihf",
|
||||
- "armv7hl-redhat-linux-gnueabi" };
|
||||
+ "armv7hl-redhat-linux-gnueabi",
|
||||
+ "armv6-linux-musleabihf",
|
||||
+ "armv7-linux-musleabihf",
|
||||
+ "arm-linux-musleabihf" };
|
||||
static const char *const ARMebLibDirs[] = { "/lib" };
|
||||
static const char *const ARMebTriples[] = { "armeb-linux-gnueabi",
|
||||
"armeb-linux-androideabi" };
|
||||
@@ -1308,7 +1311,8 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
|
||||
"x86_64-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-linux-gnu",
|
||||
"x86_64-redhat-linux6E", "x86_64-redhat-linux", "x86_64-suse-linux",
|
||||
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux",
|
||||
- "x86_64-linux-android", "x86_64-unknown-linux"
|
||||
+ "x86_64-linux-android", "x86_64-linux-musl", "x86_64-pc-linux-musl",
|
||||
+ "x86_64-unknown-linux"
|
||||
};
|
||||
static const char *const X32LibDirs[] = { "/libx32" };
|
||||
static const char *const X86LibDirs[] = { "/lib32", "/lib" };
|
||||
@@ -1316,7 +1320,9 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
|
||||
"i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu", "i386-linux-gnu",
|
||||
"i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux",
|
||||
"i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux",
|
||||
- "i686-montavista-linux", "i686-linux-android", "i586-linux-gnu"
|
||||
+ "i686-montavista-linux", "i686-linux-android", "i586-linux-gnu",
|
||||
+ "i486-linux-musl", "i486-pc-linux-musl",
|
||||
+ "i686-linux-musl", "i686-pc-linux-musl"
|
||||
};
|
||||
From 420899503863473ba40ba68a81134dbcb3c330e5 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:24:52 +0200
|
||||
Subject: [PATCH 3/7] add musl triples
|
||||
|
||||
---
|
||||
lib/Driver/ToolChains.cpp | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
|
||||
index 15e36a1..3cd6dd1 100644
|
||||
--- a/lib/Driver/ToolChains.cpp
|
||||
+++ b/lib/Driver/ToolChains.cpp
|
||||
@@ -1275,7 +1275,10 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
|
||||
static const char *const ARMTriples[] = {"arm-linux-gnueabi",
|
||||
"arm-linux-androideabi"};
|
||||
static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
|
||||
- "armv7hl-redhat-linux-gnueabi"};
|
||||
+ "armv7hl-redhat-linux-gnueabi",
|
||||
+ "armv6-linux-musleabihf",
|
||||
+ "armv7-linux-musleabihf",
|
||||
+ "arm-linux-musleabihf" };
|
||||
static const char *const ARMebLibDirs[] = {"/lib"};
|
||||
static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
|
||||
"armeb-linux-androideabi"};
|
||||
@@ -1289,6 +1292,7 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
|
||||
"x86_64-redhat-linux", "x86_64-suse-linux",
|
||||
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
|
||||
"x86_64-slackware-linux", "x86_64-linux-android",
|
||||
+ "x86_64-linux-musl", "x86_64-pc-linux-musl",
|
||||
"x86_64-unknown-linux"};
|
||||
static const char *const X32LibDirs[] = {"/libx32"};
|
||||
static const char *const X86LibDirs[] = {"/lib32", "/lib"};
|
||||
@@ -1297,7 +1301,9 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
|
||||
"i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
|
||||
"i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
|
||||
"i486-slackware-linux", "i686-montavista-linux", "i686-linux-android",
|
||||
- "i586-linux-gnu"};
|
||||
+ "i586-linux-gnu", "i486-linux-musl", "i486-pc-linux-musl",
|
||||
+ "i686-linux-musl", "i686-pc-linux-musl"
|
||||
+ };
|
||||
|
||||
static const char *const MIPSLibDirs[] = { "/lib" };
|
||||
static const char *const MIPSLibDirs[] = {"/lib"};
|
||||
static const char *const MIPSTriples[] = {
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,47 +1,71 @@
|
|||
diff --git lib/Driver/Tools.cpp lib/Driver/Tools.cpp
|
||||
index 75eef9e..4f32678 100644
|
||||
--- lib/Driver/Tools.cpp
|
||||
+++ lib/Driver/Tools.cpp
|
||||
@@ -7282,8 +7282,14 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
|
||||
From edd1fc14b3c3e05b14c3ab1917515a11bc477aca Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:33:28 +0200
|
||||
Subject: [PATCH 4/7] fix dynamic linker paths
|
||||
|
||||
---
|
||||
lib/Driver/Tools.cpp | 43 ++++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 38 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
|
||||
index 19ebbb9..4384829 100644
|
||||
--- a/lib/Driver/Tools.cpp
|
||||
+++ b/lib/Driver/Tools.cpp
|
||||
@@ -7958,7 +7958,14 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
|
||||
return "/system/bin/linker64";
|
||||
else
|
||||
return "/system/bin/linker";
|
||||
- } else if (ToolChain.getArch() == llvm::Triple::x86 ||
|
||||
- ToolChain.getArch() == llvm::Triple::sparc)
|
||||
+ } else if (ToolChain.getArch() == llvm::Triple::x86) {
|
||||
- } else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::sparc ||
|
||||
+ } else if (Arch == llvm::Triple::x86) {
|
||||
+ switch (ToolChain.getTriple().getEnvironment()) {
|
||||
+ case llvm::Triple::Musl:
|
||||
+ return "/lib/ld-musl-i386.so.1";
|
||||
+ default:
|
||||
+ return "/lib/ld-linux.so.2";
|
||||
+ }
|
||||
+ } else if (ToolChain.getArch() == llvm::Triple::sparc)
|
||||
+ case llvm::Triple::Musl:
|
||||
+ return "/lib/ld-musl-i386.so.1";
|
||||
+ default:
|
||||
+ return "/lib/ld-linux.so.2";
|
||||
+ }
|
||||
+ } else if (Arch == llvm::Triple::sparc ||
|
||||
Arch == llvm::Triple::sparcel)
|
||||
return "/lib/ld-linux.so.2";
|
||||
else if (ToolChain.getArch() == llvm::Triple::aarch64)
|
||||
return "/lib/ld-linux-aarch64.so.1";
|
||||
@@ -7291,10 +7297,17 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
|
||||
return "/lib/ld-linux-aarch64_be.so.1";
|
||||
else if (ToolChain.getArch() == llvm::Triple::arm ||
|
||||
ToolChain.getArch() == llvm::Triple::thumb) {
|
||||
- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
|
||||
- return "/lib/ld-linux-armhf.so.3";
|
||||
- else
|
||||
+ switch (ToolChain.getTriple().getEnvironment()) {
|
||||
+ case llvm::Triple::Musl:
|
||||
+ case llvm::Triple::MuslEABI:
|
||||
+ return "/lib/ld-musl-arm.so.1";
|
||||
+ case llvm::Triple::MuslEABIHF:
|
||||
+ return "/lib/ld-musl-armhf.so.1";
|
||||
+ case llvm::Triple::GNUEABIHF:
|
||||
+ return "/lib/ld-linux-armhf.so.1";
|
||||
+ default:
|
||||
return "/lib/ld-linux.so.3";
|
||||
+ }
|
||||
} else if (ToolChain.getArch() == llvm::Triple::armeb ||
|
||||
ToolChain.getArch() == llvm::Triple::thumbeb) {
|
||||
if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
|
||||
@@ -7339,8 +7352,14 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
|
||||
else if (ToolChain.getArch() == llvm::Triple::x86_64 &&
|
||||
else if (Arch == llvm::Triple::aarch64)
|
||||
@@ -7970,14 +7977,34 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
|
||||
tools::arm::getARMFloatABI(ToolChain.getDriver(), Args, ToolChain.getTriple()) == "hard")
|
||||
return "/lib/ld-linux-armhf.so.3";
|
||||
else
|
||||
- return "/lib/ld-linux.so.3";
|
||||
+ switch (ToolChain.getTriple().getEnvironment()) {
|
||||
+ case llvm::Triple::Musl:
|
||||
+ case llvm::Triple::MuslEABI:
|
||||
+ return "/lib/ld-musl-arm.so.1";
|
||||
+ case llvm::Triple::MuslEABIHF:
|
||||
+ return "/lib/ld-musl-armhf.so.1";
|
||||
+ case llvm::Triple::GNUEABIHF:
|
||||
+ return "/lib/ld-linux-armhf.so.1";
|
||||
+ default:
|
||||
+ return "/lib/ld-linux.so.3";
|
||||
+ }
|
||||
} else if (Arch == llvm::Triple::armeb || Arch == llvm::Triple::thumbeb) {
|
||||
// TODO: check which dynamic linker name.
|
||||
if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF ||
|
||||
tools::arm::getARMFloatABI(ToolChain.getDriver(), Args, ToolChain.getTriple()) == "hard")
|
||||
return "/lib/ld-linux-armhf.so.3";
|
||||
else
|
||||
- return "/lib/ld-linux.so.3";
|
||||
+ switch (ToolChain.getTriple().getEnvironment()) {
|
||||
+ case llvm::Triple::Musl:
|
||||
+ case llvm::Triple::MuslEABI:
|
||||
+ return "/lib/ld-musl-arm.so.1";
|
||||
+ case llvm::Triple::MuslEABIHF:
|
||||
+ return "/lib/ld-musl-armhf.so.1";
|
||||
+ case llvm::Triple::GNUEABIHF:
|
||||
+ return "/lib/ld-linux-armhf.so.1";
|
||||
+ default:
|
||||
+ return "/lib/ld-linux.so.3";
|
||||
+ }
|
||||
} else if (Arch == llvm::Triple::mips || Arch == llvm::Triple::mipsel ||
|
||||
Arch == llvm::Triple::mips64 || Arch == llvm::Triple::mips64el) {
|
||||
StringRef CPUName;
|
||||
@@ -8014,8 +8041,14 @@ static std::string getLinuxDynamicLinker(const ArgList &Args,
|
||||
else if (Arch == llvm::Triple::x86_64 &&
|
||||
ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUX32)
|
||||
return "/libx32/ld-linux-x32.so.2";
|
||||
- else
|
||||
|
@ -57,3 +81,6 @@ index 75eef9e..4f32678 100644
|
|||
}
|
||||
|
||||
static void AddRunTimeLibs(const ToolChain &TC, const Driver &D,
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,14 +1,26 @@
|
|||
diff --git lib/Driver/Tools.cpp lib/Driver/Tools.cpp
|
||||
index 3e71522..5a5cba7 100644
|
||||
--- lib/Driver/Tools.cpp
|
||||
+++ lib/Driver/Tools.cpp
|
||||
@@ -3978,7 +3978,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
From 7024157ee8c63e3d892e3bcac8bbe73b4dd92bbd Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:35:39 +0200
|
||||
Subject: [PATCH 5/7] no use cxa atexit
|
||||
|
||||
---
|
||||
lib/Driver/Tools.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
|
||||
index 4384829..b6bf7fc 100644
|
||||
--- a/lib/Driver/Tools.cpp
|
||||
+++ b/lib/Driver/Tools.cpp
|
||||
@@ -4435,7 +4435,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
options::OPT_fno_use_cxa_atexit,
|
||||
!IsWindowsCygnus && !IsWindowsGNU &&
|
||||
getToolChain().getArch() != llvm::Triple::hexagon &&
|
||||
- getToolChain().getArch() != llvm::Triple::xcore) ||
|
||||
+ getToolChain().getArch() != llvm::Triple::xcore &&
|
||||
+ getToolChain().getTriple().getEnvironment() != llvm::Triple::Musl) ||
|
||||
getToolChain().getArch() != llvm::Triple::hexagon &&
|
||||
- getToolChain().getArch() != llvm::Triple::xcore) ||
|
||||
+ getToolChain().getArch() != llvm::Triple::xcore &&
|
||||
+ getToolChain().getTriple().getEnvironment() != llvm::Triple::Musl) ||
|
||||
KernelOrKext)
|
||||
CmdArgs.push_back("-fno-use-cxa-atexit");
|
||||
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,14 +1,26 @@
|
|||
diff --git lib/Driver/ToolChains.cpp lib/Driver/ToolChains.cpp
|
||||
index 7b15c54..3155ade 100644
|
||||
--- lib/Driver/ToolChains.cpp
|
||||
+++ lib/Driver/ToolChains.cpp
|
||||
@@ -2088,7 +2088,8 @@ void Generic_ELF::addClangTargetOptions(const ArgList &DriverArgs,
|
||||
From 886d662712b1cfb5cf7b84bfd96fb5f8b58069d5 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:38:44 +0200
|
||||
Subject: [PATCH 6/7] musl use init array
|
||||
|
||||
---
|
||||
lib/Driver/ToolChains.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
|
||||
index 3cd6dd1..ef77df8 100644
|
||||
--- a/lib/Driver/ToolChains.cpp
|
||||
+++ b/lib/Driver/ToolChains.cpp
|
||||
@@ -2071,7 +2071,8 @@ void Generic_ELF::addClangTargetOptions(const ArgList &DriverArgs,
|
||||
getTriple().getArch() == llvm::Triple::aarch64_be ||
|
||||
(getTriple().getOS() == llvm::Triple::Linux &&
|
||||
(!V.isOlderThan(4, 7, 0) ||
|
||||
- getTriple().getEnvironment() == llvm::Triple::Android));
|
||||
- getTriple().getEnvironment() == llvm::Triple::Android)) ||
|
||||
+ getTriple().getEnvironment() == llvm::Triple::Android ||
|
||||
+ getTriple().getEnvironment() == llvm::Triple::Musl));
|
||||
+ getTriple().getEnvironment() == llvm::Triple::Musl)) ||
|
||||
getTriple().getOS() == llvm::Triple::NaCl;
|
||||
|
||||
if (DriverArgs.hasFlag(options::OPT_fuse_init_array,
|
||||
options::OPT_fno_use_init_array,
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
--- lib/Driver/Tools.cpp 2015-08-11 13:59:22.324639527 +0200
|
||||
+++ lib/Driver/Tools.cpp 2015-08-11 13:59:34.058576064 +0200
|
||||
@@ -2158,8 +2158,6 @@
|
||||
From 75d91fe8d9219007069af02301565173bd5d0612 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:39:20 +0200
|
||||
Subject: [PATCH 7/7] remove lgcc when using compiler rt
|
||||
|
||||
---
|
||||
lib/Driver/Tools.cpp | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
|
||||
index b6bf7fc..665961a 100644
|
||||
--- a/lib/Driver/Tools.cpp
|
||||
+++ b/lib/Driver/Tools.cpp
|
||||
@@ -2389,8 +2389,6 @@ static void addClangRT(const ToolChain &TC, const ArgList &Args,
|
||||
CmdArgs.push_back(Args.MakeArgString(getCompilerRT(TC, "builtins")));
|
||||
|
||||
if (!TC.getTriple().isOSWindows()) {
|
||||
|
@ -9,3 +20,6 @@
|
|||
if (TC.getDriver().CCCIsCXX())
|
||||
CmdArgs.push_back("-lgcc_eh");
|
||||
}
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
diff --git lib/interception/interception_linux.cc lib/interception/interception_linux.cc
|
||||
From 7f278344034eab699a90fab3d313048d1de44012 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:45:11 +0200
|
||||
Subject: [PATCH 2/2] musl no dlvsym
|
||||
|
||||
---
|
||||
lib/interception/interception_linux.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
|
||||
index 6e908ac..7fcf2a6 100644
|
||||
--- lib/interception/interception_linux.cc
|
||||
+++ lib/interception/interception_linux.cc
|
||||
--- a/lib/interception/interception_linux.cc
|
||||
+++ b/lib/interception/interception_linux.cc
|
||||
@@ -24,7 +24,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
|
||||
return real == wrapper;
|
||||
}
|
||||
|
@ -11,3 +20,6 @@ index 6e908ac..7fcf2a6 100644
|
|||
void *GetFuncAddrVer(const char *func_name, const char *ver) {
|
||||
return dlvsym(RTLD_NEXT, func_name, ver);
|
||||
}
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,25 +1,31 @@
|
|||
diff --git lib/Makefile.mk lib/Makefile.mk
|
||||
index ed9690d..aacb2b1 100644
|
||||
--- lib/Makefile.mk
|
||||
+++ lib/Makefile.mk
|
||||
@@ -10,13 +10,13 @@
|
||||
From 146c027efdd839b7173a922a43c4ab7003bdc160 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:44:22 +0200
|
||||
Subject: [PATCH 1/2] disable sanitizers
|
||||
|
||||
---
|
||||
lib/Makefile.mk | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/lib/Makefile.mk b/lib/Makefile.mk
|
||||
index 7eb6489..c0efac3 100644
|
||||
--- a/lib/Makefile.mk
|
||||
+++ b/lib/Makefile.mk
|
||||
@@ -10,10 +10,10 @@
|
||||
SubDirs :=
|
||||
|
||||
# Add submodules.
|
||||
-SubDirs += asan
|
||||
+# SubDirs += asan
|
||||
SubDirs += builtins
|
||||
-SubDirs += dfsan
|
||||
+# SubDirs += dfsan
|
||||
SubDirs += interception
|
||||
-SubDirs += lsan
|
||||
-SubDirs += msan
|
||||
+# SubDirs += lsan
|
||||
+# SubDirs += msan
|
||||
SubDirs += profile
|
||||
-SubDirs += sanitizer_common
|
||||
-SubDirs += tsan
|
||||
-SubDirs += ubsan
|
||||
+# SubDirs += sanitizer_common
|
||||
+# SubDirs += tsan
|
||||
+# SubDirs += ubsan
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
--- source/Plugins/Process/Linux/ProcessMonitor.cpp.orig
|
||||
+++ source/Plugins/Process/Linux/ProcessMonitor.cpp
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <sys/procfs.h>
|
||||
#endif
|
||||
#include <sys/ptrace.h>
|
||||
+#ifdef __aarch64__
|
||||
+#include <asm/ptrace.h>
|
||||
+#endif
|
||||
#include <sys/uio.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/syscall.h>
|
||||
--- source/Plugins/Process/Linux/NativeProcessLinux.cpp.orig
|
||||
+++ source/Plugins/Process/Linux/NativeProcessLinux.cpp
|
||||
@@ -29,6 +29,9 @@
|
||||
#include <sys/procfs.h>
|
||||
#endif
|
||||
#include <sys/ptrace.h>
|
||||
+#ifdef __aarch64__
|
||||
+#include <asm/ptrace.h>
|
||||
+#endif
|
||||
#include <sys/uio.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/syscall.h>
|
|
@ -1,5 +1,20 @@
|
|||
--- source/Core/ConnectionSharedMemory.cpp.orig 2015-05-07 10:52:36.554392575 +0200
|
||||
+++ source/Core/ConnectionSharedMemory.cpp 2015-05-07 10:52:51.674373757 +0200
|
||||
From 13b33959b864e3697e8dad002577321de13f4cc9 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 23:00:56 +0200
|
||||
Subject: [PATCH] fix musl
|
||||
|
||||
---
|
||||
source/Core/ConnectionSharedMemory.cpp | 1 +
|
||||
source/Host/common/FileSpec.cpp | 1 +
|
||||
source/Host/linux/Host.cpp | 2 +-
|
||||
source/Host/linux/HostThreadLinux.cpp | 2 ++
|
||||
source/Plugins/Process/Linux/Procfs.h | 2 +-
|
||||
5 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/Core/ConnectionSharedMemory.cpp b/source/Core/ConnectionSharedMemory.cpp
|
||||
index 77daeb1..36e9bc7 100644
|
||||
--- a/source/Core/ConnectionSharedMemory.cpp
|
||||
+++ b/source/Core/ConnectionSharedMemory.cpp
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifdef _WIN32
|
||||
#include "lldb/Host/windows/windows.h"
|
||||
|
@ -8,8 +23,10 @@
|
|||
#include <sys/file.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
--- source/Host/common/FileSpec.cpp.orig 2015-05-07 11:12:29.544965335 +0200
|
||||
+++ source/Host/common/FileSpec.cpp 2015-05-07 11:13:32.999890912 +0200
|
||||
diff --git a/source/Host/common/FileSpec.cpp b/source/Host/common/FileSpec.cpp
|
||||
index ceb094b..a48620d 100644
|
||||
--- a/source/Host/common/FileSpec.cpp
|
||||
+++ b/source/Host/common/FileSpec.cpp
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "lldb/Host/windows/windows.h"
|
||||
#endif
|
||||
|
@ -18,30 +35,10 @@
|
|||
#ifndef _MSC_VER
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
--- source/Plugins/Process/Linux/NativeProcessLinux.cpp.orig 2015-05-07 11:33:00.109509237 +0200
|
||||
+++ source/Plugins/Process/Linux/NativeProcessLinux.cpp 2015-05-07 11:36:17.726275750 +0200
|
||||
@@ -68,7 +68,7 @@
|
||||
#include "ProcFileReader.h"
|
||||
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
|
||||
|
||||
-#ifdef __ANDROID__
|
||||
+#ifndef __GLIBC__
|
||||
#define __ptrace_request int
|
||||
#define PT_DETACH PTRACE_DETACH
|
||||
#endif
|
||||
--- source/Plugins/Process/Linux/ProcessMonitor.cpp.orig 2015-05-07 11:48:17.954425191 +0200
|
||||
+++ source/Plugins/Process/Linux/ProcessMonitor.cpp 2015-05-07 11:48:42.097396679 +0200
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
|
||||
#include "ProcessMonitor.h"
|
||||
|
||||
-#ifdef __ANDROID__
|
||||
+#ifndef __GLIBC__
|
||||
#define __ptrace_request int
|
||||
#define PT_DETACH PTRACE_DETACH
|
||||
#endif
|
||||
--- source/Host/linux/Host.cpp.orig 2015-05-07 11:59:26.524631749 +0200
|
||||
+++ source/Host/linux/Host.cpp 2015-05-07 12:00:07.852582643 +0200
|
||||
diff --git a/source/Host/linux/Host.cpp b/source/Host/linux/Host.cpp
|
||||
index 6217b1d..edcfa4a 100644
|
||||
--- a/source/Host/linux/Host.cpp
|
||||
+++ b/source/Host/linux/Host.cpp
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
|
@ -51,27 +48,11 @@
|
|||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
@@ -380,7 +380,7 @@ Host::GetProcessInfo (lldb::pid_t pid, P
|
||||
void
|
||||
Host::Backtrace (Stream &strm, uint32_t max_frames)
|
||||
{
|
||||
-#ifndef __ANDROID__
|
||||
+#ifdef __GLIBC__
|
||||
if (max_frames > 0)
|
||||
{
|
||||
std::vector<void *> frame_buffer (max_frames, NULL);
|
||||
@@ -395,7 +395,7 @@ Host::Backtrace (Stream &strm, uint32_t
|
||||
}
|
||||
}
|
||||
#else
|
||||
- assert(false && "::backtrace() not supported on Android");
|
||||
+ assert(false && "::backtrace() only supported with glibc");
|
||||
#endif
|
||||
}
|
||||
|
||||
--- source/Host/linux/HostThreadLinux.cpp.orig 2015-05-07 12:09:24.855925281 +0200
|
||||
+++ source/Host/linux/HostThreadLinux.cpp 2015-05-07 12:12:10.495735534 +0200
|
||||
@@ -30,7 +30,9 @@ HostThreadLinux::HostThreadLinux(lldb::t
|
||||
diff --git a/source/Host/linux/HostThreadLinux.cpp b/source/Host/linux/HostThreadLinux.cpp
|
||||
index 8151215..a849e51 100644
|
||||
--- a/source/Host/linux/HostThreadLinux.cpp
|
||||
+++ b/source/Host/linux/HostThreadLinux.cpp
|
||||
@@ -30,7 +30,9 @@ HostThreadLinux::HostThreadLinux(lldb::thread_t thread)
|
||||
void
|
||||
HostThreadLinux::SetName(lldb::thread_t thread, llvm::StringRef name)
|
||||
{
|
||||
|
@ -81,3 +62,19 @@
|
|||
}
|
||||
|
||||
void
|
||||
diff --git a/source/Plugins/Process/Linux/Procfs.h b/source/Plugins/Process/Linux/Procfs.h
|
||||
index 1b383fb..4ebe390 100644
|
||||
--- a/source/Plugins/Process/Linux/Procfs.h
|
||||
+++ b/source/Plugins/Process/Linux/Procfs.h
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <sys/ptrace.h>
|
||||
|
||||
-#ifdef __ANDROID__
|
||||
+#ifndef __GLIBC__
|
||||
#if defined (__arm64__) || defined (__aarch64__)
|
||||
typedef unsigned long elf_greg_t;
|
||||
typedef elf_greg_t elf_gregset_t[(sizeof (struct user_pt_regs) / sizeof(elf_greg_t))];
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
diff --git include/llvm/IR/LegacyPassNameParser.h include/llvm/IR/LegacyPassNameParser.h
|
||||
index e2e4912..a07e3fd 100644
|
||||
--- include/llvm/IR/LegacyPassNameParser.h
|
||||
+++ include/llvm/IR/LegacyPassNameParser.h
|
||||
@@ -95,6 +95,8 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
+EXTERN_TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>);
|
||||
+
|
||||
///===----------------------------------------------------------------------===//
|
||||
/// FilteredPassNameParser class - Make use of the pass registration
|
||||
/// mechanism to automatically add a command line argument to opt for
|
||||
diff --git lib/IR/Pass.cpp lib/IR/Pass.cpp
|
||||
index 91d86ae..00ce223 100644
|
||||
--- lib/IR/Pass.cpp
|
||||
+++ lib/IR/Pass.cpp
|
||||
@@ -234,6 +234,8 @@ PassNameParser::~PassNameParser() {
|
||||
// attempting to remove the registration listener is an error.
|
||||
}
|
||||
|
||||
+TEMPLATE_INSTANTIATION(class cl::parser<const PassInfo *>);
|
||||
+
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AnalysisUsage Class Implementation
|
||||
//
|
|
@ -1,8 +1,20 @@
|
|||
diff --git include/llvm/ADT/Triple.h include/llvm/ADT/Triple.h
|
||||
index 8a68599..072623c 100644
|
||||
--- include/llvm/ADT/Triple.h
|
||||
+++ include/llvm/ADT/Triple.h
|
||||
@@ -154,6 +154,10 @@ public:
|
||||
From 58be6f7fb164dbf42fdd28ce6474dbe4bc5ca401 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 21:53:42 +0200
|
||||
Subject: [PATCH 2/3] musl triple
|
||||
|
||||
---
|
||||
include/llvm/ADT/Triple.h | 4 ++++
|
||||
lib/Support/Triple.cpp | 6 ++++++
|
||||
lib/Target/ARM/ARMSubtarget.h | 3 +++
|
||||
lib/Target/ARM/ARMTargetMachine.cpp | 2 ++
|
||||
4 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h
|
||||
index 947812d..d2a6bbe 100644
|
||||
--- a/include/llvm/ADT/Triple.h
|
||||
+++ b/include/llvm/ADT/Triple.h
|
||||
@@ -167,6 +167,10 @@ public:
|
||||
EABIHF,
|
||||
Android,
|
||||
|
||||
|
@ -13,11 +25,11 @@ index 8a68599..072623c 100644
|
|||
MSVC,
|
||||
Itanium,
|
||||
Cygnus,
|
||||
diff --git lib/Support/Triple.cpp lib/Support/Triple.cpp
|
||||
index 0838e90..4be78e5 100644
|
||||
--- lib/Support/Triple.cpp
|
||||
+++ lib/Support/Triple.cpp
|
||||
@@ -175,6 +175,9 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
|
||||
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
|
||||
index c6646fb..8d47ad9 100644
|
||||
--- a/lib/Support/Triple.cpp
|
||||
+++ b/lib/Support/Triple.cpp
|
||||
@@ -192,6 +192,9 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
|
||||
case CODE16: return "code16";
|
||||
case EABI: return "eabi";
|
||||
case EABIHF: return "eabihf";
|
||||
|
@ -27,7 +39,7 @@ index 0838e90..4be78e5 100644
|
|||
case Android: return "android";
|
||||
case MSVC: return "msvc";
|
||||
case Itanium: return "itanium";
|
||||
@@ -375,6 +378,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
|
||||
@@ -427,6 +430,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
|
||||
.StartsWith("code16", Triple::CODE16)
|
||||
.StartsWith("gnu", Triple::GNU)
|
||||
.StartsWith("android", Triple::Android)
|
||||
|
@ -37,11 +49,11 @@ index 0838e90..4be78e5 100644
|
|||
.StartsWith("msvc", Triple::MSVC)
|
||||
.StartsWith("itanium", Triple::Itanium)
|
||||
.StartsWith("cygnus", Triple::Cygnus)
|
||||
diff --git lib/Target/ARM/ARMSubtarget.h lib/Target/ARM/ARMSubtarget.h
|
||||
index dbacd4d..b330be5 100644
|
||||
--- lib/Target/ARM/ARMSubtarget.h
|
||||
+++ lib/Target/ARM/ARMSubtarget.h
|
||||
@@ -369,8 +369,10 @@ public:
|
||||
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h
|
||||
index dd101df..c5bdcca 100644
|
||||
--- a/lib/Target/ARM/ARMSubtarget.h
|
||||
+++ b/lib/Target/ARM/ARMSubtarget.h
|
||||
@@ -381,8 +381,10 @@ public:
|
||||
bool isTargetEHABICompatible() const {
|
||||
return (TargetTriple.getEnvironment() == Triple::EABI ||
|
||||
TargetTriple.getEnvironment() == Triple::GNUEABI ||
|
||||
|
@ -52,7 +64,7 @@ index dbacd4d..b330be5 100644
|
|||
TargetTriple.getEnvironment() == Triple::Android) &&
|
||||
!isTargetDarwin() && !isTargetWindows();
|
||||
}
|
||||
@@ -379,6 +381,7 @@ public:
|
||||
@@ -391,6 +393,7 @@ public:
|
||||
// FIXME: this is invalid for WindowsCE
|
||||
return TargetTriple.getEnvironment() == Triple::GNUEABIHF ||
|
||||
TargetTriple.getEnvironment() == Triple::EABIHF ||
|
||||
|
@ -60,11 +72,11 @@ index dbacd4d..b330be5 100644
|
|||
isTargetWindows();
|
||||
}
|
||||
bool isTargetAndroid() const {
|
||||
diff --git lib/Target/ARM/ARMTargetMachine.cpp lib/Target/ARM/ARMTargetMachine.cpp
|
||||
index 7a8181b..ce5ceb9 100644
|
||||
--- lib/Target/ARM/ARMTargetMachine.cpp
|
||||
+++ lib/Target/ARM/ARMTargetMachine.cpp
|
||||
@@ -87,6 +87,8 @@ computeTargetABI(const Triple &TT, StringRef CPU,
|
||||
diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp
|
||||
index 93495d6..56e6b7f 100644
|
||||
--- a/lib/Target/ARM/ARMTargetMachine.cpp
|
||||
+++ b/lib/Target/ARM/ARMTargetMachine.cpp
|
||||
@@ -97,6 +97,8 @@ computeTargetABI(const Triple &TT, StringRef CPU,
|
||||
case llvm::Triple::GNUEABIHF:
|
||||
case llvm::Triple::EABIHF:
|
||||
case llvm::Triple::EABI:
|
||||
|
@ -73,3 +85,6 @@ index 7a8181b..ce5ceb9 100644
|
|||
TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS;
|
||||
break;
|
||||
case llvm::Triple::GNU:
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,9 +1,22 @@
|
|||
diff --git include/llvm/Target/TargetLibraryInfo.h include/llvm/Target/TargetLibraryInfo.h
|
||||
index 46f87b9..41ac5fd 100644
|
||||
--- include/llvm/Target/TargetLibraryInfo.h
|
||||
+++ include/llvm/Target/TargetLibraryInfo.h
|
||||
@@ -13,6 +13,15 @@
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:03:02 +0200
|
||||
Subject: [PATCH 3/3] musl
|
||||
|
||||
---
|
||||
include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
|
||||
lib/Analysis/TargetLibraryInfo.cpp | 5 +++--
|
||||
lib/Support/DynamicLibrary.cpp | 2 +-
|
||||
lib/Support/Unix/Signals.inc | 6 +++---
|
||||
utils/unittest/googletest/src/gtest.cc | 1 +
|
||||
5 files changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
index e0a1ee3..465b65a 100644
|
||||
--- a/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
+++ b/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
@@ -18,6 +18,15 @@
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
||||
+#undef fopen64
|
||||
|
@ -16,39 +29,13 @@ index 46f87b9..41ac5fd 100644
|
|||
+#undef tmpfile64
|
||||
+
|
||||
namespace llvm {
|
||||
class Triple;
|
||||
|
||||
diff --git lib/Support/DynamicLibrary.cpp lib/Support/DynamicLibrary.cpp
|
||||
index d2b551e..4634a13 100644
|
||||
--- lib/Support/DynamicLibrary.cpp
|
||||
+++ lib/Support/DynamicLibrary.cpp
|
||||
@@ -138,7 +138,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
|
||||
|
||||
// This macro returns the address of a well-known, explicit symbol
|
||||
#define EXPLICIT_SYMBOL(SYM) \
|
||||
- if (!strcmp(symbolName, #SYM)) return &SYM
|
||||
+ if (!strcmp(symbolName, #SYM)) return (void *) &SYM
|
||||
|
||||
// On linux we have a weird situation. The stderr/out/in symbols are both
|
||||
// macros and global variables because of standards requirements. So, we
|
||||
diff --git lib/Support/Unix/Signals.inc lib/Support/Unix/Signals.inc
|
||||
index e8f4643..8a320ef 100644
|
||||
--- lib/Support/Unix/Signals.inc
|
||||
+++ lib/Support/Unix/Signals.inc
|
||||
@@ -416,7 +416,7 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
||||
// On glibc systems we have the 'backtrace' function, which works nicely, but
|
||||
// doesn't demangle symbols.
|
||||
void llvm::sys::PrintStackTrace(FILE *FD) {
|
||||
-#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||
+#if defined(__GLIBC__) && defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||
static void* StackTrace[256];
|
||||
// Use backtrace() to output a backtrace on Linux systems with glibc.
|
||||
int depth = backtrace(StackTrace,
|
||||
diff --git lib/Target/TargetLibraryInfo.cpp lib/Target/TargetLibraryInfo.cpp
|
||||
index c0abdbd..ed908f8 100644
|
||||
--- lib/Target/TargetLibraryInfo.cpp
|
||||
+++ lib/Target/TargetLibraryInfo.cpp
|
||||
@@ -664,14 +664,15 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
|
||||
/// VecDesc - Describes a possible vectorization of a function.
|
||||
/// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
|
||||
diff --git a/lib/Analysis/TargetLibraryInfo.cpp b/lib/Analysis/TargetLibraryInfo.cpp
|
||||
index 635c50c..863f4a0 100644
|
||||
--- a/lib/Analysis/TargetLibraryInfo.cpp
|
||||
+++ b/lib/Analysis/TargetLibraryInfo.cpp
|
||||
@@ -336,14 +336,15 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
|
||||
}
|
||||
|
||||
// The following functions are available on at least Linux:
|
||||
|
@ -66,10 +53,54 @@ index c0abdbd..ed908f8 100644
|
|||
TLI.setUnavailable(LibFunc::fopen64);
|
||||
TLI.setUnavailable(LibFunc::fseeko64);
|
||||
TLI.setUnavailable(LibFunc::fstat64);
|
||||
diff --git utils/unittest/googletest/src/gtest.cc utils/unittest/googletest/src/gtest.cc
|
||||
index bf850c6..9e9088c 100644
|
||||
--- utils/unittest/googletest/src/gtest.cc
|
||||
+++ utils/unittest/googletest/src/gtest.cc
|
||||
diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp
|
||||
index 9a7aeb5..e21750d 100644
|
||||
--- a/lib/Support/DynamicLibrary.cpp
|
||||
+++ b/lib/Support/DynamicLibrary.cpp
|
||||
@@ -138,7 +138,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
|
||||
|
||||
// This macro returns the address of a well-known, explicit symbol
|
||||
#define EXPLICIT_SYMBOL(SYM) \
|
||||
- if (!strcmp(symbolName, #SYM)) return &SYM
|
||||
+ if (!strcmp(symbolName, #SYM)) return (void *) &SYM
|
||||
|
||||
// On linux we have a weird situation. The stderr/out/in symbols are both
|
||||
// macros and global variables because of standards requirements. So, we
|
||||
diff --git a/lib/Support/Unix/Signals.inc b/lib/Support/Unix/Signals.inc
|
||||
index bfe2a3a..e8372d9 100644
|
||||
--- a/lib/Support/Unix/Signals.inc
|
||||
+++ b/lib/Support/Unix/Signals.inc
|
||||
@@ -117,7 +117,7 @@ static void RegisterHandlers() {
|
||||
// during handling an actual signal because you can't safely call new in a
|
||||
// signal handler.
|
||||
*SignalsMutex;
|
||||
-
|
||||
+
|
||||
// If the handlers are already registered, we're done.
|
||||
if (NumRegisteredSignals != 0) return;
|
||||
|
||||
@@ -164,7 +164,7 @@ static void RemoveFilesToRemove() {
|
||||
// super-user permissions.
|
||||
if (!S_ISREG(buf.st_mode))
|
||||
continue;
|
||||
-
|
||||
+
|
||||
// Otherwise, remove the file. We ignore any errors here as there is nothing
|
||||
// else we can do.
|
||||
unlink(path);
|
||||
@@ -430,7 +430,7 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth,
|
||||
// On glibc systems we have the 'backtrace' function, which works nicely, but
|
||||
// doesn't demangle symbols.
|
||||
void llvm::sys::PrintStackTrace(raw_ostream &OS) {
|
||||
-#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||
+#if defined(__GLIBC__) && defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||
static void* StackTrace[256];
|
||||
// Use backtrace() to output a backtrace on Linux systems with glibc.
|
||||
int depth = backtrace(StackTrace,
|
||||
diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc
|
||||
index 5780764..1d548c1 100644
|
||||
--- a/utils/unittest/googletest/src/gtest.cc
|
||||
+++ b/utils/unittest/googletest/src/gtest.cc
|
||||
@@ -120,6 +120,7 @@
|
||||
|
||||
#if GTEST_CAN_STREAM_RESULTS_
|
||||
|
@ -78,3 +109,6 @@ index bf850c6..9e9088c 100644
|
|||
# include <netdb.h> // NOLINT
|
||||
#endif
|
||||
|
||||
--
|
||||
2.5.1
|
||||
|
||||
|
|
|
@ -1,67 +1,74 @@
|
|||
# Template file for 'llvm'
|
||||
pkgname=llvm
|
||||
version=3.6.2
|
||||
revision=3
|
||||
version=3.7.0
|
||||
revision=1
|
||||
wrksrc="llvm-${version}.src"
|
||||
lib32disabled=yes
|
||||
configure_args="--disable-expensive-checks --disable-debug-runtime
|
||||
--enable-bindings=none --enable-optimized --enable-shared --enable-libffi
|
||||
--enable-llvmc-dynamic --disable-assertions --enable-keep-symbols
|
||||
--enable-experimental-targets=R600"
|
||||
--enable-experimental-targets=AMDGPU"
|
||||
short_desc="Low Level Virtual Machine"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="http://www.llvm.org"
|
||||
license="BSD"
|
||||
distfiles="
|
||||
http://www.llvm.org/releases/${version}/llvm-${version}.src.tar.xz
|
||||
http://www.llvm.org/releases/${version}/lld-${version}.src.tar.xz
|
||||
http://www.llvm.org/releases/${version}/lldb-${version}.src.tar.xz
|
||||
http://www.llvm.org/releases/${version}/cfe-${version}.src.tar.xz
|
||||
http://www.llvm.org/releases/${version}/clang-tools-extra-${version}.src.tar.xz
|
||||
http://www.llvm.org/releases/${version}/compiler-rt-${version}.src.tar.xz"
|
||||
checksum="
|
||||
f60dc158bfda6822de167e87275848969f0558b3134892ff54fced87e4667b94
|
||||
43f553c115563600577764262f1f2fac3740f0c639750f81e125963c90030b33
|
||||
940dc96b64919b7dbf32c37e0e1d1fc88cc18e1d4b3acf1e7dfe5a46eb6523a9
|
||||
ae9180466a23acb426d12444d866b266ff2289b266064d362462e44f8d4699f3
|
||||
6a0ec627d398f501ddf347060f7a2ccea4802b2494f1d4fd7bda3e0442d04feb
|
||||
0f2ff37d80a64575fecd8cf0d5c50f7ac1f837ddf700d1855412bb7547431d87"
|
||||
checksum="ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153
|
||||
f4d7505bc111044eaa4033af012221e492938405b62522b8e3e354c20c4b71e9
|
||||
4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc
|
||||
8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd
|
||||
227fa998520bc94974a428dc8e7654d9bdf277e5bc70d4064ebc05691bd62b0b"
|
||||
|
||||
# XXX Investigate ocaml bindings.
|
||||
hostmakedepends="groff perl python zlib-devel libffi-devel swig"
|
||||
makedepends="python-devel zlib-devel libffi-devel libedit-devel"
|
||||
|
||||
subpackages="clang clang-analyzer libllvm3.6 llvm-docs"
|
||||
subpackages="clang clang-analyzer libllvm3.7 llvm-docs"
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
# XXX fails to cross compile due to python
|
||||
subpackages+=" lldb lldb-devel"
|
||||
fi
|
||||
subpackages+=" lld"
|
||||
|
||||
post_extract() {
|
||||
# patches
|
||||
cd ${XBPS_BUILDDIR}/llvm-${version}.src
|
||||
for i in ${FILESDIR}/patches/llvm/llvm-*.patch; do
|
||||
patch -sNp0 -i ${i}
|
||||
msg_normal "Applying $i to llvm\n"
|
||||
patch -sNp1 -i ${i}
|
||||
done
|
||||
|
||||
cd ${XBPS_BUILDDIR}/compiler-rt-${version}.src
|
||||
for i in ${FILESDIR}/patches/compiler-rt/compiler-rt-*.patch; do
|
||||
patch -sNp0 -i ${i}
|
||||
msg_normal "Applying $i to compiler-rt\n"
|
||||
patch -sNp1 -i ${i}
|
||||
done
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) patch -sNp0 -i "${FILESDIR}/patches/compiler-rt/compiler-rt_musl_001-disable-sanitizers.patch" ;;
|
||||
*-musl) patch -sNp1 -i "${FILESDIR}/patches/compiler-rt/compiler-rt_musl_001-disable-sanitizers.patch" ;;
|
||||
esac
|
||||
# FIX BUG 22661
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*) sed -ri "/ifeq.*CompilerTargetArch/s#i386#i686#g" make/platform/clang_linux.mk ;;
|
||||
esac
|
||||
|
||||
cd ${XBPS_BUILDDIR}/cfe-${version}.src
|
||||
for i in ${FILESDIR}/patches/cfe/cfe-*.patch; do
|
||||
patch -sNp0 -i ${i}
|
||||
msg_normal "Applying $i to cfe\n"
|
||||
patch -sNp1 -i ${i}
|
||||
done
|
||||
|
||||
cd ${XBPS_BUILDDIR}/lldb-${version}.src
|
||||
for i in ${FILESDIR}/patches/lldb/*.patch; do
|
||||
patch -sNp0 -i ${i}
|
||||
msg_normal "Applying $i to lldb\n"
|
||||
patch -sNp1 -i ${i}
|
||||
done
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) sed -i 's|__ptrace_request|int|g' source/Plugins/Process/Linux/NativeProcessLinux.cpp ;;
|
||||
esac
|
||||
|
||||
# Move clang files into the llvm source.
|
||||
if [ -d ${XBPS_BUILDDIR}/cfe-${version}.src ]; then
|
||||
|
@ -71,10 +78,6 @@ post_extract() {
|
|||
if [ -d ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ]; then
|
||||
mv ${XBPS_BUILDDIR}/clang-tools-extra-${version}.src ${wrksrc}/tools/clang/extra
|
||||
fi
|
||||
# Move lld files into the llvm source
|
||||
if [ -d ${XBPS_BUILDDIR}/lld-${version}.src ]; then
|
||||
mv ${XBPS_BUILDDIR}/lld-${version}.src ${wrksrc}/tools/lld
|
||||
fi
|
||||
# Move lldb files into the llvm source.
|
||||
if [ -z "$CROSS_BUILD" -a -d ${XBPS_BUILDDIR}/lldb-${version}.src ]; then
|
||||
mv ${XBPS_BUILDDIR}/lldb-${version}.src ${wrksrc}/tools/lldb
|
||||
|
@ -105,6 +108,8 @@ do_build() {
|
|||
}
|
||||
|
||||
do_install() {
|
||||
vlicense LICENSE.TXT
|
||||
|
||||
cd build
|
||||
make DESTDIR=${DESTDIR} install
|
||||
|
||||
|
@ -161,7 +166,6 @@ clang_package() {
|
|||
vmove usr/bin/c-index-test
|
||||
vmove usr/lib/clang
|
||||
vmove "usr/lib/libclang*"
|
||||
vmove "usr/share/man/man1/*clang*"
|
||||
}
|
||||
}
|
||||
lldb_package() {
|
||||
|
@ -183,16 +187,6 @@ lldb-devel_package() {
|
|||
vmove "usr/lib/liblldb*.a"
|
||||
}
|
||||
}
|
||||
lld_package() {
|
||||
lib32disabled=yes
|
||||
short_desc+=" - Linker"
|
||||
homepage="http://lld.llvm.org"
|
||||
pkg_install() {
|
||||
vmove usr/include/lld
|
||||
vmove usr/bin/lld
|
||||
vmove "usr/lib/liblld*"
|
||||
}
|
||||
}
|
||||
llvm-docs_package() {
|
||||
noarch=yes
|
||||
short_desc+=" - documentation files"
|
||||
|
@ -200,7 +194,7 @@ llvm-docs_package() {
|
|||
vmove usr/share/doc
|
||||
}
|
||||
}
|
||||
libllvm3.6_package() {
|
||||
libllvm3.7_package() {
|
||||
short_desc+=" - runtime library"
|
||||
pkg_install() {
|
||||
vmove usr/lib/libLLVM-${version%.*}.so
|
||||
|
|
Loading…
Reference in New Issue