All of these variables are single-valued, so we can use weak-defaults
for them and only see the final assignment after parsing.

Signed-off-by: Alex Kiernan <alex.kier...@gmail.com>
---

Changes in v2:
- New in v2

 meta/classes-recipe/cargo_common.bbclass | 6 +++---
 meta/classes-recipe/rust-common.bbclass  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/classes-recipe/cargo_common.bbclass 
b/meta/classes-recipe/cargo_common.bbclass
index 509aa195c5fa..48cdd69bca13 100644
--- a/meta/classes-recipe/cargo_common.bbclass
+++ b/meta/classes-recipe/cargo_common.bbclass
@@ -28,10 +28,10 @@ export PKG_CONFIG_ALLOW_CROSS = "1"
 # Don't instruct cargo to use crates downloaded by bitbake. Some rust packages,
 # for example the rust compiler itself, come with their own vendored sources.
 # Specifying two [source.crates-io] will not work.
-CARGO_DISABLE_BITBAKE_VENDORING ?= "0"
+CARGO_DISABLE_BITBAKE_VENDORING ??= "0"
 
 # Used by libstd-rs to point to the vendor dir included in rustc src
-CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake"
+CARGO_VENDORING_DIRECTORY ??= "${CARGO_HOME}/bitbake"
 
 # The directory of the Cargo.toml relative to the root directory, per default
 # assume there's a Cargo.toml directly in the root directory
@@ -40,7 +40,7 @@ CARGO_SRC_DIR ??= ""
 # The actual path to the Cargo.toml
 CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml"
 
-CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}"
+CARGO_RUST_TARGET_CCLD ??= "${RUST_TARGET_CCLD}"
 cargo_common_do_configure () {
        mkdir -p ${CARGO_HOME}/bitbake
 
diff --git a/meta/classes-recipe/rust-common.bbclass 
b/meta/classes-recipe/rust-common.bbclass
index ae96d9c5b1ff..6940093e59bf 100644
--- a/meta/classes-recipe/rust-common.bbclass
+++ b/meta/classes-recipe/rust-common.bbclass
@@ -16,8 +16,8 @@ FILES:${PN}-dbg += "${rustlibdir}/.debug"
 RUSTLIB = "-L ${STAGING_DIR_HOST}${rustlibdir}"
 RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}"
 RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
-RUSTLIB_DEP ?= "libstd-rs"
-RUST_PANIC_STRATEGY ?= "unwind"
+RUSTLIB_DEP ??= "libstd-rs"
+RUST_PANIC_STRATEGY ??= "unwind"
 
 def target_is_armv7(d):
     '''Determine if target is armv7'''
-- 
2.39.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192049): 
https://lists.openembedded.org/g/openembedded-core/message/192049
Mute This Topic: https://lists.openembedded.org/mt/103053306/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to