[PATCH RFC next 14/18] kbuild: respect CONFIG_WERROR for linker and assembler

Ilias Apalodimas ilias.apalodimas at linaro.org
Tue May 5 07:46:38 CEST 2026


On Mon, 4 May 2026 at 16:20, Quentin Schulz <foss+uboot at 0leil.net> wrote:
>
> From: Quentin Schulz <quentin.schulz at cherry.de>
>
> [ Upstream commit ec4a3992bc0b5b659eceb44a9f8582b26f2c8489 ]
>
> Original commit log:
>
>   The linker and assembler do not share the compiler flags.
>
>   Make sure they also fail on warnings with CONFIG_WERROR and W=e.
>
> Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
> ---

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>

>  scripts/Makefile.extrawarn | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index 2af90af594e..29b6aab5f72 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -104,6 +104,8 @@ endif
>  ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
>
>  KBUILD_CPPFLAGS                += -Werror
> +KBUILD_AFLAGS          += -Wa,--fatal-warnings
> +KBUILD_LDFLAGS         += --fatal-warnings
>  KBUILD_RUSTFLAGS       += -Dwarnings
>
>  endif
>
> --
> 2.54.0
>


More information about the U-Boot mailing list