newlib.mk: llvm, fix newlib-nano header not used #9513
Conversation
smlng
left a comment
There was a problem hiding this comment.
(still) works on macOS, but INCLUDES do not differ from master
INCLUDES:
-isystem
/usr/local/Caskroom/gcc-arm-embedded/7-2017-q4-major/gcc-arm-none-eabi-7-2017-q4-major/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include/newlib-nano
-I/Volumes/devel/github/smlng/RIOT/core/include
-I/Volumes/devel/github/smlng/RIOT/drivers/include
-I/Volumes/devel/github/smlng/RIOT/sys/include
-I/Volumes/devel/github/smlng/RIOT/boards/samr21-xpro/include
-I/Volumes/devel/github/smlng/RIOT/cpu/samd21/include
-I/Volumes/devel/github/smlng/RIOT/cpu/sam0_common/include
-I/Volumes/devel/github/smlng/RIOT/cpu/cortexm_common/include
-I/Volumes/devel/github/smlng/RIOT/cpu/cortexm_common/include/vendor
-I/Volumes/devel/github/smlng/RIOT/sys/libc/include
-I/Volumes/devel/github/smlng/RIOT/sys/net/gnrc/netif/include
-I/Volumes/devel/github/smlng/RIOT/drivers/at86rf2xx/include
|
btw. used |
|
@smlng Can you try the test command in the description to force using |
In the previous state, with llvm and arm for example, newlib-nano include dir NEWLIB_NANO_INCLUDE_DIR is placed after NEWLIB_INCLUDES and so the default 'newlib.h' is used instead of the nano version.
37adfc3 to
f8e1419
Compare
|
I removed the sanity check commit now that #9599 is merged. |
|
It is required for enabling |
|
@smlng up, can you retry with TOOLCHAIN=llvm ? I would like to have it in the release |
|
I retested on macOS but got several issues, used native macOSincludes but error when compiling setting However: fails on master, too 😟 samr21-xpro, macOSNote no toolchain set includes: compiling, all good: samr21-xpro, macOS, llvmincludes (note: linker is gcc): compiling |
It's a known problem. Also irrelevant for this PR since |
|
(the fix is provided within #9398, but I can cherry-pick it out of there if desired) |
|
See #9513 |
|
@smlng Thank you for testing and the detailed output, it works as I expected.
The other native issue was unrelated and fixed. I still let you hit merge in case you had any other remarks. |
@cladmi does it make sense to change the |
|
@miri64: for me it is on purpose to link with GCC according to the comment, so it should be investigated before changing it: |
|
Ah... I did not read the comment ^^" |
|
(yepp, linking doesn't work then for newlib-supported boards :-/) |
|
Then it could be only for non |
|
I guess this can be merged?!? |
|
does work on macOS, I get a bit confused with all those newlib PRs open here 😕, the other is #9515 right? |
|
I interpret this as a "yes" ;-). |
|
@smlng yes the other is a different one for the newly introduced issues. This ones fixed a loooooooong lasting bug. |
|
Backport provided in #9685 |
Contribution description
This fixes building with llvm where newlib-nano header is not used.
Basically, the default newlib directory was put before newlib-nano include directory.
Test command
The first commit can be tested to show it is broken and that the second fixes it
Output
Without patch:
You can notive that 'newlib-nano' is not in front
With the fix, newlib-nano directory is in front.
Replaced by #9599
Issues/PRs references
Split from #9512