rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Conor Dooley <conor@kernel.org>
Cc: "Asuna Yang" <spriteovo@gmail.com>,
	"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>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	"Han Gao" <rabenda.cn@gmail.com>,
	rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-kbuild@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v2] RISC-V: re-enable gcc + rust builds
Date: Wed, 17 Sep 2025 14:13:38 +0200	[thread overview]
Message-ID: <aMql8oB4GuU87lie@levanger> (raw)
In-Reply-To: <20250910-harmless-bamboo-ebc94758fdad@spud>

On Wed, Sep 10, 2025 at 03:27:19PM +0100, Conor Dooley wrote:
> On Tue, Sep 09, 2025 at 06:53:11PM +0200, Asuna Yang wrote:
> > Commit 33549fcf37ec ("RISC-V: disallow gcc + rust builds") disabled GCC
> > + Rust builds for RISC-V due to differences in extension handling
> > compared to LLVM.
> > 
> > Add a Kconfig symbol to indicate the version of libclang used by Rust
> > bindgen and add conditions for the availability of libclang to the
> > RISC-V extension Kconfig symbols that depend on the cc-option function.
> > 
> > For Zicsr/Zifencei special handling, since LLVM/Clang always enables
> > these two extensions, either don't pass them to -march, or pass them
> > explicitly and Rust bindgen libclang must recognize them.
> > 
> > Clang does not support -mno-riscv-attribute flag, filter it out to
> > resolve error: unknown argument: '-mno-riscv-attribute'.
> > 
> > Define BINDGEN_TARGET_riscv to pass the target triplet to Rust bindgen
> > libclang for RISC-V to resolve error: unsupported argument 'medany' to
> > option '-mcmodel=' for target 'unknown'. Improve to output a clearer
> > error message if the target triplet is undefined for Rust bindgen
> > libclang.
> > 
> > Update the documentation, GCC + Rust builds are now supported.
> > 
> > ---
> 
> FWIW, this --- breaks git, and anything after this line (including your
> signoff) is lost when the patch is applied.

FTR, there is good documentation about '---' in patch mails:
https://docs.kernel.org/process/submitting-patches.html#commentary

Kind regards,
Nicolas

      parent reply	other threads:[~2025-09-17 12:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 16:53 [PATCH v2] RISC-V: re-enable gcc + rust builds Asuna Yang
2025-09-09 17:12 ` Miguel Ojeda
2025-09-09 17:26   ` Asuna
2025-09-10 14:27 ` Conor Dooley
2025-09-11  4:46   ` Asuna
2025-09-11 13:14     ` Conor Dooley
2025-09-17 12:13   ` Nicolas Schier [this message]

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=aMql8oB4GuU87lie@levanger \
    --to=nsc@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=alex@ghiti.fr \
    --cc=aliceryhl@google.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=conor@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=justinstitt@google.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=llvm@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=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rabenda.cn@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=spriteovo@gmail.com \
    --cc=tmgross@umich.edu \
    /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).