]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/DevicePath/GNUmakefile
BaseTools: Fix DevicePath tool build failure issue
[mirror_edk2.git] / BaseTools / Source / C / DevicePath / GNUmakefile
index b05d2bddfa68c977dadcb50545095f5da26c94db..c217674345b1b7884c9dab233afeb828abf8c7e2 100644 (file)
@@ -13,8 +13,13 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili
 \r
 include $(MAKEROOT)/Makefiles/app.makefile\r
 \r
+GCCVERSION = $(shell gcc -dumpversion | awk -F'.' '{print $$1}')\r
+ifneq ("$(GCCVERSION)", "5")\r
+ifneq ($(CXX), llvm)\r
 # gcc 12 trips over device path handling\r
 BUILD_CFLAGS += -Wno-error=stringop-overflow\r
+endif\r
+endif\r
 \r
 LIBS = -lCommon\r
 ifeq ($(CYGWIN), CYGWIN)\r