Merge pull request #144778 from thiagokokada/zhf-ovmf-i686

OVMF: disable LTO on i686
This commit is contained in:
Thiago Kenji Okada 2021-11-05 20:03:43 -03:00 committed by GitHub
commit d2c613620d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"];