rust: switch to using _class-cross and _class-native variables to stop abusing the BBCLASSEXTEND system

This commit is contained in:
Cody P Schafer
2015-02-12 14:37:39 -05:00
parent 6b6f4714c9
commit 70d0957e6d
3 changed files with 42 additions and 56 deletions
-29
View File
@@ -1,29 +0,0 @@
inherit cross
# Otherwise we'll depend on what we provide
INHIBIT_DEFAULT_RUST_DEPS = "1"
DEPENDS += "rust-native"
PROVIDES = "virtual/${TARGET_PREFIX}rust"
PN = "rust-cross-${TARGET_ARCH}"
# The same value as ${TOOLCHAIN_OPTIONS}. We can't use that variable directly
# here because cross.bblcass is "helpful" and blanks it out.
#TARGET_PRE_LINK_ARGS_append = " --sysroot=${STAGING_DIR_TARGET}"
# FIXME: the only way to convince cargo to include the rpath is via editing
# Config.toml, and doing that safely requires us to write actual patches
HOST_PRE_LINK_ARGS_append = " -Wl,-rpath=${libdir}"
BUILD_PRE_LINK_ARGS_append = " -Wl,-rpath=${libdir}"
# We need the same thing for the calls to the compiler when building the runtime crap
TARGET_CC_ARCH_append = " --sysroot=${STAGING_DIR_TARGET}"
## gcc-cross settings
# INHIBIT_DEFAULT_DEPS = "1"
# INHIBIT_PACKAGE_STRIP = "1"
# ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_NATIVE}${target_includedir}"
# cross.bbclass is "helpful" and overrides our do_install. Tell it not to.
do_install () {
rust_do_install
}
-10
View File
@@ -1,10 +0,0 @@
inherit native
PN = "rust-native"
# Otherwise we'll depend on what we provide
INHIBIT_DEFAULT_RUST_DEPS = "1"
# We don't need to depend on gcc-native because yocto assumes it exists
PROVIDES = "virtual/${TARGET_PREFIX}rust"
USE_LOCAL_NATIVE_RUST ??= "0"
USE_LOCAL_RUST ?= "${@base_conditional('USE_LOCAL_NATIVE_RUST', '0', '0', '1', d)}"