[SDL] compiling SDL-1.2.12 with CFLAGS="-mcpu=G4" fails
Ryan C. Gordon
icculus at icculus.org
Sat Nov 17 21:18:57 PST 2007
matt hull wrote:
> it compiles. i was asking a few other people and they said its a gcc
> problem. do you know anything more on that ?
It's not a bug, really.
It's trying to use an altivec extension in one of the headers. It sees
an #ifdef that suggests the target CPU definitely has Altivec support,
and then includes some Altivec functionality.
The problem is GCC doesn't understand the Altivec extension keywords and
assumes it's a syntax error, if you don't use -faltivec. It can't turn
this option on by default with -mcpu=G4, because words like "vector"
might be used in your legitimate C program that have nothing to do with
Altivec.
So in this case, if you use one flag, use the other, too.
--ryan.
More information about the SDL
mailing list