public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0
@ 2026-01-29 13:37 Alyssa Ross
  2026-01-29 14:55 ` Miguel Ojeda
  0 siblings, 1 reply; 8+ messages in thread
From: Alyssa Ross @ 2026-01-29 13:37 UTC (permalink / raw)
  To: stable; +Cc: Miguel Ojeda, Alice Ryhl, Trevor Gross, Nicolas Schier

From: Miguel Ojeda <ojeda@kernel.org>

Rust 1.93.0 (expected 2026-01-22) is stabilizing `-Zno-jump-tables`
[1][2] as `-Cjump-tables=n` [3].

Without this change, one would eventually see:

      RUSTC L rust/core.o
    error: unknown unstable option: `no-jump-tables`

Thus support the upcoming version.

Link: https://github.com/rust-lang/rust/issues/116592 [1]
Link: https://github.com/rust-lang/rust/pull/105812 [2]
Link: https://github.com/rust-lang/rust/pull/145974 [3]
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Acked-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20251101094011.1024534-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
(cherry picked from commit 789521b4717fd6bd85164ba5c131f621a79c9736)
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
 arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 5b773b34768d1..7c921514c6d0f 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -109,7 +109,7 @@ ifeq ($(CONFIG_X86_KERNEL_IBT),y)
 #   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816
 #
 KBUILD_CFLAGS += $(call cc-option,-fcf-protection=branch -fno-jump-tables)
-KBUILD_RUSTFLAGS += -Zcf-protection=branch -Zno-jump-tables
+KBUILD_RUSTFLAGS += -Zcf-protection=branch $(if $(call rustc-min-version,109300),-Cjump-tables=n,-Zno-jump-tables)
 else
 KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
 endif

base-commit: abf529abd660d8ccad46dd8c8f20e93db6134f5f
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-02-06 13:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29 13:37 [PATCH 6.12.y] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 Alyssa Ross
2026-01-29 14:55 ` Miguel Ojeda
2026-01-29 15:03   ` Miguel Ojeda
2026-02-03 14:42     ` Greg KH
2026-02-03 17:18       ` Alyssa Ross
2026-02-06 10:47         ` Miguel Ojeda
2026-02-06 13:04           ` Alyssa Ross
2026-02-06 10:45       ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox