summaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-07-04 15:02:11 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-07-04 15:02:11 +0000
commit94eff1541df0fe389c3e5eee69bc4bf4e8661a79 (patch)
tree8bdcabf0bd7b330636f8a87c1fcd3d3d44d1d2dc /tools/configure
parent79a863b322e9a86c67223f4d1c8a9731cb7ae277 (diff)
downloadrockbox-94eff1541df0fe389c3e5eee69bc4bf4e8661a79.tar.gz
rockbox-94eff1541df0fe389c3e5eee69bc4bf4e8661a79.zip
Fix win32 simulator builds (tested cross compilation from linux)
- windows linker doesn't support -z defs - rename 'crosscompile' variable to 'win32crosscompile' to show its real meaning - do not test which host we are running on if we are cross compiling for win32 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27283 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/configure b/tools/configure
index c7185f0982..85736d5735 100755
--- a/tools/configure
+++ b/tools/configure
@@ -12,7 +12,7 @@
CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe"
# global LD options for all platforms
-GLOBAL_LDOPTS="-Wl,-z,defs"
+GLOBAL_LDOPTS=""
use_logf="#undef ROCKBOX_HAS_LOGF"
use_bootchart="#undef DO_BOOTCHART"
@@ -107,7 +107,7 @@ simcc () {
ARG_ARM_THUMB=0 # can't use thumb in native builds
simver=sdl
- winbuild="$crosscompile"
+ winbuild=""
GCCOPTS='-W -Wall -g -fno-builtin'
GCCOPTIMIZE=''
LDOPTS='-lm' # button-sdl.c uses sqrt()
@@ -118,6 +118,11 @@ simcc () {
# default share option, override below if needed
SHARED_FLAG="-shared"
+ if [ "$win32crosscompile" = "yes" ]; then
+ LDOPTS="$LDOPTS -mconsole"
+ output="rockboxui.exe"
+ winbuild="yes"
+ else
case $uname in
CYGWIN*)
echo "Cygwin host detected"
@@ -164,7 +169,9 @@ simcc () {
exit 1
;;
esac
+ fi
+ [ "$winbuild" != "yes" ] && GLOBAL_LDOPTS="$GLOBAL_LDOPTS -Wl,-z,defs"
sdl=`findsdl $winbuild`
if [ $1 = "sdl" ]; then
@@ -182,7 +189,7 @@ simcc () {
GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
- if test "X$crosscompile" != "Xyes"; then
+ if test "X$win32crosscompile" != "Xyes"; then
case `uname -m` in
x86_64|amd64)
# fPIC is needed to make shared objects link
@@ -483,7 +490,7 @@ whichadvanced () {
;;
[Ww])
echo "Enabling Windows 32 cross-compiling"
- crosscompile="yes"
+ win32crosscompile="yes"
;;
*)
if [ "$interact" ]; then