Would it be possible to link to the ARM embedded libc instead of newlib, whilst still using a GCC toolchain?
Short answer: No.
Long answer: It could be theoretically possible to hack it, but with mediocre results.
A standard library is designed to go along its compiler.
For example, a good compiler+linker can detect which subset of the printf
functionalities have been used (which formats) and it can know which subset of functions need to be linked in from its standard library. GCC ARM Embedded does not know how the printf
functionality is split inside the "ARM embedded libc". Similarly, ARMCC does not know how the printf
functionality is split inside "newlib".
You would also have to reimplement all the conventions knowledge of the ARMCC linker to decide which system libraries need to be linked in.
Cheers,
Emilio
How to reproduce:
The error I get is:
This is with 4.7-2012-q4-major from:
https://launchpad.net/gcc-arm-embedded
From what I understand _sbrk is a hook that users of newlib must define on a per-architecture basis?
Am I doing something obviously stupid, or is this a bug?
Ashley