diff --git a/main/rust/APKBUILD b/main/rust/APKBUILD index 34a35922d30..c3078a8b0a6 100644 --- a/main/rust/APKBUILD +++ b/main/rust/APKBUILD @@ -7,9 +7,9 @@ # Contributor: omni # Maintainer: pkgname=rust -pkgver=1.75.0 +pkgver=1.76.0 _llvmver=17 -_bootver=1.74.0 +_bootver=1.75.0 pkgrel=0 pkgdesc="Rust Programming Language toolchain" url="https://www.rust-lang.org/" @@ -144,6 +144,8 @@ ldpath="/$_rlibdir" export OPENSSL_NO_VENDOR=1 export RUST_BACKTRACE=1 +export gztool="$(command -v pigz || echo gzip)" + # this is useful for when we have to patch vendored projects _clear_vendor_checksums() { sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json @@ -242,9 +244,9 @@ check() { mkdir -p "$builddir/test-rustc" - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rustc-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rustc-$pkgver-$_target.tar.gz \ -C "$builddir/test-rustc" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rust-std-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rust-std-$pkgver-$_target.tar.gz \ -C "$builddir/test-rustc" --strip-components=2 --exclude=manifest.in --no-same-owner & wait @@ -274,24 +276,24 @@ package() { cd "$pkgdir" - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rustc-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rustc-$pkgver-$_target.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rust-std-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rust-std-$pkgver-$_target.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rustc-dev-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rustc-dev-$pkgver-$_target.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rust-src-$pkgver.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rust-src-$pkgver.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & wait - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/cargo-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/cargo-$pkgver-$_target.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/clippy-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/clippy-$pkgver-$_target.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rustfmt-$pkgver-$_target.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rustfmt-$pkgver-$_target.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rust-std-$pkgver-wasm32-unknown-unknown.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rust-std-$pkgver-wasm32-unknown-unknown.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & - tar -I "$(command -v pigz || echo gzip) -d" -xf "$builddir"/build/dist/rust-std-$pkgver-wasm32-wasi.tar.gz \ + tar -I "$gztool -d" -xf "$builddir"/build/dist/rust-std-$pkgver-wasm32-wasi.tar.gz \ -C "$pkgdir/usr" --strip-components=2 --exclude=manifest.in --no-same-owner & wait @@ -318,8 +320,8 @@ package() { fi # for some reason the tar archive gets some root-only files for rlibs - find "$pkgdir"/usr/lib/rustlib -type f -perm -600 -exec chmod 644 {} \+ - find "$pkgdir"/usr/lib/rustlib -type f -perm -700 -exec chmod 755 {} \+ + find "$pkgdir"/usr/lib/rustlib -type f -perm -600 -exec chmod 0644 {} \+ + find "$pkgdir"/usr/lib/rustlib -type f -perm -700 -exec chmod 0755 {} \+ if [ -z "$BOOTSTRAP" ]; then # link scudo to tools by default on architectures where it works well @@ -438,17 +440,17 @@ _mv() { } sha512sums=" -7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606 rustc-1.75.0-src.tar.xz +92e16cfdeb91bde341fe6c2774d92868275b07aa1d46d870ddc9291eadfe4ea9af93e06586fa7d6b8d60534903945cbbe706d354c90272712989c58d2bf174bf rustc-1.76.0-src.tar.xz 9de9d7ad05584e3cafddedcac409a4605a1d67e82260220deb3efd965603ee3148062b081c0cd736e50d82daad3a723fb6a7493fdf4dddfe36288645425a7946 alpine-move-py-scripts-to-share.patch -c88d914201349ac39be852f491efe7d2d043479931c43ceb78c626c719fae20786c9700828ae7367bcb820e6f46fa3fc41d57bb3d30813f869e7ebb47efb4473 alpine-target.patch -d2058c4c0ee9a447b72872016baed8c42df96ca7d5e53d45c39f698bc570ef94780623a1de43b5ca64b366901df66a9a07ae378392899b2abc520f42701e4c70 bootstrap-vendor-remap.patch +18d18bb5e2f63b0ec53cf198486098e07dba8de98423414ac43c3e9594eccc3d5c057c333e2129042ad4154453c5e4fb36e002fe272142fc1d0186ac352d967b alpine-target.patch +bf039bacf62864bcbf1da2a501ec8e32c106252e526468b6222e8c6cacdf32b256ecb39a2fd4e23f73001b585c36f2746407b8ef5a25f7572a258050883b7c7f bootstrap-vendor-remap.patch b4f09270f4e1677975d12447be9960271b00ffb8ab55987864c306fa45b8f70bdb82fd89e5fa7ad1cf604a1c91fbac8f3753b29dc98e10e7f47edf13d9071d77 do-not-install-libunwind-source.patch -35a87b388b0a42d7897744fd39c3976b46a082cbf424eea936a81dacc5450ec12a5cba436cc57c65d4c9ccbc57a51fe3bbcefb969bab1b9e407e4e28198e8218 gcc-eh-libunwind.patch +d4531905520b3fc699fbf57b267130bdbca94e2773a710e8b4c618ae3895149312934dd92d1988860c6dd102af50e05264b49a01662d5621c26de3604c753d6a gcc-eh-libunwind.patch b283d31cc8d6559aa639d44f776e97c2a1e0f23c717b6784e549861b881555bd467fa6023180866aae81a9a58c5f83e306940ee645f3c6733a1bdef6130036c9 install-template-shebang.patch a32f3a9bcab771cce6be2ad936cd4edad3bb638f38da02e79c29cfed967eb0edcdf47ae892bbdd2959cebb5c74dee3fcc752dc2405f761d5c8ecc0021abb24a0 musl-fix-linux_musl_base.patch -19c3c11be697e6161b4430c6dbd6de643dc128b9867c688a3d417a785c31d090c7f408fcc035d2c3c81ac9357d7e30ff09134cdb2c1b7e4223c156702dafc5b2 need-rpath.patch -f6cbf217b71ac7082935beefc5d23b8ef325132898ecfaa53dd8e741e3d70b12656c1ad2ae94b49ce8a7062f5e7f9f28861445c0e7e229f92ab8c0cbc00c8101 need-ssp_nonshared.patch -61899e60f9c874572b335ff83bd8c06e288eb85eae441399c604286f1d0f56981437c67c543f7573d94404ad35fc64a41cc9508be37079d7d6a997e4cd93eba6 no-export-ld-library-path.patch +7ad05849016a6c69bafcb947373edc0d2649d1ac970ae2b6d4ab80e76c2957cbcd11bf00515a356f1dc96fbf49fc5447a3a5d90a3d8c9fd32fc5ec2e9b086d2a need-rpath.patch +b83449f86d4bd7f45c28fc12e004c471a7b2a17e336e12543cb39e3d3dc68fd07cac52af4524821374f7fd79a77df8de5cb6837b946bb59eb671bdf459001e20 need-ssp_nonshared.patch +da5ea8ea2360ba6fdc2b3f29063baf978af19f7ff106d0511912b1357e1e613dae0417d3b55fb2aafb4e97d1749cb01046d76c6a27a03e384468e2d26c2a30dc no-export-ld-library-path.patch 74c0d14a68c2d7355f15ec3704d387556ad337e4991831e94951906d17aeb60387d20586a63cf6cdc62b46c60e1874340a250196ec2b3e75c268af1c41fae7e9 revert-rustc_codegen_ssa-use-try_canonicalize-in-rpath.patch fc5d13242aaa7f0a5ac78fa2e4fa02c50816daa20ad9671e55738f27218186748694ec973ae9b7f13d97910f35c14ed0d73b6d6fa3e484865a92fad9fc1e86b0 system-wasm-ld.patch c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125 check-rustc diff --git a/main/rust/alpine-target.patch b/main/rust/alpine-target.patch index c9df3c1441d..91ae12c7dd7 100644 --- a/main/rust/alpine-target.patch +++ b/main/rust/alpine-target.patch @@ -77,7 +77,7 @@ and distribution-specific quirks instead of polluting the main musl target of +} --- 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 -@@ -1441,6 +1441,16 @@ +@@ -1440,6 +1440,16 @@ } supported_targets! { diff --git a/main/rust/bootstrap-vendor-remap.patch b/main/rust/bootstrap-vendor-remap.patch index 344145bb306..b57a216ce13 100644 --- a/main/rust/bootstrap-vendor-remap.patch +++ b/main/rust/bootstrap-vendor-remap.patch @@ -13,7 +13,7 @@ diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder. index 4e20babc55a68..3770d0687b242 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs -@@ -1789,15 +1789,20 @@ impl<'a> Builder<'a> { +@@ -1801,15 +1801,20 @@ impl<'a> Builder<'a> { } if self.config.rust_remap_debuginfo { diff --git a/main/rust/gcc-eh-libunwind.patch b/main/rust/gcc-eh-libunwind.patch index 7675e8f02ba..eb29bf6cbed 100644 --- a/main/rust/gcc-eh-libunwind.patch +++ b/main/rust/gcc-eh-libunwind.patch @@ -23,7 +23,7 @@ error: aborting due to previous error --- a/library/unwind/src/lib.rs +++ b/library/unwind/src/lib.rs -@@ -50,7 +50,10 @@ +@@ -53,7 +53,10 @@ #[link(name = "unwind", cfg(not(target_feature = "crt-static")))] extern "C" {} } else { diff --git a/main/rust/need-rpath.patch b/main/rust/need-rpath.patch index dae43a8bb16..751dd4d5eea 100644 --- a/main/rust/need-rpath.patch +++ b/main/rust/need-rpath.patch @@ -13,7 +13,7 @@ Hacky hacky! --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs -@@ -2018,6 +2018,8 @@ pub struct TargetOptions { +@@ -2021,6 +2021,8 @@ pub struct TargetOptions { pub allows_weak_linkage: bool, /// Whether the linker support rpaths or not. Defaults to false. pub has_rpath: bool, @@ -30,7 +30,7 @@ Hacky hacky! no_default_libraries: true, position_independent_executables: false, static_position_independent_executables: false, -@@ -3078,6 +3081,7 @@ impl Target { +@@ -3077,6 +3080,7 @@ impl Target { key!(default_dwarf_version, u32); key!(allows_weak_linkage, bool); key!(has_rpath, bool); @@ -38,7 +38,7 @@ Hacky hacky! key!(no_default_libraries, bool); key!(position_independent_executables, bool); key!(static_position_independent_executables, bool); -@@ -3334,6 +3338,7 @@ impl ToJson for Target { +@@ -3332,6 +3336,7 @@ impl ToJson for Target { target_option_val!(default_dwarf_version); target_option_val!(allows_weak_linkage); target_option_val!(has_rpath); diff --git a/main/rust/need-ssp_nonshared.patch b/main/rust/need-ssp_nonshared.patch index 6b1db16c2e1..efa325fdbe0 100644 --- a/main/rust/need-ssp_nonshared.patch +++ b/main/rust/need-ssp_nonshared.patch @@ -6,7 +6,7 @@ diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs index 68c9520..63f8a48 100644 --- a/library/std/src/sys/unix/mod.rs +++ b/library/std/src/sys/unix/mod.rs -@@ -383,6 +383,9 @@ cfg_if::cfg_if! { +@@ -382,6 +382,9 @@ cfg_if::cfg_if! { #[link(name = "dl", cfg(not(target_feature = "crt-static")))] #[link(name = "log", cfg(not(target_feature = "crt-static")))] extern "C" {} diff --git a/main/rust/no-export-ld-library-path.patch b/main/rust/no-export-ld-library-path.patch index 1c6bf64015c..feff239bdaa 100644 --- a/main/rust/no-export-ld-library-path.patch +++ b/main/rust/no-export-ld-library-path.patch @@ -12,7 +12,7 @@ diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 7c36bb264..b4f9b7066 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py -@@ -909,12 +909,6 @@ class RustBuild(object): +@@ -893,12 +893,6 @@ class RustBuild(object): del env["CARGO_BUILD_TARGET"] env["CARGO_TARGET_DIR"] = build_dir env["RUSTC"] = self.rustc()