Re: default definition in arm C environment
On Sun, Aug 01, 2004 at 02:23:24PM -0400, Chris Gorman wrote:
> and build this with 'gcc foo.c -o foo' without a -DMAGIC_DEFINITION is
> there any 'MAGIC_DEFINITION' which will yield 'success' in a default arm
> gcc environment?
You might try the symbol __arm__ for this. If you need more detailed
version (arm sub-architecture) then have a look at the cpp_cpu_arch
definitions in gcc spec file (gcc -dumpspecs will show this).
Note that this sort of coding makes it hard to cross-compile your
package. A more traditional way to achieve the same goal is to use
either autoconf or just to call "uname -a" from the makefile to determine
the system type.