mirror of https://github.com/thesofproject/sof.git
set_xtensa_params.sh: add ZEPHYR_TOOLCHAIN_VARIANT
This helps with Zephyr and does not hurt anyone else. Adjust rebuild-testbench.sh accordingly. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
7b8068963c
commit
3e09f233a4
|
@ -57,7 +57,6 @@ setup_xtensa_tools_build()
|
|||
BUILD_TYPE=xt
|
||||
BUILD_TARGET=
|
||||
BUILD_DIR_NAME=build_xt_testbench
|
||||
COMPILER="xt-xcc"
|
||||
|
||||
# check needed environment variables
|
||||
test -n "${XTENSA_TOOLS_ROOT}" || die "XTENSA_TOOLS_ROOT need to be set.\n"
|
||||
|
@ -73,6 +72,15 @@ setup_xtensa_tools_build()
|
|||
test -n "${XTENSA_CORE}" ||
|
||||
die "Illegal platform $BUILD_PLATFORM, no XTENSA_CORE found.\n"
|
||||
|
||||
# Zephyr is not part of the testbench at all but let's play nice and
|
||||
# align with that naming convention to keep things simple.
|
||||
case "${ZEPHYR_TOOLCHAIN_VARIANT}" in
|
||||
xcc) COMPILER=xt-xcc;;
|
||||
xt-clang) COMPILER=xt-clang;;
|
||||
*) die 'Unknown or undefined ZEPHYR_TOOLCHAIN_VARIANT=%s\n' \
|
||||
"${ZEPHYR_TOOLCHAIN_VARIANT}";;
|
||||
esac
|
||||
|
||||
install_bin=install/tools/$TOOLCHAIN_VER/XtensaTools/bin
|
||||
tools_bin=$XTENSA_TOOLS_ROOT/$install_bin
|
||||
testbench_sections="-Wl,--sections-placement $BUILD_TESTBENCH_DIR/testbench_xcc_sections.txt"
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
}
|
||||
platform=$1
|
||||
|
||||
# If adding a new variable is required, avoid adding it to the mass
|
||||
# duplication in this first, very verbose `case` statement. Prefer
|
||||
# adding a new, smarter, per-variable `case` statement like the one for
|
||||
# ZEPHYR_TOOLCHAIN_VARIANT below
|
||||
case "$platform" in
|
||||
|
||||
# Intel
|
||||
|
@ -51,10 +55,6 @@ case "$platform" in
|
|||
PLATFORM="$platform"
|
||||
XTENSA_CORE="ace10_LX7HiFi4_2022_10"
|
||||
TOOLCHAIN_VER="RI-2022.10-linux"
|
||||
# TODO: to reduce duplication, make rebuild-testbench "smarter"
|
||||
# and able to decode ZEPHYR_TOOLCHAIN_VARIANT (even when it does
|
||||
# not care about Zephyr)
|
||||
COMPILER="xt-clang"
|
||||
;;
|
||||
|
||||
# NXP
|
||||
|
@ -137,3 +137,12 @@ case "$platform" in
|
|||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$platform" in
|
||||
imx8*|mtl|lnl)
|
||||
ZEPHYR_TOOLCHAIN_VARIANT='xt-clang';;
|
||||
*) # The previous, main case/esac already caught invalid input.
|
||||
# This won't hurt platforms that don't use Zephyr (it's not even
|
||||
# exported).
|
||||
ZEPHYR_TOOLCHAIN_VARIANT='xcc';;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue