aboutsummaryrefslogtreecommitdiffstats
path: root/community/rust
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-05-20 20:04:12 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-05-20 20:16:43 +0200
commitd0e3b62002af8d78e3ac33a8ada0412ce2fe1da1 (patch)
treef3e85e92d4f5ef9a1f14c6768af88114f5b8caad /community/rust
parentf4ff81233adc30ccf13f6efd040e3d5a3480b39d (diff)
downloadaports-d0e3b62002af8d78e3ac33a8ada0412ce2fe1da1.tar.bz2
aports-d0e3b62002af8d78e3ac33a8ada0412ce2fe1da1.tar.xz
community/rust: backport patch PR-50789 from upstream
Diffstat (limited to 'community/rust')
-rw-r--r--community/rust/APKBUILD2
-rw-r--r--community/rust/ensure-stage0-libs-have-unique-metadata.patch39
2 files changed, 41 insertions, 0 deletions
diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD
index 97fa0713cc..7c94cc92ce 100644
--- a/community/rust/APKBUILD
+++ b/community/rust/APKBUILD
@@ -70,6 +70,7 @@ source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz
install-template-shebang.patch
fix-configure-tools.patch
bootstrap-tool-respect-tool-config.patch
+ ensure-stage0-libs-have-unique-metadata.patch
cargo-libressl27x.patch
cargo-tests-fix-build-auth-http_auth_offered.patch
cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch
@@ -285,6 +286,7 @@ b3be85bf54d03ba5a685c8e01246e047a169fedb1745182286fdb1ae8cb23e6723318276ef36ee0c
7d59258d4462eba0207739a5c0c8baf1f19d9a396e5547bb4d59d700eb94d50ba6add2e523f3e94e29e993821018594625ea4ac86304fb58f7f8c82622a26ab0 install-template-shebang.patch
775a7a28a79d4150813caef6b5b1ee0771cf3cb5945eae427371618ff1fb097da9a0001e13f0f426e3a9636f75683bfe4bdff634456137e057f965ee2899b95a fix-configure-tools.patch
b0f117423f0a9f51c2fecfcc63acabcd7da692946113b6e0aa30f2cff529a06bc41a2b075b410badab6c11fd4e1147b4af796e3e9a93608d3b43ee65b0a4aa02 bootstrap-tool-respect-tool-config.patch
+df8caff62724e4d4ced52a72f919c3b41f272b5e547dac5aaccbc70f0cae2edf0002c755275e228944effac82fece63274e8fc717dca171b525fd51865151c75 ensure-stage0-libs-have-unique-metadata.patch
a1c6cc6181d48e313c9c976cb403437cee8d49bda6ef612df7bc21981abc21177b6682ae6b1e4d4906d97ab21f32b310272f57b97ad68ad0f351cd923afeb2f2 cargo-libressl27x.patch
332a6af59edc507baa73eda1de60591dd4202f540541769ac1bcbc731267f4523ea309d2c3b1f5a9dc3db32831942a5d3d40b81882dad0bf0b5ee7f74f1d6477 cargo-tests-fix-build-auth-http_auth_offered.patch
3d6f027088e1ec189ce864bf5ed150ccad8be5d9fc0973f1b4d202eec6eab865834403335a9f0765bbfa54638aed7f5d5f2183ba9dfeab9f5bc4ef48111a8427 cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch
diff --git a/community/rust/ensure-stage0-libs-have-unique-metadata.patch b/community/rust/ensure-stage0-libs-have-unique-metadata.patch
new file mode 100644
index 0000000000..8141a4784e
--- /dev/null
+++ b/community/rust/ensure-stage0-libs-have-unique-metadata.patch
@@ -0,0 +1,39 @@
+From e8e5eb58c0d6890f73ea01354e18f51b1a6697f8 Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Tue, 15 May 2018 17:48:02 -0700
+Subject: [PATCH] Ensure libraries built in stage0 have unique metadata
+
+Issue #50786 shows a case with local rebuild where the libraries built
+by stage0 had the same suffix as stage0's own, and were accidentally
+loaded by that stage0 rustc when compiling `librustc_trans`.
+
+Now we set `__CARGO_DEFAULT_LIB_METADATA` to "bootstrap" during stage0,
+rather than the release channel like usual, so the library suffix will
+always be completely distinct from the stage0 compiler.
+
+Patch-Source: https://github.com/rust-lang/rust/pull/50789
+---
+ src/bootstrap/builder.rs | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
+index 17f19222e6ea..e5824010ef2c 100644
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -592,7 +592,15 @@ impl<'a> Builder<'a> {
+
+ // FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
+ // Force cargo to output binaries with disambiguating hashes in the name
+- cargo.env("__CARGO_DEFAULT_LIB_METADATA", &self.config.channel);
++ let metadata = if compiler.stage == 0 {
++ // Treat stage0 like special channel, whether it's a normal prior-
++ // release rustc or a local rebuild with the same version, so we
++ // never mix these libraries by accident.
++ "bootstrap"
++ } else {
++ &self.config.channel
++ };
++ cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);
+
+ let stage;
+ if compiler.stage == 0 && self.local_rebuild {