forked from len0rd/rockbox
Improve sim win32 cross compiling.
- Extend configure to allow setting the cross compiler prefix using the environment variable CROSS. This allows using a compiler that is prefixed differently than the prefix configure does assume. - When searching for sdl-config also check for a prefixed version. Some toolchains prefix sdl-config (like mingw-cross-env). This enables cross compiling the sim with at least the MinGW packages provided by Fedora (different prefix) and mingw-cross-env (different prefix and prefixes sdl-config. There's a non-prefixed version as well, but that folder also includes the non-prefixed compiler, so using the prefixed version is preferable.) starting git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30484 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
385af791f1
commit
e6317d51e9
1 changed files with 21 additions and 16 deletions
11
tools/configure
vendored
11
tools/configure
vendored
|
|
@ -147,10 +147,13 @@ findtool(){
|
||||||
# scan the $PATH for sdl-config - check whether for a (cross-)win32
|
# scan the $PATH for sdl-config - check whether for a (cross-)win32
|
||||||
# sdl as requested
|
# sdl as requested
|
||||||
findsdl(){
|
findsdl(){
|
||||||
file="sdl-config"
|
# sdl-config might (not) be prefixed for cross compiles so try both.
|
||||||
|
files="sdl-config:${CROSS}sdl-config"
|
||||||
winbuild="$1"
|
winbuild="$1"
|
||||||
|
|
||||||
IFS=":"
|
IFS=":"
|
||||||
|
for file in $files
|
||||||
|
do
|
||||||
for path in $PATH
|
for path in $PATH
|
||||||
do
|
do
|
||||||
#echo "checks for $file in $path" >&2
|
#echo "checks for $file in $path" >&2
|
||||||
|
|
@ -168,6 +171,7 @@ findsdl(){
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for availability of sigaltstack to support our thread engine
|
# check for availability of sigaltstack to support our thread engine
|
||||||
|
|
@ -233,6 +237,7 @@ simcc () {
|
||||||
LDOPTS="$LDOPTS -mconsole"
|
LDOPTS="$LDOPTS -mconsole"
|
||||||
output="$output.exe"
|
output="$output.exe"
|
||||||
winbuild="yes"
|
winbuild="yes"
|
||||||
|
CROSS=${CROSS:-"i586-mingw32msvc-"}
|
||||||
SHARED_CFLAGS=''
|
SHARED_CFLAGS=''
|
||||||
else
|
else
|
||||||
case $uname in
|
case $uname in
|
||||||
|
|
@ -360,7 +365,7 @@ EOF
|
||||||
else
|
else
|
||||||
# We are crosscompiling
|
# We are crosscompiling
|
||||||
# add cross-compiler option(s)
|
# add cross-compiler option(s)
|
||||||
prefixtools i586-mingw32msvc-
|
prefixtools $CROSS
|
||||||
LDOPTS="$LDOPTS -mconsole"
|
LDOPTS="$LDOPTS -mconsole"
|
||||||
fibers=`check_fiber`
|
fibers=`check_fiber`
|
||||||
output="rockboxui.exe"
|
output="rockboxui.exe"
|
||||||
|
|
@ -3445,7 +3450,7 @@ else
|
||||||
""|"$CROSS_COMPILE")
|
""|"$CROSS_COMPILE")
|
||||||
# simulator
|
# simulator
|
||||||
;;
|
;;
|
||||||
i586-mingw32msvc-)
|
${CROSS})
|
||||||
# cross-compile for win32
|
# cross-compile for win32
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue