]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
rust: kbuild: add -fzero-init-padding-bits to bindgen_skip_cflags
authorJustin M. Forbes <jforbes@fedoraproject.org>
Wed, 29 Jan 2025 21:50:02 +0000 (14:50 -0700)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 6 Feb 2025 16:13:13 +0000 (17:13 +0100)
This seems to break the build when building with gcc15:

    Unable to generate bindings: ClangDiagnostic("error: unknown
    argument: '-fzero-init-padding-bits=all'\n")

Thus skip that flag.

Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
Fixes: dce4aab8441d ("kbuild: Use -fzero-init-padding-bits=all")
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20250129215003.1736127-1-jforbes@fedoraproject.org
[ Slightly reworded commit. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/Makefile

index ff4343ca3f7c40211c03ec3162608bac49f0e10e..ff8a5e810d65e466ef330e53cd4526df7a84f534 100644 (file)
@@ -240,6 +240,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
        -fzero-call-used-regs=% -fno-stack-clash-protection \
        -fno-inline-functions-called-once -fsanitize=bounds-strict \
        -fstrict-flex-arrays=% -fmin-function-alignment=% \
+       -fzero-init-padding-bits=% \
        --param=% --param asan-%
 
 # Derived from `scripts/Makefile.clang`.