summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-05 12:28:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-08 15:44:20 +0100
commit5c45b73c8fa445b5192bb9fac1bc80b038b44c0d (patch)
tree70558676b6ea7eed370b09e81ed0be5d62371e0f /meta
parent411304c3e99f6d3320cb307a61b5d03eda9f7b4d (diff)
downloadpoky-5c45b73c8fa445b5192bb9fac1bc80b038b44c0d.tar.gz
rust: Switch to use RUST_XXX_SYS consistently
The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use RUST_XXX_SYS consistently and add the variables to the global exclsion on signatures as they're reflected in the directory triplets and trying to filter them out the hashes separately is too painful. (From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/cargo.bbclass4
-rw-r--r--meta/classes/cargo_common.bbclass6
-rw-r--r--meta/classes/python_pyo3.bbclass2
-rw-r--r--meta/classes/rust-target-config.bbclass2
-rw-r--r--meta/classes/rust.bbclass4
-rw-r--r--meta/conf/bitbake.conf2
-rw-r--r--meta/recipes-devtools/rust/libstd-rs.inc4
-rw-r--r--meta/recipes-devtools/rust/rust.inc10
-rw-r--r--meta/recipes-gnome/librsvg/librsvg_2.54.4.bb4
9 files changed, 19 insertions, 19 deletions
diff --git a/meta/classes/cargo.bbclass b/meta/classes/cargo.bbclass
index 4a780a501f..539ff03ec7 100644
--- a/meta/classes/cargo.bbclass
+++ b/meta/classes/cargo.bbclass
@@ -32,12 +32,12 @@ MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml"
32 32
33RUSTFLAGS ??= "" 33RUSTFLAGS ??= ""
34BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" 34BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
35CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" 35CARGO_BUILD_FLAGS = "-v --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}"
36 36
37# This is based on the content of CARGO_BUILD_FLAGS and generally will need to 37# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
38# change if CARGO_BUILD_FLAGS changes. 38# change if CARGO_BUILD_FLAGS changes.
39BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}" 39BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}"
40CARGO_TARGET_SUBDIR="${HOST_SYS}/${BUILD_DIR}" 40CARGO_TARGET_SUBDIR="${RUST_HOST_SYS}/${BUILD_DIR}"
41oe_cargo_build () { 41oe_cargo_build () {
42 export RUSTFLAGS="${RUSTFLAGS}" 42 export RUSTFLAGS="${RUSTFLAGS}"
43 export RUST_TARGET_PATH="${RUST_TARGET_PATH}" 43 export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
diff --git a/meta/classes/cargo_common.bbclass b/meta/classes/cargo_common.bbclass
index 39f32829fd..dcd0afd980 100644
--- a/meta/classes/cargo_common.bbclass
+++ b/meta/classes/cargo_common.bbclass
@@ -69,15 +69,15 @@ cargo_common_do_configure () {
69 cat <<- EOF >> ${CARGO_HOME}/config 69 cat <<- EOF >> ${CARGO_HOME}/config
70 70
71 # HOST_SYS 71 # HOST_SYS
72 [target.${HOST_SYS}] 72 [target.${RUST_HOST_SYS}]
73 linker = "${CARGO_RUST_TARGET_CCLD}" 73 linker = "${CARGO_RUST_TARGET_CCLD}"
74 EOF 74 EOF
75 75
76 if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then 76 if [ "${RUST_HOST_SYS}" != "${RUST_BUILD_SYS}" ]; then
77 cat <<- EOF >> ${CARGO_HOME}/config 77 cat <<- EOF >> ${CARGO_HOME}/config
78 78
79 # BUILD_SYS 79 # BUILD_SYS
80 [target.${BUILD_SYS}] 80 [target.${RUST_BUILD_SYS}]
81 linker = "${RUST_BUILD_CCLD}" 81 linker = "${RUST_BUILD_CCLD}"
82 EOF 82 EOF
83 fi 83 fi
diff --git a/meta/classes/python_pyo3.bbclass b/meta/classes/python_pyo3.bbclass
index 10cc3a0645..b41e3ba075 100644
--- a/meta/classes/python_pyo3.bbclass
+++ b/meta/classes/python_pyo3.bbclass
@@ -8,7 +8,7 @@ inherit cargo python3-dir siteinfo
8export PYO3_CROSS="1" 8export PYO3_CROSS="1"
9export PYO3_CROSS_PYTHON_VERSION="${PYTHON_BASEVERSION}" 9export PYO3_CROSS_PYTHON_VERSION="${PYTHON_BASEVERSION}"
10export PYO3_CROSS_LIB_DIR="${STAGING_LIBDIR}" 10export PYO3_CROSS_LIB_DIR="${STAGING_LIBDIR}"
11export CARGO_BUILD_TARGET="${HOST_SYS}" 11export CARGO_BUILD_TARGET="${RUST_HOST_SYS}"
12export RUSTFLAGS 12export RUSTFLAGS
13export PYO3_PYTHON="${PYTHON}" 13export PYO3_PYTHON="${PYTHON}"
14export PYO3_CONFIG_FILE="${WORKDIR}/pyo3.config" 14export PYO3_CONFIG_FILE="${WORKDIR}/pyo3.config"
diff --git a/meta/classes/rust-target-config.bbclass b/meta/classes/rust-target-config.bbclass
index 1721839922..7fe039601a 100644
--- a/meta/classes/rust-target-config.bbclass
+++ b/meta/classes/rust-target-config.bbclass
@@ -360,7 +360,7 @@ def rust_gen_target(d, thing, wd, arch):
360 json.dump(tspec, f, indent=4) 360 json.dump(tspec, f, indent=4)
361 361
362# These are accounted for in tmpdir path names so don't need to be in the task sig 362# These are accounted for in tmpdir path names so don't need to be in the task sig
363rust_gen_target[vardepsexclude] += "RUST_HOST_SYS RUST_TARGET_SYS ABIEXTENSION llvm_cpu" 363rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu"
364 364
365do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES" 365do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES"
366 366
diff --git a/meta/classes/rust.bbclass b/meta/classes/rust.bbclass
index 5c8938d09f..f20e063c5b 100644
--- a/meta/classes/rust.bbclass
+++ b/meta/classes/rust.bbclass
@@ -2,7 +2,7 @@ inherit rust-common
2 2
3RUSTC = "rustc" 3RUSTC = "rustc"
4 4
5RUSTC_ARCHFLAGS += "--target=${HOST_SYS} ${RUSTFLAGS}" 5RUSTC_ARCHFLAGS += "--target=${RUST_HOST_SYS} ${RUSTFLAGS}"
6 6
7def rust_base_dep(d): 7def rust_base_dep(d):
8 # Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to 8 # Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to
@@ -37,7 +37,7 @@ HOST_CFLAGS ?= "${CFLAGS}"
37HOST_CXXFLAGS ?= "${CXXFLAGS}" 37HOST_CXXFLAGS ?= "${CXXFLAGS}"
38HOST_CPPFLAGS ?= "${CPPFLAGS}" 38HOST_CPPFLAGS ?= "${CPPFLAGS}"
39 39
40rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib" 40rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${RUST_HOST_SYS}/lib"
41# Native sysroot standard library path 41# Native sysroot standard library path
42rustlib_src="${prefix}/lib/${rustlib_suffix}" 42rustlib_src="${prefix}/lib/${rustlib_suffix}"
43# Host sysroot standard library path 43# Host sysroot standard library path
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 1d36aae8b3..bdfb678437 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -943,7 +943,7 @@ BB_HASHEXCLUDE_COMMON ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DI
943 SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE GIT_CEILING_DIRECTORIES \ 943 SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE GIT_CEILING_DIRECTORIES \
944 OMP_NUM_THREADS BB_CURRENTTASK" 944 OMP_NUM_THREADS BB_CURRENTTASK"
945BB_BASEHASH_IGNORE_VARS ?= "${BB_HASHEXCLUDE_COMMON} PSEUDO_IGNORE_PATHS BUILDHISTORY_DIR \ 945BB_BASEHASH_IGNORE_VARS ?= "${BB_HASHEXCLUDE_COMMON} PSEUDO_IGNORE_PATHS BUILDHISTORY_DIR \
946 SSTATE_DIR SOURCE_DATE_EPOCH" 946 SSTATE_DIR SOURCE_DATE_EPOCH RUST_BUILD_SYS RUST_HOST_SYS RUST_TARGET_SYS"
947BB_HASHCONFIG_IGNORE_VARS ?= "${BB_HASHEXCLUDE_COMMON} DATE TIME SSH_AGENT_PID \ 947BB_HASHCONFIG_IGNORE_VARS ?= "${BB_HASHEXCLUDE_COMMON} DATE TIME SSH_AGENT_PID \
948 SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_PASSTHROUGH_ADDITIONS DISABLE_SANITY_CHECKS \ 948 SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_PASSTHROUGH_ADDITIONS DISABLE_SANITY_CHECKS \
949 PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \ 949 PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
diff --git a/meta/recipes-devtools/rust/libstd-rs.inc b/meta/recipes-devtools/rust/libstd-rs.inc
index 987956344a..d49383ced5 100644
--- a/meta/recipes-devtools/rust/libstd-rs.inc
+++ b/meta/recipes-devtools/rust/libstd-rs.inc
@@ -35,6 +35,6 @@ do_install () {
35 # With the incremental build support added in 1.24, the libstd deps directory also includes dependency 35 # With the incremental build support added in 1.24, the libstd deps directory also includes dependency
36 # files that get installed. Those are really only needed to incrementally rebuild the libstd library 36 # files that get installed. Those are really only needed to incrementally rebuild the libstd library
37 # itself and don't need to be installed. 37 # itself and don't need to be installed.
38 rm -f ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/*.d 38 rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d
39 cp ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} 39 cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir}
40} 40}
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index ecb057ad3b..aa067932fd 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -79,7 +79,7 @@ python do_configure() {
79 config = configparser.RawConfigParser() 79 config = configparser.RawConfigParser()
80 80
81 # [target.ARCH-poky-linux] 81 # [target.ARCH-poky-linux]
82 target_section = "target.{}".format(d.getVar('TARGET_SYS', True)) 82 target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True))
83 config.add_section(target_section) 83 config.add_section(target_section)
84 84
85 llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}") 85 llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}")
@@ -128,11 +128,11 @@ python do_configure() {
128 config.set("build", "vendor", e(True)) 128 config.set("build", "vendor", e(True))
129 129
130 if not "targets" in locals(): 130 if not "targets" in locals():
131 targets = [d.getVar("TARGET_SYS", True)] 131 targets = [d.getVar("RUST_TARGET_SYS", True)]
132 config.set("build", "target", e(targets)) 132 config.set("build", "target", e(targets))
133 133
134 if not "hosts" in locals(): 134 if not "hosts" in locals():
135 hosts = [d.getVar("HOST_SYS", True)] 135 hosts = [d.getVar("RUST_HOST_SYS", True)]
136 config.set("build", "host", e(hosts)) 136 config.set("build", "host", e(hosts))
137 137
138 # We can't use BUILD_SYS since that is something the rust snapshot knows 138 # We can't use BUILD_SYS since that is something the rust snapshot knows
@@ -181,10 +181,10 @@ do_compile () {
181 181
182rust_do_install () { 182rust_do_install () {
183 mkdir -p ${D}${bindir} 183 mkdir -p ${D}${bindir}
184 cp build/${HOST_SYS}/stage2/bin/* ${D}${bindir} 184 cp build/${RUST_HOST_SYS}/stage2/bin/* ${D}${bindir}
185 185
186 mkdir -p ${D}${libdir}/rustlib 186 mkdir -p ${D}${libdir}/rustlib
187 cp -pRd build/${HOST_SYS}/stage2/lib/* ${D}${libdir} 187 cp -pRd build/${RUST_HOST_SYS}/stage2/lib/* ${D}${libdir}
188 # Remove absolute symlink so bitbake doesn't complain 188 # Remove absolute symlink so bitbake doesn't complain
189 rm -f ${D}${libdir}/rustlib/src/rust 189 rm -f ${D}${libdir}/rustlib/src/rust
190} 190}
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb b/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb
index cc7fb9bbdf..f3bbeb74eb 100644
--- a/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb
+++ b/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb
@@ -31,7 +31,7 @@ export RUST_BACKTRACE = "full"
31export RUSTFLAGS 31export RUSTFLAGS
32export RUST_TARGET_PATH 32export RUST_TARGET_PATH
33 33
34export RUST_TARGET = "${HOST_SYS}" 34export RUST_TARGET = "${RUST_HOST_SYS}"
35 35
36RUSTFLAGS:append:mips = " --cfg crossbeam_no_atomic_64" 36RUSTFLAGS:append:mips = " --cfg crossbeam_no_atomic_64"
37RUSTFLAGS:append:mipsel = " --cfg crossbeam_no_atomic_64" 37RUSTFLAGS:append:mipsel = " --cfg crossbeam_no_atomic_64"
@@ -45,7 +45,7 @@ RUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64"
45do_compile:prepend() { 45do_compile:prepend() {
46 cp ${STAGING_LIBDIR_NATIVE}/rustlib/${HOST_SYS}.json ${WORKDIR} 46 cp ${STAGING_LIBDIR_NATIVE}/rustlib/${HOST_SYS}.json ${WORKDIR}
47 cp ${STAGING_LIBDIR_NATIVE}/rustlib/${BUILD_SYS}.json ${WORKDIR} 47 cp ${STAGING_LIBDIR_NATIVE}/rustlib/${BUILD_SYS}.json ${WORKDIR}
48 sed -ie 's,"linker": ".*","linker": "${RUST_TARGET_CC}",g' ${WORKDIR}/${HOST_SYS}.json 48 sed -ie 's,"linker": ".*","linker": "${RUST_TARGET_CC}",g' ${WORKDIR}/${RUST_HOST_SYS}.json
49 RUST_TARGET_PATH="${WORKDIR}" 49 RUST_TARGET_PATH="${WORKDIR}"
50 export RUST_TARGET_PATH 50 export RUST_TARGET_PATH
51} 51}