From 8cfc3c9826dc2691efa1222d662b1f19dc7d6759 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Thu, 17 Dec 2020 17:27:35 +1000 Subject: [PATCH 1/2] clean up some common definitions across rust versions These bits and pieces had evidently been copy-pasted forward into each new recipe version, but now they are all identical and can be tidied up. --- recipes-devtools/rust/libstd-rs.inc | 3 +++ recipes-devtools/rust/libstd-rs_1.34.2.bb | 6 ------ recipes-devtools/rust/libstd-rs_1.36.0.bb | 6 ------ recipes-devtools/rust/libstd-rs_1.37.0.bb | 6 ------ recipes-devtools/rust/libstd-rs_1.39.0.bb | 6 ------ recipes-devtools/rust/libstd-rs_1.40.0.bb | 6 ------ recipes-devtools/rust/libstd-rs_1.41.0.bb | 6 ------ recipes-devtools/rust/libstd-rs_1.43.0.bb | 6 ------ recipes-devtools/rust/libstd-rs_1.46.0.bb | 6 ------ recipes-devtools/rust/rust-llvm-ncsa.inc | 2 +- recipes-devtools/rust/rust-llvm.inc | 8 ++++---- recipes-devtools/rust/rust-llvm_1.34.2.bb | 14 -------------- recipes-devtools/rust/rust-llvm_1.36.0.bb | 14 -------------- recipes-devtools/rust/rust-llvm_1.37.0.bb | 14 -------------- recipes-devtools/rust/rust-llvm_1.39.0.bb | 14 -------------- recipes-devtools/rust/rust-llvm_1.40.0.bb | 14 -------------- recipes-devtools/rust/rust-llvm_1.41.0.bb | 14 -------------- recipes-devtools/rust/rust-llvm_1.43.0.bb | 14 -------------- recipes-devtools/rust/rust-llvm_1.46.0.bb | 14 -------------- 19 files changed, 8 insertions(+), 165 deletions(-) diff --git a/recipes-devtools/rust/libstd-rs.inc b/recipes-devtools/rust/libstd-rs.inc index 5298c00..dc33f42 100644 --- a/recipes-devtools/rust/libstd-rs.inc +++ b/recipes-devtools/rust/libstd-rs.inc @@ -2,6 +2,7 @@ SUMMARY = "Rust standard libaries" HOMEPAGE = "http://www.rust-lang.org" SECTION = "devel" LICENSE = "MIT | Apache-2.0" +LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" RUSTLIB_DEP = "" inherit cargo @@ -12,7 +13,9 @@ RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so" S = "${RUSTSRC}/src/libstd" +CARGO_FEATURES ?= "panic-unwind backtrace" CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'" +CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" do_compile_prepend () { export CARGO_TARGET_DIR="${B}" diff --git a/recipes-devtools/rust/libstd-rs_1.34.2.bb b/recipes-devtools/rust/libstd-rs_1.34.2.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.34.2.bb +++ b/recipes-devtools/rust/libstd-rs_1.34.2.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/libstd-rs_1.36.0.bb b/recipes-devtools/rust/libstd-rs_1.36.0.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.36.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.36.0.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/libstd-rs_1.37.0.bb b/recipes-devtools/rust/libstd-rs_1.37.0.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.37.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.37.0.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/libstd-rs_1.39.0.bb b/recipes-devtools/rust/libstd-rs_1.39.0.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.39.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.39.0.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/libstd-rs_1.40.0.bb b/recipes-devtools/rust/libstd-rs_1.40.0.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.40.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.40.0.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/libstd-rs_1.41.0.bb b/recipes-devtools/rust/libstd-rs_1.41.0.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.41.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.41.0.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/libstd-rs_1.43.0.bb b/recipes-devtools/rust/libstd-rs_1.43.0.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.43.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.43.0.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/libstd-rs_1.46.0.bb b/recipes-devtools/rust/libstd-rs_1.46.0.bb index 69cb48a..88b0fc1 100644 --- a/recipes-devtools/rust/libstd-rs_1.46.0.bb +++ b/recipes-devtools/rust/libstd-rs_1.46.0.bb @@ -1,8 +1,2 @@ require rust-source-${PV}.inc require libstd-rs.inc - -LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" - -CARGO_FEATURES ?= "panic-unwind backtrace" - -CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" diff --git a/recipes-devtools/rust/rust-llvm-ncsa.inc b/recipes-devtools/rust/rust-llvm-ncsa.inc index 28d7578..903f283 100644 --- a/recipes-devtools/rust/rust-llvm-ncsa.inc +++ b/recipes-devtools/rust/rust-llvm-ncsa.inc @@ -1,5 +1,5 @@ LICENSE = "NCSA" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648" require rust-llvm.inc diff --git a/recipes-devtools/rust/rust-llvm.inc b/recipes-devtools/rust/rust-llvm.inc index ff118d2..3dbcc1d 100644 --- a/recipes-devtools/rust/rust-llvm.inc +++ b/recipes-devtools/rust/rust-llvm.inc @@ -5,7 +5,7 @@ SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch" S = "${RUSTSRC}/src/llvm-project/llvm" -LIC_FILES_CHKSUM ?= "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" inherit cmake python3native @@ -46,9 +46,9 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1" export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" -do_install_append_class-target() { - # Disable checks on the native tools, since these should came from the native recipe - sed -i -e 's/\(.*APPEND.*_IMPORT_CHECK_FILES_FOR_.*{_IMPORT_PREFIX}\/bin\/.*\)/#\1/' ${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake +do_install_append () { + # we don't need any of this stuff to build Rust + rm -rf "${D}/usr/lib/cmake" } PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto" diff --git a/recipes-devtools/rust/rust-llvm_1.34.2.bb b/recipes-devtools/rust/rust-llvm_1.34.2.bb index 6fce32f..a40201c 100644 --- a/recipes-devtools/rust/rust-llvm_1.34.2.bb +++ b/recipes-devtools/rust/rust-llvm_1.34.2.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm-ncsa.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} diff --git a/recipes-devtools/rust/rust-llvm_1.36.0.bb b/recipes-devtools/rust/rust-llvm_1.36.0.bb index 6fce32f..a40201c 100644 --- a/recipes-devtools/rust/rust-llvm_1.36.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.36.0.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm-ncsa.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} diff --git a/recipes-devtools/rust/rust-llvm_1.37.0.bb b/recipes-devtools/rust/rust-llvm_1.37.0.bb index 6fce32f..a40201c 100644 --- a/recipes-devtools/rust/rust-llvm_1.37.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.37.0.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm-ncsa.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} diff --git a/recipes-devtools/rust/rust-llvm_1.39.0.bb b/recipes-devtools/rust/rust-llvm_1.39.0.bb index ac77a4b..1dca22b 100644 --- a/recipes-devtools/rust/rust-llvm_1.39.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.39.0.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} diff --git a/recipes-devtools/rust/rust-llvm_1.40.0.bb b/recipes-devtools/rust/rust-llvm_1.40.0.bb index ac77a4b..1dca22b 100644 --- a/recipes-devtools/rust/rust-llvm_1.40.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.40.0.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} diff --git a/recipes-devtools/rust/rust-llvm_1.41.0.bb b/recipes-devtools/rust/rust-llvm_1.41.0.bb index ac77a4b..1dca22b 100644 --- a/recipes-devtools/rust/rust-llvm_1.41.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.41.0.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} diff --git a/recipes-devtools/rust/rust-llvm_1.43.0.bb b/recipes-devtools/rust/rust-llvm_1.43.0.bb index ac77a4b..1dca22b 100644 --- a/recipes-devtools/rust/rust-llvm_1.43.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.43.0.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} diff --git a/recipes-devtools/rust/rust-llvm_1.46.0.bb b/recipes-devtools/rust/rust-llvm_1.46.0.bb index ac77a4b..1dca22b 100644 --- a/recipes-devtools/rust/rust-llvm_1.46.0.bb +++ b/recipes-devtools/rust/rust-llvm_1.46.0.bb @@ -1,16 +1,2 @@ require rust-source-${PV}.inc require rust-llvm.inc - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" - -do_install_prepend () { - # the install does a sed on this without installing the file - # we don't need it for anything - mkdir -p "${D}/usr/share/llvm/cmake" - touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake" -} - -do_install_append () { - # we don't need any of this stuff to build Rust - rm -rf "${D}/usr/lib/cmake" -} From 4b151fa804b1e78af445037e4136c133ada40a05 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Fri, 18 Dec 2020 12:59:17 +1000 Subject: [PATCH 2/2] add rust 1.47.0 --- .../cargo-1.47.0/0001-Disable-http2.patch | 31 +++++++++++++++++++ recipes-devtools/cargo/cargo_1.47.0.bb | 8 +++++ recipes-devtools/rust/libstd-rs_1.47.0.bb | 5 +++ recipes-devtools/rust/rust-cross_1.47.0.bb | 2 ++ recipes-devtools/rust/rust-llvm_1.47.0.bb | 2 ++ .../rust/rust-snapshot-1.47.0.inc | 21 +++++++++++++ recipes-devtools/rust/rust-source-1.47.0.inc | 10 ++++++ recipes-devtools/rust/rust_1.47.0.bb | 18 +++++++++++ 8 files changed, 97 insertions(+) create mode 100644 recipes-devtools/cargo/cargo-1.47.0/0001-Disable-http2.patch create mode 100644 recipes-devtools/cargo/cargo_1.47.0.bb create mode 100644 recipes-devtools/rust/libstd-rs_1.47.0.bb create mode 100644 recipes-devtools/rust/rust-cross_1.47.0.bb create mode 100644 recipes-devtools/rust/rust-llvm_1.47.0.bb create mode 100644 recipes-devtools/rust/rust-snapshot-1.47.0.inc create mode 100644 recipes-devtools/rust/rust-source-1.47.0.inc create mode 100644 recipes-devtools/rust/rust_1.47.0.bb diff --git a/recipes-devtools/cargo/cargo-1.47.0/0001-Disable-http2.patch b/recipes-devtools/cargo/cargo-1.47.0/0001-Disable-http2.patch new file mode 100644 index 0000000..b08f7ac --- /dev/null +++ b/recipes-devtools/cargo/cargo-1.47.0/0001-Disable-http2.patch @@ -0,0 +1,31 @@ +From 40802c3a42fab9cfcd27fda8d00e98f8cc30016a Mon Sep 17 00:00:00 2001 +From: Johan Anderholm +Date: Sun, 27 Jan 2019 10:19:00 +0100 +Subject: [PATCH] Disable http2 + +http2 requires that curl is build with nghttp2 which in turn depends on +many dependencies and ultimately a dependency loop in the case of +curl-native. As long as multiplexing is disabled in cargo this should +be fine. + +Upstream-Status: Inappropriate +--- + Cargo.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 95cea90c4..56211532f 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -25,7 +25,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.1" } + crates-io = { path = "crates/crates-io", version = "0.31.1" } + crossbeam-utils = "0.7" + crypto-hash = "0.3.1" +-curl = { version = "0.4.23", features = ["http2"] } ++curl = { version = "0.4.23" } + curl-sys = "0.4.22" + env_logger = "0.7.0" + pretty_env_logger = { version = "0.4", optional = true } +-- +2.28.0 + diff --git a/recipes-devtools/cargo/cargo_1.47.0.bb b/recipes-devtools/cargo/cargo_1.47.0.bb new file mode 100644 index 0000000..f048779 --- /dev/null +++ b/recipes-devtools/cargo/cargo_1.47.0.bb @@ -0,0 +1,8 @@ +require recipes-devtools/rust/rust-source-${PV}.inc +require recipes-devtools/rust/rust-snapshot-${PV}.inc +require cargo.inc + +LIC_FILES_CHKSUM += " \ + file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \ + file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \ +" diff --git a/recipes-devtools/rust/libstd-rs_1.47.0.bb b/recipes-devtools/rust/libstd-rs_1.47.0.bb new file mode 100644 index 0000000..4398a22 --- /dev/null +++ b/recipes-devtools/rust/libstd-rs_1.47.0.bb @@ -0,0 +1,5 @@ +require rust-source-${PV}.inc +require libstd-rs.inc + +# libstd moved from src/libstd to library/std in 1.47+ +S = "${RUSTSRC}/library/std" diff --git a/recipes-devtools/rust/rust-cross_1.47.0.bb b/recipes-devtools/rust/rust-cross_1.47.0.bb new file mode 100644 index 0000000..ddc25d3 --- /dev/null +++ b/recipes-devtools/rust/rust-cross_1.47.0.bb @@ -0,0 +1,2 @@ +require rust-cross.inc +require rust-source-${PV}.inc diff --git a/recipes-devtools/rust/rust-llvm_1.47.0.bb b/recipes-devtools/rust/rust-llvm_1.47.0.bb new file mode 100644 index 0000000..1dca22b --- /dev/null +++ b/recipes-devtools/rust/rust-llvm_1.47.0.bb @@ -0,0 +1,2 @@ +require rust-source-${PV}.inc +require rust-llvm.inc diff --git a/recipes-devtools/rust/rust-snapshot-1.47.0.inc b/recipes-devtools/rust/rust-snapshot-1.47.0.inc new file mode 100644 index 0000000..45cbf71 --- /dev/null +++ b/recipes-devtools/rust/rust-snapshot-1.47.0.inc @@ -0,0 +1,21 @@ +## 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.46.0" + +RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" +RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" +CARGO_VERSION = "0.47.0" +CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" + +SRC_URI += " \ + https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ + https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ + https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ + " + +# TODO: Add hashes for other architecture toolchains as well. Make a script? +SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "e631d80cb03539769c041ee4566e94e36a271d4b3cdd149e1447d1f77fda979c" +SRC_URI[rustc-snapshot-x86_64.sha256sum] = "6edcec5367f9fcaee78cbcabfb1f6757fa95d7fd2c0853913223fe20ad534f12" +SRC_URI[cargo-snapshot-x86_64.sha256sum] = "9da5c4888c6025fa174eaef330337e49666ca9562f876a34d40c03a80d432b8d" diff --git a/recipes-devtools/rust/rust-source-1.47.0.inc b/recipes-devtools/rust/rust-source-1.47.0.inc new file mode 100644 index 0000000..25042fa --- /dev/null +++ b/recipes-devtools/rust/rust-source-1.47.0.inc @@ -0,0 +1,10 @@ +SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust" + +SRC_URI[rust.sha256sum] = "ec2c81d2d34890486094a6407589be96161e4e301c238332d32c6dbae4f38ea2" + +# later versions of rust change the directory that they unextract to +RUSTSRC = "${WORKDIR}/rustc-${PV}-src" +# set this as our default +S = "${RUSTSRC}" + +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0" diff --git a/recipes-devtools/rust/rust_1.47.0.bb b/recipes-devtools/rust/rust_1.47.0.bb new file mode 100644 index 0000000..509f2b8 --- /dev/null +++ b/recipes-devtools/rust/rust_1.47.0.bb @@ -0,0 +1,18 @@ +require rust.inc +require rust-source-${PV}.inc +require rust-snapshot-${PV}.inc + +DEPENDS += "rust-llvm (=${PV})" + +# Otherwise we'll depend on what we provide +INHIBIT_DEFAULT_RUST_DEPS_class-native = "1" +# We don't need to depend on gcc-native because yocto assumes it exists +PROVIDES_class-native = "virtual/${TARGET_PREFIX}rust" + +# The default behaviour of x.py changed in 1.47+ so now we need to +# explicitly ask for the stage 2 compiler to be assembled. +do_compile () { + rust_runx build --stage 2 src/rustc +} + +BBCLASSEXTEND = "native"