diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-05 13:53:53 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-08 15:44:20 +0100 |
| commit | 38934deeea87686982fb1536a2ccff4ae51781d5 (patch) | |
| tree | 8f76a52622604251af11fa9066024a7456309e4a /meta | |
| parent | 0a01b5ab973ed6351fb485950adaf888f27f990d (diff) | |
| download | poky-38934deeea87686982fb1536a2ccff4ae51781d5.tar.gz | |
rust: Drop cross/crosssdk
Now that target config json is provided by rust-target-config.bbclass,
the need for the cross and crosssdk recipes is removed. Drop them and
simplify dependencies accordingly.
(From OE-Core rev: 4b54f5f52b33db4d2fe95c5faef033b6c6b37b7d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/cargo.bbclass | 4 | ||||
| -rw-r--r-- | meta/classes/rust.bbclass | 2 | ||||
| -rw-r--r-- | meta/conf/distro/include/maintainers.inc | 2 | ||||
| -rw-r--r-- | meta/recipes-devtools/rust/rust-cross.inc | 47 | ||||
| -rw-r--r-- | meta/recipes-devtools/rust/rust-cross_1.62.0.bb | 8 | ||||
| -rw-r--r-- | meta/recipes-devtools/rust/rust-crosssdk_1.62.0.bb | 8 |
6 files changed, 3 insertions, 68 deletions
diff --git a/meta/classes/cargo.bbclass b/meta/classes/cargo.bbclass index 2475d05b3d..4bfcfe5fc6 100644 --- a/meta/classes/cargo.bbclass +++ b/meta/classes/cargo.bbclass | |||
| @@ -13,8 +13,8 @@ CARGO = "cargo" | |||
| 13 | BASEDEPENDS:append = " cargo-native" | 13 | BASEDEPENDS:append = " cargo-native" |
| 14 | 14 | ||
| 15 | # Ensure we get the right rust variant | 15 | # Ensure we get the right rust variant |
| 16 | DEPENDS:append:class-target = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" | 16 | DEPENDS:append:class-target = " rust-native ${RUSTLIB_DEP}" |
| 17 | DEPENDS:append:class-nativesdk = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" | 17 | DEPENDS:append:class-nativesdk = " rust-native ${RUSTLIB_DEP}" |
| 18 | DEPENDS:append:class-native = " rust-native" | 18 | DEPENDS:append:class-native = " rust-native" |
| 19 | 19 | ||
| 20 | # Enable build separation | 20 | # Enable build separation |
diff --git a/meta/classes/rust.bbclass b/meta/classes/rust.bbclass index f20e063c5b..2639cecfd4 100644 --- a/meta/classes/rust.bbclass +++ b/meta/classes/rust.bbclass | |||
| @@ -10,7 +10,7 @@ def rust_base_dep(d): | |||
| 10 | deps = "" | 10 | deps = "" |
| 11 | if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS'): | 11 | if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS'): |
| 12 | if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')): | 12 | if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')): |
| 13 | deps += " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" | 13 | deps += " rust-native ${RUSTLIB_DEP}" |
| 14 | else: | 14 | else: |
| 15 | deps += " rust-native" | 15 | deps += " rust-native" |
| 16 | return deps | 16 | return deps |
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index b563c51796..80dfd6eb47 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
| @@ -717,8 +717,6 @@ RECIPE_MAINTAINER:pn-rt-tests = "Alexander Kanavin <alex.kanavin@gmail.com>" | |||
| 717 | RECIPE_MAINTAINER:pn-ruby = "Ross Burton <ross.burton@arm.com>" | 717 | RECIPE_MAINTAINER:pn-ruby = "Ross Burton <ross.burton@arm.com>" |
| 718 | RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton <ross.burton@arm.com>" | 718 | RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton <ross.burton@arm.com>" |
| 719 | RECIPE_MAINTAINER:pn-rust = "Randy MacLeod <Randy.MacLeod@windriver.com>" | 719 | RECIPE_MAINTAINER:pn-rust = "Randy MacLeod <Randy.MacLeod@windriver.com>" |
| 720 | RECIPE_MAINTAINER:pn-rust-cross-${TUNE_PKGARCH}-${TCLIBC} = "Randy MacLeod <Randy.MacLeod@windriver.com>" | ||
| 721 | RECIPE_MAINTAINER:pn-rust-crosssdk-${SDK_ARCH}-glibc = "Randy MacLeod <Randy.MacLeod@windriver.com>" | ||
| 722 | RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod <Randy.MacLeod@windriver.com>" | 720 | RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod <Randy.MacLeod@windriver.com>" |
| 723 | RECIPE_MAINTAINER:pn-rust-hello-world = "Randy MacLeod <Randy.MacLeod@windriver.com>" | 721 | RECIPE_MAINTAINER:pn-rust-hello-world = "Randy MacLeod <Randy.MacLeod@windriver.com>" |
| 724 | RECIPE_MAINTAINER:pn-rust-llvm = "Randy MacLeod <Randy.MacLeod@windriver.com>" | 722 | RECIPE_MAINTAINER:pn-rust-llvm = "Randy MacLeod <Randy.MacLeod@windriver.com>" |
diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc deleted file mode 100644 index ab538e6659..0000000000 --- a/meta/recipes-devtools/rust/rust-cross.inc +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | RUST_TARGETGENS = "BUILD HOST TARGET" | ||
| 2 | |||
| 3 | # Otherwise we'll depend on what we provide | ||
| 4 | INHIBIT_DEFAULT_RUST_DEPS = "1" | ||
| 5 | |||
| 6 | # Unlike native (which nicely maps it's DEPENDS) cross wipes them out completely. | ||
| 7 | # Generally, we (and cross in general) need the same things that native needs, | ||
| 8 | # so it might make sense to take it's mapping. For now, though, we just mention | ||
| 9 | # the bits we need explicitly. | ||
| 10 | DEPENDS += "rust-llvm-native" | ||
| 11 | DEPENDS += "rust-native" | ||
| 12 | |||
| 13 | # In the cross compilation case, rustc doesn't seem to get the rpath quite | ||
| 14 | # right. It manages to include '../../lib/${TARGET_PREFIX}', but doesn't | ||
| 15 | # include the '../../lib' (ie: relative path from cross_bindir to normal | ||
| 16 | # libdir. As a result, we end up not being able to properly reference files in normal ${libdir}. | ||
| 17 | # Most of the time this happens to work fine as the systems libraries are | ||
| 18 | # subsituted, but sometimes a host system will lack a library, or the right | ||
| 19 | # version of a library (libtinfo was how I noticed this). | ||
| 20 | # | ||
| 21 | # FIXME: this should really be fixed in rust itself. | ||
| 22 | # FIXME: using hard-coded relative paths is wrong, we should ask bitbake for | ||
| 23 | # the relative path between 2 of it's vars. | ||
| 24 | HOST_POST_LINK_ARGS:append = " -Wl,-rpath=../../lib" | ||
| 25 | BUILD_POST_LINK_ARGS:append = " -Wl,-rpath=../../lib" | ||
| 26 | |||
| 27 | # We need the same thing for the calls to the compiler when building the runtime crap | ||
| 28 | TARGET_CC_ARCH:append = " --sysroot=${STAGING_DIR_TARGET}" | ||
| 29 | |||
| 30 | do_rust_setup_snapshot () { | ||
| 31 | } | ||
| 32 | |||
| 33 | do_configure () { | ||
| 34 | } | ||
| 35 | |||
| 36 | do_compile () { | ||
| 37 | } | ||
| 38 | |||
| 39 | do_install () { | ||
| 40 | mkdir -p ${D}${prefix}/${base_libdir_native}/rustlib | ||
| 41 | cp ${WORKDIR}/targets/${TARGET_SYS}.json ${D}${prefix}/${base_libdir_native}/rustlib | ||
| 42 | } | ||
| 43 | |||
| 44 | rust_cross_sysroot_preprocess() { | ||
| 45 | sysroot_stage_dir ${D}${prefix}/${base_libdir_native}/rustlib ${SYSROOT_DESTDIR}${prefix}/${base_libdir_native}/rustlib | ||
| 46 | } | ||
| 47 | SYSROOT_PREPROCESS_FUNCS += "rust_cross_sysroot_preprocess" | ||
diff --git a/meta/recipes-devtools/rust/rust-cross_1.62.0.bb b/meta/recipes-devtools/rust/rust-cross_1.62.0.bb deleted file mode 100644 index 5358d98da8..0000000000 --- a/meta/recipes-devtools/rust/rust-cross_1.62.0.bb +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | require rust.inc | ||
| 2 | inherit cross | ||
| 3 | require rust-cross.inc | ||
| 4 | require rust-source.inc | ||
| 5 | |||
| 6 | DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc" | ||
| 7 | PROVIDES = "virtual/${TARGET_PREFIX}rust" | ||
| 8 | PN = "rust-cross-${TUNE_PKGARCH}-${TCLIBC}" | ||
diff --git a/meta/recipes-devtools/rust/rust-crosssdk_1.62.0.bb b/meta/recipes-devtools/rust/rust-crosssdk_1.62.0.bb deleted file mode 100644 index 6ea8cb09b2..0000000000 --- a/meta/recipes-devtools/rust/rust-crosssdk_1.62.0.bb +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | require rust.inc | ||
| 2 | inherit crosssdk | ||
| 3 | require rust-cross.inc | ||
| 4 | require rust-source.inc | ||
| 5 | |||
| 6 | DEPENDS += "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/nativesdk-libc" | ||
| 7 | PROVIDES = "virtual/nativesdk-${TARGET_PREFIX}rust" | ||
| 8 | PN = "rust-crosssdk-${TUNE_PKGARCH}-${RUST_LIBC}" | ||
