diff options
-rw-r--r-- | BaseTools/Source/C/DevicePath/GNUmakefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile index b05d2bd..c217674 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)
|