From: Quentin Schulz <[email protected]> This is not something that is in Linux kernel in v5.1, nor in v6.1 which will be the next sync. Since the next sync will be importing scripts/Makefile.extrawarn directly instead of backporting individual patches, CONFIG_WERROR handling would be gone.
Move the CONFIG_WERROR handling to the U-Boot-specific file such that it doesn't get removed during the next sync. Signed-off-by: Quentin Schulz <[email protected]> --- scripts/Makefile.extrawarn | 3 --- scripts/Makefile.extrawarn.u-boot | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index c5ed501d374..7dfc374a19d 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -22,9 +22,6 @@ endif export KBUILD_EXTRA_WARN -KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror -KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y) - ifeq ("$(origin W)", "command line") KBUILD_EXTRA_WARN := $(W) endif diff --git a/scripts/Makefile.extrawarn.u-boot b/scripts/Makefile.extrawarn.u-boot index 0a9b49a30f0..86f6fbc2301 100644 --- a/scripts/Makefile.extrawarn.u-boot +++ b/scripts/Makefile.extrawarn.u-boot @@ -25,3 +25,6 @@ ifdef CONFIG_CC_IS_CLANG # there are other places as well. For now, we will silence this warning. KBUILD_CFLAGS += $(call cc-disable-warning, deprecated-non-prototype) endif + +KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror +KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y) -- 2.54.0

