Big-endian in combined one-pass build

Mon Jan 24 21:44:00 GMT 2011

Hi all,
I am trying to compile GCC 4.5.1 and newlib-1.18.0 in one-pass
combined build. I created symlink to newlib directory in gcc
directory. Target is arm-elf.

I use configuration options --disable-multilib and --with-endian=big.

After compilation of toolchain, I can see that Newlib was compiled in
LE mode, so I can not compile my software properly.

I noticed that in order to compile newlib in BE mode, I have to force
GCC target to armeb-elf (and then newlib have to be patched, because
it does not recognize armeb target)

Questions are :
1) Why is this happening and how to force newlib to compile in BE mode ?
2) Can --with-endian=big flag work even if I disabled multilib (i.e.
is multilib necessary for BE mode build ?)
3) Do I always have to use armeb-elf instead of arm-elf target when
multilib is disabled
4) Do I have to use make CFLAGS_FOR_TARGET="-mbig-endian -msoft-float"
CCASFLAGS="-mbig-endian -msoft-float" when calling GCC (with newlib
combined, one-pass) build to force Newlib to compile in big-endian
mode ?

Thanks for the answers,

More information about the Newlib mailing list