diff options
author | Marat Safin <jeizsm@gmail.com> | 2019-01-18 12:37:41 +0300 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-05-23 19:38:12 +0000 |
commit | e066018fc40a37267d5cbaed6245382d1215ee15 (patch) | |
tree | bd0999e1e2c390216c7763a4f9788d7025f5ff33 /community/rust | |
parent | 59c72398df08141f4177bd93f513451e16d90480 (diff) | |
download | aports-e066018fc40a37267d5cbaed6245382d1215ee15.tar.bz2 aports-e066018fc40a37267d5cbaed6245382d1215ee15.tar.xz |
community/rust: upgrade to 1.32.0
Signed-off-by: Marat Safin <jeizsm@gmail.com>
Closes GH-6071
Diffstat (limited to 'community/rust')
-rw-r--r-- | community/rust/APKBUILD | 33 | ||||
-rw-r--r-- | community/rust/alpine-change-rpath-to-rustlib.patch | 6 | ||||
-rw-r--r-- | community/rust/alpine-target.patch | 8 | ||||
-rw-r--r-- | community/rust/cargo-skip-broken-tests.patch | 60 | ||||
-rw-r--r-- | community/rust/minimize-rpath.patch | 5 | ||||
-rw-r--r-- | community/rust/musl-fix-linux_musl_base.patch | 27 | ||||
-rw-r--r-- | community/rust/static-pie.patch | 2 |
7 files changed, 86 insertions, 55 deletions
diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD index 143583d5f9..0a6c8accee 100644 --- a/community/rust/APKBUILD +++ b/community/rust/APKBUILD @@ -3,11 +3,10 @@ # Contributor: Jeizsm <jeizsm@gmail.com> # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=rust -pkgver=1.31.1 -# TODO: bump to 6 as soon as we add llvm6 -_llvmver=5 -_bootver=1.30.0 -pkgrel=2 +pkgver=1.32.0 +_llvmver=7 +_bootver=1.31.1 +pkgrel=0 pkgdesc="The Rust Programming Language" url="http://www.rust-lang.org" arch="x86_64" @@ -70,8 +69,8 @@ source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz install-template-shebang.patch bootstrap-tool-respect-tool-config.patch cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch - cargo-tests-fix-package-include-exclude.patch check-rustc + cargo-skip-broken-tests.patch " builddir="$srcdir/rustc-$pkgver-src" @@ -97,9 +96,6 @@ prepare() { build() { cd "$builddir" - # jemalloc is disabled, because it increases size of statically linked - # binaries produced by rustc (stripped hello_world 186 kiB vs. 358 kiB) - # for only tiny performance boost (even negative in some tests). ./configure \ --build="$CBUILD" \ --host="$CTARGET" \ @@ -116,8 +112,7 @@ build() { --enable-llvm-link-shared \ --enable-option-checking \ --enable-locked-deps \ - --enable-vendor \ - --disable-jemalloc + --enable-vendor ./x.py build -v --jobs ${JOBS:-2} } @@ -270,18 +265,18 @@ _mv() { mv $@ } -sha512sums="76ca238c40694abab4982f4b788a0da34bbb3d8a6e4adb50b0b9138876407ac2cb4fc39cde057b8fa32729c543c5977d392167e96b82f76a01af31eaafe463cf rustc-1.31.1-src.tar.gz +sha512sums="9bca5702fe4ea515b4401cf200cf472d3b24dd6c93bd4a783a4cd6c473a2e9dc715b642672e1c940770d2bab860633ffe0b8cec6fbbfc737e23aa2a21d6cd00a rustc-1.32.0-src.tar.gz 6713d0d0ccac6b17ed47e486c6d74d1f913887bf88d42527576188fa98063a33a1ea903967847d52126b996f965577f1311344d6e57063b1625221847290a0ed musl-fix-static-linking.patch -3615b815cfb4eae60f3291dc07a292e1be6048eeddcb21c595bddbe8cca6a622e5b76be72a76f6b65b4d33abdc34a792ce010b024b2818a4d73bce3f85b3eb2b musl-fix-linux_musl_base.patch +a2871fa75fb63570031eda80390461a137fe31ba82bf253caeabf3fb6673b4c80b535917dde139a300fb6d5f8c14fe09c8f7aaf4a506ef5e837540cf00aaa977 musl-fix-linux_musl_base.patch e40d41a6dc5d400d6672f1836cd5b9e00391f7beb52e872d87db76bc95a606ce6aaae737a0256a1e5fba77c83bb223818d214dbe87028d47be65fb43c101595c llvm-with-ffi.patch -820e5dbeaea157859d0fb735f0bf9419cad1e148b074aea4ba84fdd4c2c0e1ce7e097b4fd6a2a5797299ecb918a4f9dbb57ce05e71638b31ccae415c256a9a66 static-pie.patch +5490ba8d78e55ce24c1a4f152604a38066079f9fec0bb41184c5ef279092b45ecc67cba00995c9a3f594b5eacee88a330c6836d755b5c895b87a64579d33febe static-pie.patch 487d479a15b43c3e1ee28c111206a4f488be933309f3c6571be7ec33da4e955cc1ee907b7729b4228cb292ca7b3324eb6ba4f32a01abc3d04573a0d96982569a need-rpath.patch -5e8557e72b250b8726b821541dc7d0e40d8179220cfdacd6d74ed19c756ffb214d9f882e82856acb4fbfbfe5c70f1c6de6813db3ba92a2c0e2e425bb5eb620ba minimize-rpath.patch +b649b2312000e94b26c1c4fceb7f11e7afd6066795370891ce1d239745f956d1ee7124cf831119d7f5762274851c15f333762d465d87c73fdceab6ec4bfe198d minimize-rpath.patch 35e0619672843d9dd41df4a086404a59b57c12fa014e42d06102bc3856a96ed021e716f9d581ec5c89444acbaedd3edcd2b8a85576df3bb4451c0edde3afbba5 alpine-move-py-scripts-to-share.patch -61aa415d754e9e01236481a1f3c9d5242f2d633e6f11b998e9ffcc07bf5c182d87c0c973dab6f10e4bb3ab4b4a4857bf9ed8dd664c49a65f6175d27db2774db1 alpine-change-rpath-to-rustlib.patch -a69b2ae7ffddbacee4b400645a829fbc7f5313f2ebf796c2a5aa4f93d5f2eb62993c201fc0241684ad23e6b3a929a4674ee9b8ec98468ecfaae35cc34a941fdb alpine-target.patch +4f5746acb08c18f749691a8455cc81ea2e9a361621790b006b884c9c895ab9e51a001b6638bed071a9af5c232ed8d1b43c58260839a3f6dce4eec3f495ce4348 alpine-change-rpath-to-rustlib.patch +64063c1c61477afcf2cc8b58fab5a11cb11cabf8914b3f0098525731b1b8a7442ff4d4d9506ad5ea24483e0811a2b76c836c635f25a66ce155237d2518c4176b 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 -41ae208a8c06be8c65e3e95529c9298e0fc094607e25d60f5055f217f96a5382ece4b0c4d580a44bf86a50272377a9924637341ec1d9848fb297e8200a598d8f cargo-tests-fix-package-include-exclude.patch -c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125 check-rustc" +c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125 check-rustc +afca9b5524e270b6ddad4b2c99bba9a5f156a2411b04a9ca5802b185b50420de70555bb2526dcb4d5b12b29ff30afa2fe461d1de83b5345dd8e4ccf52e875c3f cargo-skip-broken-tests.patch" diff --git a/community/rust/alpine-change-rpath-to-rustlib.patch b/community/rust/alpine-change-rpath-to-rustlib.patch index 609fdde358..3eb1a5d02e 100644 --- a/community/rust/alpine-change-rpath-to-rustlib.patch +++ b/community/rust/alpine-change-rpath-to-rustlib.patch @@ -24,13 +24,15 @@ Related upstream issues: --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs -@@ -224,9 +224,9 @@ +@@ -224,11 +224,11 @@ // so. Note that this is definitely a hack, and we should likely // flesh out rpath support more fully in the future. cmd.arg("-Z").arg("osx-rpath-install-name"); - Some("-Wl,-rpath,@loader_path/../lib") + Some("-Wl,-rpath,@loader_path/../lib".to_string()) - } else if !target.contains("windows") && !target.contains("wasm32") { + } else if !target.contains("windows") && + !target.contains("wasm32") && + !target.contains("fuchsia") { - Some("-Wl,-rpath,$ORIGIN/../lib") + Some(format!("-Wl,-rpath,$ORIGIN/../lib/rustlib/{}/lib", target)) } else { diff --git a/community/rust/alpine-target.patch b/community/rust/alpine-target.patch index d25da5b584..2e3e8610bc 100644 --- a/community/rust/alpine-target.patch +++ b/community/rust/alpine-target.patch @@ -9,10 +9,12 @@ and distribution-specific quirks instead of polluting the main musl target of --- a/src/librustc_target/spec/mod.rs +++ b/src/librustc_target/spec/mod.rs -@@ -412,6 +412,11 @@ +@@ -412,8 +412,13 @@ ("riscv32imac-unknown-none-elf", riscv32imac_unknown_none_elf), ("aarch64-unknown-none", aarch64_unknown_none), + + ("x86_64-fortanix-unknown-sgx", x86_64_fortanix_unknown_sgx), + + ("i586-alpine-linux-musl", i586_alpine_linux_musl), + ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl), @@ -99,7 +101,7 @@ and distribution-specific quirks instead of polluting the main musl target of +} --- /dev/null +++ b/src/librustc_target/spec/aarch64_alpine_linux_musl.rs -@@ -0,0 +1,38 @@ +@@ -0,0 +1,36 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. @@ -118,8 +120,6 @@ and distribution-specific quirks instead of polluting the main musl target of + base.crt_static_default = false; + base.static_position_independent_executables = true; + base.need_rpath = true; -+ // see #36994 -+ base.exe_allocation_crate = None; + + Ok(Target { + llvm_target: "aarch64-alpine-linux-musl".to_string(), diff --git a/community/rust/cargo-skip-broken-tests.patch b/community/rust/cargo-skip-broken-tests.patch new file mode 100644 index 0000000000..425d69d846 --- /dev/null +++ b/community/rust/cargo-skip-broken-tests.patch @@ -0,0 +1,60 @@ +diff --git a/src/tools/cargo/tests/testsuite/new.rs b/src/tools/cargo/tests/testsuite/new.rs.new +index 52e327e36c..416ff58671 100644 +--- a/src/tools/cargo/tests/testsuite/new.rs ++++ b/src/tools/cargo/tests/testsuite/new.rs.new +@@ -154,6 +154,7 @@ fn keyword_name() { + ).run(); + } + ++#[ignore] + #[test] + fn finds_author_user() { + create_empty_gitconfig(); +@@ -168,6 +169,7 @@ fn finds_author_user() { + assert!(contents.contains(r#"authors = ["foo"]"#)); + } + ++#[ignore] + #[test] + fn finds_author_user_escaped() { + create_empty_gitconfig(); +@@ -182,6 +184,7 @@ fn finds_author_user_escaped() { + assert!(contents.contains(r#"authors = ["foo \"bar\""]"#)); + } + ++#[ignore] + #[test] + fn finds_author_username() { + create_empty_gitconfig(); +@@ -217,6 +220,7 @@ fn finds_author_priority() { + assert!(contents.contains(r#"authors = ["bar <baz>"]"#)); + } + ++#[ignore] + #[test] + fn finds_author_email() { + create_empty_gitconfig(); +@@ -234,6 +238,7 @@ fn finds_author_email() { + assert!(contents.contains(r#"authors = ["bar <baz>"]"#)); + } + ++#[ignore] + #[test] + fn finds_author_git() { + git_process("config --global user.name bar").exec().unwrap(); +@@ -289,6 +294,7 @@ fn finds_git_email() { + assert!(contents.contains(r#"authors = ["foo <gitfoo>"]"#), contents); + } + ++#[ignore] + #[test] + fn finds_git_author() { + create_empty_gitconfig(); +@@ -337,6 +343,7 @@ fn author_prefers_cargo() { + assert!(!root.join("foo/.gitignore").exists()); + } + ++#[ignore] + #[test] + fn strip_angle_bracket_author_email() { + create_empty_gitconfig(); diff --git a/community/rust/minimize-rpath.patch b/community/rust/minimize-rpath.patch index 3ae6a7efe1..1f6682ae26 100644 --- a/community/rust/minimize-rpath.patch +++ b/community/rust/minimize-rpath.patch @@ -46,7 +46,7 @@ and skip it there. // Mac doesn't appear to support $ORIGIN let prefix = if config.is_like_osx { "@loader_path" -@@ -114,11 +117,18 @@ +@@ -114,10 +117,18 @@ let mut output = cwd.join(&config.out_filename); output.pop(); let output = fs::canonicalize(&output).unwrap_or(output); @@ -54,8 +54,7 @@ and skip it there. - panic!("couldn't create relative path from {:?} to {:?}", output, lib)); + // FIXME (#9639): This needs to handle non-utf8 paths -- format!("{}/{}", prefix, -- relative.to_str().expect("non-utf8 component in path")) +- 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) { + None diff --git a/community/rust/musl-fix-linux_musl_base.patch b/community/rust/musl-fix-linux_musl_base.patch index e342f448fc..90314dce62 100644 --- a/community/rust/musl-fix-linux_musl_base.patch +++ b/community/rust/musl-fix-linux_musl_base.patch @@ -6,7 +6,7 @@ See https://github.com/rust-lang/rust/pull/40113 --- a/src/librustc_target/spec/linux_musl_base.rs +++ b/src/librustc_target/spec/linux_musl_base.rs -@@ -13,53 +13,12 @@ +@@ -13,28 +13,12 @@ pub fn opts() -> TargetOptions { let mut base = super::linux_base::opts(); @@ -21,31 +21,6 @@ See https://github.com/rust-lang/rust/pull/40113 // argument is *not* necessary for normal builds, but it can't hurt! base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string()); -- // There's a whole bunch of circular dependencies when dealing with MUSL -- // unfortunately. To put this in perspective libc is statically linked to -- // liblibc and libunwind is statically linked to libstd: -- // -- // * libcore depends on `fmod` which is in libc (transitively in liblibc). -- // liblibc, however, depends on libcore. -- // * compiler-rt has personality symbols that depend on libunwind, but -- // libunwind is in libstd which depends on compiler-rt. -- // -- // Recall that linkers discard libraries and object files as much as -- // possible, and with all the static linking and archives flying around with -- // MUSL the linker is super aggressively stripping out objects. For example -- // the first case has fmod stripped from liblibc (it's in its own object -- // file) so it's not there when libcore needs it. In the second example all -- // the unused symbols from libunwind are stripped (each is in its own object -- // file in libstd) before we end up linking compiler-rt which depends on -- // those symbols. -- // -- // To deal with these circular dependencies we just force the compiler to -- // link everything as a group, not stripping anything out until everything -- // is processed. The linker will still perform a pass to strip out object -- // files but it won't do so until all objects/archives have been processed. -- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,-(".to_string()); -- base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-Wl,-)".to_string()]); -- - // When generating a statically linked executable there's generally some - // small setup needed which is listed in these files. These are provided by - // a musl toolchain and are linked by default by the `musl-gcc` script. Note diff --git a/community/rust/static-pie.patch b/community/rust/static-pie.patch index 437a95ebe7..4f861466c1 100644 --- a/community/rust/static-pie.patch +++ b/community/rust/static-pie.patch @@ -98,7 +98,7 @@ library, just like static binaries, but more secure. key!(position_independent_executables, bool); + key!(static_position_independent_executables, bool); key!(needs_plt, bool); - try!(key!(relro_level, RelroLevel)); + key!(relro_level, RelroLevel)?; key!(archive_format); key!(allow_asm, bool); key!(custom_unwind_resume, bool); |