diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2022-02-07 01:08:07 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-08 14:20:18 +0000 |
commit | 379519795a49228acf78d9fa928373fdd30311b9 (patch) | |
tree | 4214c349964e305158e6d571dfd19d21387e7fb4 | |
parent | efa450bfbf20b826e952d08a40495cba6fa7beba (diff) | |
download | poky-379519795a49228acf78d9fa928373fdd30311b9.tar.gz |
icecc.bbclass: replace deprecated bash command substitution
- build some packages with icecc enabled is not supported
because of the folling that disables the icecc:
DEBUG: while parsing set_icecc_env, unable to handle non-literal command '$ICECC_CC'
- it can be replicated with:
bitbake make && bitbake make -c cleansstate && bitbake make -DD
grep ICECC_CC tmp/log/cooker/qemux86-64/console-latest.log
- bash command substitution backquote deprecated
https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html
https://mywiki.wooledge.org/BashFAQ/082
(From OE-Core rev: b4e3983f38af5a5484b33de43449ae85b7e4f104)
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/icecc.bbclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 794e9930ad..3bbd2645af 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
@@ -309,7 +309,7 @@ wait_for_file() { | |||
309 | local TIMEOUT=$2 | 309 | local TIMEOUT=$2 |
310 | until [ -f "$FILE_TO_TEST" ] | 310 | until [ -f "$FILE_TO_TEST" ] |
311 | do | 311 | do |
312 | TIME_ELAPSED=`expr $TIME_ELAPSED + 1` | 312 | TIME_ELAPSED=$(expr $TIME_ELAPSED + 1) |
313 | if [ $TIME_ELAPSED -gt $TIMEOUT ] | 313 | if [ $TIME_ELAPSED -gt $TIMEOUT ] |
314 | then | 314 | then |
315 | return 1 | 315 | return 1 |
@@ -362,8 +362,8 @@ set_icecc_env() { | |||
362 | return | 362 | return |
363 | fi | 363 | fi |
364 | 364 | ||
365 | ICE_VERSION=`$ICECC_CC -dumpversion` | 365 | ICE_VERSION="$($ICECC_CC -dumpversion)" |
366 | ICECC_VERSION=`echo ${ICECC_VERSION} | sed -e "s/@VERSION@/$ICE_VERSION/g"` | 366 | ICECC_VERSION=$(echo ${ICECC_VERSION} | sed -e "s/@VERSION@/$ICE_VERSION/g") |
367 | if [ ! -x "${ICECC_ENV_EXEC}" ] | 367 | if [ ! -x "${ICECC_ENV_EXEC}" ] |
368 | then | 368 | then |
369 | bbwarn "Cannot use icecc: invalid ICECC_ENV_EXEC" | 369 | bbwarn "Cannot use icecc: invalid ICECC_ENV_EXEC" |
@@ -390,18 +390,18 @@ set_icecc_env() { | |||
390 | chmod 775 $ICE_PATH/$compiler | 390 | chmod 775 $ICE_PATH/$compiler |
391 | done | 391 | done |
392 | 392 | ||
393 | ICECC_AS="`${ICECC_CC} -print-prog-name=as`" | 393 | ICECC_AS="$(${ICECC_CC} -print-prog-name=as)" |
394 | # for target recipes should return something like: | 394 | # for target recipes should return something like: |
395 | # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as | 395 | # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as |
396 | # and just "as" for native, if it returns "as" in current directory (for whatever reason) use "as" from PATH | 396 | # and just "as" for native, if it returns "as" in current directory (for whatever reason) use "as" from PATH |
397 | if [ "`dirname "${ICECC_AS}"`" = "." ] | 397 | if [ "$(dirname "${ICECC_AS}")" = "." ] |
398 | then | 398 | then |
399 | ICECC_AS="${ICECC_WHICH_AS}" | 399 | ICECC_AS="${ICECC_WHICH_AS}" |
400 | fi | 400 | fi |
401 | 401 | ||
402 | if [ ! -f "${ICECC_VERSION}.done" ] | 402 | if [ ! -f "${ICECC_VERSION}.done" ] |
403 | then | 403 | then |
404 | mkdir -p "`dirname "${ICECC_VERSION}"`" | 404 | mkdir -p "$(dirname "${ICECC_VERSION}")" |
405 | 405 | ||
406 | # the ICECC_VERSION generation step must be locked by a mutex | 406 | # the ICECC_VERSION generation step must be locked by a mutex |
407 | # in order to prevent race conditions | 407 | # in order to prevent race conditions |