[SDL] gcc-3.4.0 / PIC fix
stephane.marchesin at wanadoo.fr
Mon May 3 13:11:21 PDT 2004
Mike Frysinger wrote:
>when building with -fPIC and gcc-3.4.0, a few files fail to compile
> this one is easy to fix ... find patch attached
Your patch is fine, but I added some x86_64 support that I had lying in
my SDL tree (and it makes the code shorter and cleaner anyway).
> this one claims ebx gets clobbered yet the asm saves/restores it ? removing
>it from the clobber list 'fixes' the problem since in reality it isn't
I don't like push/pops too much, but I see no other way. Using push/pop
means you have to be sure you can touch the stack which is not always
the case (for example with inlined functions).
> perhaps remove ebx from the clobber list and push/pop it in the same manner
>as SDL_yuv_mmx.c ?
We can simply remove ebx from the clobber list, since it's already saved
A modified patch is attached, tested with gcc 3.3.1 and 2.96. Could you
report if this works with 3.4.0 please (it seems it's not yet packaged
by my distro) ?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the SDL