This series bounds the `-Cunsafe-allow-abi-mismatch=fixed-x18` workaround
in `rust/Makefile` to the compiler versions that are actually affected by
the rustdoc (#144521, fixed in 1.90.0) and doctests (#146465, fixed in
1.92.0) target-modifier bugs, so that ABI compatibility checks run again
on newer toolchains.
Changes since v5 [1] [2]:
- Patch 1/2 is v5 1/2 renamed from `rustc-max-version` to
`rustc-lt-version` per Miguel's plan to rename on apply [3] and to
avoid the `99` form. Nathan's [4] and Nicolas' [5] Acked-bys from
v5 1/2 are carried over as Miguel indicated they would be preserved
through the rename.
- Patch 2/2 reworks v5 2/2 to fix the doctests case that Miguel
pointed out [6]: the v5 form reused `$(rustdoc_modifiers_workaround)`
as a prefix, so on rustc >= 1.91 the doctests variable expanded to
a stray `,sanitizer`. Use Miguel's suggested explicit
`ifeq`/`else ifeq` layout with `rustc-min-version` +
`rustc-lt-version` combined inline, so each affected range is
visible on its own line.
The `rustc-version-range` macro Miguel mentioned as an "improvement on
top" [3] is intentionally left out of this series; I will send it as a
separate follow-up patch once this lands, as Miguel suggested.
Tested by building `make rustdoc` and `make rusttest` on rustc 1.93.0:
both succeed with the workaround disabled (empty expansion), confirming
the bugs really are fixed in 1.92+ and no regressions are introduced.
Macro expansion was also spot-checked across simulated rustc versions
1.87 through 1.93 to verify each range matches the expected flag value.
[1] https://lore.kernel.org/rust-for-linux/20260205131522.2942928-1-mlksvender@gmail.com/
[2] https://lore.kernel.org/rust-for-linux/20260205131815.2943152-2-mlksvender@gmail.com/
[3] https://lore.kernel.org/rust-for-linux/CANiq72n-z0v_deUVPWeg1h0c6KQ+r6xfNDf72o29_0yy6KbqGA@mail.gmail.com/
[4] https://lore.kernel.org/rust-for-linux/20260203221224.GA2703490@ax162/
[5] https://lore.kernel.org/rust-for-linux/aYS9bRugxr1rUvA3@levanger/
[6] https://lore.kernel.org/rust-for-linux/CANiq72nnuKJaKrxrut6+noR13PUiSoWWyyp-pGx-fe_2O6ayFA@mail.gmail.com/
HeeSu Kim (2):
kbuild: add rustc-lt-version macro
rust: Makefile: bound rustdoc workaround to affected versions
rust/Makefile | 18 ++++++++++++------
scripts/Makefile.compiler | 4 ++++
2 files changed, 16 insertions(+), 6 deletions(-)
--
2.52.0