]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rust: Add -fno-isolate-erroneous-paths-dereference to bindgen_skip_c_flags
authorXi Ruoyao <xry111@xry111.site>
Sun, 9 Nov 2025 08:01:50 +0000 (16:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Nov 2025 09:35:49 +0000 (10:35 +0100)
[ Upstream commit fe4b3a34e9a9654d98d274218dac0270779db0ae ]

It's used to work around an objtool issue since commit abb2a5572264
("LoongArch: Add cflag -fno-isolate-erroneous-paths-dereference"), but
it's then passed to bindgen and cause an error because Clang does not
have this option.

Fixes: abb2a5572264 ("LoongArch: Add cflag -fno-isolate-erroneous-paths-dereference")
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Tested-by: Mingcong Bai <jeffbai@aosc.io>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
rust/Makefile

index 07c13100000cd74f220771199e8c8a8a751fe549..c68c147205ed800783d225fba5187d9620e9c888 100644 (file)
@@ -249,7 +249,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 \
-       --param=% --param asan-%
+       --param=% --param asan-% -fno-isolate-erroneous-paths-dereference
 
 # Derived from `scripts/Makefile.clang`.
 BINDGEN_TARGET_x86     := x86_64-linux-gnu