This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to specify the endianess for target machine?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]