summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/cargo.bbclass
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2022-10-28 11:38:15 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-07 14:32:42 +0000
commit4065f0d840446d4e7ad729be375b4e0f9bb8a99d (patch)
tree16449c0a83bb32b94d9bfb53e8c79dc6a2404742 /meta/classes-recipe/cargo.bbclass
parent5a2b075fa9884d507bab547f3434ee5229a3d887 (diff)
downloadpoky-4065f0d840446d4e7ad729be375b4e0f9bb8a99d.tar.gz
cargo.bbclass: avoid calling which ${RUSTC} with undefined ${RUSTC}
* RUSTC is normally defined in rust.bbclass, but rust-target-config doesn't inherit rust.bbclass and RUSTC is then undefined when calling 'which' in oe_cargo_build * causes which help text ending in log.do_compile, e.g.: | DEBUG: Executing shell function do_compile | NOTE: Using rust targets from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/openssl-sys/0.9.77-r0/rust-targets/ | NOTE: cargo = /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/openssl-sys/0.9.77-r0/recipe-sysroot-native/usr/bin/cargo | Usage: which [options] [--] COMMAND [...] | Write the full path of COMMAND(s) to standard output. | | --version, -[vV] Print version and exit successfully. | --help, Print this help and exit successfully. | --skip-dot Skip directories in PATH that start with a dot. | --skip-tilde Skip directories in PATH that start with a tilde. | --show-dot Don't expand a dot to current directory in output. | --show-tilde Output a tilde for HOME directory for non-root. | --tty-only Stop processing options on the right if not on tty. | --all, -a Print all matches in PATH, not just the first | --read-alias, -i Read list of aliases from stdin. | --skip-alias Ignore option --read-alias; don't read stdin. | --read-functions Read shell functions from stdin. | --skip-functions Ignore option --read-functions; don't read stdin. | | Recommended use is to write the output of (alias; declare -f) to standard | input, so that which can show aliases and shell functions. See which(1) for | examples. | | If the options --read-alias and/or --read-functions are specified then the | output can be a full alias or function definition, optionally followed by | the full path of each command used inside of those. | | Report bugs to <which-bugs@gnu.org>. | NOTE: rustc = (From OE-Core rev: 0068e82f02354729b953e622889f96ca52468d6c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/cargo.bbclass')
-rw-r--r--meta/classes-recipe/cargo.bbclass1
1 files changed, 0 insertions, 1 deletions
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass
index d1e83518b5..93e185f2c9 100644
--- a/meta/classes-recipe/cargo.bbclass
+++ b/meta/classes-recipe/cargo.bbclass
@@ -49,7 +49,6 @@ oe_cargo_build () {
49 export RUSTFLAGS="${RUSTFLAGS}" 49 export RUSTFLAGS="${RUSTFLAGS}"
50 bbnote "Using rust targets from ${RUST_TARGET_PATH}" 50 bbnote "Using rust targets from ${RUST_TARGET_PATH}"
51 bbnote "cargo = $(which ${CARGO})" 51 bbnote "cargo = $(which ${CARGO})"
52 bbnote "rustc = $(which ${RUSTC})"
53 bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@" 52 bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
54 "${CARGO}" build ${CARGO_BUILD_FLAGS} "$@" 53 "${CARGO}" build ${CARGO_BUILD_FLAGS} "$@"
55} 54}