arm-none-eabi-g++ pulls the wrong version of newlib.h if -specs=nano.specs selected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Fix Released
|
Undecided
|
Thomas Preud'homme |
Bug Description
The is for arm-none-eabi-g++ 6.2 and linking against newlib-nano.
When I preprocess a C-source with -specs=nano.specs, the file newlib.h from the directory newlib-nano is included:
echo '#include <string.h>' |\
/opt/gcc-
grep '^# 1 .*newlib\.h'
outputs # 1 "/opt/gcc-
%rename cpp nano_cpp
...
*cpp:
-isystem =/include/
But if I feed a C++-source through the same compiler
echo '#include <string.h>' |\
/opt/gcc-
grep '^# 1 .*newlib\.h'
the output reads # 1 "/opt/gcc-
In other words: The specs-file is ignored.
I am aware that I should include <cstring> instead of <string.h> in C++ sources and that GNU g++ is commonly invoked by …/arm-none-eabi-c++ instead of …/arm-none-eabi-gcc -x c++ but I did that to carve out the small difference. And: this does not change the matter.
Question: What do I have to add to the specs-file to let C++-files include newlib-
(I put this as a question in stackoverflow but did not get any tip: http://
Changed in gcc-arm-embedded: | |
status: | New → Confirmed |
Changed in gcc-arm-embedded: | |
assignee: | nobody → Thomas Preud'homme (thomas-preudhomme) |
status: | Confirmed → In Progress |
Changed in gcc-arm-embedded: | |
status: | In Progress → Fix Committed |
Changed in gcc-arm-embedded: | |
milestone: | none → 6-2017-q1-update |
Changed in gcc-arm-embedded: | |
status: | Fix Committed → Fix Released |