[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: default definition in arm C environment



On Sun, Aug 01, 2004 at 02:23:24PM -0400, Chris Gorman wrote:

[Please do not cross-post between lists, especially cross-posting to
 subscriber-only lists like linux-arm is considered rude.]

> I'm trying to set some architecture specific definitions in the
> vorbis-tools package so that when building on arm it will use a different
> library than on non-arm.  The reason for this is I want to use a fixed
> point vorbis decoding library and header files when building on arm.
> 
> Is there a predefined definition passed by the gcc environment that I can
> use?  For example, if I use
> 
> #include <stdio.h>
> 
> int main (int argc, char ** argv) {
> 
> #ifdef MAGIC_DEFINITION
> printf("success\n");
> #else
> printf("failure\n");
> #endif /* MAGIC_DEFINITION */
> return 0;
> 
> }

"gcc -dumpspecs" will tell you, look at "predefines".

If vorbis use autoconf/automake, the trick is to define macros
or compile certain libraries depending on the target selection and not
to rely on gcc dependencies.


Erik

-- 
----  Erik Mouw  ----  www.bitwizard.nl  ----  +31 15 2600 998  ----



Reply to: