aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-11 13:52:49 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-11 13:58:18 +0000
commit5e5727bdfb02f387b13f3e8d81c716ef0a1299cc (patch)
tree97e9a1247fce0527e15ce6f5134337b7227632e5 /testing
parent525ddedcd03af8e1a573fab61505ba268e9579f0 (diff)
downloadaports-5e5727bdfb02f387b13f3e8d81c716ef0a1299cc.tar.bz2
aports-5e5727bdfb02f387b13f3e8d81c716ef0a1299cc.tar.xz
testing/llvm: fix clang with alpine-linux
For now we just hardcode the dynamic linker
Diffstat (limited to 'testing')
-rw-r--r--testing/llvm/APKBUILD6
-rw-r--r--testing/llvm/clang-2.9-add_gcc_vers.patch12
-rw-r--r--testing/llvm/clang-2.9-alpine-linux.patch71
3 files changed, 74 insertions, 15 deletions
diff --git a/testing/llvm/APKBUILD b/testing/llvm/APKBUILD
index 6f8ac90025..2368319434 100644
--- a/testing/llvm/APKBUILD
+++ b/testing/llvm/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=llvm
pkgver=2.9
-pkgrel=1
+pkgrel=2
pkgdesc="low level virtual machine compiler system"
arch="x86"
url="http://llvm.org/"
@@ -13,7 +13,7 @@ install=
subpackages="clang $pkgname-dev $pkgname-doc $pkgname-libs"
source="http://llvm.org/releases/$pkgver/llvm-$pkgver.tgz
http://llvm.org/releases/$pkgver/clang-$pkgver.tgz
- clang-2.9-add_gcc_vers.patch
+ clang-2.9-alpine-linux.patch
"
_builddir="$srcdir"/build
@@ -88,4 +88,4 @@ libs() {
md5sums="793138412d2af2c7c7f54615f8943771 llvm-2.9.tgz
634de18d04b7a4ded19ec4c17d23cfca clang-2.9.tgz
-996988e8a9d74b9393fde8fb8561dbaf clang-2.9-add_gcc_vers.patch"
+9aff59aadf89e56e173fa7be011915f1 clang-2.9-alpine-linux.patch"
diff --git a/testing/llvm/clang-2.9-add_gcc_vers.patch b/testing/llvm/clang-2.9-add_gcc_vers.patch
deleted file mode 100644
index 8ce320ac66..0000000000
--- a/testing/llvm/clang-2.9-add_gcc_vers.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./tools/clang/lib/Driver/ToolChains.cpp.add_gcc_vers 2011-03-21 22:29:27.000000000 +0100
-+++ ./tools/clang/lib/Driver/ToolChains.cpp 2011-08-01 18:20:29.504194241 +0200
-@@ -1449,7 +1449,8 @@
- GccTriple = "i586-suse-linux";
- }
-
-- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4",
-+ const char* GccVersions[] = {"4.6.1", "4.6.0",
-+ "4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4",
- "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2",
- "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1",
- "4.2"};
diff --git a/testing/llvm/clang-2.9-alpine-linux.patch b/testing/llvm/clang-2.9-alpine-linux.patch
new file mode 100644
index 0000000000..f173994ce7
--- /dev/null
+++ b/testing/llvm/clang-2.9-alpine-linux.patch
@@ -0,0 +1,71 @@
+--- ./tools.orig/clang/lib/Driver/ToolChains.cpp
++++ ./tools/clang/lib/Driver/ToolChains.cpp
+@@ -1273,6 +1273,7 @@
+ /// Linux toolchain (very bare-bones at the moment).
+
+ enum LinuxDistro {
++ AlpineLinux,
+ ArchLinux,
+ DebianLenny,
+ DebianSqueeze,
+@@ -1380,6 +1381,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;
+ }
+
+@@ -1432,6 +1436,9 @@
+ else if (!llvm::sys::fs::exists("/usr/lib/gcc/x86_64-manbo-linux-gnu",
+ Exists) && Exists)
+ GccTriple = "x86_64-manbo-linux-gnu";
++ else if (!llvm::sys::fs::exists("/usr/lib/gcc/x86_64-alpine-linux-uclibc",
++ Exists) && Exists)
++ GccTriple = "x86_64-alpine-linux-uclibc";
+ } else if (Arch == llvm::Triple::x86) {
+ if (!llvm::sys::fs::exists("/usr/lib/gcc/i686-linux-gnu", Exists) && Exists)
+ GccTriple = "i686-linux-gnu";
+@@ -1447,9 +1454,13 @@
+ else if (!llvm::sys::fs::exists("/usr/lib/gcc/i586-suse-linux", Exists) &&
+ Exists)
+ GccTriple = "i586-suse-linux";
++ else if (!llvm::sys::fs::exists("/usr/lib/gcc/i486-alpine-linux-uclibc", Exists) &&
++ Exists)
++ GccTriple = "i486-alpine-linux-uclibc";
+ }
+
+- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4",
++ const char* GccVersions[] = {"4.6.1", "4.6.0",
++ "4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4",
+ "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2",
+ "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1",
+ "4.2"};
+@@ -1513,7 +1524,7 @@
+ Distro == UbuntuKarmic)
+ ExtraOpts.push_back("--build-id");
+
+- if (Distro == ArchLinux)
++ if (Distro == ArchLinux || Distro == AlpineLinux)
+ Lib = "lib";
+
+ Paths.push_back(Base + Suffix);
+--- ./tools.orig/clang/lib/Driver/Tools.cpp
++++ ./tools/clang/lib/Driver/Tools.cpp
+@@ -3621,12 +3621,12 @@
+ !Args.hasArg(options::OPT_shared))) {
+ CmdArgs.push_back("-dynamic-linker");
+ if (ToolChain.getArch() == llvm::Triple::x86)
+- CmdArgs.push_back("/lib/ld-linux.so.2");
++ CmdArgs.push_back("/lib/ld-uClibc.so.0.9.32");
+ else if (ToolChain.getArch() == llvm::Triple::arm ||
+ ToolChain.getArch() == llvm::Triple::thumb)
+ CmdArgs.push_back("/lib/ld-linux.so.3");
+ else
+- CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2");
++ CmdArgs.push_back("/lib/ld64-uClibc.so.0.9.32");
+ }
+
+ CmdArgs.push_back("-o");