Re: [PATCH] rust: Add -fno-isolate-erroneous-paths-dereference to bindgen_skip_c_flags

From: Mingcong Bai

Date: Tue Oct 14 2025 - 23:20:26 EST


Hi Ruoyao,

在 2025/10/15 10:20, Xi Ruoyao 写道:
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")
Signed-off-by: Xi Ruoyao <xry111@xxxxxxxxxxx>
---
rust/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/Makefile b/rust/Makefile
index 23c7ae905bd2..0676b1194a62 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -289,7 +289,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

Tested good applied atop v6.18-rc1, which includes the aforementioned abb2a5572264.

Tested-by: Mingcong Bai <jeffbai@xxxxxxx>

Best Regards,
Mingcong Bai