Skip to content

Commit

Permalink
xtensa-build-all.sh: do not fallback on gcc when xcc dir is wrong
Browse files Browse the repository at this point in the history
If the user requested the Cadence toolchain by defining
$XTENSA_TOOLS_ROOT, then do not "correct" the user and fallback on gcc
when that variable is wrong. Fail and point at the problem instead. No
one ever pays attention to build logs; as shown by new warnings being
submitted on a regular basis.

This also removes the local variable "XCC", the name of which was
collision-prone and confusingly capitalized.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb authored and kv2019i committed Aug 14, 2024
1 parent 8236f38 commit 1ce1b28
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions scripts/xtensa-build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,22 +210,17 @@ do
XTENSA_TOOLS_DIR="$XTENSA_TOOLS_ROOT/install/tools/$TOOLCHAIN_VER"
XTENSA_BUILDS_DIR="$XTENSA_TOOLS_ROOT/install/builds/$TOOLCHAIN_VER"

# make sure the required version of xtensa tools is installed
if [ -d "$XTENSA_TOOLS_DIR" ]
then
XCC="xt-xcc"
else
XCC="none"
>&2 printf 'WARNING: %s
\t is not a directory, reverting to gcc\n' "$XTENSA_TOOLS_DIR"
fi
[ -d "$XTENSA_TOOLS_DIR" ] || {
>&2 printf 'ERROR: %s\t is not a directory\n' "$XTENSA_TOOLS_DIR"
exit 1
}
fi

# CMake uses ROOT_DIR for includes and libraries a bit like
# --sysroot would.
ROOT="$SOF_TOP/../xtensa-root/$HOST"

if [ "$XCC" == "xt-xcc" ]
if [ -n "$XTENSA_TOOLS_ROOT" ]
then
TOOLCHAIN=xt
ROOT="$XTENSA_BUILDS_DIR/$XTENSA_CORE/xtensa-elf"
Expand Down

0 comments on commit 1ce1b28

Please sign in to comment.