Mirec Talasek wrote:
> Please in every make file script is -lc or -lstdc++ but i dont have it.
> I am using only arm-elf-gcc/g++ on linux.
> In my ARM7TDMI i don use any os only my compiled binary.
>
> Please tell me how i compile libc, libm a and libstdc++ (without any
> parts which need kernel (syscalls , iostreams .....))
>
> THX
The GNU C library assumes a Linux/Unix-like subsystem, and is not really
suited to OS-less or non-Posix RTOS based embedded systems. The most
common solution is to use the Newlib C library (which incidentally has
fewer licence restrictions that GPL code).
GNU libstdc++ will work hapilly with Newlib as its low-level runtime
support.
The libraries are normally build with the compiler, so it is surprising
that you do not have them. Last time I built GCC for ARM I used the
instructions here: http://ecos.sourceware.org/build-toolchain.html
(don't worry about the "for eCOS" references, the critical thing is that
it is not "for Linux". A similar pagem but which is specific to GCC
4.1.1 is at
http://www.jstuber.net/lego/nxt-programming/arm-toolchain.html (oddly,
these instructions have a separate build stage for Newlib, despite it
being built with GCC - the eCOS instructions simply copy the library to
the required location. It is possible to build Newlib separately, but
the GCC configure script seems to deal with creating all the necessary
architecture variations for Thumb, FPE, etc. Which I have never been
able to get the Newlib script to do (perhaps because I know very little
about all that configure script stuff!).
With Newlib, it is your responsibility to provide the necessary
low-level glue by implementing some or all of the syscall routines. The
examples provided assume the existance of one of the supported ROM
monitor interfaces, which may not be suitable in your case.
Clifford