* how to specify the endianess for target machine?
@ 2005-05-25 1:49 cyclops
2005-05-25 2:09 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: cyclops @ 2005-05-25 1:49 UTC (permalink / raw)
To: gcc-help
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.
Any suggestion would be nice.
I can already compile the whole gcc-4.0.0 for my target machine,
however when I use the gcc to compile the newlib, I got an error:
Making all in stdlib
make[3]: Entering directory
`/home/zeal/z64/build/dirnewlib/z6464-linux-elf/newlib/libc/stdlib'
z6464-linux-elf-gcc
-B/home/zeal/z64/build/dirnewlib/z6464-linux-elf/newlib/ -isystem
/home/zeal/z64/build/dirnewlib/z6464-linux-elf/newlib/targ-include
-isystem /home/zeal/z64/src/newlib-1.10.0/newlib/libc/include
-DPACKAGE=\"newlib\" -DVERSION=\"1.10.0\" -I.
-I/home/zeal/z64/src/newlib-1.10.0/newlib/libc/stdlib -O1
-I../../targ-include
-I/home/zeal/z64/src/newlib-1.10.0/newlib/libc/../libc/include
-fno-builtin -O1 -w -c
/home/zeal/z64/src/newlib-1.10.0/newlib/libc/stdlib/__adjust.c
In file included from
/home/zeal/z64/src/newlib-1.10.0/newlib/libc/include/math.h:10,
from
/home/zeal/z64/src/newlib-1.10.0/newlib/libc/stdlib/std.h:5,
from
/home/zeal/z64/src/newlib-1.10.0/newlib/libc/stdlib/__adjust.c:7:
/home/zeal/z64/src/newlib-1.10.0/newlib/libc/include/machine/ieeefp.h:199:2:
error: #error Endianess not declared!!
make[3]: *** [__adjust.o] Error 1
It seems this is because of the Endianess problem.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how to specify the endianess for target machine?
2005-05-25 1:49 how to specify the endianess for target machine? cyclops
@ 2005-05-25 2:09 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2005-05-25 2:09 UTC (permalink / raw)
To: cyclops; +Cc: gcc-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-25 2:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-25 1:49 how to specify the endianess for target machine? cyclops
2005-05-25 2:09 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).