aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-04-28 15:35:22 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-28 15:36:51 +0200
commitc529e08b39870357e8f10ddd9fb48b4aea2543bd (patch)
treeda282ddd664c1a2da9ea125da7b73566127b6fcb /testing
parentcc5e775db8b5793ee4f2e1e5372bec6b8e27d58a (diff)
downloadaports-c529e08b39870357e8f10ddd9fb48b4aea2543bd.tar.bz2
aports-c529e08b39870357e8f10ddd9fb48b4aea2543bd.tar.xz
testing/emscripten-fastcomp: update abuild according to llvm4
Diffstat (limited to 'testing')
-rw-r--r--testing/emscripten-fastcomp/APKBUILD37
-rw-r--r--testing/emscripten-fastcomp/llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch (renamed from testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch)11
-rw-r--r--testing/emscripten-fastcomp/llvm-fix-build-with-musl-libc.patch (renamed from testing/emscripten-fastcomp/fix-build-with-musl-libc.patch)24
3 files changed, 52 insertions, 20 deletions
diff --git a/testing/emscripten-fastcomp/APKBUILD b/testing/emscripten-fastcomp/APKBUILD
index 0ef0cb0fff..93ca8d06df 100644
--- a/testing/emscripten-fastcomp/APKBUILD
+++ b/testing/emscripten-fastcomp/APKBUILD
@@ -8,7 +8,7 @@
pkgname=emscripten-fastcomp
# Keep in sync with package emscripten!
pkgver=1.37.9
-pkgrel=1
+pkgrel=2
pkgdesc="The Clang + LLVM backend for Emscripten"
url="https://kripken.github.io/emscripten-site/"
arch="all"
@@ -17,13 +17,13 @@ depends="python2"
makedepends="cmake paxmark zlib-dev"
source="$pkgname.tar.gz::https://github.com/kripken/$pkgname/archive/$pkgver.tar.gz
$pkgname-clang.tar.gz::https://github.com/kripken/$pkgname-clang/archive/$pkgver.tar.gz
- fix-build-with-musl-libc.patch
- fix-DynamicLibrary-to-build-with-musl-libc.patch"
+ llvm-fix-build-with-musl-libc.patch
+ llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # some tests are broken, don't bother with it for now
-_prefix="/usr/lib/$pkgname"
-ldpath="$_prefix/lib"
+_prefix="usr/lib/$pkgname"
+ldpath="/$_prefix/lib"
# Avoid conflicts in provided so:* names with llvm package.
sonameprefix="$pkgname:"
@@ -41,22 +41,25 @@ build() {
# https://github.com/kripken/emscripten-fastcomp/issues/174
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX="$_prefix" \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
- -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DCMAKE_INSTALL_PREFIX="/$_prefix" \
+ -DCMAKE_VERBOSE_MAKEFILE=NO \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
- -DLLVM_HOST_TRIPLE="$CHOST" \
+ -DCLANG_BUILD_EXAMPLES=OFF \
+ -DCLANG_INCLUDE_TESTS=OFF \
+ -DLLVM_BUILD_DOCS=OFF \
-DLLVM_BUILD_LLVM_DYLIB=ON \
- -DLLVM_LINK_LLVM_DYLIB=ON \
- -DLLVM_TARGETS_TO_BUILD=JSBackend \
- -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly \
-DLLVM_BUILD_RUNTIME=OFF \
- -DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_ENABLE_ZLIB=ON \
- -DCLANG_INCLUDE_EXAMPLES=OFF
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly \
+ -DLLVM_HOST_TRIPLE="$CHOST" \
+ -DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_INCLUDE_TESTS=OFF \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_TARGETS_TO_BUILD=JSBackend
make -j ${JOBS:-2}
- paxmark m bin/llvm-rtdyld \
+ paxmark m \
+ bin/llvm-rtdyld \
bin/lli \
bin/lli-child-target
}
@@ -77,5 +80,5 @@ package() {
sha512sums="443d22163866a409b6218bb686d52b845051350ef4af546e2d52ffaca03ed363f3cbf8f8e61b7fc28c1e1007d7e2789bfd74d91159deff46e3c6e1913ffebf34 emscripten-fastcomp.tar.gz
5c1fae88e87575571fef767f9c3d664c0eed106d566517871503c75cb5e31777d5fd5773f914fbe932abde3b42870b25e4ca58cf458ceecd0f9a7a50e7d86af9 emscripten-fastcomp-clang.tar.gz
-5596bb1b4d4f7da8fef5f7e85a50de797dd88c1d93c7fcc9ff585093fd56d292222496e8e28e6a7d90effcfbf11c486636025646d65ba928fcb52352d1eb6336 fix-build-with-musl-libc.patch
-01c0f994eb364fc0b02f7c97268f0bc470ed9d404bb2c013196005a6c0be91c9634f092aa262fc5c4e7ae72e36140f259efe9d8ec3a613f4b9aa7aa7b4b57759 fix-DynamicLibrary-to-build-with-musl-libc.patch"
+f84cd65d7042e89826ba6e8d48c4c302bf4980da369d7f19a55f217e51c00ca8ed178d453df3a3cee76598a7cecb94aed0775a6d24fe73266f82749913fc3e71 llvm-fix-build-with-musl-libc.patch
+19bfb9282455d39d07dbb2b1293b03a45c57d522fbb9c5e58dac034200669628b97e7a90cd4ff5d52d9bb79acfccbef653d8a1140a7f0589ecd6f9b7c4ba0eb6 llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch"
diff --git a/testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch b/testing/emscripten-fastcomp/llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch
index 7d9dc855b0..d5d7f07b5e 100644
--- a/testing/emscripten-fastcomp/fix-DynamicLibrary-to-build-with-musl-libc.patch
+++ b/testing/emscripten-fastcomp/llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch
@@ -1,12 +1,18 @@
+From d12ecb83d01dcb580dd94f4d57828f33d3eb4c35 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 18 Feb 2016 15:33:21 +0100
-Subject: [PATCH] Fix DynamicLibrary to build with musl libc
+Subject: [PATCH 3/3] Fix DynamicLibrary to build with musl libc
stdin/out/err is part of the libc and not the kernel so we check for the
specific libc that does the unexpected instead of linux.
This is needed for making it build with musl libc.
+---
+ lib/Support/DynamicLibrary.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp
+index 9a7aeb5..0c1c8f8 100644
--- a/lib/Support/DynamicLibrary.cpp
+++ b/lib/Support/DynamicLibrary.cpp
@@ -140,10 +140,10 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
@@ -22,3 +28,6 @@ This is needed for making it build with musl libc.
{
EXPLICIT_SYMBOL(stderr);
EXPLICIT_SYMBOL(stdout);
+--
+2.7.3
+
diff --git a/testing/emscripten-fastcomp/fix-build-with-musl-libc.patch b/testing/emscripten-fastcomp/llvm-fix-build-with-musl-libc.patch
index 223b7306db..6ee91ea44d 100644
--- a/testing/emscripten-fastcomp/fix-build-with-musl-libc.patch
+++ b/testing/emscripten-fastcomp/llvm-fix-build-with-musl-libc.patch
@@ -1,14 +1,20 @@
+From 5c571082fdaf61f6df19d9b7137dc26d71334058 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 18 Feb 2016 10:33:04 +0100
-Subject: [PATCH] Fix build with musl libc
+Subject: [PATCH 2/3] Fix build with musl libc
On musl libc the fopen64 and fopen are the same thing, but for
compatibility they have a `#define fopen64 fopen`. Same applies for
fseek64, fstat64, fstatvfs64, ftello64, lstat64, stat64 and tmpfile64.
+---
+ include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
+index 7becdf0..7f14427 100644
--- a/include/llvm/Analysis/TargetLibraryInfo.h
+++ b/include/llvm/Analysis/TargetLibraryInfo.h
-@@ -18,6 +18,15 @@
+@@ -18,6 +18,26 @@
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
@@ -20,7 +26,21 @@ fseek64, fstat64, fstatvfs64, ftello64, lstat64, stat64 and tmpfile64.
+#undef lstat64
+#undef stat64
+#undef tmpfile64
++#undef F_GETLK64
++#undef F_SETLK64
++#undef F_SETLKW64
++#undef flock64
++#undef open64
++#undef openat64
++#undef creat64
++#undef lockf64
++#undef posix_fadvise64
++#undef posix_fallocate64
++#undef off64_t
+
namespace llvm {
/// VecDesc - Describes a possible vectorization of a function.
/// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
+--
+2.7.3
+