llvm_34: fix build with glibc 2.26
This commit is contained in:
parent
6acabb06b7
commit
38ac67fc9a
1 changed files with 17 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
{ stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, perl
|
||||
, groff
|
||||
, cmake
|
||||
|
@ -39,6 +40,22 @@ in stdenv.mkDerivation rec {
|
|||
../fix-llvm-config.patch
|
||||
];
|
||||
|
||||
postPatch = stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
(
|
||||
cd projects/compiler-rt
|
||||
patch -p1 -F3 < ${
|
||||
fetchpatch {
|
||||
name = "sigaltstack.patch"; # for glibc-2.26
|
||||
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
|
||||
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
|
||||
}
|
||||
}
|
||||
|
||||
sed -i "s,#include <pthread.h>,&\n#include <signal.h>,g" \
|
||||
lib/asan/asan_linux.cc
|
||||
)
|
||||
'';
|
||||
|
||||
# hacky fix: created binaries need to be run before installation
|
||||
preBuild = ''
|
||||
mkdir -p $out/
|
||||
|
|
Loading…
Reference in a new issue