Hallo Forum. Ich suche eine Möglichkeit festzustellen ob ich den Code grade für meinen Rechner (Host, X86 oder x64_X86) oder einen beliebigen Embedded Prozessor kompiliere. Meine Hoffnung ist dass der GCC ein Define setzt wie z.B.:
1 | |
2 | |
3 | |
4 | |
5 | |
Gibt es ein ein Define welches der GCC automatisch setzt? Scheinbar habe ich nicht das passende ge-guurgelt. [edit:] Manchmal ist man einfach zu doof es zu finden... Für alle die das gleiche mal suchen: http://www.atmel.com/webdoc/AVRLibcReferenceManual/using_tools_1using_avr_gcc_mach_opt.html "In addition to the preprocessor macros indicated in the tables below, the preprocessor will define the macros __AVR and __AVR__ (to the value 1) when compiling for an AVR target."