Cross compiling SDL libraries

A while back there was a question about how to cross build win32 DLLs for the
various SDL libraries without debug info (they are quite large with debug
info).

The answer turns out to be simple. Before running cross-configure.sh, do this:

export CFLAGS="-O2 -Wall"
export CXXFLAGS="-O2 -Wall"

Then build just like normal. The resulting SDL.dll file will be much smaller.
I compiled the CVS version tonight and got a file that was less than 300K,
previously it 1.6 megs.

-Ray

Hi all,

Thanks Ray, for this tip … should make it into the FAQ in my view.

But to solve the “strip-problem” once and for all, I’ve assembled a new
cross-compiler distro that works with SDL with the help of Reinhard
Jessich’s magic cross-mingw.sh script. Using the newer compiler and
binutils one can strip .EXEs and .DLLs without breaking them (i.e. the
build configuration doesn’t matter anymore).

This is not very well tested and should be considered beta - but SDL and
SDL-tests compile and run. I would welcome any reports where this
works/doesn’t work.

Get it from here:

http://www.ferzkopp.net/Software/CrossMingw/index.html

To use: backup your old /usr/local/cross-tools and untar into /usr/local

Ciao
Andreas

Ray Kelm wrote:>

A while back there was a question about how to cross build win32 DLLs for the
various SDL libraries without debug info (they are quite large with debug
info).

The answer turns out to be simple. Before running cross-configure.sh, do this:

export CFLAGS="-O2 -Wall"
export CXXFLAGS="-O2 -Wall"

Then build just like normal. The resulting SDL.dll file will be much smaller.
I compiled the CVS version tonight and got a file that was less than 300K,
previously it 1.6 megs.

-Ray

But to solve the “strip-problem” once and for all, I’ve assembled a new
cross-compiler distro that works with SDL with the help of Reinhard
Jessich’s magic cross-mingw.sh script. Using the newer compiler and
binutils one can strip .EXEs and .DLLs without breaking them (i.e. the
build configuration doesn’t matter anymore).

This is not very well tested and should be considered beta - but SDL and
SDL-tests compile and run. I would welcome any reports where this
works/doesn’t work.

Get it from here:

http://www.ferzkopp.net/Software/CrossMingw/index.html

The strip included with the officially blessed mingw32 cross-compiler
does work. The problem is that the resulting DLL library will not be
loaded by Windows 95B. Can you test your stripped library on that
configuration?

See ya!
-Sam Lantinga, Lead Programmer, Loki Software, Inc.