diff --git a/universe/rust/0100-Add-Alpaquita-targets.patch b/universe/rust/0100-Add-Alpaquita-targets.patch new file mode 100644 index 0000000000..74a2b1bbfd --- /dev/null +++ b/universe/rust/0100-Add-Alpaquita-targets.patch @@ -0,0 +1,112 @@ +From 78fdfe1ebed38008806b70a624a05d3804d84a82 Mon Sep 17 00:00:00 2001 +From: Stanislav Kholmanskikh +Date: Fri, 12 Apr 2024 12:54:49 +0000 +Subject: [PATCH] Add Alpaquita targets + +--- + compiler/rustc_target/src/spec/mod.rs | 5 +++++ + .../src/spec/targets/aarch64_alpaquita_linux_gnu.rs | 13 +++++++++++++ + .../spec/targets/aarch64_alpaquita_linux_musl.rs | 13 +++++++++++++ + .../src/spec/targets/x86_64_alpaquita_linux_gnu.rs | 13 +++++++++++++ + .../src/spec/targets/x86_64_alpaquita_linux_musl.rs | 13 +++++++++++++ + 5 files changed, 57 insertions(+) + create mode 100644 compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_gnu.rs + create mode 100644 compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_musl.rs + create mode 100644 compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_gnu.rs + create mode 100644 compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_musl.rs + +diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs +index cf22148f2..57783389a 100644 +--- a/compiler/rustc_target/src/spec/mod.rs ++++ b/compiler/rustc_target/src/spec/mod.rs +@@ -1397,6 +1397,11 @@ macro_rules! supported_targets { + } + + supported_targets! { ++ ("aarch64-alpaquita-linux-gnu", aarch64_alpaquita_linux_gnu), ++ ("aarch64-alpaquita-linux-musl", aarch64_alpaquita_linux_musl), ++ ("x86_64-alpaquita-linux-gnu", x86_64_alpaquita_linux_gnu), ++ ("x86_64-alpaquita-linux-musl", x86_64_alpaquita_linux_musl), ++ + ("i586-alpine-linux-musl", i586_alpine_linux_musl), + ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl), + ("aarch64-alpine-linux-musl", aarch64_alpine_linux_musl), +diff --git a/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_gnu.rs +new file mode 100644 +index 000000000..c17d5f1e9 +--- /dev/null ++++ b/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_gnu.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::aarch64_unknown_linux_gnu::target(); ++ ++ base.llvm_target = "aarch64-alpaquita-linux-gnu".into(); ++ base.options.vendor = "alpaquita".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +diff --git a/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_musl.rs b/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_musl.rs +new file mode 100644 +index 000000000..d633dc8f9 +--- /dev/null ++++ b/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::aarch64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "aarch64-alpaquita-linux-musl".into(); ++ base.options.vendor = "alpaquita".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +diff --git a/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_gnu.rs +new file mode 100644 +index 000000000..f39bdfd80 +--- /dev/null ++++ b/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_gnu.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::x86_64_unknown_linux_gnu::target(); ++ ++ base.llvm_target = "x86_64-alpaquita-linux-gnu".into(); ++ base.options.vendor = "alpaquita".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +diff --git a/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_musl.rs b/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_musl.rs +new file mode 100644 +index 000000000..1eeb31399 +--- /dev/null ++++ b/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::x86_64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "x86_64-alpaquita-linux-musl".into(); ++ base.options.vendor = "alpaquita".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +-- +2.44.0 + diff --git a/universe/rust/APKBUILD b/universe/rust/APKBUILD index 288b4d89c8..46f5ed294d 100644 --- a/universe/rust/APKBUILD +++ b/universe/rust/APKBUILD @@ -2,7 +2,7 @@ pkgname=rust pkgver=1.77.0 _llvmver=17 _bootver=1.76.0 -pkgrel=1 +pkgrel=2 pkgdesc="Rust Programming Language toolchain" url="https://www.rust-lang.org/" arch="all" @@ -78,7 +78,7 @@ subpackages=" " source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.xz alpine-move-py-scripts-to-share.patch - alpaquita-target.patch + alpine-target.patch do-not-install-libunwind-source.patch musl:gcc-eh-libunwind.patch install-template-shebang.patch @@ -89,6 +89,8 @@ source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.xz revert-rustc_codegen_ssa-use-try_canonicalize-in-rpath.patch system-wasm-ld.patch check-rustc + + 0100-Add-Alpaquita-targets.patch " builddir="$srcdir/rustc-$pkgver-src" @@ -451,7 +453,7 @@ _mv() { sha512sums=" 59f19d9def93b613ac72925625e6662622f445506489b8f1cd405d037c28becd53ae1446b46edfd63734f6f236af2dc326a57a184f01bc10d497c96227f09034 rustc-1.77.0-src.tar.xz 9de9d7ad05584e3cafddedcac409a4605a1d67e82260220deb3efd965603ee3148062b081c0cd736e50d82daad3a723fb6a7493fdf4dddfe36288645425a7946 alpine-move-py-scripts-to-share.patch -f773202c44c877b042c30c9d94b421fd8b8da1cd1cfbd4db04338b97295f889050ca6ecae5d9dd06770244d1701c7864328d8d5eee12e20826c0900a2927003f alpaquita-target.patch +8b146dabe9cebfd5fcd916a9ece8ce1eefe27c410bf63f896b5f3c327fe41184fe77034ee604d385ace8fd61eac94469134967a51e3bdd9dece4d2428f42e21f alpine-target.patch b4f09270f4e1677975d12447be9960271b00ffb8ab55987864c306fa45b8f70bdb82fd89e5fa7ad1cf604a1c91fbac8f3753b29dc98e10e7f47edf13d9071d77 do-not-install-libunwind-source.patch d4531905520b3fc699fbf57b267130bdbca94e2773a710e8b4c618ae3895149312934dd92d1988860c6dd102af50e05264b49a01662d5621c26de3604c753d6a gcc-eh-libunwind.patch b283d31cc8d6559aa639d44f776e97c2a1e0f23c717b6784e549861b881555bd467fa6023180866aae81a9a58c5f83e306940ee645f3c6733a1bdef6130036c9 install-template-shebang.patch @@ -462,4 +464,5 @@ da5ea8ea2360ba6fdc2b3f29063baf978af19f7ff106d0511912b1357e1e613dae0417d3b55fb2aa 74c0d14a68c2d7355f15ec3704d387556ad337e4991831e94951906d17aeb60387d20586a63cf6cdc62b46c60e1874340a250196ec2b3e75c268af1c41fae7e9 revert-rustc_codegen_ssa-use-try_canonicalize-in-rpath.patch 5216e083a1709b3ecbbdeaaaf0e112ec88e7534952fdadf834ce864b55768e15d7d181c14127d4ef39f66ca2a94dd40eddb2c4ab297081d75e5f3a09dcbcfa56 system-wasm-ld.patch c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125 check-rustc +ccfbcc91b01a1488f944b2a77b9d9f430f79d8839f9d483639714838e263fd8277a54f9855faf752bf617f47550c64be5e55c4dfbf7fa21293500f26f1309306 0100-Add-Alpaquita-targets.patch " diff --git a/universe/rust/alpaquita-target.patch b/universe/rust/alpaquita-target.patch deleted file mode 100644 index 11883e45b5..0000000000 --- a/universe/rust/alpaquita-target.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- /dev/null -+++ rustc-src/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_gnu.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::aarch64_unknown_linux_gnu::target(); -+ -+ base.llvm_target = "aarch64-alpaquita-linux-gnu".into(); -+ base.options.vendor = "alpaquita".into(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-src/compiler/rustc_target/src/spec/targets/aarch64_alpaquita_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::aarch64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "aarch64-alpaquita-linux-musl".into(); -+ base.options.vendor = "alpaquita".into(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-src/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_gnu.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::x86_64_unknown_linux_gnu::target(); -+ -+ base.llvm_target = "x86_64-alpaquita-linux-gnu".into(); -+ base.options.vendor = "alpaquita".into(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-src/compiler/rustc_target/src/spec/targets/x86_64_alpaquita_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::x86_64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "x86_64-alpaquita-linux-musl".into(); -+ base.options.vendor = "alpaquita".into(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- rustc-src/compiler/rustc_target/src/spec/mod.rs.orig -+++ rustc-src/compiler/rustc_target/src/spec/mod.rs -@@ -1013,6 +1013,10 @@ - } - - supported_targets! { -+ ("aarch64-alpaquita-linux-gnu", aarch64_alpaquita_linux_gnu), -+ ("aarch64-alpaquita-linux-musl", aarch64_alpaquita_linux_musl), -+ ("x86_64-alpaquita-linux-gnu", x86_64_alpaquita_linux_gnu), -+ ("x86_64-alpaquita-linux-musl", x86_64_alpaquita_linux_musl), - ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), - ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), - ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), diff --git a/universe/rust/alpine-target.patch b/universe/rust/alpine-target.patch new file mode 100644 index 0000000000..fee532f75f --- /dev/null +++ b/universe/rust/alpine-target.patch @@ -0,0 +1,192 @@ +From: Shiz +Updated by Rasmus Thomsen on 28th of July 2019 +Updated again by Ariadne Conill on 31 October 2020 +Date: Thu, 20 Aug 2017 01:52:36 +0200 +Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200 +Subject: [PATCH] Add Alpine targets + +This adds `$arch-alpine-linux-musl` targets to Rust to encode our toolchain +and distribution-specific quirks instead of polluting the main musl target of +`$arch-unknown-linux-musl`. + +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/aarch64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::aarch64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "aarch64-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/armv6_alpine_linux_musleabihf.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::arm_unknown_linux_musleabihf::target(); ++ ++ base.llvm_target = "armv6-alpine-linux-musleabihf".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/armv7_alpine_linux_musleabihf.rs +@@ -0,0 +1,14 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::armv7_unknown_linux_musleabihf::target(); ++ ++ base.llvm_target = "armv7-alpine-linux-musleabihf".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ base.options.features = "+v7,+vfp3,-d32,+thumb-mode,+thumb2".into(); ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/i586_alpine_linux_musl.rs +@@ -0,0 +1,14 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::i686_unknown_linux_musl::target(); ++ ++ base.options.cpu = "pentium4".into(); ++ base.llvm_target = "i586-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- rustc-1.48.0-src.orig/compiler/rustc_target/src/spec/mod.rs ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/mod.rs +@@ -1397,6 +1397,16 @@ + } + + supported_targets! { ++ ("i586-alpine-linux-musl", i586_alpine_linux_musl), ++ ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl), ++ ("aarch64-alpine-linux-musl", aarch64_alpine_linux_musl), ++ ("armv6-alpine-linux-musleabihf", armv6_alpine_linux_musleabihf), ++ ("armv7-alpine-linux-musleabihf", armv7_alpine_linux_musleabihf), ++ ("powerpc-alpine-linux-musl", powerpc_alpine_linux_musl), ++ ("powerpc64-alpine-linux-musl", powerpc64_alpine_linux_musl), ++ ("powerpc64le-alpine-linux-musl", powerpc64le_alpine_linux_musl), ++ ("s390x-alpine-linux-musl", s390x_alpine_linux_musl), ++ ("riscv64-alpine-linux-musl", riscv64_alpine_linux_musl), + ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), + ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), + ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/powerpc64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::powerpc64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "powerpc64-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/powerpc64le_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::powerpc64le_unknown_linux_musl::target(); ++ ++ base.llvm_target = "powerpc64le-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/powerpc_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::powerpc_unknown_linux_musl::target(); ++ ++ base.llvm_target = "powerpc-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/s390x_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::s390x_unknown_linux_musl::target(); ++ ++ base.llvm_target = "s390x-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/targets/x86_64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::x86_64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "x86_64-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.52.1-src/compiler/rustc_target/src/spec/targets/riscv64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::riscv64gc_unknown_linux_musl::target(); ++ ++ base.llvm_target = "riscv64-alpine-linux-musl".into(); ++ base.options.vendor = "alpine".into(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++}