[macstl-dev] Secret incantations of the vector masters...
glen.low at pixelglow.com
Fri Jun 3 23:01:55 WST 2005
I've got vector code (macstl -- what else!) that needs to compile
1. Apple gcc 3.3 with -faltivec
2. Mainline gcc 3.4 with -maltivec
3. Apple gcc 4.0 with -faltivec -maltivec
4. Mainline gcc 4.0 with -maltivec
On 1 and 3, the Altivec intrinsics are builtin and vector, bool and
pixel are automatically contextualized keywords. On 2 and 4, the
Altivec intrinsics need to be #include <altivec.h> and vector, bool
and pixel are not keywords (but they are, ugh, defined through macros
What combination of #ifdef macros and secret handshakes will allow me
to navigate this wasteland??
A. Nicely enough, Apple gcc 4.0 -faltivec defines
__APPLE_ALTIVEC__, which works as advertised and keeps me happy for
gcc > 4.0. But it fails on #1.
B. I thought __APPLE_CC__ would do the trick, but apparently
mainline gcc also defines it. See e.g. http://archive.netbsd.se/?
ml=gcc&a=2004-12&t=893594. Go figure!!
Cheers, Glen Low
pixelglow software | simply brilliant stuff
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macstl-dev