SDL with gcc-fat

Hello !

When i compile SDL with fatbuild as a Univ. Binary
everything works great. When i compile it with my gcc-fat,
it also compiles to the end, but only halve of the test
examples work. testgl and testdyngl work, but not testsprite
or testwin. testsprite prints an error about too large image.
But hey this is the normal icon.bmp.

Has anybody an idea why this happens ?

I tried a lot of things, changing the SDK settings,
disable altivec and disable nasm and so on.

When compiling the SDL helper libs. with my gcc-fat they
work. Also ZLIB, LIBJPEG and LIBPNG. They are more or less
data libs, but also FLTK-1 compiles and works without problems.

CU

When i compile SDL with fatbuild as a Univ. Binary
everything works great. When i compile it with my gcc-fat,
it also compiles to the end, but only halve of the test
examples work. testgl and testdyngl work, but not testsprite
or testwin. testsprite prints an error about too large image.
But hey this is the normal icon.bmp.

Has anybody an idea why this happens ?

Probably it’s building the Intel version with something like POWERPC
defined, or vice versa…this will cause byteswapping to happen on data
it shouldn’t, so things like standard files will get outrageous values
where they shouldn’t.

Can you send me (not the mailing list) the actual calls to gcc that
happen when you build with gcc-fat? There’s probably a -D option that is
getting passed in to both architecture’s compiles that shouldn’t be.

–ryan.

Hello !

Probably it’s building the Intel version with something like POWERPC
defined, or vice versa…this will cause byteswapping to happen on data it
shouldn’t, so things like standard files will get outrageous values where
they shouldn’t.

YOU ARE A GENIUS. That was exactly the problem.

Not a define, but SDL checks for what endianess the
system has and then puts it into SDL_config.h

As i call GCC_PPC first and then GCC_X86, it got the idea that
the actual system uses LITTLE ENDIAN. configure always has to fail,
what should it detect as i want to compile for a LITTLE- and BIG
ENDIAN system.

I will work around this by putting a #ifndef BUILD_WITH_GCCFAT
into SDL_config. When BUILD_WITH_GCCFAT is not defined it will
use the normal cases, when i define BUILD_WITH_GCC i will call the
build with the correct SDL_BYTEORDER define manually.

This should not break existing stuff.

I will add a way to add special COMPILE_PPC, LINK_PPC,
COMPILE_X86, LINK_X86 flags to my gcc-fat.

http://www.syntheticsw.com/~wizard/tmp/gcc-fat-v0.1.0.tar.gz

CU

Hello !

Probably it’s building the Intel version with something like POWERPC
defined, or vice versa…this will cause byteswapping to happen on data
it shouldn’t, so things like standard files will get outrageous values
where they shouldn’t.

Can you send me (not the mailing list) the actual calls to gcc that
happen when you build with gcc-fat? There’s probably a -D option that is
getting passed in to both architecture’s compiles that shouldn’t be.

Thanks for the tipps on this. Many Sources have these problems.
This brings an interesting question to me, how is this solved
when building Uni. Binaries from SDL with XCode ?

CU

I don’t remember adding many (if at all) -D flags for the Xcode side.
I think we just punt and let Xcode do its thing. Either it works or
nobody has caught the bugs.

-EricOn 2/26/07, Torsten Giebl wrote:

Hello !

Probably it’s building the Intel version with something like POWERPC
defined, or vice versa…this will cause byteswapping to happen on data
it shouldn’t, so things like standard files will get outrageous values
where they shouldn’t.

Can you send me (not the mailing list) the actual calls to gcc that
happen when you build with gcc-fat? There’s probably a -D option that is
getting passed in to both architecture’s compiles that shouldn’t be.

Thanks for the tipps on this. Many Sources have these problems.
This brings an interesting question to me, how is this solved
when building Uni. Binaries from SDL with XCode ?

CU


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I don’t remember adding many (if at all) -D flags for the Xcode side.
I think we just punt and let Xcode do its thing. Either it works or
nobody has caught the bugs.

The XCode project doesn’t use SDL_config.h.in, which the configure
script uses to write out the #define SDL_BYTEORDER.

–ryan.