[Clfs-support] Assembler error when making target 'all-target-libgcc' with the 'thumb' ARM mode
Hector Oron
hector.oron at gmail.com
Thu Mar 31 08:51:44 PDT 2011
Hi,
2011/3/31 Angel Ivan Castell Rovira <al004140 at gmail.com>:
> $ make all-target-libgcc
> [...]
> /home/clfs/sources/gcc-static-build/./gcc/xgcc
> -B/home/clfs/sources/gcc-static-build/./gcc/
> -B/home/clfs/cross-tools/armv4-linux-uclibc/bin/
> -B/home/clfs/cross-tools/armv4-linux-uclibc/lib/ -isystem
> /home/clfs/cross-tools/armv4-linux-uclibc/include -isystem
> /home/clfs/cross-tools/armv4-linux-uclibc/sys-include -g -O2 -O2 -g -O2
> -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem
> ./include -fomit-frame-pointer -fPIC -Wno-missing-prototypes -g
> -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc
> -I../../../gcc-4.5.2/libgcc -I../../../gcc-4.5.2/libgcc/.
> -I../../../gcc-4.5.2/libgcc/../gcc -I../../../gcc-4.5.2/libgcc/../include
> -DHAVE_CC_TLS -o _clear_cache.o -MT _clear_cache.o -MD -MP -MF
> _clear_cache.dep -DL_clear_cache -c
> ../../../gcc-4.5.2/libgcc/../gcc/libgcc2.c \
>
> /tmp/ccG53RGB.s: Assembler messages:
> /tmp/ccG53RGB.s:29: Error: invalid swi expression
> /tmp/ccG53RGB.s:29: Error: value of 10420226 too large for field of 2 bytes
> at 2
> make[1]: *** [_clear_cache.o] Error 1
> make[1]: Leaving directory
> `/home/clfs/sources/gcc-static-build/armv4-linux-uclibc/libgcc'
> make: *** [all-target-libgcc] Error 2
>
> The assembler is generating the nasty error you just have seen. That error
> is fixed using mode "arm" instead of "thumb":
If I am not mistaken, swi allows context mode switch between arm and
thumb modes, if you compile your tool to be mode thumb, I guess it
makes not much sense to link against c library, as you loose arm
context. Try to build a bare metal (arm-elf|arm-eabi) tool which
defaults to thumb, appropriate for cortex chips with M profiles.
> $ export CLFS_ARM_MODE="arm"
>
> Using "arm", the target 'all-target-libgcc' ends ok, but I would like to get
> the cross-toolchain with that "thumb" feature enabled.
>
> Hope you can give me some advice based on your own experience.
I guess arm tool is able to spit thumb code without that switch.
I might be well mistaken, so if someone knows about it, please correct me.
Cheers,
--
Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.
"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."
-- Day DVB-T stop working nicely
Video flare: http://antwrp.gsfc.nasa.gov/apod/ap100510.html
More information about the Clfs-support
mailing list