rust: stop using shared source
Convert rust to not use the shared source setup and instead use its own extracted directory. Include the version info in the bitbake file so that in the future we can support multiple versions via a PREFERRED_VERSIONS variable.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user