Skip to content

Conversation

@galak
Copy link
Contributor

@galak galak commented May 22, 2020

Add a zephyr case to newlib/configure.host so we get the same config on
all arch's. Fix the fact that some arch's like x86 were getting
-DMISSING_SYSCALL_NAMES set in newlib which we don't want.

Fixes: #221

Signed-off-by: Kumar Gala [email protected]

Add a zephyr case to newlib/configure.host so we get the same config on
all arch's.  Fix the fact that some arch's like x86 were getting
-DMISSING_SYSCALL_NAMES set in newlib which we don't want.

Fixes: zephyrproject-rtos#221

Signed-off-by: Kumar Gala <[email protected]>
@stephanosio
Copy link
Member

@galak This is for 0.11.4, I suppose?

@galak
Copy link
Contributor Author

galak commented May 22, 2020

@galak This is for 0.11.4, I suppose?

Yeah, that was my thinking.

+ case "${host}" in
+ arm*-*-*)
+ if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
+ newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add zephyr specific host config

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.

Copy link
Contributor

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 ;-).

Copy link
Contributor

@pfalcon pfalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I confirmed that not defining -DMISSING_SYSCALL_NAMES is what we want.

The patch is definitely useful, and will save a lot of time figuring out inconsistent behavior across platforms.

@pfalcon
Copy link
Contributor

pfalcon commented May 28, 2020

@stephanosio: Hopefully you can approve too.

@galak galak merged commit cd1657d into zephyrproject-rtos:master Jun 4, 2020
@galak galak deleted the fix-newlib-cfg branch June 4, 2020 11:57
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.

Newlib: inconsistent usage of write() vs _write() in builds for different architectures to dump error messages to console

3 participants