diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-05-23 21:02:01 +0200 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-05-24 18:38:18 +0000 |
commit | de1e86703e0786ed69ecbd451aeb262f590bcdec (patch) | |
tree | 364dfb3b40805d95e70db2e151644461354d490a /community/rust | |
parent | 3e027bc404156894ad8388027f6d341db8d80d48 (diff) | |
download | aports-de1e86703e0786ed69ecbd451aeb262f590bcdec.tar.bz2 aports-de1e86703e0786ed69ecbd451aeb262f590bcdec.tar.xz |
community/rust: upgrade to 1.33.0
Closes GH-8023
Diffstat (limited to 'community/rust')
-rw-r--r-- | community/rust/APKBUILD | 25 | ||||
-rw-r--r-- | community/rust/alpine-target.patch | 19 | ||||
-rw-r--r-- | community/rust/minimize-rpath.patch | 23 | ||||
-rw-r--r-- | community/rust/need-rpath.patch | 10 |
4 files changed, 33 insertions, 44 deletions
diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD index 0a6c8accee..e689b77d1c 100644 --- a/community/rust/APKBUILD +++ b/community/rust/APKBUILD @@ -1,11 +1,12 @@ +# Contributor: Rasmus Thomsen <oss@cogitri.dev> # Contributor: Jakub Jirutka <jakub@jirutka.cz> # Contributor: Shiz <hi@shiz.me> # Contributor: Jeizsm <jeizsm@gmail.com> # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=rust -pkgver=1.32.0 +pkgver=1.33.0 _llvmver=7 -_bootver=1.31.1 +_bootver=1.32.0 pkgrel=0 pkgdesc="The Rust Programming Language" url="http://www.rust-lang.org" @@ -87,15 +88,11 @@ export LIBGIT2_SYS_USE_PKG_CONFIG=1 prepare() { default_prepare - cd "$builddir" - # Remove bundled dependencies. rm -Rf src/llvm/ } build() { - cd "$builddir" - ./configure \ --build="$CBUILD" \ --host="$CTARGET" \ @@ -118,18 +115,15 @@ build() { } check() { - cd "$builddir" - # At this moment lib/rustlib/$CTARGET/lib does not contain a complete # copy of the .so libs from lib (they will be copied there during - # `x.py install`). Thus we must set LD_LIBRARY_PATH for tests to work. + # 'x.py install'). Thus we must set LD_LIBRARY_PATH for tests to work. # This is related to change-rpath-to-rustlib.patch. export LD_LIBRARY_PATH="$builddir/build/$CTARGET/stage2/lib" "$srcdir"/check-rustc "$builddir"/build/$CTARGET/stage2/bin/rustc # XXX: There's some problem with these tests, we will figure it out later. -# cd "$builddir" # make check \ # LD_LIBRARY_PATH="$_stage0dir/lib" \ # VERBOSE=1 @@ -141,8 +135,6 @@ check() { } package() { - cd "$builddir" - DESTDIR="$pkgdir" ./x.py install -v cd "$pkgdir" @@ -262,19 +254,20 @@ _cargo_doc() { _mv() { local dest; for dest; do true; done # get last argument mkdir -p "$dest" + # shellcheck disable=SC2068 mv $@ } -sha512sums="9bca5702fe4ea515b4401cf200cf472d3b24dd6c93bd4a783a4cd6c473a2e9dc715b642672e1c940770d2bab860633ffe0b8cec6fbbfc737e23aa2a21d6cd00a rustc-1.32.0-src.tar.gz +sha512sums="65ae2615f4639ccea146fc431aca62e6f0793aa5e584e786e706eefb30588056080300fd5752ce9226067dc213f1a468f96c21b2334f22c5751fa90ddbd3a2b4 rustc-1.33.0-src.tar.gz 6713d0d0ccac6b17ed47e486c6d74d1f913887bf88d42527576188fa98063a33a1ea903967847d52126b996f965577f1311344d6e57063b1625221847290a0ed musl-fix-static-linking.patch a2871fa75fb63570031eda80390461a137fe31ba82bf253caeabf3fb6673b4c80b535917dde139a300fb6d5f8c14fe09c8f7aaf4a506ef5e837540cf00aaa977 musl-fix-linux_musl_base.patch e40d41a6dc5d400d6672f1836cd5b9e00391f7beb52e872d87db76bc95a606ce6aaae737a0256a1e5fba77c83bb223818d214dbe87028d47be65fb43c101595c llvm-with-ffi.patch 5490ba8d78e55ce24c1a4f152604a38066079f9fec0bb41184c5ef279092b45ecc67cba00995c9a3f594b5eacee88a330c6836d755b5c895b87a64579d33febe static-pie.patch -487d479a15b43c3e1ee28c111206a4f488be933309f3c6571be7ec33da4e955cc1ee907b7729b4228cb292ca7b3324eb6ba4f32a01abc3d04573a0d96982569a need-rpath.patch -b649b2312000e94b26c1c4fceb7f11e7afd6066795370891ce1d239745f956d1ee7124cf831119d7f5762274851c15f333762d465d87c73fdceab6ec4bfe198d minimize-rpath.patch +b7931281bfc1deb25c72494b4111500fe46c2e551ca32cafdfcc9a1bff657ca0b2bfaeea52260b4604678403fc76a708c2416bfc9e5bdac04475c4a70602295b need-rpath.patch +00f868748eb76f393f32fa7ef3e670a0578884cf81dc905accf546ea1b55e10eb9b731a867cb3b1554b9b609309fd10153d2ae3c0c11cc3bf6be6cdce41fe36d minimize-rpath.patch 35e0619672843d9dd41df4a086404a59b57c12fa014e42d06102bc3856a96ed021e716f9d581ec5c89444acbaedd3edcd2b8a85576df3bb4451c0edde3afbba5 alpine-move-py-scripts-to-share.patch 4f5746acb08c18f749691a8455cc81ea2e9a361621790b006b884c9c895ab9e51a001b6638bed071a9af5c232ed8d1b43c58260839a3f6dce4eec3f495ce4348 alpine-change-rpath-to-rustlib.patch -64063c1c61477afcf2cc8b58fab5a11cb11cabf8914b3f0098525731b1b8a7442ff4d4d9506ad5ea24483e0811a2b76c836c635f25a66ce155237d2518c4176b alpine-target.patch +1c5ef78ee210e3966e49eae3b43986bc04341a818c240ef39979046bb41d191139bc5d5f7048a83d8b8210b4ec9655d4882692cdb1711edc8da620216a67d36a alpine-target.patch 7d59258d4462eba0207739a5c0c8baf1f19d9a396e5547bb4d59d700eb94d50ba6add2e523f3e94e29e993821018594625ea4ac86304fb58f7f8c82622a26ab0 install-template-shebang.patch c2ccab15d48c11cc3af549a3944ca0d29cb3790345468f4f3779e5ac931554dea603e5523281fc391ba4a555ee468b516961c4cb8ecee007eadacf114f3d8758 bootstrap-tool-respect-tool-config.patch 3d6f027088e1ec189ce864bf5ed150ccad8be5d9fc0973f1b4d202eec6eab865834403335a9f0765bbfa54638aed7f5d5f2183ba9dfeab9f5bc4ef48111a8427 cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch diff --git a/community/rust/alpine-target.patch b/community/rust/alpine-target.patch index 2e3e8610bc..66c8345f2f 100644 --- a/community/rust/alpine-target.patch +++ b/community/rust/alpine-target.patch @@ -7,22 +7,19 @@ 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`. ---- a/src/librustc_target/spec/mod.rs -+++ b/src/librustc_target/spec/mod.rs -@@ -412,8 +412,13 @@ - ("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf), - - ("aarch64-unknown-none", aarch64_unknown_none), +--- a/src/librustc_target/spec/mod.rs.orig 2019-05-23 21:05:45.173347119 +0200 ++++ b/src/librustc_target/spec/mod.rs 2019-05-23 21:06:39.006681699 +0200 +@@ -328,6 +328,10 @@ + } - ("x86_64-fortanix-unknown-sgx", x86_64_fortanix_unknown_sgx), -+ + 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), + ("arm-alpine-linux-musleabihf", arm_alpine_linux_musleabihf), - } - - /// Everything `rustc` knows about how to compile for a specific target. + ("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 +++ b/src/librustc_target/spec/i586_alpine_linux_musl.rs @@ -0,0 +1,35 @@ diff --git a/community/rust/minimize-rpath.patch b/community/rust/minimize-rpath.patch index 1f6682ae26..8d3be50cbe 100644 --- a/community/rust/minimize-rpath.patch +++ b/community/rust/minimize-rpath.patch @@ -9,7 +9,7 @@ and skip it there. --- a/src/librustc_codegen_llvm/back/rpath.rs +++ b/src/librustc_codegen_llvm/back/rpath.rs -@@ -69,14 +69,15 @@ +@@ -59,13 +59,14 @@ debug!(" {:?}", libpath.display()); } @@ -21,15 +21,14 @@ and skip it there. // as long as they maintain the relative relationship to the // crates they depend on. - let rel_rpaths = get_rpaths_relative_to_output(config, libs); -+ let rel_rpaths = get_rpaths_relative_to_output(config, libs, &fallback_rpaths); - +- - // And a final backup rpath to the global library location. - let fallback_rpaths = vec![get_install_prefix_rpath(config)]; -- ++ let rel_rpaths = get_rpaths_relative_to_output(config, libs, &fallback_rpaths); + fn log_rpaths(desc: &str, rpaths: &[String]) { debug!("{} rpaths:", desc); - for rpath in rpaths { -@@ -96,11 +97,13 @@ +@@ -87,11 +88,13 @@ } fn get_rpaths_relative_to_output(config: &mut RPathConfig, @@ -46,14 +45,13 @@ and skip it there. // Mac doesn't appear to support $ORIGIN let prefix = if config.is_like_osx { "@loader_path" -@@ -114,10 +117,18 @@ +@@ -105,10 +108,16 @@ let mut output = cwd.join(&config.out_filename); output.pop(); let output = fs::canonicalize(&output).unwrap_or(output); - let relative = path_relative_from(&lib, &output).unwrap_or_else(|| - panic!("couldn't create relative path from {:?} to {:?}", output, lib)); -+ - // FIXME (#9639): This needs to handle non-utf8 paths +- // FIXME (#9639): This needs to handle non-utf8 paths - format!("{}/{}", prefix, relative.to_str().expect("non-utf8 component in path")) + let libpath = lib.to_str().expect("non-utf8 component in path").to_string(); + if omit.contains(&libpath) { @@ -68,7 +66,7 @@ and skip it there. } // This routine is adapted from the *old* Path's `path_relative_from` -@@ -239,6 +249,7 @@ +@@ -227,6 +236,7 @@ #[test] fn test_rpath_relative() { if cfg!(target_os = "macos") { @@ -76,7 +74,7 @@ and skip it there. let config = &mut RPathConfig { used_crates: Vec::new(), has_rpath: true, -@@ -248,9 +259,11 @@ +@@ -236,9 +246,11 @@ get_install_prefix_lib_path: &mut || panic!(), }; let res = get_rpath_relative_to_output(config, @@ -89,7 +87,7 @@ and skip it there. let config = &mut RPathConfig { used_crates: Vec::new(), out_filename: PathBuf::from("bin/rustc"), -@@ -260,7 +273,8 @@ +@@ -248,7 +260,8 @@ linker_is_gnu: true, }; let res = get_rpath_relative_to_output(config, @@ -99,3 +97,4 @@ and skip it there. assert_eq!(res, "$ORIGIN/../lib"); } } + diff --git a/community/rust/need-rpath.patch b/community/rust/need-rpath.patch index c86f437d50..6a997c41b6 100644 --- a/community/rust/need-rpath.patch +++ b/community/rust/need-rpath.patch @@ -46,9 +46,9 @@ Hacky hacky! target_option_val!(no_default_libraries); target_option_val!(position_independent_executables); target_option_val!(static_position_independent_executables); ---- a/src/librustc_codegen_llvm/back/link.rs -+++ b/src/librustc_codegen_llvm/back/link.rs -@@ -1092,7 +1092,10 @@ +--- a/src/librustc_codegen_llvm/back/link.rs.orig 2019-05-23 17:57:22.587173355 +0200 ++++ b/src/librustc_codegen_llvm/back/link.rs 2019-05-23 17:58:28.833841560 +0200 +@@ -1018,7 +1018,10 @@ // FIXME (#2397): At some point we want to rpath our guesses as to // where extern libraries might live, based on the // addl_lib_search_paths @@ -56,7 +56,7 @@ Hacky hacky! + // XXX: hacky hacky + let bootstrap = env::var("RUSTC_BOOTSTRAP").is_ok(); + if !bootstrap && !sess.crt_static() && -+ (sess.opts.cg.rpath || sess.target.target.options.need_rpath) { - let sysroot = sess.sysroot(); ++ (sess.opts.cg.rpath || sess.target.target.options.need_rpath) { let target_triple = sess.opts.target_triple.triple(); let mut get_install_prefix_lib_path = || { + let install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX"); |