Skip to content

newlib-nano: Fix include path for CT_NEWLIB_NANO_INSTALL_IN_TARGET #16

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

Merged

Conversation

stephanosio
Copy link
Member

@stephanosio stephanosio commented May 9, 2022

When CT_NEWLIB_NANO_INSTALL_IN_TARGET=y, the nano.specs file
emitted by the newlib-nano build script contains an invalid include
path, resulting in the full newlib.h being included instead of the
nano newlib.h by the application.

=/include/newlib-nano is not a valid path (= does not mean anything
and that string is taken as an include path as-is) and GCC ignores this
include path, resulting in application including the newlib.h from
include/ which contains the newlib build configurations for the full
newlib.

This commit modifies the newlib-nano build script to emit a proper
newlib-nano include path relative to the GCC_EXEC_PREFIX.

Signed-off-by: Stephanos Ioannidis [email protected]

Upstream PR: crosstool-ng#1721

When `CT_NEWLIB_NANO_INSTALL_IN_TARGET=y`, the `nano.specs` file
emitted by the newlib-nano build script contains an invalid include
path, resulting in the full `newlib.h` being included instead of the
nano `newlib.h` by the application.

`=/include/newlib-nano` is not a valid path (`=` does not mean anything
and that string is taken as an include path as-is) and GCC ignores this
include path, resulting in application including the `newlib.h` from
`include/` which contains the newlib build configurations for the full
newlib.

This commit modifies the newlib-nano build script to emit a proper
newlib-nano include path relative to the `GCC_EXEC_PREFIX`.

Signed-off-by: Stephanos Ioannidis <[email protected]>
@stephanosio stephanosio merged commit fe8391f into zephyr-crosstool-ng-1.25.0-rc1 May 10, 2022
@stephanosio stephanosio deleted the fix_newlib_nano_specs_zephyr branch June 12, 2022 18:29
@stephanosio stephanosio restored the fix_newlib_nano_specs_zephyr branch June 12, 2022 18:30
@stephanosio stephanosio deleted the fix_newlib_nano_specs_zephyr branch June 12, 2022 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant