Skip to content

Commit 1ce1b28

Browse files
marc-hbkv2019i
authored andcommitted
xtensa-build-all.sh: do not fallback on gcc when xcc dir is wrong
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>
1 parent 8236f38 commit 1ce1b28

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

scripts/xtensa-build-all.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,22 +210,17 @@ do
210210
XTENSA_TOOLS_DIR="$XTENSA_TOOLS_ROOT/install/tools/$TOOLCHAIN_VER"
211211
XTENSA_BUILDS_DIR="$XTENSA_TOOLS_ROOT/install/builds/$TOOLCHAIN_VER"
212212

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

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

228-
if [ "$XCC" == "xt-xcc" ]
223+
if [ -n "$XTENSA_TOOLS_ROOT" ]
229224
then
230225
TOOLCHAIN=xt
231226
ROOT="$XTENSA_BUILDS_DIR/$XTENSA_CORE/xtensa-elf"

0 commit comments

Comments
 (0)