From 7c766e66add9512290c3174ddaa8bb7f841bcade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Sun, 4 Jan 2015 01:32:04 -0500 Subject: [PATCH] Add the option of cross compiling by default in build.sh. Revert this or use useCross=0 for normal behaviour. --- build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index e65352edd..d8efb61fd 100755 --- a/build.sh +++ b/build.sh @@ -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