From 537e5832d9b3c060ca5cd4008db53ea7f52638c3 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 9 Aug 2024 23:11:53 +0000 Subject: [PATCH] rebuild-testbench.sh: switch to new SOF_CC_BASE variable It was awkward to depend on ZEPHYR_TOOLCHAIN_VARIANT when the testbench has absolutely nothing to do with it. Signed-off-by: Marc Herbert --- scripts/rebuild-testbench.sh | 10 ++-------- scripts/set_xtensa_params.sh | 6 +++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/rebuild-testbench.sh b/scripts/rebuild-testbench.sh index e9c386eb57ce..5204f90031e0 100755 --- a/scripts/rebuild-testbench.sh +++ b/scripts/rebuild-testbench.sh @@ -75,14 +75,8 @@ 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 + # This (local?) variable should probably be inlined + COMPILER=xt-"$SOF_CC_BASE" install_bin=install/tools/$TOOLCHAIN_VER/XtensaTools/bin tools_bin=$XTENSA_TOOLS_ROOT/$install_bin diff --git a/scripts/set_xtensa_params.sh b/scripts/set_xtensa_params.sh index fd48edf0bc13..37c2bdbdf09d 100644 --- a/scripts/set_xtensa_params.sh +++ b/scripts/set_xtensa_params.sh @@ -145,15 +145,15 @@ case "$platform" in ;; esac -# Pre-zephyr "XTOS" build +# Pre-zephyr "XTOS" build, testbench,... case "$platform" in - none_yet) + mtl|lnl) SOF_CC_BASE='clang';; *) SOF_CC_BASE='xcc';; esac -# For Zephyr unit tests, testbench,... +# For Zephyr unit tests case "$platform" in imx8*|mtl|lnl) ZEPHYR_TOOLCHAIN_VARIANT='xt-clang';;