rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps
@ 2025-08-14 10:14 Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 1/6] kbuild: align W=e with CONFIG_WERROR Thomas Weißschuh
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2025-08-14 10:14 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kbuild, linux-kernel, rust-for-linux, Thomas Weißschuh

CONFIG_WERROR is useful for all build steps, not only compilation of C and
Rust sources linked into the kernel.

Also enable it for assembler and linker invocations and userprogs.

In addition unify the implementations of CONFIG_WERROR and W=e.

This partially implements features of Miguel's Rust -Werror series [0].
The changes to $(common_rust_flags) are not incorporated as it also modifies
Rust hostprog flags.

[0] https://lore.kernel.org/rust-for-linux/20240519211235.589325-2-ojeda@kernel.org

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v2:
- Unify CONFIG_WERROR with W=e
- Unconditionally enable -Werror for C and Rust hostprogs
- Link to v1: https://lore.kernel.org/r/20250812-kbuild-werror-v1-0-36c9ff653700@linutronix.de

---
Miguel Ojeda (1):
      kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn`

Thomas Weißschuh (5):
      kbuild: align W=e with CONFIG_WERROR
      kbuild: unify W=e and CONFIG_WERROR
      kbuild: respect CONFIG_WERROR for linker and assembler
      kbuild: respect CONFIG_WERROR for userprogs
      kbuild: enable -Werror for hostprogs

 Makefile                   |  3 ---
 scripts/Makefile.extrawarn | 18 +++++++++++++-----
 2 files changed, 13 insertions(+), 8 deletions(-)
---
base-commit: e8ee794a1f7705edd64b9eb9837e7baa4421c084
change-id: 20250801-kbuild-werror-081f72fee1de

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/6] kbuild: align W=e with CONFIG_WERROR
  2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
@ 2025-08-14 10:14 ` Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 2/6] kbuild: unify W=e and CONFIG_WERROR Thomas Weißschuh
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2025-08-14 10:14 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kbuild, linux-kernel, rust-for-linux, Thomas Weißschuh

CONFIG_WERROR sets KBUILD_CPPFLAGS while W=e would only set KBUILD_CFLAGS.

As a preparation to unify the two mechanism, align their effects.

While at it, add some alignment whitespace to prepare for later additions
to the list of changed variables.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 scripts/Makefile.extrawarn | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index dca175fffcabeb2d942814f0a096a7efbf8bc819..4b4e8e136ce6b45f43dc7658eda78ae2b37bd792 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -218,6 +218,6 @@ endif
 #
 ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),)
 
-KBUILD_CFLAGS += -Werror
+KBUILD_CPPFLAGS		+= -Werror
 
 endif

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 2/6] kbuild: unify W=e and CONFIG_WERROR
  2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 1/6] kbuild: align W=e with CONFIG_WERROR Thomas Weißschuh
@ 2025-08-14 10:14 ` Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 3/6] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` Thomas Weißschuh
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2025-08-14 10:14 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kbuild, linux-kernel, rust-for-linux, Thomas Weißschuh

The two mechanisms have the same effect, unify their implementation.

Also avoid spurious rebuilds when switching between the two.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 scripts/Makefile.extrawarn | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 4b4e8e136ce6b45f43dc7658eda78ae2b37bd792..1ffc7beca43bc9e373064194dc8975182815a872 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -25,8 +25,6 @@ ifneq ($(CONFIG_FRAME_WARN),0)
 KBUILD_CFLAGS += -Wframe-larger-than=$(CONFIG_FRAME_WARN)
 endif
 
-KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror
-KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y)
 KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
 
 ifdef CONFIG_CC_IS_CLANG
@@ -214,9 +212,9 @@ KBUILD_CFLAGS += -Wno-unused-parameter
 endif
 
 #
-# W=e - error out on warnings
+# W=e and CONFIG_WERROR - error out on warnings
 #
-ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),)
+ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
 
 KBUILD_CPPFLAGS		+= -Werror
 

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 3/6] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn`
  2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 1/6] kbuild: align W=e with CONFIG_WERROR Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 2/6] kbuild: unify W=e and CONFIG_WERROR Thomas Weißschuh
@ 2025-08-14 10:14 ` Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 4/6] kbuild: respect CONFIG_WERROR for linker and assembler Thomas Weißschuh
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2025-08-14 10:14 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kbuild, linux-kernel, rust-for-linux, Thomas Weißschuh

From: Miguel Ojeda <ojeda@kernel.org>

Following commit e88ca24319e4 ("kbuild: consolidate warning flags
in scripts/Makefile.extrawarn"), move `-Dwarnings` handling into
`Makefile.extrawarn` like C's `-Werror`.

No functional change intended.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 Makefile                   | 3 ---
 scripts/Makefile.extrawarn | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 6bfe776bf3c5ff0cf187dc6719dd5817cd4af2ca..6630a66659c6d1ca7e72448b04d16c3fdd1fbe24 100644
--- a/Makefile
+++ b/Makefile
@@ -901,9 +901,6 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG)      := -fstack-protector-strong
 
 KBUILD_CFLAGS += $(stackp-flags-y)
 
-KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings
-KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y)
-
 ifdef CONFIG_FRAME_POINTER
 KBUILD_CFLAGS	+= -fno-omit-frame-pointer -fno-optimize-sibling-calls
 KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 1ffc7beca43bc9e373064194dc8975182815a872..b04b3062e0e49c3ae7471973251017e8738cd244 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -217,5 +217,6 @@ endif
 ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
 
 KBUILD_CPPFLAGS		+= -Werror
+KBUILD_RUSTFLAGS	+= -Dwarnings
 
 endif

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 4/6] kbuild: respect CONFIG_WERROR for linker and assembler
  2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
                   ` (2 preceding siblings ...)
  2025-08-14 10:14 ` [PATCH v2 3/6] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` Thomas Weißschuh
@ 2025-08-14 10:14 ` Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 5/6] kbuild: respect CONFIG_WERROR for userprogs Thomas Weißschuh
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2025-08-14 10:14 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kbuild, linux-kernel, rust-for-linux, Thomas Weißschuh

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: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 scripts/Makefile.extrawarn | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index b04b3062e0e49c3ae7471973251017e8738cd244..6efb9e5eeeed0696a061a17e029a92caba50826f 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -217,6 +217,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.50.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 5/6] kbuild: respect CONFIG_WERROR for userprogs
  2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
                   ` (3 preceding siblings ...)
  2025-08-14 10:14 ` [PATCH v2 4/6] kbuild: respect CONFIG_WERROR for linker and assembler Thomas Weißschuh
@ 2025-08-14 10:14 ` Thomas Weißschuh
  2025-08-14 10:14 ` [PATCH v2 6/6] kbuild: enable -Werror for hostprogs Thomas Weißschuh
  2025-08-14 19:11 ` [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Nathan Chancellor
  6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2025-08-14 10:14 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kbuild, linux-kernel, rust-for-linux, Thomas Weißschuh

The userprogs compiler and linker do not share the regular compiler flags.

Make sure they also fail on warnings with CONFIG_WERROR and W=e.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 scripts/Makefile.extrawarn | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 6efb9e5eeeed0696a061a17e029a92caba50826f..96ff3f5582d651f0016c8ccd49d46022cc6fe070 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -219,6 +219,8 @@ ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
 KBUILD_CPPFLAGS		+= -Werror
 KBUILD_AFLAGS		+= -Wa,--fatal-warnings
 KBUILD_LDFLAGS		+= --fatal-warnings
+KBUILD_USERCFLAGS	+= -Werror
+KBUILD_USERLDFLAGS	+= -Wl,--fatal-warnings
 KBUILD_RUSTFLAGS	+= -Dwarnings
 
 endif

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 6/6] kbuild: enable -Werror for hostprogs
  2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
                   ` (4 preceding siblings ...)
  2025-08-14 10:14 ` [PATCH v2 5/6] kbuild: respect CONFIG_WERROR for userprogs Thomas Weißschuh
@ 2025-08-14 10:14 ` Thomas Weißschuh
  2025-08-14 12:10   ` Nicolas Schier
  2025-08-17 16:31   ` Miguel Ojeda
  2025-08-14 19:11 ` [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Nathan Chancellor
  6 siblings, 2 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2025-08-14 10:14 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich
  Cc: linux-kbuild, linux-kernel, rust-for-linux, Thomas Weißschuh

The hostprog compilers and linkers do not share the regular compiler flags,
so they are not affected by CONFIG_WERROR or W=e. As hostprogs are used
during the bootstrap of the build, they can't depend on kconfig options.

Enable -Werror unconditionally.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

---
For testing in -next, as discussed in
https://lore.kernel.org/lkml/20250812-kbuild-werror-v1-2-36c9ff653700@linutronix.de/
---
 scripts/Makefile.extrawarn | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 96ff3f5582d651f0016c8ccd49d46022cc6fe070..1434cb6208cb82f20aeb29cc8c059220d1a1f6d2 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -224,3 +224,8 @@ KBUILD_USERLDFLAGS	+= -Wl,--fatal-warnings
 KBUILD_RUSTFLAGS	+= -Dwarnings
 
 endif
+
+# Hostprog flags are used during build bootstrapping and can not rely on CONFIG_ symbols.
+KBUILD_HOSTCFLAGS	+= -Werror
+KBUILD_HOSTLDFLAGS	+= -Wl,--fatal-warnings
+KBUILD_HOSTRUSTFLAGS	+= -Dwarnings

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 6/6] kbuild: enable -Werror for hostprogs
  2025-08-14 10:14 ` [PATCH v2 6/6] kbuild: enable -Werror for hostprogs Thomas Weißschuh
