From fe8cd1cd264aae2cf06949524cbcd1803ed7f666 Mon Sep 17 00:00:00 2001 From: Derek Straka Date: Tue, 7 Mar 2017 12:11:25 -0600 Subject: [PATCH 1/5] Update the source paths for each item The path to the rust source changes from 1.15 so preemptively make changes to prepare for that. Signed-off-by: Derek Straka Signed-off-by: Doug Goldstein (cherry picked from commit 64cdd4b714f320c81f9f06e28342a527c87a5766) --- recipes-devtools/rust/compiler-rt.inc | 2 -- recipes-devtools/rust/libstd-rs.inc | 4 ---- recipes-devtools/rust/libstd-rs_1.12.1.bb | 2 +- recipes-devtools/rust/libstd-rs_1.14.0.bb | 2 +- recipes-devtools/rust/rust-llvm.inc | 2 +- recipes-devtools/rust/rust-llvm_1.12.1.bb | 2 +- recipes-devtools/rust/rust-llvm_1.14.0.bb | 2 +- recipes-devtools/rust/rust-source-1.12.1.inc | 4 ++++ recipes-devtools/rust/rust-source-1.14.0.inc | 4 ++++ recipes-devtools/rust/rust.inc | 2 -- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/recipes-devtools/rust/compiler-rt.inc b/recipes-devtools/rust/compiler-rt.inc index 59677e7..9fd5d42 100644 --- a/recipes-devtools/rust/compiler-rt.inc +++ b/recipes-devtools/rust/compiler-rt.inc @@ -12,8 +12,6 @@ DEPENDS += "rust-llvm-native (=${PV})" RDEPENDS_${PN}-dev = "" INSANE_SKIP_${PN}-dev = "staticdev" -S = "${WORKDIR}/rustc-${PV}" - DISABLE_STATIC = "" INHIBIT_DEFAULT_RUST_DEPS = "1" diff --git a/recipes-devtools/rust/libstd-rs.inc b/recipes-devtools/rust/libstd-rs.inc index 0dafce5..f79548e 100644 --- a/recipes-devtools/rust/libstd-rs.inc +++ b/recipes-devtools/rust/libstd-rs.inc @@ -4,8 +4,6 @@ SECTION = "devel" LICENSE = "MIT | Apache-2.0" LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8" -S = "${WORKDIR}/rustc-${PV}" - SRC_URI += "\ crate://crates.io/gcc/0.3.27 \ " @@ -18,8 +16,6 @@ inherit cargo # Needed so cargo can find libbacktrace RUSTFLAGS += "-L ${STAGING_LIBDIR}" -S = "${WORKDIR}/rustc-${PV}" - do_compile_prepend () { cd ${S}/src/rustc/std_shim export CARGO_TARGET_DIR="${B}" diff --git a/recipes-devtools/rust/libstd-rs_1.12.1.bb b/recipes-devtools/rust/libstd-rs_1.12.1.bb index 3c12c86..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.12.1.bb +++ b/recipes-devtools/rust/libstd-rs_1.12.1.bb @@ -1,2 +1,2 @@ -require libstd-rs.inc require rust-source-${PV}.inc +require libstd-rs.inc diff --git a/recipes-devtools/rust/libstd-rs_1.14.0.bb b/recipes-devtools/rust/libstd-rs_1.14.0.bb index 3c12c86..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.14.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.14.0.bb @@ -1,2 +1,2 @@ -require libstd-rs.inc require rust-source-${PV}.inc +require libstd-rs.inc diff --git a/recipes-devtools/rust/rust-llvm.inc b/recipes-devtools/rust/rust-llvm.inc index 4f5fa29..79d40ab 100644 --- a/recipes-devtools/rust/rust-llvm.inc +++ b/recipes-devtools/rust/rust-llvm.inc @@ -1,7 +1,7 @@ SUMMARY = "LLVM compiler framework (packaged with rust)" LICENSE = "NCSA" -S = "${WORKDIR}/rustc-${PV}/src/llvm" +S = "${RUSTSRC}/src/llvm" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=b99eb43c934ceebecab85c6b9b1a08be" diff --git a/recipes-devtools/rust/rust-llvm_1.12.1.bb b/recipes-devtools/rust/rust-llvm_1.12.1.bb index 12dd8e9..b64382d 100644 --- a/recipes-devtools/rust/rust-llvm_1.12.1.bb +++ b/recipes-devtools/rust/rust-llvm_1.12.1.bb @@ -1,5 +1,5 @@ -require rust-llvm.inc require rust-source-${PV}.inc +require rust-llvm.inc LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=43fdaa303c1c5589ad60f4ffc6a0b9ce" diff --git a/recipes-devtools/rust/rust-llvm_1.14.0.bb b/recipes-devtools/rust/rust-llvm_1.14.0.bb index 761ec19..d2b4cc6 100644 --- a/recipes-devtools/rust/rust-llvm_1.14.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.14.0.bb @@ -1,5 +1,5 @@ -require rust-llvm.inc require rust-source-${PV}.inc +require rust-llvm.inc do_install_prepend () { # the install does a sed on this without installing the file diff --git a/recipes-devtools/rust/rust-source-1.12.1.inc b/recipes-devtools/rust/rust-source-1.12.1.inc index add9509..f343217 100644 --- a/recipes-devtools/rust/rust-source-1.12.1.inc +++ b/recipes-devtools/rust/rust-source-1.12.1.inc @@ -19,3 +19,7 @@ SRC_URI += "\ SRC_URI[rust.md5sum] = "82db5a9cb9a051bf8ece2f5174cb273b" SRC_URI[rust.sha256sum] = "97913ae4cb255618aaacd1a534b11f343634b040b32656250d09d8d9ec02d3dc" +# later versions of rust change the directory that they unextract to +RUSTSRC = "${WORKDIR}/rustc-${PV}" +# set this as our default +S = "${RUSTSRC}" diff --git a/recipes-devtools/rust/rust-source-1.14.0.inc b/recipes-devtools/rust/rust-source-1.14.0.inc index 1a55687..9a02953 100644 --- a/recipes-devtools/rust/rust-source-1.14.0.inc +++ b/recipes-devtools/rust/rust-source-1.14.0.inc @@ -18,3 +18,7 @@ SRC_URI += "\ SRC_URI[rust.md5sum] = "00b6bb5b465e7bd89c541eea99876cdc" SRC_URI[rust.sha256sum] = "c790edd2e915bd01bea46122af2942108479a2fda9a6f76d1094add520ac3b6b" +# later versions of rust change the directory that they unextract to +RUSTSRC = "${WORKDIR}/rustc-${PV}" +# set this as our default +S = "${RUSTSRC}" diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index 9ca061b..1805073 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -10,8 +10,6 @@ SRC_URI = "\ https://static.rust-lang.org/dist/${RUST_SNAPSHOT}.tar.gz;name=rust-snapshot \ " -S = "${WORKDIR}/rustc-${PV}" - DEPENDS += "file-native" # We generate local targets, and need to be able to locate them From 5c0fb2e6edb8f5e946262d5038f07566e333fce3 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 7 Mar 2017 13:07:19 -0600 Subject: [PATCH 2/5] libstd-rs: move depends out of the shared file Technically these dependencies change between versions. It just happens that these two versions didn't change the dependencies but future versions will so preemptively make the adjustment. (cherry picked from commit bc04c2ea4abdb596c1b46a08a7c80870d398f90e) --- recipes-devtools/rust/libstd-rs.inc | 4 ---- recipes-devtools/rust/libstd-rs_1.12.1.bb | 4 ++++ recipes-devtools/rust/libstd-rs_1.14.0.bb | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/recipes-devtools/rust/libstd-rs.inc b/recipes-devtools/rust/libstd-rs.inc index f79548e..21a312a 100644 --- a/recipes-devtools/rust/libstd-rs.inc +++ b/recipes-devtools/rust/libstd-rs.inc @@ -4,10 +4,6 @@ SECTION = "devel" LICENSE = "MIT | Apache-2.0" LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8" -SRC_URI += "\ - crate://crates.io/gcc/0.3.27 \ -" - DEPENDS += "compiler-rt (=${PV})" RUSTLIB_DEP = "" diff --git a/recipes-devtools/rust/libstd-rs_1.12.1.bb b/recipes-devtools/rust/libstd-rs_1.12.1.bb index 88b0fc1..d8e02b2 100644 --- a/recipes-devtools/rust/libstd-rs_1.12.1.bb +++ b/recipes-devtools/rust/libstd-rs_1.12.1.bb @@ -1,2 +1,6 @@ require rust-source-${PV}.inc require libstd-rs.inc + +SRC_URI += "\ + crate://crates.io/gcc/0.3.27 \ +" diff --git a/recipes-devtools/rust/libstd-rs_1.14.0.bb b/recipes-devtools/rust/libstd-rs_1.14.0.bb index 88b0fc1..d8e02b2 100644 --- a/recipes-devtools/rust/libstd-rs_1.14.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.14.0.bb @@ -1,2 +1,6 @@ require rust-source-${PV}.inc require libstd-rs.inc + +SRC_URI += "\ + crate://crates.io/gcc/0.3.27 \ +" From 2973190c5c97f92c92e10e1e5b16f95d30627f66 Mon Sep 17 00:00:00 2001 From: Derek Straka Date: Wed, 15 Feb 2017 16:48:31 -0500 Subject: [PATCH 3/5] Bump to Cargo 0.16.0 for Rust 1.15.x Signed-off-by: Derek Straka (cherry picked from commit f851e8f1854f71bde066c4c75d54cfa41661fd54) --- recipes-devtools/cargo/cargo_0.16.0.bb | 85 ++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 recipes-devtools/cargo/cargo_0.16.0.bb diff --git a/recipes-devtools/cargo/cargo_0.16.0.bb b/recipes-devtools/cargo/cargo_0.16.0.bb new file mode 100644 index 0000000..47d447d --- /dev/null +++ b/recipes-devtools/cargo/cargo_0.16.0.bb @@ -0,0 +1,85 @@ +require cargo-snapshot.inc +require cargo.inc + +EXTRA_OECONF += "--cargo=${WORKDIR}/cargo-nightly-x86_64-unknown-linux-gnu/cargo/bin/cargo" + +SRC_URI += " \ + git://github.com/rust-lang/cargo.git;protocol=https;name=cargo;branch=rust-1.15.1 \ + crate://crates.io/advapi32-sys/0.2.0 \ + crate://crates.io/aho-corasick/0.5.3 \ + crate://crates.io/bitflags/0.7.0 \ + crate://crates.io/bufstream/0.1.2 \ + crate://crates.io/cfg-if/0.1.0 \ + crate://crates.io/cmake/0.1.19 \ + crate://crates.io/crossbeam/0.2.10 \ + crate://crates.io/curl-sys/0.3.6 \ + crate://crates.io/curl/0.4.1 \ + crate://crates.io/docopt/0.6.86 \ + crate://crates.io/env_logger/0.3.5 \ + crate://crates.io/filetime/0.1.10 \ + crate://crates.io/flate2/0.2.14 \ + crate://crates.io/fs2/0.3.0 \ + crate://crates.io/gcc/0.3.39 \ + crate://crates.io/gdi32-sys/0.2.0 \ + crate://crates.io/git2-curl/0.7.0 \ + crate://crates.io/git2/0.6.3 \ + crate://crates.io/glob/0.2.11 \ + crate://crates.io/hamcrest/0.1.1 \ + crate://crates.io/idna/0.1.0 \ + crate://crates.io/kernel32-sys/0.2.2 \ + crate://crates.io/lazy_static/0.2.2 \ + crate://crates.io/libc/0.2.18 \ + crate://crates.io/libgit2-sys/0.6.5 \ + crate://crates.io/libssh2-sys/0.2.4 \ + crate://crates.io/libz-sys/1.0.10 \ + crate://crates.io/log/0.3.6 \ + crate://crates.io/matches/0.1.4 \ + crate://crates.io/memchr/0.1.11 \ + crate://crates.io/miniz-sys/0.1.7 \ + crate://crates.io/miow/0.1.3 \ + crate://crates.io/net2/0.2.26 \ + crate://crates.io/num-bigint/0.1.35 \ + crate://crates.io/num-complex/0.1.35 \ + crate://crates.io/num-integer/0.1.32 \ + crate://crates.io/num-iter/0.1.32 \ + crate://crates.io/num-rational/0.1.35 \ + crate://crates.io/num-traits/0.1.36 \ + crate://crates.io/num/0.1.36 \ + crate://crates.io/num_cpus/1.1.0 \ + crate://crates.io/openssl-probe/0.1.0 \ + crate://crates.io/openssl-sys/0.9.1 \ + crate://crates.io/openssl/0.9.1 \ + crate://crates.io/pkg-config/0.3.8 \ + crate://crates.io/psapi-sys/0.1.0 \ + crate://crates.io/rand/0.3.14 \ + crate://crates.io/regex-syntax/0.3.9 \ + crate://crates.io/regex/0.1.80 \ + crate://crates.io/rustc-serialize/0.3.21 \ + crate://crates.io/semver-parser/0.6.1 \ + crate://crates.io/semver/0.5.1 \ + crate://crates.io/strsim/0.5.1 \ + crate://crates.io/tar/0.4.9 \ + crate://crates.io/tempdir/0.3.5 \ + crate://crates.io/term/0.4.4 \ + crate://crates.io/thread-id/2.0.0 \ + crate://crates.io/thread_local/0.2.7 \ + crate://crates.io/toml/0.2.1 \ + crate://crates.io/unicode-bidi/0.2.3 \ + crate://crates.io/unicode-normalization/0.1.2 \ + crate://crates.io/url/1.2.3 \ + crate://crates.io/user32-sys/0.2.0 \ + crate://crates.io/utf8-ranges/0.1.3 \ + crate://crates.io/winapi-build/0.1.1 \ + crate://crates.io/winapi/0.2.8 \ + crate://crates.io/ws2_32-sys/0.2.1 \ +" + +SRCREV_cargo = "6e0c18cccc8b0c06fba8a8d76486f81a792fb420" + +S = "${WORKDIR}/git" + +LIC_FILES_CHKSUM=" \ + file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \ + file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \ + file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \ +" From d464b3971edd1187b34a0e0ac14d131f4b120fcd Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Sun, 5 Feb 2017 22:57:03 -0600 Subject: [PATCH 4/5] bump to Rust 1.15.1 (cherry picked from commit 5a9614f91a2c68117621e2c33bc5a1e90662c105) --- ...ler-rt_1.14.0.bb => compiler-rt_1.15.1.bb} | 2 + ...e-RUSTFLAGS-to-override-target-libs-.patch | 72 ------------------- ...lt-target.json-path-libdir-rust-targ.patch | 22 +++--- ...cal-workaround-for-NULL-__dso_handle.patch | 2 +- recipes-devtools/rust/libstd-rs_1.14.0.bb | 6 -- recipes-devtools/rust/libstd-rs_1.15.1.bb | 19 +++++ ...t-cross_1.14.0.bb => rust-cross_1.15.1.bb} | 0 ...ust-llvm_1.14.0.bb => rust-llvm_1.15.1.bb} | 0 ...urce-1.14.0.inc => rust-source-1.15.1.inc} | 14 ++-- .../rust/{rust_1.14.0.bb => rust_1.15.1.bb} | 3 +- 10 files changed, 42 insertions(+), 98 deletions(-) rename recipes-devtools/rust/{compiler-rt_1.14.0.bb => compiler-rt_1.15.1.bb} (58%) delete mode 100644 recipes-devtools/rust/files/rust-1.14.0/0002-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch rename recipes-devtools/rust/files/{rust-1.14.0 => rust-1.15.1}/0001-Target-add-default-target.json-path-libdir-rust-targ.patch (89%) rename recipes-devtools/rust/files/{rust-1.14.0 => rust-1.15.1}/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch (94%) delete mode 100644 recipes-devtools/rust/libstd-rs_1.14.0.bb create mode 100644 recipes-devtools/rust/libstd-rs_1.15.1.bb rename recipes-devtools/rust/{rust-cross_1.14.0.bb => rust-cross_1.15.1.bb} (100%) rename recipes-devtools/rust/{rust-llvm_1.14.0.bb => rust-llvm_1.15.1.bb} (100%) rename recipes-devtools/rust/{rust-source-1.14.0.inc => rust-source-1.15.1.inc} (58%) rename recipes-devtools/rust/{rust_1.14.0.bb => rust_1.15.1.bb} (85%) diff --git a/recipes-devtools/rust/compiler-rt_1.14.0.bb b/recipes-devtools/rust/compiler-rt_1.15.1.bb similarity index 58% rename from recipes-devtools/rust/compiler-rt_1.14.0.bb rename to recipes-devtools/rust/compiler-rt_1.15.1.bb index 8e08013..b7b8f50 100644 --- a/recipes-devtools/rust/compiler-rt_1.14.0.bb +++ b/recipes-devtools/rust/compiler-rt_1.15.1.bb @@ -1,2 +1,4 @@ require compiler-rt.inc require rust-source-${PV}.inc + +EXTRA_OECONF = "--disable-rustbuild" diff --git a/recipes-devtools/rust/files/rust-1.14.0/0002-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch b/recipes-devtools/rust/files/rust-1.14.0/0002-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch deleted file mode 100644 index f4a983b..0000000 --- a/recipes-devtools/rust/files/rust-1.14.0/0002-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 52fa8537ae9073b81340a974c8eebb1b2fc2e1aa Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Tue, 18 Nov 2014 14:52:56 -0500 -Subject: [PATCH 2/3] mk: for stage0, use RUSTFLAGS to override target libs dir - -Setting HLIB specially for stage0 (and even more specially for windows) -also affects the location we place TLIB. To keep the TLIBs we build in -the place requested by configure, use '-L' and '--sysroot' to point -stage0-rustc at the appropriate location. ---- - mk/main.mk | 29 ++++++++++++----------------- - 1 file changed, 12 insertions(+), 17 deletions(-) - -diff --git a/mk/main.mk b/mk/main.mk -index fd0464a..755bf09 100644 ---- a/mk/main.mk -+++ b/mk/main.mk -@@ -403,32 +403,26 @@ define SREQ - HROOT$(1)_H_$(3) = $(3)/stage$(1) - HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin - --ifeq ($$(CFG_WINDOWSY_$(3)),1) --# On Windows we always store host runtime libraries in the 'bin' directory because --# there's no rpath. Target libraries go under $CFG_LIBDIR_RELATIVE (usually 'lib'). --HLIB_RELATIVE$(1)_H_$(3) = bin --TROOT$(1)_T_$(2)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)/rustlib/$(2) --# Remove the next 3 lines after a snapshot --ifeq ($(1),0) --RUSTFLAGS_STAGE0 += -L $$(TROOT$(1)_T_$(2)_H_$(3))/lib --endif -- --else -- --ifeq ($(1),0) --HLIB_RELATIVE$(1)_H_$(3) = lib --else - HLIB_RELATIVE$(1)_H_$(3) = $$(CFG_LIBDIR_RELATIVE) --endif -+ - TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2) - --endif - HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(HLIB_RELATIVE$(1)_H_$(3)) - - # Destinations of artifacts for target architectures - TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin - TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib - -+# Don't trust stage0, be explicit about libraries -+# TODO: rather than specifying sysroot, we really want to tell which libdir to -+# use (ie: the dir containing 'rustlib'). This would allow us to avoid -+# passing the '-L' options. -+ifeq ($(1),0) -+RUSTFLAGS_S_$(1)_T_$(2)_H_$(3) += --sysroot "$$(HROOT$(1)_H_$(3))" \ -+ -L "$$(TLIB$(1)_T_$(2)_H_$(3))" -+endif -+ -+ - # Preqrequisites for using the stageN compiler - ifeq ($(1),0) - HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) -@@ -548,6 +542,7 @@ STAGE$(1)_T_$(2)_H_$(3) := \ - $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \ - --cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \ - $$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \ -+ $$(RUSTFLAGS_S_$(1)_T_$(2)_H_$(3)) \ - $$(RUSTC_FLAGS_$(2)) - - endef --- -2.10.1 (Apple Git-78) - diff --git a/recipes-devtools/rust/files/rust-1.14.0/0001-Target-add-default-target.json-path-libdir-rust-targ.patch b/recipes-devtools/rust/files/rust-1.15.1/0001-Target-add-default-target.json-path-libdir-rust-targ.patch similarity index 89% rename from recipes-devtools/rust/files/rust-1.14.0/0001-Target-add-default-target.json-path-libdir-rust-targ.patch rename to recipes-devtools/rust/files/rust-1.15.1/0001-Target-add-default-target.json-path-libdir-rust-targ.patch index df6e0d8..c0798d6 100644 --- a/recipes-devtools/rust/files/rust-1.14.0/0001-Target-add-default-target.json-path-libdir-rust-targ.patch +++ b/recipes-devtools/rust/files/rust-1.15.1/0001-Target-add-default-target.json-path-libdir-rust-targ.patch @@ -1,4 +1,4 @@ -From 24b71f1ce87c1247d0e573d3dcba4686f237c817 Mon Sep 17 00:00:00 2001 +From e9c6cf5d1a9bb7f50c5e98a660217062b510928b Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 01:40:21 -0500 Subject: [PATCH 1/3] Target: add default target.json path: @@ -11,20 +11,20 @@ Subject: [PATCH 1/3] Target: add default target.json path: 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs -index 63eabd5..6d002d0 100644 +index 5e3c8bc..15fd763 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs -@@ -42,7 +42,7 @@ use std::fmt; - use std::hash::Hasher; +@@ -42,7 +42,7 @@ use std::hash::Hasher; use std::collections::hash_map::DefaultHasher; + use std::collections::HashSet; use std::iter::FromIterator; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; pub struct Config { pub target: Target, -@@ -1002,8 +1002,8 @@ pub fn build_configuration(sess: &Session, - v +@@ -1001,8 +1001,8 @@ pub fn build_configuration(sess: &Session, + user_cfg } -pub fn build_target_config(opts: &Options, sp: &Handler) -> Config { @@ -35,10 +35,10 @@ index 63eabd5..6d002d0 100644 Err(e) => { sp.struct_fatal(&format!("Error loading target specification: {}", e)) diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs -index b4dadbf..72fa269 100644 +index 91765e6..29e5e5d 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs -@@ -564,13 +564,17 @@ pub fn build_session_(sopts: config::Options, +@@ -575,13 +575,17 @@ pub fn build_session_(sopts: config::Options, codemap: Rc, cstore: Rc CrateStore<'a>>) -> Session { @@ -59,7 +59,7 @@ index b4dadbf..72fa269 100644 let default_sysroot = match sopts.maybe_sysroot { Some(_) => None, diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs -index 4d9315a..12aadab 100644 +index 351d469..3282dbd 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -51,6 +51,7 @@ use std::io::prelude::*; @@ -70,7 +70,7 @@ index 4d9315a..12aadab 100644 mod android_base; mod apple_base; -@@ -604,12 +605,13 @@ impl Target { +@@ -625,12 +626,13 @@ impl Target { /// /// The error string could come from any of the APIs called, including /// filesystem access and JSON decoding. @@ -85,7 +85,7 @@ index 4d9315a..12aadab 100644 fn load_file(path: &Path) -> Result { let mut f = File::open(path).map_err(|e| e.to_string())?; -@@ -640,8 +642,14 @@ impl Target { +@@ -661,8 +663,14 @@ impl Target { .unwrap_or(OsString::new()); // FIXME 16351: add a sane default search path? diff --git a/recipes-devtools/rust/files/rust-1.14.0/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch b/recipes-devtools/rust/files/rust-1.15.1/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch similarity index 94% rename from recipes-devtools/rust/files/rust-1.14.0/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch rename to recipes-devtools/rust/files/rust-1.15.1/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch index 77b4054..f50fb41 100644 --- a/recipes-devtools/rust/files/rust-1.14.0/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch +++ b/recipes-devtools/rust/files/rust-1.15.1/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch @@ -1,4 +1,4 @@ -From 719526b7227609733bc4400651e9919545934905 Mon Sep 17 00:00:00 2001 +From bff536002eba2ed322d329d9022ccdc77da458a3 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Wed, 3 Dec 2014 19:15:19 -0500 Subject: [PATCH 3/3] std/thread_local: workaround for NULL __dso_handle diff --git a/recipes-devtools/rust/libstd-rs_1.14.0.bb b/recipes-devtools/rust/libstd-rs_1.14.0.bb deleted file mode 100644 index d8e02b2..0000000 --- a/recipes-devtools/rust/libstd-rs_1.14.0.bb +++ /dev/null @@ -1,6 +0,0 @@ -require rust-source-${PV}.inc -require libstd-rs.inc - -SRC_URI += "\ - crate://crates.io/gcc/0.3.27 \ -" diff --git a/recipes-devtools/rust/libstd-rs_1.15.1.bb b/recipes-devtools/rust/libstd-rs_1.15.1.bb new file mode 100644 index 0000000..944df6a --- /dev/null +++ b/recipes-devtools/rust/libstd-rs_1.15.1.bb @@ -0,0 +1,19 @@ +require rust-source-${PV}.inc +require libstd-rs.inc + +EXTRA_OECONF = "--disable-rustbuild" + +CARGO_BUILD_FLAGS += "--features 'jemalloc panic-unwind'" + +SRC_URI += "\ + crate://crates.io/cmake/0.1.18 \ + crate://crates.io/env_logger/0.3.5 \ + crate://crates.io/filetime/0.1.10 \ + crate://crates.io/gcc/0.3.40 \ + crate://crates.io/getopts/0.2.14 \ + crate://crates.io/libc/0.2.17 \ + crate://crates.io/log/0.3.6 \ + crate://crates.io/num_cpus/0.2.13 \ + crate://crates.io/rustc-serialize/0.3.19 \ + crate://crates.io/toml/0.1.30 \ +" diff --git a/recipes-devtools/rust/rust-cross_1.14.0.bb b/recipes-devtools/rust/rust-cross_1.15.1.bb similarity index 100% rename from recipes-devtools/rust/rust-cross_1.14.0.bb rename to recipes-devtools/rust/rust-cross_1.15.1.bb diff --git a/recipes-devtools/rust/rust-llvm_1.14.0.bb b/recipes-devtools/rust/rust-llvm_1.15.1.bb similarity index 100% rename from recipes-devtools/rust/rust-llvm_1.14.0.bb rename to recipes-devtools/rust/rust-llvm_1.15.1.bb diff --git a/recipes-devtools/rust/rust-source-1.14.0.inc b/recipes-devtools/rust/rust-source-1.15.1.inc similarity index 58% rename from recipes-devtools/rust/rust-source-1.14.0.inc rename to recipes-devtools/rust/rust-source-1.15.1.inc index 9a02953..dc3bdfb 100644 --- a/recipes-devtools/rust/rust-source-1.14.0.inc +++ b/recipes-devtools/rust/rust-source-1.15.1.inc @@ -1,24 +1,24 @@ -# Specifics for Rust 1.14.0 +# Specifics for Rust 1.15.1 ## This is information on the rust-snapshot (binary) used to build our current release. ## snapshot info is taken from rust/src/stage0.txt ## TODO: find a way to add additional SRC_URIs based on the contents of an ## earlier SRC_URI. -RS_VERSION = "1.13.0" +RS_VERSION = "1.14.0" RUST_SNAPSHOT = "rustc-${RS_VERSION}-${RUST_BUILD_SYS}" # These are x86_64-unknown-linux-gnu hashes, how can we add more? -SRC_URI[rust-snapshot.md5sum] = "1400262e1529f94a12d2f5c77cc67782" -SRC_URI[rust-snapshot.sha256sum] = "0b092ba6750be89aad32b231ad9c625a11b040fae3cad5aa3ef32aaf213332d4" +SRC_URI[rust-snapshot.md5sum] = "f178d9d6aad0f87c451f4b2f93170633" +SRC_URI[rust-snapshot.sha256sum] = "0eeec4211aa872f24c220200a0c2b095bbfc9c0f737c1c5df2555967c8f36787" SRC_URI += "\ https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \ " -SRC_URI[rust.md5sum] = "00b6bb5b465e7bd89c541eea99876cdc" -SRC_URI[rust.sha256sum] = "c790edd2e915bd01bea46122af2942108479a2fda9a6f76d1094add520ac3b6b" +SRC_URI[rust.md5sum] = "5bbfff5ef8857a73d120616546a7fd29" +SRC_URI[rust.sha256sum] = "2e7daad418a830b45b977cd7ecf181b65f30f73df63ff36e124ea5fe5d1af327" # later versions of rust change the directory that they unextract to -RUSTSRC = "${WORKDIR}/rustc-${PV}" +RUSTSRC = "${WORKDIR}/rustc-${PV}-src" # set this as our default S = "${RUSTSRC}" diff --git a/recipes-devtools/rust/rust_1.14.0.bb b/recipes-devtools/rust/rust_1.15.1.bb similarity index 85% rename from recipes-devtools/rust/rust_1.14.0.bb rename to recipes-devtools/rust/rust_1.15.1.bb index 704f66f..208ef97 100644 --- a/recipes-devtools/rust/rust_1.14.0.bb +++ b/recipes-devtools/rust/rust_1.15.1.bb @@ -1,9 +1,10 @@ require rust.inc require rust-source-${PV}.inc +EXTRA_OECONF = "--disable-rustbuild" + SRC_URI += " \ file://rust-${PV}/0001-Target-add-default-target.json-path-libdir-rust-targ.patch \ - file://rust-${PV}/0002-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch \ file://rust-${PV}/0003-std-thread_local-workaround-for-NULL-__dso_handle.patch \ " From 505ba7a172a3694d259d768aa837a0060c415750 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 7 Mar 2017 20:25:13 -0600 Subject: [PATCH 5/5] compiler-rt: remove standalone build for Rust 1.15 From Rust 1.15 a standalone build of compiler-rt is no longer necessary. (cherry picked from commit 182090799070604e6755262b446549cb0615645b) --- recipes-devtools/rust/compiler-rt_1.15.1.bb | 4 ---- recipes-devtools/rust/libstd-rs.inc | 2 -- recipes-devtools/rust/libstd-rs_1.12.1.bb | 5 +++++ 3 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 recipes-devtools/rust/compiler-rt_1.15.1.bb diff --git a/recipes-devtools/rust/compiler-rt_1.15.1.bb b/recipes-devtools/rust/compiler-rt_1.15.1.bb deleted file mode 100644 index b7b8f50..0000000 --- a/recipes-devtools/rust/compiler-rt_1.15.1.bb +++ /dev/null @@ -1,4 +0,0 @@ -require compiler-rt.inc -require rust-source-${PV}.inc - -EXTRA_OECONF = "--disable-rustbuild" diff --git a/recipes-devtools/rust/libstd-rs.inc b/recipes-devtools/rust/libstd-rs.inc index 21a312a..5bcfb69 100644 --- a/recipes-devtools/rust/libstd-rs.inc +++ b/recipes-devtools/rust/libstd-rs.inc @@ -4,8 +4,6 @@ SECTION = "devel" LICENSE = "MIT | Apache-2.0" LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8" -DEPENDS += "compiler-rt (=${PV})" - RUSTLIB_DEP = "" inherit cargo diff --git a/recipes-devtools/rust/libstd-rs_1.12.1.bb b/recipes-devtools/rust/libstd-rs_1.12.1.bb index d8e02b2..0957cbb 100644 --- a/recipes-devtools/rust/libstd-rs_1.12.1.bb +++ b/recipes-devtools/rust/libstd-rs_1.12.1.bb @@ -4,3 +4,8 @@ require libstd-rs.inc SRC_URI += "\ crate://crates.io/gcc/0.3.27 \ " + +# not necessary from Rust 1.15.x and newer as its built +# as a cargo crate with libstd +DEPENDS += "compiler-rt (=${PV})" +