mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
llvmPackages_12.openmp,llvmPackages_13.openmp: fix cross
CMake commit faa950a155 ("try_compile: Run native build tool with verbose output")
did not play well with these versions of openmp, which have a faulty
failure regex that considers "unknown" in the build output to indicate
a failure. When cross compiling, the string "unknown" is very likely
to occur as part of triples. Fix by backporting a patch that improves
the failure regex check to not be tripped up by triples.
The same problem affects LLVM 11 and possibly earlier, but the patch
doesn't apply that far back, so I didn't bother for now.
Fixes: b8ac5b6cfb
("cmake: 3.25.3 -> 3.26.4")
This commit is contained in:
parent
1d9a88ae85
commit
fcc44e9aea
@ -2,6 +2,7 @@
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, llvm
|
||||
, targetLlvm
|
||||
@ -15,6 +16,16 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetch pname "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0";
|
||||
|
||||
patches = [
|
||||
# Fix cross.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
|
||||
hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
|
||||
})
|
||||
];
|
||||
|
||||
patchFlags = [ "-p2" ];
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [
|
||||
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
|
||||
|
@ -2,6 +2,7 @@
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, src
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, llvm
|
||||
, targetLlvm
|
||||
@ -16,6 +17,16 @@ stdenv.mkDerivation rec {
|
||||
inherit src;
|
||||
sourceRoot = "${src.name}/${pname}";
|
||||
|
||||
patches = [
|
||||
# Fix cross.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
|
||||
hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
|
||||
})
|
||||
];
|
||||
|
||||
patchFlags = [ "-p2" ];
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [
|
||||
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
|
||||
|
Loading…
Reference in New Issue
Block a user