Skip to content

Commit

Permalink
BaseTools: Fix DevicePath GNUmakefile for macOS
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Michael D Kinney <[email protected]>
  • Loading branch information
bexcran authored and mergify[bot] committed Aug 28, 2022
1 parent 39ff976 commit ba0e0e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BaseTools/Source/C/DevicePath/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ba0e0e4

Please sign in to comment.