This is the mail archive of the
newlib@sourceware.cygnus.com
mailing list for the newlib project.
Re: More newlib issues w/StrongARM Target
Hello again.
After having rebuilt Binutils & EGCS with the same configuration
(--target=arm-elf & using the newlib headers & not specifying a host),
we then successfully built NewLib for an ARM target. Following the
newlib build we tried to compile a sample "helloworld" program and
encountered some road-blocks.
We wrote a simple Makefile to help automate the test builds; the
contents
of the Makefile and errors are listed below.
Any suggestions?
Thanks,
Dave Croyle & Vasant Ram.
P.S.
We will not be using Angel as our debugger, do we need to modify the
newlib compile such that it does not issue -DARM-RDI-ANGEL?
Makefile:
CFLAGS = -g -Wall -Wa,-a=$*.lst
testprogram: helloworld.o
arm-elf-gcc $(CFLAGS) -otestprogram helloworld.o \
-Wl,-Map=testprogram.map --cref \
-L/usr/local/home/vram/strongarm_embedded/newlib_test \
-nostartfiles -nodefaultlibs -nostdlib -lc -nostartfiles
helloworld.o : helloworld.c
arm-elf-gcc $(CFLAGS) -c -O helloworld.c
clean:
rm -f helloworld.o testprogram.o *.lst *.map
rm -f testprogram
When we issue "make" we get the following errors:
/usr/local/home/vram/strongarm_embedded/newlib_test/libc.a(vfprintf.o):
In
function `_vfprintf_r':
/usr/local/home/vram/strongarm_embedded/armbuild/newlib-arm-elf/arm-elf/newlib/libc/stdio/../../../../../newlib-1.8.2/newlib/libc/stdio/vfprintf.c(.text+0xb48):undefined
reference to `__umodsi3'
/usr/local/home/vram/strongarm_embedded/armbuild/newlib-arm-elf/arm-elf/newlib/libc/stdio/../../../../../newlib-1.8.2/newlib/libc/stdio/vfprintf.c(.text+0xb64):undefined
reference to `__udivsi3'
/usr/local/home/vram/strongarm_embedded/newlib_test/libc.a(vfprintf.o):
In
function `exponent':
/usr/local/home/vram/strongarm_embedded/armbuild/newlib-arm-elf/arm-elf/newlib/libc/stdio/../../../../../newlib-1.8.2/newlib/libc/stdio/vfprintf.c(.text+0x190c):
undefined reference to `__modsi3'
/usr/local/home/vram/strongarm_embedded/armbuild/newlib-arm-elf/arm-elf/newlib/libc/stdio/../../../../../newlib-1.8.2/newlib/libc/stdio/vfprintf.c(.text+0x1920):
undefined reference to `__divsi3'
/usr/local/home/vram/strongarm_embedded/newlib_test/libc.a(dtoa.o): In
function `quorem':
/usr/local/home/vram/strongarm_embedded/armbuild/newlib-arm-elf/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.8.2/newlib/libc/stdlib/dtoa.c(.text+0x74):
undefined reference to `__udivsi3'
/usr/local/home/vram/strongarm_embedded/newlib_test/libc.a(freer.o): In
function `_malloc_trim_r':
/usr/local/home/vram/strongarm_embedded/armbuild/newlib-arm-elf/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.8.2/newlib/libc/stdlib/mallocr.c(.text+0x2b4):
undefined reference to `__udivsi3'
/usr/local/home/vram/strongarm_embedded/newlib_test/libc.a(mprec.o): In
function `_s2b':
/usr/local/home/vram/strongarm_embedded/armbuild/newlib-arm-elf/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.8.2/newlib/libc/stdlib/mprec.c(.text+0x1b0):
undefined reference to `__divsi3'
collect2: ld returned 1 exit status
make: *** [testprogram] Error 1