diff --git a/app-admin/oma/autobuild/defines b/app-admin/oma/autobuild/defines index 15dd8ab67f75..5bd250fece6f 100644 --- a/app-admin/oma/autobuild/defines +++ b/app-admin/oma/autobuild/defines @@ -10,6 +10,3 @@ PKGREP="mirrormgr<=0.11.1" USECLANG=1 PKGESS=1 - -# FIXME: LTO will cause unexpected lsx generation -NOLTO__LOONGARCH64_NOSIMD=1 diff --git a/app-admin/oma/spec b/app-admin/oma/spec index 767d0b42b94c..dd982d26ba55 100644 --- a/app-admin/oma/spec +++ b/app-admin/oma/spec @@ -1,5 +1,5 @@ VER=1.20.1 -REL=1 +REL=2 SRCS="git::commit=tags/v${VER/\~/-}::https://github.com/AOSC-Dev/oma" CHKSUMS="SKIP" CHKUPDATE="anitya::id=328412" diff --git a/lang-rust/rustc/autobuild/patches/0001-Add-i486-unknown-linux-gnu-compiler-target.patch b/lang-rust/rustc/autobuild/patches/0001-Add-i486-unknown-linux-gnu-compiler-target.patch index 4235d1bf6502..062ccc54220f 100644 --- a/lang-rust/rustc/autobuild/patches/0001-Add-i486-unknown-linux-gnu-compiler-target.patch +++ b/lang-rust/rustc/autobuild/patches/0001-Add-i486-unknown-linux-gnu-compiler-target.patch @@ -1,7 +1,7 @@ From c62e1c6dcc6eeb8db7619b6e30e00657b98f5162 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Fri, 9 Feb 2024 18:48:33 -0800 -Subject: [PATCH 1/3] Add i486-unknown-linux-gnu compiler target +Subject: [PATCH 1/4] Add i486-unknown-linux-gnu compiler target --- compiler/rustc_target/src/spec/mod.rs | 1 + diff --git a/lang-rust/rustc/autobuild/patches/0002-ARCHLINUX-compiler-Swap-primary-and-secondary-lib-di.patch b/lang-rust/rustc/autobuild/patches/0002-ARCHLINUX-compiler-Swap-primary-and-secondary-lib-di.patch index b555e9cf2298..f97350f3de0b 100644 --- a/lang-rust/rustc/autobuild/patches/0002-ARCHLINUX-compiler-Swap-primary-and-secondary-lib-di.patch +++ b/lang-rust/rustc/autobuild/patches/0002-ARCHLINUX-compiler-Swap-primary-and-secondary-lib-di.patch @@ -1,7 +1,7 @@ From d775cc8d435c34ad5147161c5082775bc1a0f45b Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 7 Aug 2025 20:12:53 +0200 -Subject: [PATCH 2/3] ARCHLINUX: compiler: Swap primary and secondary lib dirs +Subject: [PATCH 2/4] ARCHLINUX: compiler: Swap primary and secondary lib dirs Arch Linux (editor's note: also AOSC OS) prefers "lib" over "lib64". --- diff --git a/lang-rust/rustc/autobuild/patches/0003-ARCHLINUX-bootstrap-Workaround-for-system-stage0.patch b/lang-rust/rustc/autobuild/patches/0003-ARCHLINUX-bootstrap-Workaround-for-system-stage0.patch index f02a047ed676..a61071aa790e 100644 --- a/lang-rust/rustc/autobuild/patches/0003-ARCHLINUX-bootstrap-Workaround-for-system-stage0.patch +++ b/lang-rust/rustc/autobuild/patches/0003-ARCHLINUX-bootstrap-Workaround-for-system-stage0.patch @@ -1,7 +1,7 @@ From 4558c3cef1db12eb171c992e12c88a53b79101ed Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 7 Aug 2025 19:01:26 +0200 -Subject: [PATCH 3/3] ARCHLINUX: bootstrap: Workaround for system stage0 +Subject: [PATCH 3/4] ARCHLINUX: bootstrap: Workaround for system stage0 See: https://github.com/rust-lang/rust/issues/143735 --- diff --git a/lang-rust/rustc/autobuild/patches/0004-compiler-Apply-target-features-to-the-entry-function.patch b/lang-rust/rustc/autobuild/patches/0004-compiler-Apply-target-features-to-the-entry-function.patch new file mode 100644 index 000000000000..1ee6efb264ac --- /dev/null +++ b/lang-rust/rustc/autobuild/patches/0004-compiler-Apply-target-features-to-the-entry-function.patch @@ -0,0 +1,78 @@ +From 874b53e68456b421b3a0bf7e2f48a2390758e71d Mon Sep 17 00:00:00 2001 +From: WANG Rui +Date: Wed, 3 Sep 2025 11:34:15 +0800 +Subject: [PATCH 4/4] compiler: Apply target features to the entry function + +--- + compiler/rustc_codegen_llvm/src/attributes.rs | 21 ++++++++++++------- + compiler/rustc_codegen_llvm/src/context.rs | 8 +++++-- + 2 files changed, 20 insertions(+), 9 deletions(-) + +diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs +index adb53e0b66..3313b1f4c4 100644 +--- a/compiler/rustc_codegen_llvm/src/attributes.rs ++++ b/compiler/rustc_codegen_llvm/src/attributes.rs +@@ -302,6 +302,19 @@ pub(crate) fn tune_cpu_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribu + .map(|tune_cpu| llvm::CreateAttrStringValue(cx.llcx, "tune-cpu", tune_cpu)) + } + ++/// Get the `target-features` LLVM attribute. ++pub(crate) fn target_features_attr<'ll>( ++ cx: &CodegenCx<'ll, '_>, ++ function_features: Vec, ++) -> Option<&'ll Attribute> { ++ let global_features = cx.tcx.global_backend_features(()).iter().map(String::as_str); ++ let function_features = function_features.iter().map(String::as_str); ++ let target_features = ++ global_features.chain(function_features).intersperse(",").collect::(); ++ (!target_features.is_empty()) ++ .then(|| llvm::CreateAttrStringValue(cx.llcx, "target-features", &target_features)) ++} ++ + /// Get the `NonLazyBind` LLVM attribute, + /// if the codegen options allow skipping the PLT. + pub(crate) fn non_lazy_bind_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> { +@@ -535,13 +548,7 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>( + } + } + +- let global_features = cx.tcx.global_backend_features(()).iter().map(|s| s.as_str()); +- let function_features = function_features.iter().map(|s| s.as_str()); +- let target_features: String = +- global_features.chain(function_features).intersperse(",").collect(); +- if !target_features.is_empty() { +- to_add.push(llvm::CreateAttrStringValue(cx.llcx, "target-features", &target_features)); +- } ++ to_add.extend(target_features_attr(cx, function_features)); + + attributes::apply_to_llfn(llfn, Function, &to_add); + } +diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs +index 0324dff6ff..55d335923d 100644 +--- a/compiler/rustc_codegen_llvm/src/context.rs ++++ b/compiler/rustc_codegen_llvm/src/context.rs +@@ -822,7 +822,7 @@ impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> { + fn declare_c_main(&self, fn_type: Self::Type) -> Option { + let entry_name = self.sess().target.entry_name.as_ref(); + if self.get_declared_value(entry_name).is_none() { +- Some(self.declare_entry_fn( ++ let llfn = self.declare_entry_fn( + entry_name, + llvm::CallConv::from_conv( + self.sess().target.entry_abi, +@@ -830,7 +830,11 @@ impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> { + ), + llvm::UnnamedAddr::Global, + fn_type, +- )) ++ ); ++ if let Some(attr) = attributes::target_features_attr(self, vec![]) { ++ attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &[attr]) ++ } ++ Some(llfn) + } else { + // If the symbol already exists, it is an error: for example, the user wrote + // #[no_mangle] extern "C" fn main(..) {..} +-- +2.51.0 + diff --git a/lang-rust/rustc/spec b/lang-rust/rustc/spec index 255336ce2799..60675ff8f40f 100644 --- a/lang-rust/rustc/spec +++ b/lang-rust/rustc/spec @@ -1,5 +1,5 @@ VER=1.89.0 -REL=1 +REL=2 # Note: Uncomment this if we have the last version built and ready. SRCS="tbl::https://static.rust-lang.org/dist/rustc-${VER}-src.tar.xz" CHKSUMS="sha256::0b9d55610d8270e06c44f459d1e2b7918a5e673809c592abed9b9c600e33d95a"