@ 2025-08-14 12:10   ` Nicolas Schier
  2025-08-14 18:30     ` Nathan Chancellor
  2025-08-17 16:31   ` Miguel Ojeda
  1 sibling, 1 reply; 12+ messages in thread
From: Nicolas Schier @ 2025-08-14 12:10 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Nathan Chancellor, Miguel Ojeda, Alex Gaynor, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, Danilo Krummrich, linux-kbuild,
	linux-kernel, rust-for-linux

On Thu, Aug 14, 2025 at 12:14:46PM +0200, Thomas Weißschuh wrote:
> The hostprog compilers and linkers do not share the regular compiler flags,
> so they are not affected by CONFIG_WERROR or W=e. As hostprogs are used
> during the bootstrap of the build, they can't depend on kconfig options.
> 
> Enable -Werror unconditionally.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> 
> ---
> For testing in -next, as discussed in
> https://lore.kernel.org/lkml/20250812-kbuild-werror-v1-2-36c9ff653700@linutronix.de/

yeah, I am not sure if this is a good change, but I am ok with testing
it in next, as Nathan suggested.

For the rest of the series:

Reviewed-by: Nicolas Schier <nsc@kernel.org>

Thanks.

> ---
>  scripts/Makefile.extrawarn | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index 96ff3f5582d651f0016c8ccd49d46022cc6fe070..1434cb6208cb82f20aeb29cc8c059220d1a1f6d2 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -224,3 +224,8 @@ KBUILD_USERLDFLAGS	+= -Wl,--fatal-warnings
>  KBUILD_RUSTFLAGS	+= -Dwarnings
>  
>  endif
> +
> +# Hostprog flags are used during build bootstrapping and can not rely on CONFIG_ symbols.
> +KBUILD_HOSTCFLAGS	+= -Werror
> +KBUILD_HOSTLDFLAGS	+= -Wl,--fatal-warnings
> +KBUILD_HOSTRUSTFLAGS	+= -Dwarnings
> 
> -- 
> 2.50.1
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 6/6] kbuild: enable -Werror for hostprogs
  2025-08-14 12:10   ` Nicolas Schier
@ 2025-08-14 18:30     ` Nathan Chancellor
  0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2025-08-14 18:30 UTC (permalink / raw)
  To: Nicolas Schier
  Cc: Thomas Weißschuh, Miguel Ojeda, Alex Gaynor, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, Danilo Krummrich, linux-kbuild,
	linux-kernel, rust-for-linux

On Thu, Aug 14, 2025 at 02:10:13PM +0200, Nicolas Schier wrote:
> On Thu, Aug 14, 2025 at 12:14:46PM +0200, Thomas Weißschuh wrote:
> > The hostprog compilers and linkers do not share the regular compiler flags,
> > so they are not affected by CONFIG_WERROR or W=e. As hostprogs are used
> > during the bootstrap of the build, they can't depend on kconfig options.
> > 
> > Enable -Werror unconditionally.
> > 
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > 
> > ---
> > For testing in -next, as discussed in
> > https://lore.kernel.org/lkml/20250812-kbuild-werror-v1-2-36c9ff653700@linutronix.de/
> 
> yeah, I am not sure if this is a good change, but I am ok with testing
> it in next, as Nathan suggested.

Yeah, I will leave this as the top patch in kbuild-next for now so that
we can easily back out if it is disruptive.

> For the rest of the series:
> 
> Reviewed-by: Nicolas Schier <nsc@kernel.org>

I applied this tag to patches 1 through 5 and left it off of this one,
based on "for the rest of the series". Let me know if that was
unintentional.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps
  2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
                   ` (5 preceding siblings ...)
  2025-08-14 10:14 ` [PATCH v2 6/6] kbuild: enable -Werror for hostprogs Thomas Weißschuh
@ 2025-08-14 19:11 ` Nathan Chancellor
  6 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2025-08-14 19:11 UTC (permalink / raw)
  To: Nicolas Schier, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, Thomas Weißschuh
  Cc: linux-kbuild, linux-kernel, rust-for-linux


