limine: Fix build
Resolves #377469 by compiling the freestanding part with an unwrapped compiler. This compiler is required to be the default directly in the `PATH`. However a *wrapped* compiler is *also* required, but can be passed by a `CC` environment variable. Includes change to clang path from lzcnt.
This commit is contained in:
@@ -47,7 +47,13 @@ let
|
||||
++ lib.optionals pxeSupport [ "--enable-bios-pxe" ]
|
||||
++ lib.concatMap uefiFlags (
|
||||
if targets == [ ] then [ stdenv.hostPlatform.parsed.cpu.name ] else targets
|
||||
);
|
||||
)
|
||||
++ [
|
||||
"TOOLCHAIN_FOR_TARGET=llvm"
|
||||
# `clang` on `PATH` has to be unwrapped, but *a* wrapped clang
|
||||
# still needs to be available
|
||||
"CC=${lib.getExe stdenv.cc}"
|
||||
];
|
||||
in
|
||||
|
||||
assert lib.assertMsg (!(biosSupport && !hasI686)) "BIOS builds are possible only for x86";
|
||||
@@ -76,6 +82,7 @@ stdenv.mkDerivation {
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
llvmPackages.clang-unwrapped
|
||||
llvmPackages.libllvm
|
||||
llvmPackages.lld
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user