Add the option of cross compiling by default in build.sh.

Revert this or use useCross=0 for normal behaviour.
This commit is contained in:
Miguel A. Colón Vélez 2015-01-04 01:32:04 -05:00
parent 8440d263cd
commit 7c766e66ad

View File

@ -21,7 +21,7 @@ flags=(-DCMAKE_BUILD_PO=FALSE)
cleanBuild=0
useClang=0
# 0 => no, 1 => yes, 2 => force yes
useCross=0
useCross=2
for ARG in "$@"; do
case "$ARG" in
@ -81,6 +81,13 @@ if [[ "$cleanBuild" -eq 1 ]]; then
rm -fr $build/*
fi
if [[ "$useCross" -eq 2 ]] && [[ "$(getconf LONG_BIT 2> /dev/null)" != 32 ]]; then
echo "Forcing cross compilation."
flags+=(-DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake)
elif [[ "$useCross" -ne 1 ]]; then
useCross=0
fi
echo "Building pcsx2 with ${flags[*]}" | tee $log
# Resolve the symlink otherwise cmake is lost