diff --git a/recipes-devtools/rust/rust-cross.bb b/recipes-devtools/rust/rust-cross_1.10.0.bb similarity index 92% rename from recipes-devtools/rust/rust-cross.bb rename to recipes-devtools/rust/rust-cross_1.10.0.bb index c350014..d745404 100644 --- a/recipes-devtools/rust/rust-cross.bb +++ b/recipes-devtools/rust/rust-cross_1.10.0.bb @@ -1,6 +1,9 @@ require rust.inc inherit cross +SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db" +SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869" + # Otherwise we'll depend on what we provide INHIBIT_DEFAULT_RUST_DEPS = "1" diff --git a/recipes-devtools/rust/rust.bb b/recipes-devtools/rust/rust.bb deleted file mode 100644 index ab61226..0000000 --- a/recipes-devtools/rust/rust.bb +++ /dev/null @@ -1,11 +0,0 @@ -inherit rust-installer -require rust.inc - -DEPENDS += "rust-llvm" - -# 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" - -BBCLASSEXTEND = "native" diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index b886e2a..e8e7fad 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -1,15 +1,17 @@ -# ex: sts=4 et sw=4 ts=8 -inherit rust -require rust-shared-source.inc -require rust-snapshot-2016-05-24.inc - -LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8" - SUMMARY = "Rust compiler and runtime libaries" HOMEPAGE = "http://www.rust-lang.org" SECTION = "devel" +LICENSE = "MIT | Apache-2.0" +LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8" -B = "${WORKDIR}/build" +inherit rust +require rust-snapshot-2016-05-24.inc + +SRC_URI = "\ + https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \ + " + +S = "${WORKDIR}/rustc-${PV}" DEPENDS += "file-native" @@ -385,14 +387,6 @@ llvmdir = "${STAGING_DIR_NATIVE}/${prefix_native}" export CFG_DISABLE_LDCONFIG="notempty" do_configure () { - # Note: when we adjust the generated targets, rust doesn't rebuild (even - # when it should), so for now we need to remove the build dir to keep - # things in sync. - cd "${WORKDIR}" - rm -rf "${B}/" - mkdir -p "${B}/" - cd "${B}" - # FIXME: target_prefix vs prefix, see cross.bbclass # FIXME: this path to rustc (via `which rustc`) may not be quite right in the case @@ -484,4 +478,4 @@ rust_do_install () { do_install () { rust_do_install } - +# ex: sts=4 et sw=4 ts=8 diff --git a/recipes-devtools/rust/rust_1.10.0.bb b/recipes-devtools/rust/rust_1.10.0.bb new file mode 100644 index 0000000..be35dbf --- /dev/null +++ b/recipes-devtools/rust/rust_1.10.0.bb @@ -0,0 +1,29 @@ +inherit rust-installer +require rust.inc + +SRC_URI += " \ + file://rust/0001-Add-config-for-musl-based-arm-builds.patch \ + file://rust/0002-Target-add-default-target.json-path-libdir-rust-targ.patch \ + file://rust/0003-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch \ + file://rust/0004-mk-add-missing-CFG_LIBDIR_RELATIVE.patch \ + file://rust/0005-configure-support-bindir-and-extend-libdir-to-non-bl.patch \ + file://rust/0006-std-thread_local-workaround-for-NULL-__dso_handle.patch \ + file://rust/0007-mk-install-use-disable-rewrite-paths.patch \ + file://rust/0008-Allow-overriding-crate_hash-with-C-crate_hash.patch \ + file://rust/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch \ + file://rust/0010-mk-allow-changing-the-platform-configuration-source-.patch \ + file://rust/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch \ + file://rust-installer/0001-add-option-to-disable-rewriting-of-install-paths.patch;patchdir=src/rust-installer \ + " + +SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db" +SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869" + +DEPENDS += "rust-llvm" + +# 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" + +BBCLASSEXTEND = "native"