aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm
diff options
context:
space:
mode:
authorEivind Uggedal <eivind@uggedal.com>2014-05-14 07:27:29 +0000
committerEivind Uggedal <eivind@uggedal.com>2014-05-14 07:40:47 +0000
commit0a5c48b1b4463e09fdabb4482ec45be9eed4ebeb (patch)
tree3a9f4e92fbde4166d0d8121bc6d82328acbc6b92 /main/llvm
parent5e0cd59758c186de785bf81b95776ae57af16271 (diff)
downloadaports-0a5c48b1b4463e09fdabb4482ec45be9eed4ebeb.tar.bz2
aports-0a5c48b1b4463e09fdabb4482ec45be9eed4ebeb.tar.xz
main/llvm: upgrade to 3.4.1
Diffstat (limited to 'main/llvm')
-rw-r--r--main/llvm/APKBUILD30
-rw-r--r--main/llvm/llvm-3.3-alpine-linux.patch159
-rw-r--r--main/llvm/llvm-alpine-linux.patch136
-rw-r--r--main/llvm/llvm-musl.patch24
4 files changed, 158 insertions, 191 deletions
diff --git a/main/llvm/APKBUILD b/main/llvm/APKBUILD
index 19923dbc14..74a559ee94 100644
--- a/main/llvm/APKBUILD
+++ b/main/llvm/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=llvm
-pkgver=3.3
-pkgrel=1
+pkgver=3.4.1
+pkgrel=0
pkgdesc="low level virtual machine compiler system"
arch="x86 x86_64"
url="http://llvm.org/"
@@ -14,7 +14,7 @@ install=
subpackages="clang $pkgname-dev $pkgname-doc $pkgname-libs"
source="http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.gz
http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.gz
- llvm-3.3-alpine-linux.patch
+ llvm-alpine-linux.patch
llvm-musl.patch
"
# clang hardcodes linker paths; and don't know of a fix like the --with-dynamic-linker
@@ -108,15 +108,15 @@ libs() {
mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/
}
-md5sums="40564e1dc390f9844f1711c08b08e391 llvm-3.3.src.tar.gz
-8284891e3e311829b8e44ac813d0c9ef cfe-3.3.src.tar.gz
-18f9165003a5b86101547d40ec5d3036 llvm-3.3-alpine-linux.patch
-517019fb4907cf5944c84315c681f905 llvm-musl.patch"
-sha256sums="68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578 llvm-3.3.src.tar.gz
-b1b55de4ab3a57d3e0331a83e0284610191c77d924e3446498d9113d08dfb996 cfe-3.3.src.tar.gz
-5a6e40c7ffe280534ce964eaca5bc8ec325cb747f8de1390f534be2944c72361 llvm-3.3-alpine-linux.patch
-3b653520e79933058e9b4ab0943a364a87babe8e5e6b520ac15660c146302c74 llvm-musl.patch"
-sha512sums="1b7f7c5e907a68f642dcbe48fdff9585cb1504022bc9d386f310ebe5d25103d0d5f7cf0abf19e0e3fd666970160a98c90033754e2b79b2fac0cf866c984f8038 llvm-3.3.src.tar.gz
-06773f43f7d3529f06edb029f7de398f06a700a0f2476e00c4727e70c291028221bfac23625dfd2c220d6ac91a21670848187a934b99a21801c695127371afcc cfe-3.3.src.tar.gz
-d240f0fbef611b9863cbe1a79c10b4383dabf8be2ee49fd0f853d23fb0b4c935a41f3d50456a05815102834f2a4b1ac3c9334b444ed3868b7f3fb24e14ff14eb llvm-3.3-alpine-linux.patch
-52f9791a11c103ff8d1a35e0fd94a9d8e1379fd6f8046e346f52686bb256ca969ead77059271931ac1fff5581146dd7e3862a3a14d85b96555b8823e807f2d70 llvm-musl.patch"
+md5sums="b90697f4de35563ad6c35924defa8dd1 llvm-3.4.1.src.tar.gz
+c64fdc567383211c9ac212d6f7b69263 cfe-3.4.1.src.tar.gz
+524a204746c423bae0b041e4b409a687 llvm-alpine-linux.patch
+69892689105e1698988b5be3a763b511 llvm-musl.patch"
+sha256sums="7d28bb6eca243a2bb6d65a05743ab915b57958a7770277364e93534b63eef93a llvm-3.4.1.src.tar.gz
+ab83f30951b34d75729026e0e73c180a728a140f2a02cbb8915805051a9d6bb7 cfe-3.4.1.src.tar.gz
+c741573b6495d307085cf06bfc7d315bd3d6ef92fbb01e4c09cd5f1d84840a6a llvm-alpine-linux.patch
+69bf4a102d50e31853371883da1062560bdf7894bdb289c0a9522a214e0473c8 llvm-musl.patch"
+sha512sums="a8d19f8560604cd1a62b9868aca8848c0675895c5354dfcbc81ef940d4a38f56f8239a49aec853dd7d432134fa0b5feb9b070579226400874b761dcf124f7a7b llvm-3.4.1.src.tar.gz
+3886d2e362aab52f29520150a81271ee24433118e0519dd5d1c58cfacc3b1c7da4cbab49c7e82d6b4a90c278b5028f5aa1f5d79478b13d0b11a15c491a6c00d5 cfe-3.4.1.src.tar.gz
+fc566961272054e7415d0215712fd6d986341850d9281ccbcfc861c320bac6d9f3bac90571f2b72e940be4f843ad6e9133446d9fce0770514ccf39ad923bc0c8 llvm-alpine-linux.patch
+3049ad58c65791549cc696edc5920a1a2fabf87808c92a4c3fc5b70ee88745df63e2f0fd38be50e9df2055d05d922d2ccb3fe2542e9f31b4133c47c2f2b0fa93 llvm-musl.patch"
diff --git a/main/llvm/llvm-3.3-alpine-linux.patch b/main/llvm/llvm-3.3-alpine-linux.patch
deleted file mode 100644
index bfb9de0328..0000000000
--- a/main/llvm/llvm-3.3-alpine-linux.patch
+++ /dev/null
@@ -1,159 +0,0 @@
---- llvm-3.3.src.orig/include/llvm/ADT/Triple.h
-+++ llvm-3.3.src/include/llvm/ADT/Triple.h
-@@ -117,7 +117,11 @@
- EABI,
- MachO,
- Android,
-- ELF
-+ ELF,
-+ UClibc,
-+ Musl,
-+ MuslEABI,
-+ MuslEABIHF
- };
-
- private:
---- llvm-3.3.src.orig/lib/Support/Triple.cpp
-+++ llvm-3.3.src/lib/Support/Triple.cpp
-@@ -151,6 +151,10 @@
- case MachO: return "macho";
- case Android: return "android";
- case ELF: return "elf";
-+ case UClibc: return "uclibc";
-+ case Musl: return "musl";
-+ case MuslEABI: return "muslgnueabi";
-+ case MuslEABIHF: return "muslgnueabihf";
- }
-
- llvm_unreachable("Invalid EnvironmentType!");
-@@ -300,6 +304,10 @@
- .StartsWith("macho", Triple::MachO)
- .StartsWith("android", Triple::Android)
- .StartsWith("elf", Triple::ELF)
-+ .StartsWith("uclibc", Triple::UClibc)
-+ .StartsWith("muslgnueabihf", Triple::MuslEABIHF)
-+ .StartsWith("muslgnueabi", Triple::MuslEABI)
-+ .StartsWith("musl", Triple::Musl)
- .Default(Triple::UnknownEnvironment);
- }
-
---- llvm-3.3.src.orig/tools/clang/lib/Driver/ToolChains.cpp
-+++ llvm-3.3.src/tools/clang/lib/Driver/ToolChains.cpp
-@@ -1086,7 +1086,9 @@
- };
- static const char *const ARMHFTriples[] = {
- "arm-linux-gnueabihf",
-- "armv7hl-redhat-linux-gnueabi"
-+ "armv7hl-redhat-linux-gnueabi",
-+ "armv6-alpine-linux-muslgnueabihf",
-+ "armv7-alpine-linux-muslgnueabihf"
- };
-
- static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
-@@ -1099,7 +1101,9 @@
- "x86_64-suse-linux",
- "x86_64-manbo-linux-gnu",
- "x86_64-linux-gnu",
-- "x86_64-slackware-linux"
-+ "x86_64-slackware-linux",
-+ "x86_64-alpine-linux-uclibc",
-+ "x86_64-alpine-linux-musl"
- };
- static const char *const X86LibDirs[] = { "/lib32", "/lib" };
- static const char *const X86Triples[] = {
-@@ -1113,7 +1117,9 @@
- "i386-redhat-linux",
- "i586-suse-linux",
- "i486-slackware-linux",
-- "i686-montavista-linux"
-+ "i686-montavista-linux",
-+ "i486-alpine-linux-uclibc",
-+ "i486-alpine-linux-musl"
- };
-
- static const char *const MIPSLibDirs[] = { "/lib" };
-@@ -1980,6 +1986,7 @@
- /// Distribution (very bare-bones at the moment).
-
- enum Distro {
-+ AlpineLinux,
- ArchLinux,
- DebianLenny,
- DebianSqueeze,
-@@ -2108,6 +2115,9 @@
-
- if (!llvm::sys::fs::exists("/etc/arch-release", Exists) && Exists)
- return ArchLinux;
-+
-+ if (!llvm::sys::fs::exists("/etc/alpine-release", Exists) && Exists)
-+ return AlpineLinux;
-
- return UnknownDistro;
- }
---- llvm-3.3.src.orig/tools/clang/lib/Driver/Tools.cpp
-+++ llvm-3.3.src/tools/clang/lib/Driver/Tools.cpp
-@@ -5983,16 +5983,37 @@
- CmdArgs.push_back("-dynamic-linker");
- if (isAndroid)
- CmdArgs.push_back("/system/bin/linker");
-- else if (ToolChain.getArch() == llvm::Triple::x86)
-- CmdArgs.push_back("/lib/ld-linux.so.2");
-- else if (ToolChain.getArch() == llvm::Triple::aarch64)
-+ else if (ToolChain.getArch() == llvm::Triple::x86) {
-+ switch (ToolChain.getTriple().getEnvironment()) {
-+ case llvm::Triple::UClibc:
-+ CmdArgs.push_back("/lib/ld-uClibc.so.0.9.32");
-+ break;
-+ case llvm::Triple::Musl:
-+ CmdArgs.push_back("/lib/ld-musl-i386.so.1");
-+ break;
-+ default:
-+ CmdArgs.push_back("/lib/ld-linux.so.2");
-+ break;
-+ }
-+ } else if (ToolChain.getArch() == llvm::Triple::aarch64)
- CmdArgs.push_back("/lib/ld-linux-aarch64.so.1");
- else if (ToolChain.getArch() == llvm::Triple::arm ||
- ToolChain.getArch() == llvm::Triple::thumb) {
-- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
-+ switch (ToolChain.getTriple().getEnvironment()) {
-+ case llvm::Triple::Musl:
-+ case llvm::Triple::MuslEABI:
-+ CmdArgs.push_back("/lib/ld-musl-arm.so.3");
-+ break;
-+ case llvm::Triple::MuslEABIHF:
-+ CmdArgs.push_back("/lib/ld-musl-armhf.so.3");
-+ break;
-+ case llvm::Triple::GNUEABIHF:
- CmdArgs.push_back("/lib/ld-linux-armhf.so.3");
-- else
-+ break;
-+ default:
- CmdArgs.push_back("/lib/ld-linux.so.3");
-+ break;
-+ }
- }
- else if (ToolChain.getArch() == llvm::Triple::mips ||
- ToolChain.getArch() == llvm::Triple::mipsel)
-@@ -6009,8 +6030,19 @@
- else if (ToolChain.getArch() == llvm::Triple::ppc64 ||
- ToolChain.getArch() == llvm::Triple::systemz)
- CmdArgs.push_back("/lib64/ld64.so.1");
-- else
-- CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2");
-+ else {
-+ switch (ToolChain.getTriple().getEnvironment()) {
-+ case llvm::Triple::Musl:
-+ CmdArgs.push_back("/lib/ld-musl-x86_64.so.1");
-+ break;
-+ case llvm::Triple::UClibc:
-+ CmdArgs.push_back("/lib/ld64-uClibc.so.0.9.32");
-+ break;
-+ default:
-+ CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2");
-+ break;
-+ }
-+ }
- }
-
- CmdArgs.push_back("-o");
diff --git a/main/llvm/llvm-alpine-linux.patch b/main/llvm/llvm-alpine-linux.patch
new file mode 100644
index 0000000000..8bef4b1777
--- /dev/null
+++ b/main/llvm/llvm-alpine-linux.patch
@@ -0,0 +1,136 @@
+--- a/include/llvm/ADT/Triple.h
++++ b/include/llvm/ADT/Triple.h
+@@ -117,7 +117,10 @@
+ EABI,
+ MachO,
+ Android,
+- ELF
++ ELF,
++ Musl,
++ MuslEABI,
++ MuslEABIHF
+ };
+
+ private:
+--- a/lib/Support/Triple.cpp.orig
++++ b/lib/Support/Triple.cpp
+@@ -153,6 +153,9 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
+ case MachO: return "macho";
+ case Android: return "android";
+ case ELF: return "elf";
++ case Musl: return "musl";
++ case MuslEABI: return "muslgnueabi";
++ case MuslEABIHF: return "muslgnueabihf";
+ }
+
+ llvm_unreachable("Invalid EnvironmentType!");
+@@ -305,6 +308,9 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
+ .StartsWith("macho", Triple::MachO)
+ .StartsWith("android", Triple::Android)
+ .StartsWith("elf", Triple::ELF)
++ .StartsWith("muslgnueabihf", Triple::MuslEABIHF)
++ .StartsWith("muslgnueabi", Triple::MuslEABI)
++ .StartsWith("musl", Triple::Musl)
+ .Default(Triple::UnknownEnvironment);
+ }
+
+--- a/tools/clang/lib/Driver/ToolChains.cpp
++++ b/tools/clang/lib/Driver/ToolChains.cpp
+@@ -1118,20 +1118,23 @@ void Generic_GCC::GCCInstallationDetector::print(raw_ostream &OS) 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-alpine-linux-muslgnueabihf",
++ "armv7-alpine-linux-muslgnueabihf" };
+
+ static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
+ static const char *const X86_64Triples[] = {
+ "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-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux",
++ "x86_64-alpine-linux-musl"
+ };
+ static const char *const X86LibDirs[] = { "/lib32", "/lib" };
+ static const char *const X86Triples[] = {
+ "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-montavista-linux", "i486-alpine-linux-musl"
+ };
+
+ static const char *const MIPSLibDirs[] = { "/lib" };
+@@ -2166,6 +2169,7 @@ Tool *Solaris::buildLinker() const {
+ /// Distribution (very bare-bones at the moment).
+
+ enum Distro {
++ AlpineLinux,
+ ArchLinux,
+ DebianLenny,
+ DebianSqueeze,
+@@ -2276,6 +2280,9 @@ static Distro DetectDistro(llvm::Triple::ArchType Arch) {
+ if (llvm::sys::fs::exists("/etc/arch-release"))
+ return ArchLinux;
+
++ if (llvm::sys::fs::exists("/etc/alpine-release"))
++ return AlpineLinux;
++
+ return UnknownDistro;
+ }
+
+--- a/tools/clang/lib/Driver/Tools.cpp
++++ b/tools/clang/lib/Driver/Tools.cpp
+@@ -6355,16 +6355,28 @@ static StringRef getLinuxDynamicLinker(const ArgList &Args,
+ const toolchains::Linux &ToolChain) {
+ if (ToolChain.getTriple().getEnvironment() == llvm::Triple::Android)
+ return "/system/bin/linker";
+- else if (ToolChain.getArch() == llvm::Triple::x86)
+- return "/lib/ld-linux.so.2";
+- else if (ToolChain.getArch() == llvm::Triple::aarch64)
++ else if (ToolChain.getArch() == 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::aarch64)
+ return "/lib/ld-linux-aarch64.so.1";
+ else if (ToolChain.getArch() == llvm::Triple::arm ||
+ ToolChain.getArch() == llvm::Triple::thumb) {
+- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
++ switch (ToolChain.getTriple().getEnvironment()) {
++ case llvm::Triple::Musl:
++ case llvm::Triple::MuslEABI:
++ return "/lib/ld-musl-arm.so.3";
++ case llvm::Triple::MuslEABIHF:
++ return "/lib/ld-musl-armhf.so.3";
++ case llvm::Triple::GNUEABIHF:
+ return "/lib/ld-linux-armhf.so.3";
+- else
++ default:
+ return "/lib/ld-linux.so.3";
++ }
+ } else if (ToolChain.getArch() == llvm::Triple::mips ||
+ ToolChain.getArch() == llvm::Triple::mipsel)
+ return "/lib/ld.so.1";
+@@ -6380,8 +6392,14 @@ static StringRef getLinuxDynamicLinker(const ArgList &Args,
+ ToolChain.getArch() == llvm::Triple::ppc64le ||
+ ToolChain.getArch() == llvm::Triple::systemz)
+ return "/lib64/ld64.so.1";
+- else
+- return "/lib64/ld-linux-x86-64.so.2";
++ else {
++ switch (ToolChain.getTriple().getEnvironment()) {
++ case llvm::Triple::Musl:
++ return "/lib/ld-musl-x86_64.so.1";
++ default:
++ return "/lib64/ld-linux-x86-64.so.2";
++ }
++ }
+ }
+
+ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
diff --git a/main/llvm/llvm-musl.patch b/main/llvm/llvm-musl.patch
index b5a1c09ed9..581128c00e 100644
--- a/main/llvm/llvm-musl.patch
+++ b/main/llvm/llvm-musl.patch
@@ -9,8 +9,8 @@
// On linux we have a weird situation. The stderr/out/in symbols are both
// macros and global variables because of standards requirements. So, we
---- a/utils/unittest/googletest/gtest.cc (revision 170294)
-+++ b/utils/unittest/googletest/gtest.cc (working copy)
+--- a/utils/unittest/googletest/src/gtest.cc
++++ b/utils/unittest/googletest/src/gtest.cc
@@ -120,6 +120,7 @@
#if GTEST_CAN_STREAM_RESULTS_
@@ -58,17 +58,6 @@
toascii,
/// double trunc(double x);
---- a/lib/ExecutionEngine/JIT/JIT.cpp
-+++ b/lib/ExecutionEngine/JIT/JIT.cpp
-@@ -68,7 +68,7 @@ extern "C" void LLVMLinkInJIT() {
- }
-
- // Determine whether we can register EH tables.
--#if (defined(__GNUC__) && !defined(__ARM_EABI__) && \
-+#if (defined(__GLIBC__) && !defined(__ARM_EABI__) && \
- !defined(__USING_SJLJ_EXCEPTIONS__))
- #define HAVE_EHTABLE_SUPPORT 1
- #else
--- a/lib/Support/Unix/Signals.inc
+++ b/lib/Support/Unix/Signals.inc
@@ -268,7 +268,7 @@ void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
@@ -133,9 +122,9 @@
--- a/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/lib/Transforms/IPO/FunctionAttrs.cpp
-@@ -1271,30 +1271,6 @@ bool FunctionAttrs::inferPrototypeAttributes(Function &F) {
- setDoesNotCapture(F, 1);
- setDoesNotCapture(F, 2);
+@@ -1599,32 +1599,6 @@ bool FunctionAttrs::inferPrototypeAttributes(Function &F) {
+ setOnlyReadsMemory(F, 1);
+ setOnlyReadsMemory(F, 2);
break;
- case LibFunc::fopen64:
- if (FTy->getNumParams() != 2 ||
@@ -147,6 +136,8 @@
- setDoesNotAlias(F, 0);
- setDoesNotCapture(F, 1);
- setDoesNotCapture(F, 2);
+- setOnlyReadsMemory(F, 1);
+- setOnlyReadsMemory(F, 2);
- break;
- case LibFunc::fseeko64:
- case LibFunc::ftello64:
@@ -164,4 +155,3 @@
case LibFunc::fstat64:
case LibFunc::fstatvfs64:
if (FTy->getNumParams() != 2 || !FTy->getParamType(1)->isPointerTy())
-