This got added with:
7454048db27d6 ("kbuild: Enable GCC diagnostic context for value-tracking warnings")
but clang does not have this option, so avoid passing it to bindgen.
Cc: stable@vger.kernel.org Fixes: 7454048db27d6 ("kbuild: Enable GCC diagnostic context for value-tracking warnings") Signed-off-by: Siddhesh Poyarekar siddhesh@gotplt.org --- rust/Makefile | 1 + 1 file changed, 1 insertion(+)
diff --git a/rust/Makefile b/rust/Makefile index 5d357dce1704..4dcc2eff51cb 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -383,6 +383,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \ -fno-inline-functions-called-once -fsanitize=bounds-strict \ -fstrict-flex-arrays=% -fmin-function-alignment=% \ -fzero-init-padding-bits=% -mno-fdpic \ + -fdiagnostics-show-context -fdiagnostics-show-context=% \ --param=% --param asan-% -fno-isolate-erroneous-paths-dereference
# Derived from `scripts/Makefile.clang`.
On Wed, Dec 17, 2025 at 11:41 PM Siddhesh Poyarekar siddhesh@gotplt.org wrote:
but clang does not have this option, so avoid passing it to bindgen.
This looks indeed correct, although it is not yet in a released GCC (testing quickly in Compiler Explorer, GCC 15.2 doesn't have it, but GCC trunk has).
I will apply it -- Cc'ing ClangBuiltLinux and Kbuild so that they are aware.
Thanks!
Cheers, Miguel
On 2026-01-04 15:53, Miguel Ojeda wrote:
On Wed, Dec 17, 2025 at 11:41 PM Siddhesh Poyarekar siddhesh@gotplt.org wrote:
but clang does not have this option, so avoid passing it to bindgen.
This looks indeed correct, although it is not yet in a released GCC (testing quickly in Compiler Explorer, GCC 15.2 doesn't have it, but GCC trunk has).
Yes, sorry I didn't mention that in my commit message; it's mentioned in Kees' commit message (7454048db27d6).
I will apply it -- Cc'ing ClangBuiltLinux and Kbuild so that they are aware.
Thank you!
Sid
On Sun, Jan 04, 2026 at 09:53:25PM +0100, Miguel Ojeda wrote:
On Wed, Dec 17, 2025 at 11:41 PM Siddhesh Poyarekar siddhesh@gotplt.org wrote:
but clang does not have this option, so avoid passing it to bindgen.
This looks indeed correct, although it is not yet in a released GCC (testing quickly in Compiler Explorer, GCC 15.2 doesn't have it, but GCC trunk has).
I will apply it -- Cc'ing ClangBuiltLinux and Kbuild so that they are aware.
Right, this does look correct, as this option is specific to GCC for the purpose of exposing more information from GCC internals to the user for understanding diagnostics better.
I will say if this makes 6.19, the stable tag is not necessary since 7454048db27d6 landed in 6.19-rc1 and I would not expect it to get backported (but even if it did via AUTOSEL or something, the Fixes tag should ensure it gets included).
Cheers, Nathan
On Wed, Dec 17, 2025 at 11:41 PM Siddhesh Poyarekar siddhesh@gotplt.org wrote:
This got added with:
7454048db27d6 ("kbuild: Enable GCC diagnostic context for value-tracking warnings")
but clang does not have this option, so avoid passing it to bindgen.
Cc: stable@vger.kernel.org Fixes: 7454048db27d6 ("kbuild: Enable GCC diagnostic context for value-tracking warnings") Signed-off-by: Siddhesh Poyarekar siddhesh@gotplt.org
Applied to `rust-fixes` -- thanks everyone!
[ Details about what the option does are in the commit above. Nathan also expands on this:
Right, this does look correct, as this option is specific to GCC for the purpose of exposing more information from GCC internals to the user for understanding diagnostics better.
I checked that in Compiler Explorer GCC 15.2 doesn't have it, but GCC trunk indeed has. - Miguel ]
[ Removed Cc: stable. Added title prefix. - Miguel ]
Cheers, Miguel
linux-stable-mirror@lists.linaro.org