Skip to content

rust: Makefile: bound rustdoc workaround to affected versions

HeeSu Kim linux-kbuild lkml rust-for-linux stable 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 0 repliesNew
  2. v52 patches 3 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kbuild: add rustc-lt-version macroscripts/Makefile.compiler+4 -00 replies
2/2rust: Makefile: bound rustdoc workaround to affected versionsrust/Makefile+12 -60 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchNathan ChancellorNicolas Schier
1/2A-b A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/2] rust: Makefile: bound rustdoc workaround to affected versions

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/[email protected]/
[2] https://lore.kernel.org/rust-for-linux/[email protected]/
[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(-)
Signature · 1 line
2.52.0