[uClibc]big endian on ARM

David McCullough davidm at snapgear.com
Wed May 14 13:21:31 UTC 2003


Jivin Kyle Harris lays it down ...
> Hi,
> 
> I'm trying to build uClibc for big endian Xscale (IXP425). I'm using the 
> gcc-2.95.3 built for big endian (downloaded from 
> http://sourceforge.net/projects/gatewaymaker/). I changed Config and 
> Rules.mak to include -mbig-endian and -EB for CFLAGS and LDFLAGS. Everything 
> compiles and mostly links until this occurs:
> 
> /usr/local/armbe/bin/arm-linux-ar rv ./tmp/libgcc-need.a
> Finding missing symbols in libc.a ...
>     partial linking...
> ../libc.a(getttyent.o): In function `setttyent':
> getttyent.o(.text+0x4c4): Oddly enough, __fsetlocking() is NOT threadsafe.
> /usr/local/armbe/bin/arm-linux-ld: ../../lib/crt0.o: compiled for a big 
> endian system and target is little endian
> File in wrong format: failed to merge target specific data of file 
> ../../lib/crt0.o
> 
> What am I doing wrong?

I can't imagine why your crt0 was built little endian.  Perhaps do a
"make clean" or "make mrproper" to make sure no old files are hanging
around.

Alternatively, the SnapGear Linux distribution contains a build target
for the IXP425:

	http://www.snapgear.org/downloads.html

There's a toolchain and source distro that are known to work together on
the IXP425.  It also contains uClibc,  although glibc is normally used
for the XScale,  the uClibc in the distro has been compiled big-endian
for other ARM targets so I suspect you should be able to get it to build
ok on XScale.  I just built it with the ARMulator-EB target (big-endian)
without any problems.

If you have trouble getting the distro from our site you can download
the exact same source as:

	http://www.uclinux.org/pub/uClinux/dist/uClinux-dist-20030305.tar.gz

Cheers,
Davidm

-- 
David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  Custom Embedded Solutions + Security


More information about the uClibc mailing list