Skip to content

Commit 609db7e

Browse files
siddheshojeda
authored andcommitted
rust: kbuild: Add -fdiagnostics-show-context to bindgen_skip_c_flags
This got added with: 7454048 ("kbuild: Enable GCC diagnostic context for value-tracking warnings") but clang does not have this option, so avoid passing it to bindgen. [ 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 ] Fixes: 7454048 ("kbuild: Enable GCC diagnostic context for value-tracking warnings") Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org> Link: https://patch.msgid.link/20251217224050.1186896-1-siddhesh@gotplt.org [ Removed Cc: stable. Added title prefix. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent c18f35e commit 609db7e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

rust/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
383383
-fno-inline-functions-called-once -fsanitize=bounds-strict \
384384
-fstrict-flex-arrays=% -fmin-function-alignment=% \
385385
-fzero-init-padding-bits=% -mno-fdpic \
386+
-fdiagnostics-show-context -fdiagnostics-show-context=% \
386387
--param=% --param asan-% -fno-isolate-erroneous-paths-dereference
387388

388389
# Derived from `scripts/Makefile.clang`.

0 commit comments

Comments
 (0)