Xscale big endian tool-chain (how to build it?)

Karel Gardas kgardas@objectsecurity.com
Sat Dec 31 22:56:00 GMT 2005


Hello,

I have small issue building arm-elf toolchain for using with eCos OS. So 
far I have used arm-elf tool chain provided by http://www.gnuarm.com/ 
(I've used 4.0.1 GCC) and there is no problem with it, but now I would 
like to prefer building my own. I've checked that source files provided on 
the http://www.gnuarm.com/ website are exactly matching those of 
binutils/newlib/gcc releases. I've "patched" gcc by copying their 
t-arm-elf file to gcc/config/arm/t-arm-elf. I've build the compiler by 
using the instruction provided on: http://www.gnuarm.com/support.html

the problem is that their distributed binaries and what I get from the 
following their instruction are different. Exactly my problem shows while 
linking eCos application together when it fails with these messages:

silence:~/usr/local/xscale-ecos-default/ixdp425_install/examples$ arm-elf-gcc 
-Wa,-mfpu=softfpa -msoft-float -finline-limit=7000 -mbig-endian -mcpu=xscale 
-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -g -O2 
-ffunction-sections -fdata-sections -fno-exceptions  -mapcs-frame hello.c -o 
hello.xg2 -I../include -L../lib -Ttarget.ld -nostdlib
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/../../../../arm-elf/bin/ld: 
ERROR: 
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/be/libgcc.a(_udivsi3.o) 
uses hardware FP, whereas hello.xg2 uses software FP
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/../../../../arm-elf/bin/ld: 
failed to merge target specific data of file 
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/be/libgcc.a(_udivsi3.o)
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/../../../../arm-elf/bin/ld: 
ERROR: 
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/be/libgcc.a(_umodsi3.o) 
uses hardware FP, whereas hello.xg2 uses software FP
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/../../../../arm-elf/bin/ld: 
failed to merge target specific data of file 
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/be/libgcc.a(_umodsi3.o)
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/../../../../arm-elf/bin/ld: 
ERROR: 
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/be/libgcc.a(_dvmd_tls.o) 
uses hardware FP, whereas hello.xg2 uses software FP
[....]

if I understand it correctly, then libgcc.a provided in 
/home/karel/usr/local/arm-elf1/bin/../lib/gcc/arm-elf/4.0.1/be/libgcc.a is 
build with -mhard-float, while my application with -msoft-float.

Question: any idea how to build GCC tool-chain with soft-float's libgcc.a for 
big-endian Xscale? -- here I assume I'm right with my conclusion above, if this 
is not the case please correct me.

Thanks,
Karel
--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com



More information about the Gcc mailing list