Pre defined #defines for different cross compilers ?

Anton Erasmus antera@intekom.co.za
Tue Sep 30 17:54:00 GMT 2003


On 2003/09/29 at 07:20 Dan Kegel wrote:

>Anton Erasmus wrote:
>> Are there any documentation that describes the more generic #defines ?
>> I.e. Like a #define which is defined if the compiler generates Big
>Endian code,
>> or a #define which is defined if int is 32bit.
>> The idea is to try and write code which will be portable even across
>future versions
>> of gcc for 64 bit and other architectures. 
>
>#include <stdint.h> is the place to go for int size portability, I think.
>
>There is some notion of endianness defined in
>#include <endian.h>
>Not sure how portable that is, though.
>
>Otherwise, autoconf's the place to go for that sort of thing, really.
>The newer versions of autoconf are pretty good; I use
>them for detecting endianness at compile time,
>and they don't rely on any gcc extensions.
>- Dan
>

As far as I understand autoconf, configures for the platform one is
compiling on. Can one say configure on a cygwin host for a program
that will run on a mips machine under linux ? The only info regarding
the target environment as far as I can see is within the cross compile
tool environment.

Regards
   Anton Erasmus


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list