Convert to new override syntax (#357)
* Convert to new override syntax This is the result of automated script (0.9.0) conversion: oe-core/scripts/contrib/convert-overrides.py . converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> * Manually fix the conversion Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> * layer.conf: Update layer compatibility with only dunfell and newer. Add honister to mark the layers as compatible with honister now that it uses the new override syntax. Drop zeus and older which are missing a support for newer override syntax which was backported only to 1.46 branch (used by dunfell) and newer, e.g.: https://git.openembedded.org/bitbake/commit/?h=1.46&id=c5418eae56cc50dbae7951c055434a0c456c53a4 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> * CI: use YOCTO_BRANCH instead of yocto-${YOCTO_VERSION} for poky checkout * using latest revision in branch is often better than sticking to some point releases Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> * CI: switch to hardknott branch * gatesgarth is already EOL, better to use something supported Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1b59fd4590
commit
bf6705fb7f
@@ -9,7 +9,7 @@ require recipes-devtools/rust/rust-common.inc
|
||||
require cargo.inc
|
||||
|
||||
CARGO = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"
|
||||
BASEDEPENDS_remove = "cargo-native"
|
||||
BASEDEPENDS:remove = "cargo-native"
|
||||
|
||||
export RUST_TARGET_PATH="${WORKDIR}/targets/"
|
||||
|
||||
@@ -37,7 +37,7 @@ python do_rust_gen_targets () {
|
||||
rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
|
||||
}
|
||||
|
||||
do_compile_prepend () {
|
||||
do_compile:prepend () {
|
||||
PKG_CONFIG_PATH="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig:${PKG_CONFIG_PATH}"
|
||||
}
|
||||
|
||||
@@ -70,5 +70,5 @@ do_install () {
|
||||
}
|
||||
|
||||
PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin"
|
||||
FILES_${PN} += "${base_prefix}/environment-setup.d ${PKG_SYS_BINDIR}"
|
||||
FILES:${PN} += "${base_prefix}/environment-setup.d ${PKG_SYS_BINDIR}"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require recipes-devtools/rust/rust-source-${PV}.inc
|
||||
require recipes-devtools/rust/rust-snapshot-${PV}.inc
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/cargo-${PV}:"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:"
|
||||
|
||||
require cargo-cross-canadian.inc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require recipes-devtools/rust/rust-source-${PV}.inc
|
||||
require recipes-devtools/rust/rust-snapshot-${PV}.inc
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/cargo-${PV}:"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:"
|
||||
|
||||
require cargo-cross-canadian.inc
|
||||
|
||||
@@ -25,7 +25,7 @@ do_cargo_setup_snapshot () {
|
||||
addtask cargo_setup_snapshot after do_unpack before do_configure
|
||||
do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}"
|
||||
|
||||
do_compile_prepend () {
|
||||
do_compile:prepend () {
|
||||
export RUSTC_BOOTSTRAP="1"
|
||||
}
|
||||
|
||||
@@ -47,5 +47,5 @@ BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
# When building cargo-native we don't have cargo-native to use and depend on,
|
||||
# so we must use the locally set up snapshot to bootstrap the build.
|
||||
BASEDEPENDS_remove_class-native = "cargo-native"
|
||||
CARGO_class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"
|
||||
BASEDEPENDS:remove:class-native = "cargo-native"
|
||||
CARGO:class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"
|
||||
|
||||
@@ -7,10 +7,10 @@ LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
RUSTLIB_DEP = ""
|
||||
inherit cargo
|
||||
|
||||
DEPENDS_append_libc-musl = " libunwind"
|
||||
DEPENDS:append:libc-musl = " libunwind"
|
||||
# rv32 does not have libunwind ported yet
|
||||
DEPENDS_remove_riscv32 = "libunwind"
|
||||
DEPENDS_remove_riscv64 = "libunwind"
|
||||
DEPENDS:remove:riscv32 = "libunwind"
|
||||
DEPENDS:remove:riscv64 = "libunwind"
|
||||
|
||||
# Embed bitcode in order to allow compiling both with and without LTO
|
||||
RUSTFLAGS += "-Cembed-bitcode=yes"
|
||||
@@ -23,7 +23,7 @@ CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
do_compile_prepend () {
|
||||
do_compile:prepend () {
|
||||
export CARGO_TARGET_DIR="${B}"
|
||||
# For Rust 1.13.0 and newer
|
||||
export RUSTC_BOOTSTRAP="1"
|
||||
|
||||
@@ -287,7 +287,7 @@ TARGET_LLVM_FEATURES = "${@llvm_features(d)}"
|
||||
|
||||
# class-native implies TARGET=HOST, and TUNE_FEATURES only describes the real
|
||||
# (original) target.
|
||||
TARGET_LLVM_FEATURES_class-native = "${@','.join(llvm_features_from_cc_arch(d))}"
|
||||
TARGET_LLVM_FEATURES:class-native = "${@','.join(llvm_features_from_cc_arch(d))}"
|
||||
|
||||
def rust_gen_target(d, thing, wd, features, cpu, arch):
|
||||
import json
|
||||
|
||||
@@ -39,13 +39,13 @@ export WRAPPER_TARGET_CCLD = "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET
|
||||
export WRAPPER_TARGET_LDFLAGS = "${TARGET_LDFLAGS}"
|
||||
export WRAPPER_TARGET_AR = "${TARGET_PREFIX}ar"
|
||||
|
||||
python do_configure_prepend() {
|
||||
python do_configure:prepend() {
|
||||
targets = [d.getVar("TARGET_SYS", True), "{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))]
|
||||
hosts = ["{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))]
|
||||
}
|
||||
|
||||
INSANE_SKIP_${RUSTLIB_TARGET_PN} = "file-rdeps arch ldflags"
|
||||
SKIP_FILEDEPS_${RUSTLIB_TARGET_PN} = "1"
|
||||
INSANE_SKIP:${RUSTLIB_TARGET_PN} = "file-rdeps arch ldflags"
|
||||
SKIP_FILEDEPS:${RUSTLIB_TARGET_PN} = "1"
|
||||
|
||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
|
||||
@@ -8,7 +8,7 @@ RUSTLIB_PKGS = "${RUSTLIB_SRC_PN} ${RUSTLIB_TARGET_PN} ${RUSTLIB_HOST_PN}"
|
||||
PN = "rust-cross-canadian-${TRANSLATED_TARGET_ARCH}"
|
||||
|
||||
PACKAGES = "${RUSTLIB_PKGS} ${PN}"
|
||||
RDEPENDS_${PN} += "${RUSTLIB_PKGS}"
|
||||
RDEPENDS:${PN} += "${RUSTLIB_PKGS}"
|
||||
|
||||
# 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.
|
||||
@@ -66,13 +66,13 @@ do_install () {
|
||||
PKG_SYS_LIBDIR = "${SDKPATHNATIVE}/usr/lib"
|
||||
PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin"
|
||||
PKG_RUSTLIB_DIR = "${PKG_SYS_LIBDIR}/${TARGET_SYS}/rustlib"
|
||||
FILES_${PN} = "${PKG_SYS_LIBDIR}/*.so ${PKG_SYS_BINDIR} ${base_prefix}/environment-setup.d"
|
||||
FILES_${RUSTLIB_TARGET_PN} = "${PKG_RUSTLIB_DIR}/${TARGET_SYS} ${PKG_RUSTLIB_DIR}/${TARGET_SYS}.json"
|
||||
FILES_${RUSTLIB_HOST_PN} = "${PKG_RUSTLIB_DIR}/${BUILD_ARCH}-unknown-linux-gnu"
|
||||
FILES_${RUSTLIB_SRC_PN} = "${PKG_RUSTLIB_DIR}/src"
|
||||
FILES:${PN} = "${PKG_SYS_LIBDIR}/*.so ${PKG_SYS_BINDIR} ${base_prefix}/environment-setup.d"
|
||||
FILES:${RUSTLIB_TARGET_PN} = "${PKG_RUSTLIB_DIR}/${TARGET_SYS} ${PKG_RUSTLIB_DIR}/${TARGET_SYS}.json"
|
||||
FILES:${RUSTLIB_HOST_PN} = "${PKG_RUSTLIB_DIR}/${BUILD_ARCH}-unknown-linux-gnu"
|
||||
FILES:${RUSTLIB_SRC_PN} = "${PKG_RUSTLIB_DIR}/src"
|
||||
|
||||
SUMMARY_${RUSTLIB_TARGET_PN} = "Rust cross canadian libaries for ${TARGET_SYS}"
|
||||
SUMMARY_${RUSTLIB_HOST_PN} = "Rust cross canadian libaries for ${HOST_SYS}"
|
||||
SUMMARY_${RUSTLIB_SRC_PN} = "Rust standard library sources for cross canadian toolchain"
|
||||
SUMMARY_${PN} = "Rust crost canadian compiler"
|
||||
SUMMARY:${RUSTLIB_TARGET_PN} = "Rust cross canadian libaries for ${TARGET_SYS}"
|
||||
SUMMARY:${RUSTLIB_HOST_PN} = "Rust cross canadian libaries for ${HOST_SYS}"
|
||||
SUMMARY:${RUSTLIB_SRC_PN} = "Rust standard library sources for cross canadian toolchain"
|
||||
SUMMARY:${PN} = "Rust crost canadian compiler"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ require rust-cross-canadian.inc
|
||||
require rust-source-${PV}.inc
|
||||
require rust-snapshot-${PV}.inc
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/rust:"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/rust:"
|
||||
|
||||
SRC_URI += " \
|
||||
file://0001-rustc_target-Fix-dash-vs-underscore-mismatches-in-op.patch \
|
||||
|
||||
@@ -2,5 +2,5 @@ require rust-cross-canadian.inc
|
||||
require rust-source-${PV}.inc
|
||||
require rust-snapshot-${PV}.inc
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/rust:"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/rust:"
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@ PN = "rust-cross-${TARGET_ARCH}"
|
||||
# FIXME: this should really be fixed in rust itself.
|
||||
# FIXME: using hard-coded relative paths is wrong, we should ask bitbake for
|
||||
# the relative path between 2 of it's vars.
|
||||
HOST_POST_LINK_ARGS_append = " -Wl,-rpath=../../lib"
|
||||
BUILD_POST_LINK_ARGS_append = " -Wl,-rpath=../../lib"
|
||||
HOST_POST_LINK_ARGS:append = " -Wl,-rpath=../../lib"
|
||||
BUILD_POST_LINK_ARGS:append = " -Wl,-rpath=../../lib"
|
||||
|
||||
# We need the same thing for the calls to the compiler when building the runtime crap
|
||||
TARGET_CC_ARCH_append = " --sysroot=${STAGING_DIR_TARGET}"
|
||||
TARGET_CC_ARCH:append = " --sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
do_rust_setup_snapshot () {
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ inherit cmake python3native
|
||||
|
||||
DEPENDS += "ninja-native rust-llvm-native"
|
||||
|
||||
ARM_INSTRUCTION_SET_armv5 = "arm"
|
||||
ARM_INSTRUCTION_SET_armv4t = "arm"
|
||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||
ARM_INSTRUCTION_SET:armv4t = "arm"
|
||||
|
||||
LLVM_DIR = "llvm${LLVM_RELEASE}"
|
||||
|
||||
@@ -34,7 +34,7 @@ EXTRA_OECMAKE = " \
|
||||
-DLLVM_TARGET_ARCH=${TARGET_ARCH} \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \
|
||||
"
|
||||
EXTRA_OECMAKE_append_class-target = "\
|
||||
EXTRA_OECMAKE:append:class-target = "\
|
||||
-DCMAKE_CROSSCOMPILING:BOOL=ON \
|
||||
-DLLVM_BUILD_TOOLS=OFF \
|
||||
-DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
|
||||
@@ -47,7 +47,7 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
|
||||
export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
|
||||
|
||||
do_install_append () {
|
||||
do_install:append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
@@ -55,11 +55,11 @@ do_install_append () {
|
||||
PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
|
||||
|
||||
# Add the extra locations to avoid the complaints about unpackaged files
|
||||
FILES_${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so"
|
||||
FILES_${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so"
|
||||
FILES_${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*"
|
||||
FILES_${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
|
||||
FILES_${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin"
|
||||
FILES_${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake"
|
||||
FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so"
|
||||
FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so"
|
||||
FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*"
|
||||
FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
|
||||
FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin"
|
||||
FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
@@ -3,8 +3,8 @@ require rust.inc
|
||||
DEPENDS += "rust-llvm (=${PV})"
|
||||
|
||||
# Otherwise we'll depend on what we provide
|
||||
INHIBIT_DEFAULT_RUST_DEPS_class-native = "1"
|
||||
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"
|
||||
PROVIDES:class-native = "virtual/${TARGET_PREFIX}rust"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
@@ -7,7 +7,7 @@ RUST_TOOLS_PKGS = "${RUST_TOOLS_CLIPPY_PN} ${RUST_TOOLS_RUSTFMT_PN}"
|
||||
PN = "rust-tools-cross-canadian-${TRANSLATED_TARGET_ARCH}"
|
||||
|
||||
PACKAGES = "${RUST_TOOLS_CLIPPY_PN} ${RUST_TOOLS_RUSTFMT_PN} ${PN}"
|
||||
RDEPENDS_${PN} += "${RUST_TOOLS_PKGS}"
|
||||
RDEPENDS:${PN} += "${RUST_TOOLS_PKGS}"
|
||||
|
||||
do_compile () {
|
||||
rust_runx build --stage 2 src/tools/clippy
|
||||
@@ -26,13 +26,13 @@ do_install () {
|
||||
chown -R root.root ${D}
|
||||
}
|
||||
|
||||
ALLOW_EMPTY_${PN} = "1"
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
|
||||
PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin"
|
||||
FILES_${RUST_TOOLS_CLIPPY_PN} = "${PKG_SYS_BINDIR}/cargo-clippy ${PKG_SYS_BINDIR}/clippy-driver"
|
||||
FILES_${RUST_TOOLS_RUSTFMT_PN} = "${PKG_SYS_BINDIR}/rustfmt"
|
||||
FILES:${RUST_TOOLS_CLIPPY_PN} = "${PKG_SYS_BINDIR}/cargo-clippy ${PKG_SYS_BINDIR}/clippy-driver"
|
||||
FILES:${RUST_TOOLS_RUSTFMT_PN} = "${PKG_SYS_BINDIR}/rustfmt"
|
||||
|
||||
SUMMARY_${PN} = "Rust helper tools"
|
||||
SUMMARY_${RUST_TOOLS_CLIPPY_PN} = "A collection of lints to catch common mistakes and improve your Rust code"
|
||||
SUMMARY_${RUST_TOOLS_RUSTFMT_PN} = "A tool for formatting Rust code according to style guidelines"
|
||||
SUMMARY:${PN} = "Rust helper tools"
|
||||
SUMMARY:${RUST_TOOLS_CLIPPY_PN} = "A collection of lints to catch common mistakes and improve your Rust code"
|
||||
SUMMARY:${RUST_TOOLS_RUSTFMT_PN} = "A tool for formatting Rust code according to style guidelines"
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@ require rust-tools-cross-canadian.inc
|
||||
require rust-source-${PV}.inc
|
||||
require rust-snapshot-${PV}.inc
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/rust:"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/rust:"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ SRC_URI += "file://riscv-march.patch"
|
||||
SRC_URI += "file://rv64gc.patch"
|
||||
|
||||
DEPENDS += "file-native python3-native"
|
||||
DEPENDS_append_class-native = " rust-llvm-native"
|
||||
DEPENDS:append:class-native = " rust-llvm-native"
|
||||
|
||||
S = "${RUSTSRC}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user