From efbc5df5f7b0b5a79c0e9883e4507d8fe0ce7cf5 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sat, 5 Jun 2010 17:09:04 +0000 Subject: Look for CROSS_COMPILE when building the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26589 a1c6a512-1295-4272-9138-f99709370657 --- tools/configure | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/configure b/tools/configure index 505598fba1..7c41a0b182 100755 --- a/tools/configure +++ b/tools/configure @@ -97,7 +97,7 @@ findsdl(){ simcc () { # default tool setup for native building - prefixtools "" + prefixtools "$CROSS_COMPILE" simver=sdl winbuild="$crosscompile" @@ -204,7 +204,10 @@ EOF $CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null - if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then + # when cross compiling, the endianess cannot be detected because the above program doesn't run + # on the local machine. assume little endian but print a warning + endian=`$tmpdir/conftest-$id 2> /dev/null` + if [ "$endian" != "" ] && [ $endian -gt "1" ]; then # big endian endian="big" else @@ -212,6 +215,10 @@ EOF endian="little" fi + if [ "$CROSS_COMPILE" != "" ]; then + echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!" + fi + if [ $1 = "sdl" ]; then echo "Simulator environment deemed $endian endian" elif [ $1 = "checkwps" ]; then @@ -2841,7 +2848,7 @@ else fi case $prefix in - "") + ""|"$CROSS_COMPILE") # simulator ;; i586-mingw32msvc-) -- cgit v1.2.3