While I can't test this myself, the following does appear to result in a successful build using the same clang version: diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile index b05d2bddfa..81aa35aa31 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -14,7 +14,9 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o  DevicePathUtili include $(MAKEROOT)/Makefiles/app.makefile # gcc 12 trips over device path handling -BUILD_CFLAGS += -Wno-error=stringop-overflow +ifeq($(CC), gcc) +  BUILD_CFLAGS += -Wno-error=stringop-overflow +endif LIBS = -lCommon ifeq ($(CYGWIN), CYGWIN)