llvm 3.7--4: fixup build with glibc-2.26
This commit is contained in:
parent
81c5040470
commit
e0a36522a7
@ -1,5 +1,6 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, fetch
|
, fetch
|
||||||
|
, fetchpatch
|
||||||
, perl
|
, perl
|
||||||
, groff
|
, groff
|
||||||
, cmake
|
, cmake
|
||||||
@ -45,6 +46,18 @@ in stdenv.mkDerivation rec {
|
|||||||
# those always succeed has the net effect of disabling all bindings.
|
# those always succeed has the net effect of disabling all bindings.
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
|
substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
|
||||||
|
''
|
||||||
|
+ 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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# hacky fix: created binaries need to be run before installation
|
# hacky fix: created binaries need to be run before installation
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, fetch
|
, fetch
|
||||||
|
, fetchpatch
|
||||||
, perl
|
, perl
|
||||||
, groff
|
, groff
|
||||||
, cmake
|
, cmake
|
||||||
@ -49,6 +50,18 @@ in stdenv.mkDerivation rec {
|
|||||||
substituteInPlace CMakeLists.txt \
|
substituteInPlace CMakeLists.txt \
|
||||||
--replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
|
--replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
|
||||||
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
|
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
|
||||||
|
''
|
||||||
|
+ 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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# hacky fix: created binaries need to be run before installation
|
# hacky fix: created binaries need to be run before installation
|
||||||
|
@ -91,6 +91,20 @@ in stdenv.mkDerivation rec {
|
|||||||
+ stdenv.lib.optionalString (enableSharedLibraries) ''
|
+ stdenv.lib.optionalString (enableSharedLibraries) ''
|
||||||
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
|
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
|
||||||
patch -p1 < ./llvm-outputs.patch
|
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
|
# hacky fix: created binaries need to be run before installation
|
||||||
|
@ -67,6 +67,20 @@ in stdenv.mkDerivation rec {
|
|||||||
+ stdenv.lib.optionalString (enableSharedLibraries) ''
|
+ stdenv.lib.optionalString (enableSharedLibraries) ''
|
||||||
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
|
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
|
||||||
patch -p1 < ./llvm-outputs.patch
|
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
|
# hacky fix: created binaries need to be run before installation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user