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 <rebecca@bsdio.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Rebecca Cran 2022-08-26 09:31:46 +08:00 committed by mergify[bot]
parent 39ff9769ca
commit ba0e0e4c6a
1 changed files with 2 additions and 0 deletions

View File

@ -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)