-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rfc] add support for newlib with nano specs #628
Comments
Hi Steven, thank you for suggesting this! The original thinking was that We would be happy to review the patches to add another overlay package for In the future, we may want to see how this can be optimzed, e.g. have one package with both |
Some additional thoughts on how we might be able to have a single newlib overlay package. If we can end up with a directory layout like
Then if we can use something like As this would be improving newlib we could start with a separate newlib-nano package, but migrate to a single newlib overlay later. As long as users use a provided clang config file to select newlib nano, then this migration should be transparent as we can just update the config file with the new mechanism. |
Context: Cortex M-class SoCs
A lot of M-class software is currently built with GCC and newlib-nano. In order to ease the transition of preexisting projects currently building with GCC for ARM embedded and using that toolchain's provided newlib with nano specs, it would be useful for the LLVM toolchain to ship an equivalent library. I did see that picolibc is the preferred standard library in this toolchain, but migrating to it requires changes in the software projects. By providing a nano version of newlib in LLVM for ARM, these projects could be compiled with both LLVM and GCC toolchains without requiring changes beyond the build flags.
Proposal: add a library called 'newlib-nano' or 'nanolib' to the library options which builds newlib with the flags that GCC uses, and release that library as an overlay package similar to the current newlib and llvmlibc pakages. I can do a PR for adding it to the CMake targets at least.
Even better would be compatibility with GCC's specs paradigm, but that is going to be a whole other amount of work.
The text was updated successfully, but these errors were encountered: