From ba0e0e4c6a174b71b18ccd6e47319cc45878893c Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Fri, 26 Aug 2022 09:31:46 +0800 Subject: [PATCH] BaseTools: Fix DevicePath GNUmakefile for macOS On macOS, /usr/bin/gcc is clang, and so doesn't have the -Wno-error=stringop-overflow flag that was added for gcc 12. Update the GNUmakefile for DevicePath to skip setting that on macOS. Signed-off-by: Rebecca Cran Reviewed-by: Michael D Kinney --- BaseTools/Source/C/DevicePath/GNUmakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile index c217674345..17f213879e 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -16,10 +16,12 @@ include $(MAKEROOT)/Makefiles/app.makefile GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}') ifneq ("$(GCCVERSION)", "5") ifneq ($(CXX), llvm) +ifneq ($(DARWIN),Darwin) # gcc 12 trips over device path handling BUILD_CFLAGS += -Wno-error=stringop-overflow endif endif +endif LIBS = -lCommon ifeq ($(CYGWIN), CYGWIN) -- 2.39.2