diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 54378dbe13d3..1d1788ba0d80 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -30,8 +30,12 @@ edk2.mkDerivation projectDscPath { hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ]; + # Fails on i686 with: + # 'cc1: error: LTO support has not been enabled in this configuration' + NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-fno-lto" ]; + buildFlags = - lib.optional secureBoot "-D SECURE_BOOT_ENABLE=TRUE" + lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ] ++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ] ++ lib.optionals httpSupport [ "-D NETWORK_HTTP_ENABLE=TRUE" "-D NETWORK_HTTP_BOOT_ENABLE=TRUE" ] ++ lib.optionals tpmSupport [ "-D TPM_ENABLE" "-D TPM2_ENABLE" "-D TPM2_CONFIG_ENABLE"];