This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#5858 - Allow cross-compiling W32 sdl sim
Attached to Project:
Rockbox
Opened by Jonas Häggqvist (rasher) - Sunday, 20 August 2006, 02:02 GMT+2
Last edited by Rani Hod (RaeNye) - Friday, 22 September 2006, 02:08 GMT+2
Opened by Jonas Häggqvist (rasher) - Sunday, 20 August 2006, 02:02 GMT+2
Last edited by Rani Hod (RaeNye) - Friday, 22 September 2006, 02:08 GMT+2
|
DetailsThis patch will allow you to crosscompile the SDL simulator for Windows from Linux.
You will need a cross-compiled version of SDL as well. With this patch applied, the following steps are necessary to produce your first crosscompiled build: First you need to build SDL: ./configure --host=i586-mingw32msvc --prefix=$PREFIX make && make install You really should set a prefix, since the sdl-config will overwrite your native sdl-config otherwise. After that, you just need to run rockbox configure with PATH set so the crosscompiled sdl-config is first PATH=$PREFIX/bin:${PATH} ../tools/configure make |
This task depends upon
Closed by Jonas Häggqvist (rasher)
Friday, 03 November 2006, 23:15 GMT+2
Reason for closing: Accepted
Additional comments about closing: I\'ll close this. The remaining problem can be opened as a bug if it turns out to be a problem for anyone.
Friday, 03 November 2006, 23:15 GMT+2
Reason for closing: Accepted
Additional comments about closing: I\'ll close this. The remaining problem can be opened as a bug if it turns out to be a problem for anyone.
1) Is this the proper place in the script to place this check (inside simcc)?
2) Should I ditch the question entirely, so I simply check if sdl-config is from a windows SDL, and then crosscompile if it is (assuming that, if that's the case, the person must know what he's doing (seeing as he's already crosscompiled SDL and set PATH accordingly)?
So this:
echo "Crosscompile for windows?"
cross=`input`
case "$cross" in
y|Y|yes|Yes)
if [ "0" == `sdl-config --libs |grep -c mwindows` ]; then
echo "Error: `which sdl-config` doesn't look like a windows sdl-config"
exit
fi
crosswincc
;;
esac
Turns into this:
if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
crosswincc
fi
if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then
__crosswincc
fi
In the sdl sim part, which is enough. Is that fine to commit? (can't see how it'd hurt anything, if people has a cross-compiled sdl lying around, there's probably a reason).
One thing though - the binaries are huge. The codecs will not fit the codec buffer and so on. They really need to be stripped before being usable. What to do?
For now, I have created a "strip" target in the makefile, which works fine, but it seems like I should not have to do that.
Slightly related, is there any reason to display the sim-version choser anymore? The x11 and win32 sim are completely gone now, not just hidden. Simply hardcoding it to sdl, and skipping the question seems the simplest way to go about it, allowing to add back another version with minimal inconvenience.
Or should I completely rip out all parts that deal with the differing sim-version, and put that in another task?
The AAC codec is >1mb, so that and a few others will not run at all. I'm sure many of the plugins are huge as well. rockbox.zip ends up being >10mb.
Do you know if this is the case when the sim is built with cygwin as well?
Also, is the sim "standalone" when compiled with cygwin, or will it require cygwin dlls?
$ ls -l h120-sim{,-w32}/apps/codecs/aac.codec
-rw-r--r-- 1 rasher rasher 1074515 Aug 21 09:36 h120-sim-w32/apps/codecs/aac.codec
-rw-r--r-- 1 rasher rasher 675669 Aug 21 09:38 h120-sim/apps/codecs/aac.codec
Are windows binaries simply huge, is this a problem with mingw, or do I need to set/unset some flags or something?
Can I avoid the binaries getting this big, or will I need to add the method of running strip after compiling?
How likely is it though, that someone builds the sim on Linux, to run it on windows to use gdb with it?
export LDOPTS=-s -L/home/rasher/rockbox/build-env/w32/lib -lmingw32 -lSDLmain -lSDL -mwindows
Would there be any objections to committing the simple version, that produces large binaries (but otherwise works fine)?
Would it be okay to commit the version that simply enables crosscompiling, hoping someone else could fix this? It's not like it breaks anything, it just doesn't work as good as it could.
Maybe that's the problem?
If someone with a bit more knowledge of the whole build-system and/or building stuff in general could try out crosscompiling, it'd be much appreciated.