llvm_{4,5}: Add Aarch64 patch

https://reviews.llvm.org/D40423
This commit is contained in:
Tuomas Tynkkynen 2017-11-28 14:51:40 +02:00
parent 652842d82e
commit 0ea6ab8097
2 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,11 @@
let
src = fetch "llvm" "0l9bf7kdwhlj0kq1hawpyxhna1062z3h7qcz2y8nfl9dz2qksy6s";
aarch64Patch = fetchpatch {
url = https://reviews.llvm.org/file/data/2oqw5rhhklsapbjrhlpd/PHID-FILE-lvo4fcs6hjvkxb5wneg2/D40423.diff;
sha256 = "0b0h7n7lxw33pn2j061hm9050zn263gmiig937g5cmcvjimxlybb";
};
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." release_version));
@ -81,6 +86,8 @@ in stdenv.mkDerivation rec {
substituteInPlace lib/esan/esan_sideline_linux.cpp \
--replace 'struct sigaltstack' 'stack_t'
)
'' + stdenv.lib.optionalString stdenv.isAarch64 ''
patch -p0 < ${aarch64Patch}
'';
# hacky fix: created binaries need to be run before installation

View File

@ -24,6 +24,11 @@
let
src = fetch "llvm" "1nin64vz21hyng6jr19knxipvggaqlkl2l9jpd5czbc4c2pcnpg3";
aarch64Patch = fetchpatch {
url = https://reviews.llvm.org/file/data/2oqw5rhhklsapbjrhlpd/PHID-FILE-lvo4fcs6hjvkxb5wneg2/D40423.diff;
sha256 = "0b0h7n7lxw33pn2j061hm9050zn263gmiig937g5cmcvjimxlybb";
};
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." release_version));
@ -75,6 +80,8 @@ in stdenv.mkDerivation rec {
# Revert compiler-rt commit that makes codesign mandatory
patch -p1 -i ${./compiler-rt-codesign.patch} -d projects/compiler-rt
'' + stdenv.lib.optionalString stdenv.isAarch64 ''
patch -p0 < ${aarch64Patch}
'';
# hacky fix: created binaries need to be run before installation