compiler or kernel source defines

Anton Blanchard anton at
Fri Apr 13 09:23:48 EST 2001


> #ifdef defined(__powerpc__) and !defined(__PPC64__)
> 32 bit PPC kernel code
> #elif defined(__powerpc__) and defined(__PPC64__)
> 64 bit PPC kernel code
> #endif
>   Seems like the only risk here is that one always assumes to be using gcc and
> that's perfectly valid to me.

Thats what we do in the sparc port. We did have a problem where some
areas used sparc and not __sparc__ and the gcc guys decided to stop
gcc from definining it. But apart from that its been fine.


** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list