Altivec conditional?

Geoff Keating geoffk@geoffk.org
Fri Feb 22 18:36:00 GMT 2002


Daniel Egger <degger@fhm.edu> writes:

> Am Don, 2002-02-21 um 08.49 schrieb Aldy Hernandez:
> 
> > __ALTIVEC__
>  
> > but you have to include <altivec.h>
> 
> But I can only include <altivec.h> if I have a capable compiler.
> That's not going to work as it's a chicken egg problem.

If you don't want to use autoconf, the way to determine compiler
capabilities is to key off __GNUC__ and __GNUC_MINOR__ and so on.  Of
course, it's ugly, but presumably you already key off __aix__ and
__linux__ and __cygwin__ and so on, so what's one more?

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>



More information about the Gcc mailing list