From nobody Sat Feb 7 21:11:03 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCEA12C15B8; Sat, 1 Nov 2025 09:40:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761990031; cv=none; b=gvCAvLdwIwNyEodnrzD7P8kdr0/2v+l7BVk8OEu3j8JMUaENKv0DafrOnYcARJz74Gi5ksSofGCzxCdCGIJ+uJoGVDr9Mobcv67TRTWGSEG199kIyWoGOkMedrxQcl62ybhedEdIEZOgnnA9ASvwimH1a33EWXEobNm0A8sfOXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761990031; c=relaxed/simple; bh=KEyjwC/3ZixttteNhE28UtTrJX6xHVbizD+fICju5HQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jU7wbaixaq37QKMxPfLDz6yf7ZBHQuTyt5rLPEkOyxDbHZbuW49+ICOlouG1TvGwUi76gbpFwlps1eG9VU1E2DVAFWJvBH8E6jUPIJXA/Ti+6wz+vw8wNI7ihBjU3s7URuPk0CNZk69Jelr794Rko28Tap5/r3QOLy/PlDsj83k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X4nu1emX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X4nu1emX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A056EC4CEF1; Sat, 1 Nov 2025 09:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761990031; bh=KEyjwC/3ZixttteNhE28UtTrJX6xHVbizD+fICju5HQ=; h=From:To:Cc:Subject:Date:From; b=X4nu1emXFZUXSucv1dsi/I9LyoXD3yBy1scLkXVz0y0+zJaWdGWWzc5nFl/suDVGH 9qLovUiIHNnQUwrpqTcj6KLr3B7CHrb6VrgoQVjr7MYTdqOVYKGF2k3bLkOmheIkVN pMR/rteY6XfnrH3eWoX8p4r5gWRlVZdqBoEhvq5DxUGEU2NQFM/I5x2mOqiMD8+EeE YmWUCugkhOHutuBNZ6Npz1v2NohxC7/zve+pCywq8huv9MGIT62UAG9DxqZzE0Q8w8 ZxctAQ5osq+FNf9OLrRrqH/r0ltT1GkebJo2bMja7MMbtjpSjhF5wdoifpYx7OfIk6 d+w+LEFGvwohQ== From: Miguel Ojeda To: Miguel Ojeda , Alex Gaynor , Nathan Chancellor , Nicolas Schier , Huacai Chen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, WANG Xuerui , loongarch@lists.linux.dev, "H. Peter Anvin" , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH] rust: kbuild: support `-Cjump-tables=n` for Rust 1.93.0 Date: Sat, 1 Nov 2025 10:40:11 +0100 Message-ID: <20251101094011.1024534-1-ojeda@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rust 1.93.0 (expected 2026-01-22) is stabilizing `-Zno-jump-tables` [1][2] as `-Cjump-tables=3Dn` [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] Signed-off-by: Miguel Ojeda Acked-by: Nicolas Schier Reviewed-by: Alice Ryhl Reviewed-by: Trevor Gross --- arch/loongarch/Makefile | 2 +- arch/x86/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile index dc5bd3f1b8d2..96ca1a688984 100644 --- a/arch/loongarch/Makefile +++ b/arch/loongarch/Makefile @@ -109,7 +109,7 @@ endif ifdef CONFIG_RUSTC_HAS_ANNOTATE_TABLEJUMP KBUILD_RUSTFLAGS +=3D -Cllvm-args=3D--loongarch-annotate-tablejump else -KBUILD_RUSTFLAGS +=3D -Zno-jump-tables # keep compatibility with older co= mpilers +KBUILD_RUSTFLAGS +=3D $(if $(call rustc-min-version,109300),-Cjump-tables= =3Dn,-Zno-jump-tables) # keep compatibility with older compilers endif ifdef CONFIG_LTO_CLANG # The annotate-tablejump option can not be passed to LLVM backend when LTO= is enabled. diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 4db7e4bf69f5..c60371db49d9 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -98,7 +98,7 @@ ifeq ($(CONFIG_X86_KERNEL_IBT),y) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104816 # KBUILD_CFLAGS +=3D $(call cc-option,-fcf-protection=3Dbranch -fno-jump-tab= les) -KBUILD_RUSTFLAGS +=3D -Zcf-protection=3Dbranch -Zno-jump-tables +KBUILD_RUSTFLAGS +=3D -Zcf-protection=3Dbranch $(if $(call rustc-min-versi= on,109300),-Cjump-tables=3Dn,-Zno-jump-tables) else KBUILD_CFLAGS +=3D $(call cc-option,-fcf-protection=3Dnone) endif base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa --=20 2.51.2