[macstl-dev] Secret incantations of the vector masters...

Glen Low glen.low at pixelglow.com
Fri Jun 3 23:01:55 WST 2005

  • Previous message: [macstl-dev] macstl wrapper
  • Next message: [macstl-dev] Integrating Linux changes, or that funny return type issue
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]


Hi All

I've got vector code (macstl -- what else!) that needs to compile  
correctly on:

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  
in <altivec.h>).

What combination of #ifdef macros and secret handshakes will allow me  
to navigate this wasteland??

Some clues:

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
www.pixelglow.com
aim: pixglen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pixelglow.com/lists/archive/macstl-dev/attachments/20050603/733d137e/attachment.html

  • Previous message: [macstl-dev] macstl wrapper
  • Next message: [macstl-dev] Integrating Linux changes, or that funny return type issue
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the macstl-dev mailing list