On Thu, 14 Aug 2025 12:14:40 +0200, Thomas Weißschuh wrote:
> CONFIG_WERROR is useful for all build steps, not only compilation of C and
> Rust sources linked into the kernel.
> 
> Also enable it for assembler and linker invocations and userprogs.
> 
> In addition unify the implementations of CONFIG_WERROR and W=e.
> 
> [...]

Applied, thanks!

[1/6] kbuild: align W=e with CONFIG_WERROR
      https://git.kernel.org/kbuild/c/f852ce052a8b7
[2/6] kbuild: unify W=e and CONFIG_WERROR
      https://git.kernel.org/kbuild/c/e7a10929c574c
[3/6] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn`
      https://git.kernel.org/kbuild/c/592b571f20c5b
[4/6] kbuild: respect CONFIG_WERROR for linker and assembler
      https://git.kernel.org/kbuild/c/ec4a3992bc0b5
[5/6] kbuild: respect CONFIG_WERROR for userprogs
      https://git.kernel.org/kbuild/c/3f0ff4cc6ffb4
[6/6] kbuild: enable -Werror for hostprogs
      https://git.kernel.org/kbuild/c/a646e96080cd5

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 6/6] kbuild: enable -Werror for hostprogs
  2025-08-14 10:14 ` [PATCH v2 6/6] kbuild: enable -Werror for hostprogs Thomas Weißschuh
  2025-08-14 12:10   ` Nicolas Schier
@ 2025-08-17 16:31   ` Miguel Ojeda
  2025-08-18 17:45     ` Nathan Chancellor
  1 sibling, 1 reply; 12+ messages in thread
From: Miguel Ojeda @ 2025-08-17 16:31 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: Nathan Chancellor, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
	linux-kbuild, linux-kernel, rust-for-linux

On Thu, Aug 14, 2025 at 12:15 PM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> The hostprog compilers and linkers do not share the regular compiler flags,
> so they are not affected by CONFIG_WERROR or W=e. As hostprogs are used
> during the bootstrap of the build, they can't depend on kconfig options.
>
> Enable -Werror unconditionally.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>
> ---
> For testing in -next, as discussed in
> https://lore.kernel.org/lkml/20250812-kbuild-werror-v1-2-36c9ff653700@linutronix.de/

The discussion was on patch 0, i.e. the next message in Lore's tree
view -- I would suggest adding it to the commit message for reference:

Link: https://lore.kernel.org/rust-for-linux/CANiq72k-PdSH2BNgbq=X+FhpyEErifSCKfO5ObXz6bu9_J8+fA@mail.gmail.com/

Anyway, since Nathan already applied it, and I see a couple patches on
top, no big deal if it cannot be added.

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 6/6] kbuild: enable -Werror for hostprogs
  2025-08-17 16:31   ` Miguel Ojeda
@ 2025-08-18 17:45     ` Nathan Chancellor
  0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2025-08-18 17:45 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Thomas Weißschuh, Nicolas Schier, Miguel Ojeda, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
	linux-kbuild, linux-kernel, rust-for-linux

On Sun, Aug 17, 2025 at 06:31:06PM +0200, Miguel Ojeda wrote:
> The discussion was on patch 0, i.e. the next message in Lore's tree
> view -- I would suggest adding it to the commit message for reference:
> 
> Link: https://lore.kernel.org/rust-for-linux/CANiq72k-PdSH2BNgbq=X+FhpyEErifSCKfO5ObXz6bu9_J8+fA@mail.gmail.com/
> 
> Anyway, since Nathan already applied it, and I see a couple patches on
> top, no big deal if it cannot be added.

I dropped the top patch due to a build failure:

https://lore.kernel.org/20250818140143.61b8c466@canb.auug.org.au/

So I was okay with just rebasing the top commit to amend this one,
especially when giving more context to the patch. Thanks for the
suggestion!

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-08-18 17:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 1/6] kbuild: align W=e with CONFIG_WERROR Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 2/6] kbuild: unify W=e and CONFIG_WERROR Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 3/6] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 4/6] kbuild: respect CONFIG_WERROR for linker and assembler Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 5/6] kbuild: respect CONFIG_WERROR for userprogs Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 6/6] kbuild: enable -Werror for hostprogs Thomas Weißschuh
2025-08-14 12:10   ` Nicolas Schier
2025-08-14 18:30     ` Nathan Chancellor
2025-08-17 16:31   ` Miguel Ojeda
2025-08-18 17:45     ` Nathan Chancellor
2025-08-14 19:11 ` [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).