diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 19:37:39 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 19:38:27 +0200 |
commit | a2a08dfa36a5bab47eea6bb37e09f0c6660250ee (patch) | |
tree | e6564970d58373714f55ef3f28f3542cce73793f /community | |
parent | 8f80264873b8235a5a640efecc102fb5983f4b48 (diff) | |
download | aports-a2a08dfa36a5bab47eea6bb37e09f0c6660250ee.tar.bz2 aports-a2a08dfa36a5bab47eea6bb37e09f0c6660250ee.tar.xz |
community/llvm3.9: fix test failures on aarch64
Diffstat (limited to 'community')
-rw-r--r-- | community/llvm3.9/APKBUILD | 4 | ||||
-rw-r--r-- | community/llvm3.9/fix-memory-mf_exec-on-aarch64.patch | 33 |
2 files changed, 36 insertions, 1 deletions
diff --git a/community/llvm3.9/APKBUILD b/community/llvm3.9/APKBUILD index f0607d8d70..2bcd857294 100644 --- a/community/llvm3.9/APKBUILD +++ b/community/llvm3.9/APKBUILD @@ -6,7 +6,7 @@ _pkgname=llvm pkgver=3.9.1 _majorver=${pkgver%.*} pkgname=$_pkgname$_majorver -pkgrel=3 +pkgrel=4 pkgdesc="Low Level Virtual Machine compiler system (version $_majorver)" arch="all" url="http://llvm.org/" @@ -19,6 +19,7 @@ source="http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch cmake-fix-libLLVM-name.patch disable-FileSystemTest.CreateDir-perms-assert.patch + fix-memory-mf_exec-on-aarch64.patch rust-lang-llvm-pr47.patch rust-lang-llvm-pr53.patch @@ -210,6 +211,7 @@ f84cd65d7042e89826ba6e8d48c4c302bf4980da369d7f19a55f217e51c00ca8ed178d453df3a3ce 19bfb9282455d39d07dbb2b1293b03a45c57d522fbb9c5e58dac034200669628b97e7a90cd4ff5d52d9bb79acfccbef653d8a1140a7f0589ecd6f9b7c4ba0eb6 llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch 6d1a716e5aa24e6b9a3acf4cc11e2504b1b01abf574074e9e5617b991de87d5e4e687eb18e85e73d5e632568afe2fc357771c4c96f9e136502071991496fb78c cmake-fix-libLLVM-name.patch 49c47f125014b60d0ea7870f981a2c1708ad705793f89287ed846ee881a837a4dc0170bf467e03f2ef56177473128945287749ac80dc2d13cfabcf8b929ba58a disable-FileSystemTest.CreateDir-perms-assert.patch +e6d925ddc71f9f2ce8a859ac519dad51cba99c07129e378a5388bb1dd2f7d5b9d5ed392e85267fd20043789c7460a7d705eb8f970b2d130edbf5a934e9505ac4 fix-memory-mf_exec-on-aarch64.patch a7c6056bfa3c2b76bbbc1a663ea84e5db6e269d5360afedaad5fdc3279d4732bc414e8c7d3a3f6f0d7b30ed81d8aec3fd2b35377f81db6d441b17b185d8b9bd0 rust-lang-llvm-pr47.patch 3c35bd342de6ec40aef9af8f18cb7d9aa1d2d8e04e9f320fff7df2c828f663cc12715d86946bc6bbc19f2e99b357a07f0fd9a4acce912c9c195c6837675847d5 rust-lang-llvm-pr53.patch 4f5418082b3bb0992a57f7abbd4187d119cf277a573f899b63af93522d823f9195a754adc56ea2a8fb2f5925b39eb82975b522c30cac275c71204cbe6d809271 rust-lang-llvm-pr54.patch diff --git a/community/llvm3.9/fix-memory-mf_exec-on-aarch64.patch b/community/llvm3.9/fix-memory-mf_exec-on-aarch64.patch new file mode 100644 index 0000000000..644c77790a --- /dev/null +++ b/community/llvm3.9/fix-memory-mf_exec-on-aarch64.patch @@ -0,0 +1,33 @@ +Fix failures in AllocationTests/MappedMemoryTest.* on aarch64: + + Failing Tests (8): + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3 + LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3 + +Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10 + +--- a/lib/Support/Unix/Memory.inc ++++ b/lib/Support/Unix/Memory.inc +@@ -54,7 +54,7 @@ + llvm::sys::Memory::MF_EXEC: + return PROT_READ | PROT_WRITE | PROT_EXEC; + case llvm::sys::Memory::MF_EXEC: +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || (defined(__linux__) && defined(__aarch64__)) + // On PowerPC, having an executable page that has no read permission + // can have unintended consequences. The function InvalidateInstruction- + // Cache uses instructions dcbf and icbi, both of which are treated by +@@ -62,6 +62,7 @@ + // executing these instructions will result in a segmentation fault. + // Somehow, this problem is not present on Linux, but it does happen + // on FreeBSD. ++ // The same problem is present even on aarch64 Linux (at least on musl). + return PROT_READ | PROT_EXEC; + #else + return PROT_EXEC; |