From 9de0d813f4697b26e1bfbe8f6f90f20bcc22bae3 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 11 Jun 2008 18:45:16 +0000 Subject: 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 --- tools/configure | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tools/configure') diff --git a/tools/configure b/tools/configure index 324e7a3cc2..39b8d18a6e 100755 --- a/tools/configure +++ b/tools/configure @@ -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 + else + GCCOPTS="$GCCOPTS `sdl-config --cflags`" + LDOPTS="`sdl-config --libs`" fi - GCCOPTS="$GCCOPTS `sdl-config --cflags`" - LDOPTS="`sdl-config --libs`" ;; FreeBSD) @@ -159,16 +159,16 @@ simcc () { ;; esac - 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 - # due to symbol clashing - GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden" - fi - 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 + # due to symbol clashing + GCCOPTS="$GCCOPTS -fPIC -fvisibility=hidden" + fi + id=$$ cat >/tmp/conftest-$id.c < -- cgit v1.2.3