rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mingcong Bai <jeffbai@aosc.io>
To: Xi Ruoyao <xry111@xry111.site>, Nathan Chancellor <nathan@kernel.org>
Cc: loongarch@lists.linux.dev, "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Tiezhu Yang" <yangtiezhu@loongson.cn>,
	"open list:RUST" <rust-for-linux@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b"
	<llvm@lists.linux.dev>
Subject: Re: [PATCH] rust: Add -fno-isolate-erroneous-paths-dereference to bindgen_skip_c_flags
Date: Wed, 15 Oct 2025 11:19:52 +0800	[thread overview]
Message-ID: <7ead454c-8807-4e50-800c-5a646d88fa25@aosc.io> (raw)
In-Reply-To: <20251015022037.14535-2-xry111@xry111.site>

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@xry111.site>
> ---
>   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@aosc.io>

Best Regards,
Mingcong Bai


  reply	other threads:[~2025-10-15  3:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15  2:20 [PATCH] rust: Add -fno-isolate-erroneous-paths-dereference to bindgen_skip_c_flags Xi Ruoyao
2025-10-15  3:19 ` Mingcong Bai [this message]
2025-10-15 10:20 ` Miguel Ojeda
2025-10-15 10:31   ` Huacai Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ead454c-8807-4e50-800c-5a646d88fa25@aosc.io \
    --to=jeffbai@aosc.io \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=chenhuacai@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=loongarch@lists.linux.dev \
    --cc=lossin@kernel.org \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=xry111@xry111.site \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).