diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile index b05d2bddfa..c217674345 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -13,8 +13,13 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DevicePathUtili include $(MAKEROOT)/Makefiles/app.makefile +GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}') +ifneq ("$(GCCVERSION)", "5") +ifneq ($(CXX), llvm) # gcc 12 trips over device path handling BUILD_CFLAGS += -Wno-error=stringop-overflow +endif +endif LIBS = -lCommon ifeq ($(CYGWIN), CYGWIN)