Skip to contentSkip to conversation

correct disabling of -Wstringop-overflow

PATCH New Jan Beulich 1 participant 1 message Apr 14, 2025 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 correct disabling of -Wstringop-overflow

As was done up to 6.5, disabling of warnings needs to probe for the positive command line option. Hence why there is cc-disable-warning.

Fixes a5e0ace04fbf ("init: Kconfig: Disable -Wstringop-overflow for GCC-11")
Makefile +1 -1
@@ -1054,7 +1054,7 @@ NOSTDINC_FLAGS += -nostdinc
 KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)
 
 #Currently, disable -Wstringop-overflow for GCC 11, globally.
-KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-option, -Wno-stringop-overflow)
+KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-disable-warning,stringop-overflow)
 KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, -Wstringop-overflow)
 
 # disable invalid "can't wrap" optimizations for signed / pointers