config/functions: add support for 'setup_toolchain() init' and 'setup_toolchain() bootstrap'

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2016-09-23 14:29:49 -07:00 committed by Lukas Rusak
parent 564fb3e4b3
commit 734003bbeb
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3
2 changed files with 3 additions and 7 deletions

View File

@ -1,6 +1,6 @@
setup_toolchain() { setup_toolchain() {
case "$1" in case "$1" in
target) target|init)
export DESTIMAGE="target" export DESTIMAGE="target"
export CC="$TARGET_CC" export CC="$TARGET_CC"
export CXX="$TARGET_CXX" export CXX="$TARGET_CXX"
@ -39,7 +39,7 @@ setup_toolchain() {
export _python_prefix=/usr export _python_prefix=/usr
export _python_exec_prefix=/usr export _python_exec_prefix=/usr
;; ;;
host) host|bootstrap)
export DESTIMAGE="host" export DESTIMAGE="host"
export AWK=$HOST_AWK export AWK=$HOST_AWK
export CC="$HOST_CC" export CC="$HOST_CC"

View File

@ -66,11 +66,7 @@ fi
if [ ! -f $STAMP ]; then if [ ! -f $STAMP ]; then
rm -f $STAMP rm -f $STAMP
if [ "$TARGET" = "bootstrap" -o "$TARGET" = "init" ]; then setup_toolchain $TARGET
setup_toolchain target
else
setup_toolchain $TARGET
fi
# unset functions # unset functions
unset -f pre_build_target unset -f pre_build_target