arm, arm64, xtensa, libxx: Change sed -r
to sed -E
to support macOS
#41
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.
Summary
When we build NuttX on macOS, it shows many
sed
messages (and the build still completes successfully):(See the Complete Log)
This is due to the Makefiles executing
sed -r
which is not a valid option on macOS. (As explained here)This PR proposes to change
sed -r
tosed -E
because:sed -E
on macOS is equivalent tosed -r
on Linux (See this)sed -E
andsed -r
are aliases according to the GNUsed
Manualsed -E
is already used in nuttx_add_romfs.cmake, nuttx_add_symtab.cmake and process_config.shImpact
On macOS: NuttX now builds without showing any
sed
messages.On other platforms: There should be no impact, since
sed -E
andsed -r
are functionally identical.Testing
sed
is used by the Makefiles to extract the GCC Major Version and the Clang Major / Minor Version. We tested thesed
commands on Linux and macOS to verify that they work correctly:On macOS: NuttX now builds without showing any
sed
messages.