[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72nOtuBNuuQQuW2piWynhizZg29Q7VgzUPAmB17w6XtQ+g@mail.gmail.com>
Date: Tue, 12 Aug 2025 21:53:27 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Alex Gaynor <alex.gaynor@...il.com>, Masahiro Yamada <masahiroy@...nel.org>,
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>, rust-for-linux@...r.kernel.org,
Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Guillaume Gomez <guillaume1.gomez@...il.com>
Subject: Re: [PATCH] rust: workaround `rustdoc` target modifiers bug
On Sun, Jul 27, 2025 at 11:23 AM Miguel Ojeda <ojeda@...nel.org> wrote:
>
> Starting with Rust 1.88.0 (released 2025-06-26), `rustdoc` complains
> about a target modifier mismatch in configurations where `-Zfixed-x18`
> is passed:
>
> error: mixing `-Zfixed-x18` will cause an ABI mismatch in crate `rust_out`
> |
> = help: the `-Zfixed-x18` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
> = note: unset `-Zfixed-x18` in this crate is incompatible with `-Zfixed-x18=` in dependency `core`
> = help: set `-Zfixed-x18=` in this crate or unset `-Zfixed-x18` in `core`
> = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=fixed-x18` to silence this error
>
> The reason is that `rustdoc` was not passing the target modifiers when
> configuring the session options, and thus it would report a mismatch
> that did not exist as soon as a target modifier is used in a dependency.
>
> We did not notice it in the kernel until now because `-Zfixed-x18` has
> been a target modifier only since 1.88.0 (and it is the only one we use
> so far).
>
> The issue has been reported upstream [1] and a fix has been submitted
> [2], including a test similar to the kernel case.
>
> Meanwhile, conditionally pass `-Cunsafe-allow-abi-mismatch=fixed-x18`
> to workaround the issue on our side.
>
> Reported-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
> Closes: https://lore.kernel.org/rust-for-linux/36cdc798-524f-4910-8b77-d7b9fac08d77@oss.qualcomm.com/
> Link: https://github.com/rust-lang/rust/issues/144521 [1]
> Link: https://github.com/rust-lang/rust/pull/144523 [2]
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
Applied to `rust-fixes` -- thanks everyone!
[ This is now fixed upstream (thanks Guillaume for the quick review),
so it will be fixed in Rust 1.90.0 (expected 2025-09-18).
- Miguel ]
Cheers,
Miguel
Powered by blists - more mailing lists