Re: [PATCH] rust: Makefile: apply fixed-x18 workaround only on arm64

From: HeeSu Kim

Date: Mon Feb 02 2026 - 09:23:16 EST


On Tue, Feb 03, 2026, C. Mitrodimas wrote:
> > The `-Cunsafe-allow-abi-mismatch=fixed-x18` option is a workaround for
> > a rustdoc issue (rust-lang/rust#144521) where target modifiers were not
> > properly saved. This affects both rustdoc and doctests builds.
> >
> > However, `fixed-x18` is an ARM64-specific ABI modifier related to the
> > x18 register reservation (used for Shadow Call Stack). Currently, this
> > workaround is applied unconditionally on all architectures, which is
> > incorrect and may cause issues on non-ARM64 builds.
> >
> > Restrict the workaround to only apply when building for arm64
> > (SRCARCH=arm64).
> >
> > Fixes: 68e8e79e1bdc ("rust: fix `rustdoc` target modifiers")
>
> Are we sure this is in the correct commit hash? It is not present on
> mainline.
>
> Maybe it should be this one?
>
> Fixes: abbf9a449441 ("rust: workaround `rustdoc` target modifiers bug")
>
> Cheers,
> C. Mitrodimas

You're right. I mistakenly used a commit hash from my local branch.
I'll send a v2 with the correct Fixes tag.