Check whenever the compiler used knows the warning we want disable.
Fixes: 22130dcd98b4 ("Basetools: turn off gcc12 warning")
Reported-by: Rebecca Cran <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
---
BaseTools/Source/C/DevicePath/GNUmakefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile
b/BaseTools/Source/C/DevicePath/GNUmakefile
index b05d2bddfa68..1cc966c4831f 100644
--- a/BaseTools/Source/C/DevicePath/GNUmakefile
+++ b/BaseTools/Source/C/DevicePath/GNUmakefile
@@ -12,9 +12,10 @@ APPNAME = DevicePath
OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o
DevicePathUtilities.o
include $(MAKEROOT)/Makefiles/app.makefile
+include $(MAKEROOT)/Makefiles/compiler.makefile
# gcc 12 trips over device path handling
-BUILD_CFLAGS += -Wno-error=stringop-overflow
+BUILD_CFLAGS += $(call cc-disable-warning,stringop-overflow)
LIBS = -lCommon
ifeq ($(CYGWIN), CYGWIN)
--
2.35.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88406): https://edk2.groups.io/g/devel/message/88406
Mute This Topic: https://groups.io/mt/90237797/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-