可能重複:
Detecting CPU architecture compile-time檢測GCC配置了哪個目標CPU?
是否有一個定義GCC套它告訴哪個CPU(86/AMD64/PPC /等)GCC被配置用於?
因此,我可以使用它像:
#ifdef PPCARCH
dosomething();
#endif
可能重複:
Detecting CPU architecture compile-time檢測GCC配置了哪個目標CPU?
是否有一個定義GCC套它告訴哪個CPU(86/AMD64/PPC /等)GCC被配置用於?
因此,我可以使用它像:
#ifdef PPCARCH
dosomething();
#endif
用於編譯代碼或gcc本身? – Aftnix
http://sourceforge.net/apps/mediawiki/predef/index.php?title=建築 - 但我不確定這有多準確。 –
@Banthar,我會接受這個答案。 –