I am running Gentoo Linux, and I have the arm-none-eabi toolchain already installed. gcc is at version 4.7.2, and newlib at version 2.0.0. When compiling libmaple, I get the following error:
build/./wirish/syscalls.o: In function
_exit':
/home/paul/maple/libmaple/./wirish/syscalls.c:60: multiple definition of
_sbrk'/usr/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/libc.a(lib_a-syscalls.o):/var/tmp/portage/cross-arm-none-eabi/newlib-2.0.0/work/newlib-2.0.0/newlib/libc/sys/arm/syscalls.c:482: first defined here
/usr/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/lib/libc.a(lib_a-syscalls.o): In function `_sbrk':
syscalls.c:(.text+0x6a8): undefined reference to `end'
collect2: error: ld returned 1 exit status
make: *** [build/maple.elf] Error 1
`
This appears to be a clash between the newlib library and the libmaple library.
So my question is this: what do I need to do to stop the compiler linking to the newlib code (assuming it is not necessary?). I compile following the instructions in the "Command Line Tools" section of the wiki.
Alternatively, do I have to do something else, such as loading an earlier version of newlib, or compiling it with some options set when making the toolchain?
Many thanks for your help!
Rgds.,
Paul