1
0
mirror of https://github.com/netsurf-browser/netsurf synced 2024-12-24 21:16:50 +03:00

env.sh: Reorder to prefer cross env, and export that to build system

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-05-22 10:05:48 +01:00
parent de56170cb9
commit 8bef50aae2
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74

View File

@ -198,7 +198,7 @@ if [ "x${HOST}" = "x" ]; then
HOST=${TARGET_ABI} HOST=${TARGET_ABI}
fi fi
else else
HOST_CC_LIST="${HOST}-cc ${HOST}-gcc /opt/netsurf/${HOST}/cross/bin/${HOST}-cc /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc" HOST_CC_LIST="/opt/netsurf/${HOST}/cross/bin/${HOST}-cc /opt/netsurf/${HOST}/cross/bin/${HOST}-gcc ${HOST}-cc ${HOST}-gcc"
for HOST_CC_V in $(echo ${HOST_CC_LIST});do for HOST_CC_V in $(echo ${HOST_CC_LIST});do
HOST_CC=$(${WHICH_CMD} ${HOST_CC_V}) HOST_CC=$(${WHICH_CMD} ${HOST_CC_V})
if [ "x${HOST_CC}" != "x" ];then if [ "x${HOST_CC}" != "x" ];then
@ -213,9 +213,13 @@ else
HOST_CC_MACHINE=$(${HOST_CC} -dumpmachine 2>/dev/null) HOST_CC_MACHINE=$(${HOST_CC} -dumpmachine 2>/dev/null)
if [ "${HOST_CC_MACHINE}" != "${HOST}" ];then if [ "${HOST_CC_MACHINE}" != "${HOST}" ];then
echo "Compiler dumpmachine differes from HOST setting" echo "Compiler dumpmachine differs from HOST setting"
return 2 return 2
fi fi
NS_ENV_CC="${HOST_CC}"
export NS_ENV_CC
unset HOST_CC_LIST HOST_CC_V HOST_CC HOST_CC_MACHINE unset HOST_CC_LIST HOST_CC_V HOST_CC HOST_CC_MACHINE
fi fi