From 3b2a2eb1ce94241744d81efc98e75f8c2d8cc048 Mon Sep 17 00:00:00 2001 From: nat Date: Mon, 8 Sep 2025 19:15:28 +0200 Subject: [PATCH] limine: disable zerocallusedregs on loongarch64/riscv64 --- pkgs/by-name/li/limine/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/li/limine/package.nix b/pkgs/by-name/li/limine/package.nix index 0307263a1e47..70e48f53de7e 100644 --- a/pkgs/by-name/li/limine/package.nix +++ b/pkgs/by-name/li/limine/package.nix @@ -23,6 +23,13 @@ let || (if targets == [ ] then stdenv.hostPlatform.isx86_64 else (builtins.elem "x86_64" targets)) || enableAll; + missingZerocallusedregs = + ( + if targets == [ ] then stdenv.hostPlatform.isLoongArch64 else (builtins.elem "loongarch64" targets) + ) + || (if targets == [ ] then stdenv.hostPlatform.isRiscV64 else (builtins.elem "riscv64" targets)) + || enableAll; + biosSupport' = biosSupport && hasX86; pxeSupport' = pxeSupport && hasX86; @@ -54,6 +61,10 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; + hardeningDisable = lib.optionals missingZerocallusedregs [ + "zerocallusedregs" + ]; + nativeBuildInputs = [ llvmPackages.libllvm llvmPackages.lld