From ce1c2ac4cbe4f9e5393f6a641205c2a1d74f8aa4 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:25:59 +0200 Subject: [PATCH] edk2: fix build on x86_64-darwin --- pkgs/development/compilers/edk2/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix index 304ca30b5229..d34ae7b8143e 100644 --- a/pkgs/development/compilers/edk2/default.nix +++ b/pkgs/development/compilers/edk2/default.nix @@ -68,7 +68,9 @@ edk2 = stdenv.mkDerivation rec { makeFlags = [ "-C BaseTools" ]; - env.NIX_CFLAGS_COMPILE = "-Wno-return-type" + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation"; + env.NIX_CFLAGS_COMPILE = "-Wno-return-type" + + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation" + + lib.optionalString (stdenv.isDarwin) " -Wno-error=macro-redefined"; hardeningDisable = [ "format" "fortify" ];