Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
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 ;-).

+ 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