WIP newlib.mk: fix regressions and global cleanups, tracking evolutions of newlib.mk
Contribution description
WARN: I wanted to re-test commits from this PR after rebasing them multiple times, but could not find time. However I prefer uploading it instead of keeping it local
This started as a PR to fix:
- The need to have a trailing slash in
NEWLIB_INCLUDE_DIR - adding
-isystem $(empty_variable)to INCLUDES - clean the output of gcc to get compiler includes
- Patterns not be taken into account
And this ended up in also some refactoring, tests. It is still work in progress
This PR grew quite big and went beyond what I originally planed. I will split it, refactor and re-organize commits.
I also plan to add parts of https://github.com/RIOT-OS/RIOT/pull/9415 but not the 'nano.specs' this should be kept in the original pr.
I on purpose separated commits to allow adding small parts separately and removing other too problematic ones.
Split PRs
- [x] tests/libc_newlib: add test for newlib-nano inclusion https://github.com/RIOT-OS/RIOT/pull/9599
- [x] llvm not using newlib-nano https://github.com/RIOT-OS/RIOT/pull/9513
- [x] newlib.mk: fix regressions https://github.com/RIOT-OS/RIOT/pull/9515
- [ ] …
Issues/PRs references
Problems mentioned in https://github.com/RIOT-OS/RIOT/issues/9452
One of the nice things that should be taken from the fact that nobody really complained that these fixes are needed (except api change), is that the fixes added by https://github.com/RIOT-OS/RIOT/pull/9394 may be fixing everybody case.
I thought about another idea for testing in newlib-nano header is used.
I will move it to an unittest that does testing depending if MODULE_NEWLIB_NANO is set or not. It will be less invasive than adding the -include.
@fjmolinas Do you have this on your radar?
@fjmolinas Do you have this on your radar?
Not really, I'm not familiar with newlib. I can but it on the todo list, but will not have time for a while.
Ping @fjmolinas
Since this PR has been stale for several years, I'll convert it to a draft.
Please feel free to remove the draft state if anyone wants to pick this up again.