Building newlib for arm - setjmp.S and thumb?

Kurt Jensen
Wed Mar 28 16:25:00 GMT 2001

After successfully building an arm toolchain with binutils-2.10.1 and
 gcc-core-20010320 for arm-elf, I tried to configure and make
newlib-1.9.0 as follows:

# ../newlib-1.9.0/configure --host=i686-pc-linux-gnu --target=arm-elf

The make proceeded for awhile before it had problems with assembling
The appropriate makefile chatter is shown below:

****** Makefile chatter *******
arm-elf-gcc -B/var/ftp/packages/ArmGnutools/src/newlib-arm-elf/arm-elf/newli
b/ -
lude -isystem
 -DPACKAGE=\"newlib\" -DVERSION=\"1.9.0\"  -I. -I../../../../../../../newlib
OR -I./../../../targ-include -I./../../../../../../../newlib-1.9.0/newlib/li
ys/arm/../../../libc/include -fno-builtin      -g -O2  -mthumb -c
../../../../../../../newlib-1.9.0/newlib/libc/sys/arm/setjmp.S: Assembler
../../../../../../../newlib-1.9.0/newlib/libc/sys/arm/setjmp.S:97: Error:
r15 no
t allowed here
../../../../../../../newlib-1.9.0/newlib/libc/sys/arm/setjmp.S:117: Error:
r15 n
ot allowed here
make[6]: *** [setjmp.o] Error 1
make[6]: Leaving directory

It looks like it is trying to compile for thumb (note the -mthumb flag), but
I don't think that the arm thumb architecture lets you use register r15.
Does anyone know how can I tell the configure script that I want plain arm,
and not thumb output? Shouldn't the toolchain be setup for plain arm use in
the first place?

I'd appreciate any clues you folks might have.
-Kurt Jensen
Quantum Design

More information about the Newlib mailing list