aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/llvm/APKBUILD25
-rw-r--r--main/llvm/clang-2.9-alpine-linux.patch71
-rw-r--r--main/llvm/clang-3.0-alpine-linux.patch64
3 files changed, 77 insertions, 83 deletions
diff --git a/main/llvm/APKBUILD b/main/llvm/APKBUILD
index d35f452902..aedb01aec8 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=2.9
-pkgrel=5
+pkgver=3.0
+pkgrel=0
pkgdesc="low level virtual machine compiler system"
arch="x86 x86_64"
url="http://llvm.org/"
@@ -12,9 +12,9 @@ depends_dev="perl"
makedepends="$depends_dev groff libffi-dev"
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-alpine-linux.patch
+source="http://llvm.org/releases/$pkgver/llvm-$pkgver.tar.gz
+ http://llvm.org/releases/$pkgver/clang-$pkgver.tar.gz
+ clang-3.0-alpine-linux.patch
"
_builddir="$srcdir"/build
@@ -24,11 +24,12 @@ prepare() {
msg "Preparing CLANG sources..."
- mv "$srcdir"/clang-$pkgver "$srcdir"/$pkgname-$pkgver/tools/clang
+ mv "$srcdir"/clang-$pkgver.src \
+ "$srcdir"/$pkgname-$pkgver.src/tools/clang || return 1
msg "Patching LLVM core..."
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$srcdir"/$pkgname-$pkgver.src || return 1
for i in $source; do
case $i in
@@ -42,7 +43,7 @@ prepare() {
build() {
cd "$_builddir"
- ../$pkgname-$pkgver/configure \
+ ../$pkgname-$pkgver.src/configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
@@ -73,7 +74,7 @@ clang() {
pkgdesc="A C language family front-end for LLVM"
mkdir -p "$subpkgdir"/usr/bin \
"$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/bin/clang* "$pkgdir"/usr/bin/tblgen \
+ mv "$pkgdir"/usr/bin/clang* "$pkgdir"/usr/bin/c-index-test \
"$subpkgdir"/usr/bin/ || return 1
mv "$pkgdir"/usr/lib/clang \
"$pkgdir"/usr/lib/libclang.so \
@@ -87,6 +88,6 @@ libs() {
mv "$pkgdir"/usr/lib/*.so "$subpkgdir"/usr/lib/
}
-md5sums="793138412d2af2c7c7f54615f8943771 llvm-2.9.tgz
-634de18d04b7a4ded19ec4c17d23cfca clang-2.9.tgz
-6ca9d6b9706ab4e04d976c25e72952dd clang-2.9-alpine-linux.patch"
+md5sums="a8e5f5f1c1adebae7b4a654c376a6005 llvm-3.0.tar.gz
+43350706ae6cf05d0068885792ea0591 clang-3.0.tar.gz
+30bdaa52a057a11722093463c29bfda0 clang-3.0-alpine-linux.patch"
diff --git a/main/llvm/clang-2.9-alpine-linux.patch b/main/llvm/clang-2.9-alpine-linux.patch
deleted file mode 100644
index f53aee4b92..0000000000
--- a/main/llvm/clang-2.9-alpine-linux.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- ./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.3", "4.6.2", "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");
diff --git a/main/llvm/clang-3.0-alpine-linux.patch b/main/llvm/clang-3.0-alpine-linux.patch
new file mode 100644
index 0000000000..dedb6c2512
--- /dev/null
+++ b/main/llvm/clang-3.0-alpine-linux.patch
@@ -0,0 +1,64 @@
+diff --git a/tools/clang/lib/Driver/ToolChains.cpp b/tools/clang/lib/Driver/ToolChains.cpp
+index eb730e5..3e4afae 100644
+--- a/tools/clang/lib/Driver/ToolChains.cpp
++++ b/tools/clang/lib/Driver/ToolChains.cpp
+@@ -1377,6 +1377,7 @@ Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA,
+ /// Linux toolchain (very bare-bones at the moment).
+
+ enum LinuxDistro {
++ AlpineLinux,
+ ArchLinux,
+ DebianLenny,
+ DebianSqueeze,
+@@ -1507,6 +1508,9 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
+ 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;
+ }
+
+@@ -1655,7 +1659,8 @@ Linux::GCCInstallationDetector::GCCInstallationDetector(const Driver &D)
+ "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"
+ };
+ LibDirs.append(X86_64LibDirs,
+ X86_64LibDirs + llvm::array_lengthof(X86_64LibDirs));
+@@ -1672,7 +1677,8 @@ Linux::GCCInstallationDetector::GCCInstallationDetector(const Driver &D)
+ "i586-redhat-linux",
+ "i386-redhat-linux",
+ "i586-suse-linux",
+- "i486-slackware-linux"
++ "i486-slackware-linux",
++ "i486-alpine-linux-uclibc"
+ };
+ LibDirs.append(X86LibDirs, X86LibDirs + llvm::array_lengthof(X86LibDirs));
+ Triples.append(X86Triples, X86Triples + llvm::array_lengthof(X86Triples));
+diff --git a/tools/clang/lib/Driver/Tools.cpp b/tools/clang/lib/Driver/Tools.cpp
+index 6151e88..d811789 100644
+--- a/tools/clang/lib/Driver/Tools.cpp
++++ b/tools/clang/lib/Driver/Tools.cpp
+@@ -4308,7 +4308,7 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ !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");
+@@ -4317,7 +4317,7 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA,
+ else if (ToolChain.getArch() == llvm::Triple::ppc64)
+ CmdArgs.push_back("/lib64/ld64.so.1");
+ 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");