summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-06-05 17:09:04 +0000
committerThomas Martitz <kugel@rockbox.org>2010-06-05 17:09:04 +0000
commitefbc5df5f7b0b5a79c0e9883e4507d8fe0ce7cf5 (patch)
treeb89c770be37c43f2f692f1ede9567e6ce7cd6d85 /tools
parent6ea6dce4b5618806bd5e766f870531fafade3721 (diff)
Look for CROSS_COMPILE when building the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26589 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure13
1 files 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-)