diff options
author | Shiz <hi@shiz.me> | 2017-04-27 22:06:05 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-28 03:02:30 +0200 |
commit | 1ccf62eb0d27f63f20055c1458f9a6ba75b6032c (patch) | |
tree | e40322336efe91be52be95bbfc69ccfc9181d11b /testing/rust | |
parent | 22c1288141f8bba1d3801cc9d756a10334fbd091 (diff) | |
download | aports-1ccf62eb0d27f63f20055c1458f9a6ba75b6032c.tar.bz2 aports-1ccf62eb0d27f63f20055c1458f9a6ba75b6032c.tar.xz |
testing/rust: upgrade to 1.17.0
Diffstat (limited to 'testing/rust')
-rw-r--r-- | testing/rust/APKBUILD | 20 | ||||
-rw-r--r-- | testing/rust/musl-fix-static-linking.patch | 32 | ||||
-rw-r--r-- | testing/rust/static-pie.patch | 10 |
3 files changed, 44 insertions, 18 deletions
diff --git a/testing/rust/APKBUILD b/testing/rust/APKBUILD index 75158e138c..2c40bc54bb 100644 --- a/testing/rust/APKBUILD +++ b/testing/rust/APKBUILD @@ -2,11 +2,12 @@ # Contributor: Shiz <hi@shiz.me> # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=rust -pkgver=1.16.0 +pkgver=1.17.0 # Git revision of prebuilt Cargo to use for bootstrapping, from src/stage0.txt. -_cargo_gitrev=6e0c18cccc8b0c06fba8a8d76486f81a792fb420 +_cargo_gitrev=6b05583d71f982bcad049b9fa094c637c062e751 _llvmver=3.9 -pkgrel=5 +_bootver=1.16.0 +pkgrel=0 pkgdesc="The Rust Programming Language (compiler)" url="http://www.rust-lang.org" arch="x86_64" @@ -26,8 +27,8 @@ subpackages="$pkgname-dbg $pkgname-stdlib # Follow https://github.com/rust-lang/rust/issues/31322. _cbuild="$CARCH-unknown-linux-musl" source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz - https://repo.voidlinux.eu/distfiles/rustc-$pkgver-$_cbuild.tar.gz - https://repo.voidlinux.eu/distfiles/rust-std-$pkgver-$_cbuild.tar.gz + https://repo.voidlinux.eu/distfiles/rustc-$_bootver-$_cbuild.tar.gz + https://repo.voidlinux.eu/distfiles/rust-std-$_bootver-$_cbuild.tar.gz cargo-$_cargo_gitrev-$_cbuild.tar.gz::https://s3.amazonaws.com/rust-lang-ci/cargo-builds/$_cargo_gitrev/cargo-nightly-$_cbuild.tar.gz musl-support-dynamic-linking.patch musl-fix-static-linking.patch @@ -87,7 +88,6 @@ build() { # binaries produced by rustc (stripped hello_world 186 kiB vs. 358 kiB) # for only tiny performance boost (even negative in some tests). ./configure \ - --enable-rustbuild \ --build="$_cbuild" \ --host="$CTARGET" \ --target="$CTARGET" \ @@ -194,16 +194,16 @@ _mv() { mv $@ } -sha512sums="096b1b7406be9bc61161bb7cdd2061f2bc2174c161a31f4ed6ceecf7fc379f315fc2f7cb9f6c134ea4f8519c27bf6e5a3f712cf1e56d5785831d8c8374eb0ba5 rustc-1.16.0-src.tar.gz +sha512sums="781799b29d83b4f0f433814bd818df034526db8e7f88c2df51d3b814eacafe8098d4bbe47ace951e1943325b3267b244007cf04f1f11083645b25aeacd40ebb6 rustc-1.17.0-src.tar.gz e9b10d58ae5b51b09dd31a1dbf7367917bd40a05ecb4ba3e0e7ac229a0352d3ceb77de80f7c0120f553bd7904644da6bf973dbc32850b12dc91f3974846d4164 rustc-1.16.0-x86_64-unknown-linux-musl.tar.gz 54467213b2824112dec6d5a132ab01d69617a5ccaa9db15e5c8fad55dea5eb31b1b7c9ca07878901d75edd45dc84c726913bf651f3435c480a79703c074b5d90 rust-std-1.16.0-x86_64-unknown-linux-musl.tar.gz -4df33353b6be1af822220ca03f9ec5a3b6421c9b10ec17b864be586ba495c6210bac70d904b0e0b35eff62ef2c9a681ded526e5cbd37e326dc3146742aa659de cargo-6e0c18cccc8b0c06fba8a8d76486f81a792fb420-x86_64-unknown-linux-musl.tar.gz +0994945aa3faa8106059a746b3a885b1a35bf604b4c1a09a006e1a66135ff94b828102864d1642744b06c60c34a7a3107661dd54413b81ccd7c56653c29e75a5 cargo-6b05583d71f982bcad049b9fa094c637c062e751-x86_64-unknown-linux-musl.tar.gz b0a8883e4469b60edd150c84486ab950396d757220f97bd271529576614c6c3b49456098507503832c20619d4bd74246dbc99c78116634a68a6df994793e9a94 musl-support-dynamic-linking.patch -b99b1576016a0173fa0fd83a7711b0cfbe31d18fbbaf7ed79531b706411b675a2689115727f171e72de1367863552e3cdbc1bef7c0d0250505dcce0ba0a973db musl-fix-static-linking.patch +292c1cb4f751d830f5f1300d7ef94f573f698ac51e18243d7ff0d5a47bb1729bb2cbe8fb456e7a479213df5e5fbf49e360c9439d0f5ad7126cb72d161c91566a musl-fix-static-linking.patch f436fddf7ab70ca5f1424081f5b75450270b200b3d997231323863e11addf76e1d65831a7ca09e3a5b7904ce828766c1f70b08326a175890298f28e5bc8646ef musl-fix-linux_musl_base.patch c913d04ef419b2b6d8e453f72894070f263c9292abf97114a51884d475d03ce5b032053f1676ba9364800b4b35e394f707995058530ad5e4122c60f65ddd3db7 musl-fix-jemalloc.patch dc6432293bd060d5e3a73f25870867654fae61995dcd919e244a2dc686b6107556deed8c59ca6002182bfeff5ebc1ca2b89c4028ab0fbfb79e65defe47c9b4b0 llvm-with-ffi.patch -5881cb63c77a566aab80428084297fa278c04aeb5fe4e7a3a32655f2b97cdb5b0712fe859662392393dbbb4b2723be543a0207f6b75961a5fb79351c02c107a9 static-pie.patch +5aaf6715b27b8b786740a55b91216d47985fbef3ccb0ef7e6a81696a2823671f8306143f7ecf77e66af91ef1500072524b9b4c7569508922ad5268df6080fda1 static-pie.patch ff633f2a46c683ad698d1c09c98c06ce9ee9b8d55fa5593cdd485b439ebca3273794d29b5ff32b887be8666f52913a23af6e133c782bd0c4e2c88e306dd3a494 need-rpath.patch d352614e7c774e181decae210140e789de7fc090327ff371981ad28a11ce51c8c01b27c1101a24bb84d75ed2f706f67868f7dbc52196d4ccdf4ebd2d6d6b6b5e minimize-rpath.patch b00997c65d1a451fafae8b547893c5cbf03f028d2d70f6971aa670f34c2d6fc82728c740ac4a9909fc1999925ff300e4525cfec745cb9c9521e564eb166872a2 alpine-allow-crt-static.patch diff --git a/testing/rust/musl-fix-static-linking.patch b/testing/rust/musl-fix-static-linking.patch index 786b7d3a41..85de05e542 100644 --- a/testing/rust/musl-fix-static-linking.patch +++ b/testing/rust/musl-fix-static-linking.patch @@ -77,7 +77,9 @@ static linking is requested, instead of dynamically as before. // 1. The local object that LLVM just generated // 2. Local native libraries // 3. Upstream rust libraries -@@ -888,17 +881,12 @@ +--- a/src/librustc_trans/back/link.rs ++++ b/src/librustc_trans/back/link.rs +@@ -951,17 +951,12 @@ // list can't depend on items higher up in the list. For example nothing can // depend on what we just generated (e.g. that'd be a circular dependency). // Upstream rust libraries are not allowed to depend on our local native @@ -93,7 +95,7 @@ static linking is requested, instead of dynamically as before. + cmd.start_group(); add_local_native_libraries(cmd, sess); add_upstream_rust_crates(cmd, sess, crate_type, tmpdir); - add_upstream_native_libraries(cmd, sess); + add_upstream_native_libraries(cmd, sess, crate_type); + cmd.end_group(); // # Telling the linker what we're doing @@ -170,3 +172,29 @@ static linking is requested, instead of dynamically as before. } } +@@ -562,6 +562,10 @@ + // noop + } + ++ fn static_executable(&mut self) { ++ // noop ++ } ++ + fn args(&mut self, args: &[String]) { + self.cmd.args(args); + } +@@ -657,6 +661,14 @@ + + fn subsystem(&mut self, _subsystem: &str) { + // noop ++ } ++ ++ fn start_group(&mut self) { ++ self.cmd.arg("-Wl,-("); ++ } ++ ++ fn end_group(&mut self) { ++ self.cmd.arg("-Wl,-)"); + } + } + diff --git a/testing/rust/static-pie.patch b/testing/rust/static-pie.patch index babfbfaf7f..4c4e4b77c1 100644 --- a/testing/rust/static-pie.patch +++ b/testing/rust/static-pie.patch @@ -72,21 +72,19 @@ library, just like static binaries, but more secure. post_link_objects: Vec::new(), --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs -@@ -846,15 +846,12 @@ +@@ -914,13 +914,9 @@ if crate_type == config::CrateTypeExecutable && t.options.position_independent_executables { - let empty_vec = Vec::new(); - let empty_str = String::new(); - let args = sess.opts.cg.link_args.as_ref().unwrap_or(&empty_vec); - let more_args = &sess.opts.cg.link_arg; - let mut args = args.iter().chain(more_args.iter()).chain(used_link_args.iter()); - let relocation_model = sess.opts.cg.relocation_model.as_ref() - .unwrap_or(&empty_str); +- + let static_pie = t.options.static_position_independent_executables; - if (t.options.relocation_model == "pic" || *relocation_model == "pic") + if get_reloc_model(sess) == llvm::RelocMode::PIC - && !args.any(|x| *x == "-static") { -+ && (static_pie || !sess.fully_static()) { ++ && (!sess.fully_static() || static_pie) { cmd.position_independent_executable(); } } |