From: sunilkumar.dora@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: raj.khem@gmail.com, randy.macleod@windriver.com,
sundeep.kokkonda@windriver.com, deepesh.vatharaj@windriver.com
Subject: [PATCH 05/11] rust: Do not pass the removed x86 amx-tf32 feature to LLVM 23
Date: Sun, 30 Aug 2026 18:28:45 +0530 [thread overview]
Message-ID: <20260830125853.1139807-6-sunilkumar.dora@windriver.com> (raw)
In-Reply-To: <20260830125853.1139807-1-sunilkumar.dora@windriver.com>
From: Sunil Dora <sunilkumar.dora@windriver.com>
LLVM 23 removed the x86 amx-tf32 subtarget feature, so a rustc built
against LLVM 23 aborts at startup with
"+amx-tf32" is not a recognized feature for this target
Gate the feature out of to_llvm_features for LLVM >= 23. rust dropped
the feature entirely after 1.98
(https://github.com/rust-lang/rust/pull/159310), but backporting that
would change stable rust behaviour, while a version guard keeps this
rust working against older LLVM majors too.
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
---
...llvm-Do-not-pass-amx-tf32-to-LLVM-23.patch | 38 +++++++++++++++++++
meta/recipes-devtools/rust/rust-source.inc | 1 +
2 files changed, 39 insertions(+)
create mode 100644 meta/recipes-devtools/rust/files/0005-rustc_codegen_llvm-Do-not-pass-amx-tf32-to-LLVM-23.patch
diff --git a/meta/recipes-devtools/rust/files/0005-rustc_codegen_llvm-Do-not-pass-amx-tf32-to-LLVM-23.patch b/meta/recipes-devtools/rust/files/0005-rustc_codegen_llvm-Do-not-pass-amx-tf32-to-LLVM-23.patch
new file mode 100644
index 0000000000..99fcd334c7
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/0005-rustc_codegen_llvm-Do-not-pass-amx-tf32-to-LLVM-23.patch
@@ -0,0 +1,38 @@
+From: Sunil Dora <sunilkumar.dora@windriver.com>
+Date: Wed, 26 Aug 2026 16:30:00 +0530
+Subject: [PATCH] rustc_codegen_llvm: do not pass amx-tf32 to LLVM 23
+
+LLVM 23 removed the x86 amx-tf32 subtarget feature
+(https://github.com/llvm/llvm-project/pull/207673). rust 1.98 still
+lists it in the x86 table in rustc_target, so a rustc built against
+LLVM 23 aborts at startup with
+
+ '+amx-tf32' is not a recognized feature for this target
+
+Skip the feature in to_llvm_features when the LLVM in use is 23 or
+newer, in the same style the surrounding code already uses for
+avx10.1/avx10.2 on older LLVM majors. amx-tf32 is the only x86
+feature LLVM 23 removed; the rest of the table still matches X86.td.
+
+rust dropped the feature outright after 1.98
+(https://github.com/rust-lang/rust/pull/159310), which requires
+LLVM 23 or newer unconditionally. This recipe builds against whatever
+LLVM major the layer provides, so the version guard is kept instead.
+
+Upstream-Status: Inappropriate [rust dropped the feature after 1.98 via https://github.com/rust-lang/rust/pull/159310; this guard only exists to build 1.98 against more than one LLVM major]
+Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
+---
+ compiler/rustc_codegen_llvm/src/llvm_util.rs | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
++++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
+@@ -286,6 +286,8 @@
+ s,
+ smallvec![TargetFeatureFoldStrength::EnableOnly("evex512")],
+ )),
++ // AMX-TF32 was removed from LLVM 23
++ "amx-tf32" if major >= 23 => None,
+ "avx10.1" if major < 22 => Some(LLVMFeature::new("avx10.1-512")),
+ "avx10.2" if major < 22 => Some(LLVMFeature::new("avx10.2-512")),
+ "apxf" => Some(LLVMFeature::with_dependencies(
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index d87271b29c..f40f1652b2 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -8,6 +8,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
file://0002-Fix-rust-build-failure-with-unstable-options.patch;patchdir=${RUSTSRC} \
file://0003-bootstrap-skip-StdarchVerify-when-remote-testing.patch;patchdir=${RUSTSRC} \
file://0004-Backport-commits-from-rust-Fix-selftest-llvm23.patch;patchdir=${RUSTSRC} \
+ file://0005-rustc_codegen_llvm-Do-not-pass-amx-tf32-to-LLVM-23.patch;patchdir=${RUSTSRC} \
"
SRC_URI[rust.sha256sum] = "271fa73d8174f53d713c46a8310da7bf7cfdcfb8b7cfd1c2b74b84a83ae9fb1e"
--
2.43.0
next prev parent reply other threads:[~2026-08-30 12:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 12:58 [PATCH 00/11] clang/llvm: Upgrade to 23.1.0 sunilkumar.dora
2026-08-30 12:58 ` [PATCH 01/11] clang/llvm: Upgrade to 23.1.0 release sunilkumar.dora
2026-08-30 19:53 ` Khem Raj
2026-09-01 3:37 ` [OE-core] " Dora, Sunil Kumar
2026-09-01 12:49 ` Richard Purdie
2026-08-30 12:58 ` [PATCH 02/11] spirv-llvm-translator: Upgrade to 23.1.0 sunilkumar.dora
2026-08-30 19:43 ` Khem Raj
2026-09-01 4:07 ` [OE-core] " Dora, Sunil Kumar
2026-08-30 12:58 ` [PATCH 03/11] openmp: Build via the LLVM runtimes entry point sunilkumar.dora
2026-08-30 19:45 ` Khem Raj
2026-09-01 4:33 ` [OE-core] " Dora, Sunil Kumar
2026-09-03 1:11 ` Khem Raj
2026-08-30 12:58 ` [PATCH 04/11] rust: Fix build and oe-selftest failures with LLVM 23 sunilkumar.dora
2026-08-30 19:47 ` Khem Raj
2026-09-01 5:17 ` [OE-core] " Dora, Sunil Kumar
2026-09-03 1:08 ` Khem Raj
2026-08-30 12:58 ` sunilkumar.dora [this message]
2026-08-30 12:58 ` [PATCH 06/11] clang: Disable clangd's decision-forest completion model on powerpc sunilkumar.dora
2026-08-30 12:58 ` [PATCH 07/11] pango: Don't turn clang 23's -Wunused-but-set-global into an error sunilkumar.dora
2026-08-30 12:58 ` [PATCH 08/11] ovmf: Fix memcpy alias prototype for clang 23 sunilkumar.dora
2026-08-30 12:58 ` [PATCH 09/11] vulkan-samples: Don't turn clang 23's -Wdangling-gsl into an error sunilkumar.dora
2026-08-30 12:58 ` [PATCH 10/11] gettext: Export a fully-flagged Objective-C compiler sunilkumar.dora
2026-08-30 12:58 ` [PATCH 11/11] clang/llvm: Ignore tests fail with clang/llvm 23 upgrade sunilkumar.dora
2026-08-30 19:53 ` [PATCH 00/11] clang/llvm: Upgrade to 23.1.0 Khem Raj
2026-09-01 4:59 ` [OE-core] " Dora, Sunil Kumar
2026-09-03 1:10 ` Khem Raj
2026-09-03 23:46 ` Khem Raj
2026-09-04 4:49 ` Dora, Sunil Kumar
2026-09-05 13:26 ` Dora, Sunil Kumar
2026-09-05 18:01 ` [OE-core] " Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260830125853.1139807-6-sunilkumar.dora@windriver.com \
--to=sunilkumar.dora@windriver.com \
--cc=deepesh.vatharaj@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=randy.macleod@windriver.com \
--cc=sundeep.kokkonda@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox