[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e48699fb-287d-42a9-ba6c-5edad86965f4@gmail.com>
Date: Wed, 3 Sep 2025 08:59:29 +0800
From: Asuna <spriteovo@...il.com>
To: Conor Dooley <conor@...nel.org>
Cc: Jason Montleon <jmontleo@...hat.com>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
<palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: RISC-V: Re-enable GCC+Rust builds
> That particular one might be a problem not because of -mstack-protector-guard itself, but rather three options get added at once:
> $(eval KBUILD_CFLAGS += -mstack-protector-guard=tls \
> -mstack-protector-guard-reg=tp \
> -mstack-protector-guard-offset=$(shell \
> awk '{if ($$2 == "TSK_STACK_CANARY") print $$3;}' \
> $(objtree)/include/generated/asm-offsets.h))
> and the other ones might be responsible for the error.
I still don't understand the problem here. `bindgen_skip_c_flags` in
`rust/Makefile` contains a pattern `-mstack-protector-guard%`, the % at
the end enables it to match all those 3 options at the same time, and
`filter-out` function removes them before passing to Rust bindgen's
libclang. Am I missing something here?
> Similarly, something like -Wno-unterminated-string-initialization could cause a problem if gcc supports it but not libclang.
Yes. However, this option is only about warnings, not architecture
related and does not affect the generated results, so simply adding it
into `bindgen_skip_c_flags` patterns should be enough, I think.
> I think you're mostly better off catching that sort of thing in Kconfig, where possible and just make incompatible mixes invalid. What's actually incompatible is likely going to depend heavily on what options are enabled.
Sounds better, I'll go down that path.
Powered by blists - more mailing lists