diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/4/llvm.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/4/llvm.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index e90603ffefa..332fee8529b 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -67,6 +67,20 @@ in stdenv.mkDerivation rec { + stdenv.lib.optionalString (enableSharedLibraries) '' substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib patch -p1 < ./llvm-outputs.patch + '' + + stdenv.lib.optionalString (stdenv ? glibc) '' + ( + cd projects/compiler-rt + patch -p1 < ${ + fetchpatch { + name = "sigaltstack.patch"; # for glibc-2.26 + url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff; + sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi"; + } + } + substituteInPlace lib/esan/esan_sideline_linux.cpp \ + --replace 'struct sigaltstack' 'stack_t' + ) ''; # hacky fix: created binaries need to be run before installation |