diff --git a/scripts/xtensa-build-all.sh b/scripts/xtensa-build-all.sh index 981ad81ff..f12bf197b 100755 --- a/scripts/xtensa-build-all.sh +++ b/scripts/xtensa-build-all.sh @@ -392,6 +392,8 @@ do then TOOLCHAIN=xt ROOT="$XTENSA_BUILDS_DIR/$XTENSA_CORE/xtensa-elf" + # CMake cannot set (evil) build-time environment variables at configure time: +# https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#how-can-i-get-or-set-environment-variables export XTENSA_SYSTEM=$XTENSA_BUILDS_DIR/$XTENSA_CORE/config printf 'XTENSA_SYSTEM=%s\n' "${XTENSA_SYSTEM}" PATH=$XTENSA_TOOLS_DIR/XtensaTools/bin:$OLDPATH diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 992491987..256158e2f 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -464,7 +464,9 @@ def build_platforms(): print(f"XTENSA_TOOLCHAIN_PATH={XTENSA_TOOLCHAIN_PATH}") print(f"TOOLCHAIN_VER={TOOLCHAIN_VER}") - # set variables expected by xcc toolchain + # Set variables expected by xcc toolchain. CMake cannot set (evil) build-time + # environment variables at configure time: + # https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#how-can-i-get-or-set-environment-variables XTENSA_BUILDS_DIR=str(pathlib.Path(xtensa_tools_root_dir, "install", "builds", TOOLCHAIN_VER).absolute()) XTENSA_SYSTEM = str(pathlib.Path(XTENSA_BUILDS_DIR, XTENSA_CORE, "config").absolute())