forked from len0rd/rockbox
Two fixes for crosscompiled win32 simulators: * Make crosscompiled sims a console application like on cygwin, so debug output to the console works again. * Kill the thousands of visibility warnings when crosscompiling a win32 sim on a 64 bit linux host. The 64 bit linker flags must not be used when cross-linking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17714 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0efad8d925
commit
9de0d813f4
1 changed files with 12 additions and 12 deletions
14
tools/configure
vendored
14
tools/configure
vendored
|
@ -42,9 +42,9 @@ crosswincc () {
|
|||
|
||||
prefixtools i586-mingw32msvc-
|
||||
|
||||
LDOPTS="-lgdi32 -luser32 -mwindows"
|
||||
# add cross-compiler option(s)
|
||||
GCCOPTS="$GCCOPTS -mno-cygwin"
|
||||
GCCOPTS="$GCCOPTS `sdl-config --cflags`"
|
||||
LDOPTS="`sdl-config --libs` -mconsole"
|
||||
|
||||
output="rockboxui.exe" # use this as output binary name
|
||||
crosscompile="yes"
|
||||
|
@ -129,13 +129,13 @@ simcc () {
|
|||
|
||||
Linux)
|
||||
echo "Linux host detected"
|
||||
GCCOPTS="$GCCOPTS"
|
||||
if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
|
||||
# Enable crosscompiling if sdl-config is from Windows SDL
|
||||
crosswincc
|
||||
fi
|
||||
else
|
||||
GCCOPTS="$GCCOPTS `sdl-config --cflags`"
|
||||
LDOPTS="`sdl-config --libs`"
|
||||
fi
|
||||
;;
|
||||
|
||||
FreeBSD)
|
||||
|
@ -159,6 +159,9 @@ simcc () {
|
|||
;;
|
||||
esac
|
||||
|
||||
GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
|
||||
|
||||
if test "X$crosscompile" != "Xyes"; then
|
||||
if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then
|
||||
# fPIC is needed to make shared objects link
|
||||
# setting visibility to hidden is necessary to avoid strange crashes
|
||||
|
@ -166,9 +169,6 @@ simcc () {
|
|||
GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden"
|
||||
fi
|
||||
|
||||
GCCOPTS="$GCCOPTS -I\$(SIMDIR)"
|
||||
|
||||
if test "X$crosscompile" != "Xyes"; then
|
||||
id=$$
|
||||
cat >/tmp/conftest-$id.c <<EOF
|
||||
#include <stdio.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue