-
Notifications
You must be signed in to change notification settings - Fork 2k
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
newlib.mk: fix regressions [backport 2018.07] #9689
Merged
miri64
merged 6 commits into
RIOT-OS:2018.07-branch
from
cladmi:2018.07/pr/make/newlib/fixandstuff
Aug 2, 2018
Merged
newlib.mk: fix regressions [backport 2018.07] #9689
miri64
merged 6 commits into
RIOT-OS:2018.07-branch
from
cladmi:2018.07/pr/make/newlib/fixandstuff
Aug 2, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When NEWLIB_INCLUDE_DIR is set from other parts than 'COMPILER_INCLUDE_PATHS' it does not have a trailing slash. Also, it makes it more problematic when supplying it from the command line. And anyway having two '/' does not break anything. (cherry picked from commit a946c2c)
As NEWLIB_INCLUDE_DIR has already been set here, with an empty value, it is not overwriting it because of the '?='. (cherry picked from commit 18a4ccf)
Only keep lines that are indeed include path. It also keeps newlines as they do not matter. It fixes Mingw32 support where `grep '^\s'` is not working the same way. It also handles some mac `sed` that do not support `\s`. Ouput tested with: make -C examples/hello-world BOARD=samr21-xpro info-debug-variable-COMPILER_INCLUDE_PATHS # by also putting newlines for readability Now: /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include-fixed /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include Before: /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/cc1 -E -quiet -v -iprefix /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/ -isysroot /usr/bin/../arm-none-eabi -D__USES_INITFINI__ /dev/null /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/include-fixed /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include (cherry picked from commit 3a4538e)
Some versions of Mingw32 abspath implementation has trouble working with windows formatted path. $(abspath "C:/A/B") returns "/C/CUR/DIR/C:/A/B" instead of "/C/A/B" relpath does not have this problem, it does additional symlink resolution but is not a problem. Note: on windows it does not remove the trailing `/`. zephyrproject-rtos/zephyr#2061 (comment) Patched in zephyrproject-rtos/zephyr@941059c (cherry picked from commit 37a92c4)
It replaces make BOARD=iotlab-m3 info-debug-variable-NEWLIB_INCLUDE_DIR /usr/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include/ with make BOARD=iotlab-m3 info-debug-variable-NEWLIB_INCLUDE_DIR /usr/arm-none-eabi/include Without trailing slash and without relative '..' everywhere. It also uses `realpath` instead of `abspath` to support Mingw32. (cherry picked from commit 154d64e)
Comments inside an if are usually also indented. (cherry picked from commit 3226918)
cladmi
added
Process: release backport
Integration Process: The PR is a release backport of a change previously provided to master
Community: help wanted
The contributors require help from other members of the community
Area: build system
Area: Build system
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
labels
Aug 2, 2018
miri64
approved these changes
Aug 2, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible and is the same as before
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Community: help wanted
The contributors require help from other members of the community
Process: release backport
Integration Process: The PR is a release backport of a change previously provided to master
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #9515
Contribution description
Fixes:
Testing
Can be tested by compiling
tests/libc_newlib
:Issues/PRs references
Fixes for #9394
Split from #9512