Disable ISA optimisation

This commit is contained in:
Mikael 2024-07-31 16:22:35 +02:00
parent 0e76dd8ec1
commit 984eaf1e99

View file

@ -14,7 +14,7 @@
eachSystem = lib.genAttrs [ "x86_64-linux" ]; eachSystem = lib.genAttrs [ "x86_64-linux" ];
legacyPackages = eachSystem (system: import nixpkgs { inherit system; }); legacyPackages = eachSystem (system: import nixpkgs { inherit system; });
linux-hardened = pkgs: arch: configfile: linux-hardened = pkgs: configfile:
let let
inherit (pkgs) linuxKernel fetchFromGitHub overrideCC; inherit (pkgs) linuxKernel fetchFromGitHub overrideCC;
inherit (pkgs.llvmPackages_latest) clangUseLLVM bintools; inherit (pkgs.llvmPackages_latest) clangUseLLVM bintools;
@ -33,8 +33,7 @@
stdenv = overrideCC pkgs.stdenv stdenv = overrideCC pkgs.stdenv
(clangUseLLVM.override { inherit bintools; }); (clangUseLLVM.override { inherit bintools; });
extraMakeFlags = extraMakeFlags = [ "LLVM=1" ];
[ "LLVM=1" "KCFLAGS=-march=${arch}" ];
isHardened = true; isHardened = true;
inherit configfile features; inherit configfile features;
@ -50,9 +49,9 @@
pkgs = legacyPackages.x86_64-linux; pkgs = legacyPackages.x86_64-linux;
in { in {
qemu-virtio = qemu-virtio =
linux-hardened pkgs "x86-64-v3" ./x86-64/qemu-virtio; linux-hardened pkgs ./x86-64/qemu-virtio;
thinkpad-x1-extreme-gen5 = thinkpad-x1-extreme-gen5 =
linux-hardened pkgs "alderlake" ./x86-64/thinkpad-x1-extreme-gen5; linux-hardened pkgs ./x86-64/thinkpad-x1-extreme-gen5;
}; };
devShells.x86_64-linux = devShells.x86_64-linux =