-
Notifications
You must be signed in to change notification settings - Fork 173
newlib: Make configure host consistent for all arch's #223
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
patches/newlib/3.1.0.20181231/0004-newlib-configure.host-Add-host-config-for-zephyr.patch
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| From 2599d2e1016beeb8dcfe691940acc334bdc6eb24 Mon Sep 17 00:00:00 2001 | ||
| From: Kumar Gala <[email protected]> | ||
| Date: Thu, 21 May 2020 22:55:16 -0500 | ||
| Subject: [PATCH] newlib/configure.host: Add host config for zephyr | ||
|
|
||
| Add zephyr specific host config so that all arch toolchain variants we | ||
| build for zephyr behave the same way. (otherwise we end up getting | ||
| -DMISSING_SYSCALL_NAMES set on some arch's like NIOS and x86, but not on | ||
| others). | ||
|
|
||
| Signed-off-by: Kumar Gala <[email protected]> | ||
| --- | ||
| newlib/configure.host | 11 +++++++++++ | ||
| 1 file changed, 11 insertions(+) | ||
|
|
||
| diff --git a/newlib/configure.host b/newlib/configure.host | ||
| index 37d2b9b2e..77e855e85 100644 | ||
| --- a/newlib/configure.host | ||
| +++ b/newlib/configure.host | ||
| @@ -665,6 +665,17 @@ newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVID | ||
| *-*-tirtos*) | ||
| newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__ -DMALLOC_PROVIDED" | ||
| ;; | ||
| + *-zephyr-*) | ||
| + syscall_dir=syscalls | ||
| + case "${host}" in | ||
| + arm*-*-*) | ||
| + if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then | ||
| + newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR" | ||
| + fi | ||
| + ;; | ||
| + *) | ||
| + esac | ||
| + ;; | ||
| # UDI doesn't have exec, so system() should fail the right way | ||
| a29k-amd-udi) | ||
| newlib_cflags="${newlib_cflags} -DNO_EXEC" | ||
| -- | ||
| 2.25.4 | ||
|
|
||
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.
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.
@galak, Is this the same patch which was here originally? I briefly looked at it when it was posted, but now looking in detail, I'm not sure I understand what happens here. The patch description talks about being consistent with passing (or not?) -DMISSING_SYSCALL_NAMES for all platforms, but the patch content actually passes -DARM_RDI_MONITOR for
arm*-*-*platforms only. What's -DARM_RDI_MONITOR and how it's related to the original issue of syscall() vs _syscall() naming?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.
Ah, seems I'm starting to understand now. Previously, there was no config case for
*-zephyr-*specifically, so there was random matchings based on arch patterns as sprinkled around in upstream. Now we have common*-zephyr-*switch case (and thus consistent config options), but need to pass -DARM_RDI_MONITOR specifically for ARM platforms.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.
So, this is definitely useful, we just need to understand, whether it's better to have -DMISSING_SYSCALL_NAMES or -UMISSING_SYSCALL_NAMES ;-).