[Clfs-support] Assembler error when making target 'all-target-libgcc' with the 'thumb' ARM mode

Angel Ivan Castell Rovira al004140 at gmail.com
Fri Apr 1 05:56:36 PDT 2011


2011/4/1 Andrew Bradford <bradfa at gmail.com>

> As a funny aside, while trying to reproduce your uClibc issue, I got
> all mixed up with variables and ended up reproducing this issue.  Good
> to know it's confirmed... but not really what I was trying to do.
>
> The all caps define __GCC_FLOAT_NOT_NEEDED looks interesting though
> for your other issue....
> I'll reply to the other thread with my findings once I straighten out
> my variables.
>
> My failure ends like this for building libgcc the way you are:
>
> [...]
>
> /opt/clfs-embedded-armv4t/sources/gcc-build/./gcc/xgcc
> -B/opt/clfs-embedded-armv4t/sources/gcc-build/./gcc/
> -B/opt/clfs-embedded-armv4t/cross-tools/armv4l-unknown-linux-uclibc/bin/
> -B/opt/clfs-embedded-armv4t/cross-tools/armv4l-unknown-linux-uclibc/lib/
> -isystem
> /opt/clfs-embedded-armv4t/cross-tools/armv4l-unknown-linux-uclibc/include
> -isystem
> /opt/clfs-embedded-armv4t/cross-tools/armv4l-unknown-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
> _trampoline.o -MT _trampoline.o -MD -MP -MF _trampoline.dep
> -DL_trampoline -c ../../../gcc-4.5.2/libgcc/../gcc/libgcc2.c \
>
> /tmp/ccD1D3Wj.s: Assembler messages:
> /tmp/ccD1D3Wj.s:29: Error: invalid swi expression
> /tmp/ccD1D3Wj.s:29: Error: value of 10420226 too large for field of 2 bytes
> at 2
> make[1]: *** [_clear_cache.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory
>
> `/opt/clfs-embedded-arm-sources/gcc-build/armv4l-unknown-linux-uclibc/libgcc'
> make: *** [all-target-libgcc] Error 2
>
> My environment looks like this (on Debian 6 amd64):
>
> clfs-embedded-armv4t at bigbox:/opt/clfs-embedded-armv4t/sources/gcc-build$
> env | grep CLFS
> CLFS_HOST=x86_64-cross-linux-gnu
> CLFS_TARGET=armv4l-unknown-linux-uclibc
> CLFS_ARM_ARCH=armv4t
> CLFS_ARM_MODE=thumb
> CLFS=/opt/clfs-embedded-armv4t
> CLFS_ARCH=arm
> CLFS_ABI=apcs-gnu
> CLFS_ENDIAN=little
> CLFS_FLOAT=soft
>
> -Andrew
> _______________________________________________
> Clfs-support mailing list
> Clfs-support at lists.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org
>


I appreciate all your help, thanks a lot in advance! :-)

According to table 6.1 on section 6.3 (ABI variables) it seems that mode
"thumb" must be setup with CLFS_ABI="atpcs". That was wrong on my
environment. However, I tested again with that variable fixed, and the error
when building the static gcc is exactly the same:

/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/ccF3T7aD.s: Assembler messages:
/tmp/ccF3T7aD.s:29: Error: invalid swi expression
/tmp/ccF3T7aD.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

$ env | grep CLFS
CLFS_HOST=i486-cross-linux-gnu
CLFS_TARGET=armv4-linux-uclibc
CLFS_ARM_ARCH=armv4t
CLFS_ARM_MODE=thumb
CLFS=/home/clfs
CLFS_ARCH=arm
CLFS_ABI=atpcs
CLFS_ENDIAN=little
CLFS_FLOAT=soft
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20110401/077dbc7e/attachment-0001.htm>


More information about the Clfs-support mailing list