Possible duplicate:
CPU architecture compile time detection
Is there a definition that GCC installs, which indicates which CPU (x86 / amd64 / ppc / etc) GCC is configured for?
Therefore, I can use it like:
#ifdef PPCARCH
dosomething();
#endif
source
share