Hello forum!<br><br>Because the 'cat /proc/cpuinfo' on my ARM ARM920T (Samsung S3C2440) shows the 'thumb' feature available, <br><br>$ cat /proc/cpuinfo<br>Processor    : ARM920T rev 0 (v4l)<br>BogoMIPS    : 199.47<br>

Features    : swp half thumb<br>CPU implementer    : 0x41<br>CPU architecture: 4T<br>CPU variant    : 0x1<br>CPU part    : 0x920<br>CPU revision    : 0<br><br>Hardware    : BDC2440<br>Revision    : 0000<br>Serial        : 0000000000000000<br>

<br>I decided to build a cross-compiler for that processor enabling that "thumb" feature. So I modified this variable:<br><br>$ export CLFS_ARM_MODE="thumb"<br><br>in my environment to generate the cross-compiler. The rest of the CLFS_* environment variables is this:<br>

<br>$ env|grep CLFS<br>CLFS_HOST=i486-cross-linux-gnu<br>CLFS_TARGET=armv4-linux-uclibc<br>CLFS_ARM_ARCH=armv4t<br>CLFS_ARM_MODE=thumb<br>CLFS=/home/clfs<br>CLFS_ARCH=arm<br>CLFS_ABI=apcs-gnu<br>CLFS_ENDIAN=little<br>CLFS_FLOAT=soft<br>

<br>But the assembler is generating an error when making target 'all-target-libgcc' in the step to cross-compile the GCC Compiler with Static libgcc and no Threads.<br><br>More information to track this problem:<br>

<br>Version of the book being used: CLFS Embedded GIT-0.0.1-20110323<br>Host distribution: [Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1)]<br><br>Following the CLFS documentation, all the steps previous to the "Installation of Cross GCC Compiler with Static libgcc and no Threads" were successfully completed. Now I continue including the steps to reproduce the problem:<br>

<br>$ tar xvfj gcc-4.5.2.tar.bz2<br>$ mkdir gcc-static-build<br>$ cd gcc-static-build<br>$ AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" ../gcc-4.5.2/configure \<br>        --prefix=${CLFS}/cross-tools \<br>

        --build=${CLFS_HOST} \<br>        --host=${CLFS_HOST} \<br>        --target=${CLFS_TARGET} \<br>        --with-sysroot=${CLFS} \<br>        --disable-nls \<br>        --disable-shared \<br>        --with-mpfr=${CLFS}/cross-tools \<br>

        --with-gmp=${CLFS}/cross-tools \<br>        --with-mpc=${CLFS}/cross-tools \<br>        --without-headers \<br>        --with-newlib \<br>        --disable-decimal-float \<br>        --disable-libgomp \<br>        --disable-libmudflap \<br>

        --disable-libssp \<br>        --disable-threads \<br>        --enable-languages=c \<br>        --disable-multilib \<br>        --with-abi=${CLFS_ABI} \<br>        --with-arch=${CLFS_ARM_ARCH} \<br>        --with-mode=${CLFS_ARM_MODE} \<br>

        --with-float=${CLFS_FLOAT} \<br>        --with-fpu=${CLFS_FPU}<br>[ok]<br><br>$ make all-gcc<br>[ok]<br><br>$ make all-target-libgcc<br>[...]<br>/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 \<br>

      <br>/tmp/ccG53RGB.s: Assembler messages:<br>/tmp/ccG53RGB.s:29: Error: invalid swi expression<br>/tmp/ccG53RGB.s:29: Error: value of 10420226 too large for field of 2 bytes at 2<br>make[1]: *** [_clear_cache.o] Error 1<br>

make[1]: Leaving directory `/home/clfs/sources/gcc-static-build/armv4-linux-uclibc/libgcc'<br>make: *** [all-target-libgcc] Error 2<br><br>The assembler is generating the nasty error you just have seen. That error is fixed using mode "arm" instead of "thumb":<br>

<br>$ export CLFS_ARM_MODE="arm"<br><br>Using "arm", the target 'all-target-libgcc' ends ok, but I would like to get the cross-toolchain with that "thumb" feature enabled.<br><br>Hope you can give me some advice based on your own experience.<br>

<br>Thanks a lot in advance!<br><br>Best regards,<br>  --  Ivan<br><br>