scripts: fix xt-xcc build with wrong config

Need to export XTENSA_SYSTEM and override OBJCOPY and OBJDUMP for xt-xcc
build.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2018-06-19 18:02:46 +08:00 committed by Liam Girdwood
parent 6fd219cda3
commit 27795ece0f
1 changed files with 7 additions and 2 deletions

View File

@ -124,8 +124,12 @@ do
if [ -d $XTENSA_TOOLS_DIR ]
then
XCC="xt-xcc"
XTOBJCOPY="xt-objcopy"
XTOBJDUMP="xt-objdump"
else
XCC="none"
XTOBJCOPY="none"
XTOBJDUMP="none"
fi
fi
@ -133,13 +137,14 @@ do
if [ $XCC == "xt-xcc" ]
then
ROOT="$XTENSA_BUILDS_DIR/$XTENSA_CORE/xtensa-elf"
XTENSA_SYSTEM=$XTENSA_BUILDS_DIR/$XTENSA_CORE/config
export XTENSA_SYSTEM=$XTENSA_BUILDS_DIR/$XTENSA_CORE/config
PATH=$XTENSA_TOOLS_DIR/XtensaTools/bin:$OLDPATH
else
PATH=$pwd/../$HOST/bin:$OLDPATH
fi
./configure --with-arch=xtensa --with-platform=$PLATFORM --with-root-dir=$ROOT --host=$HOST CC=$XCC --with-dsp-core=$XTENSA_CORE
./configure --with-arch=xtensa --with-platform=$PLATFORM --with-root-dir=$ROOT --host=$HOST \
CC=$XCC OBJCOPY=$XTOBJCOPY OBJDUMP=$XTOBJDUMP --with-dsp-core=$XTENSA_CORE
make clean
make