This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how to specify the endianess for target machine?
- From: Ian Lance Taylor <ian at airs dot com>
- To: cyclops <cyclops64 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 24 May 2005 22:09:20 -0400
- Subject: Re: how to specify the endianess for target machine?
- References: <503d35a205052418491dd52681@mail.gmail.com>
cyclops <cyclops64@gmail.com> writes:
> In order to port GCC-4.0.0 to a new target machine, how to specify the
> endianness of the target machine? Through configure file or Header
> files?
>
> I read the gccint, but can not find how to do it.
Look again:
http://gcc.gnu.org/onlinedocs/gccint/Storage-Layout.html
Look at BITS_BIG_ENDIAN, BYTES_BIG_ENDIAN, WORDS_BIG_ENDIAN, all of
which appear in the tm.h file.
> /home/zeal/z64/src/newlib-1.10.0/newlib/libc/include/machine/ieeefp.h:199:2:
> error: #error Endianess not declared!!
Oh, that's a completely different problem. Look at that file. See
how each processor does something like
#ifdef __cputype__
#define __IEEE_BIG_ENDIAN
#endif
Ian