This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: [PATCH] : Correct build of newlib for ARC .
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: Ramana Radhakrishnan <ramana dot radhakrishnan at codito dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Tue, 22 Mar 2005 15:53:25 -0500
- Subject: Re: [PATCH] : Correct build of newlib for ARC .
- References: <42407FC0.2020009@codito.com>
Ramana Radhakrishnan wrote:
Hi,
This patch attempts to correct the build of newlib for ARC . The syscall
functions needed to be renamed to the non-reentrant versions for even a
simple program to get executed. This was visible when I attempted to run
the GCC testsuite .
Ok to commit ?
cheers
Ramana
Ramana,
This patch has problems in that you have the reentrant struct still being
passed to non _r functions (the callers won't set up the arguments correctly).
Another solution to this problem is to turn on the
REENTRANT_SYSCALLS_PROVIDED flag which should solve the linking problem you are
having and not cause an error when the call is made. Please try the alternate
patch I have attached here and let me know if it solves your problems. If yes,
I will change the syscalls.c file to reference __errno_r instead of errno.
As an aside, the syscalls should eventually be migrated into the libgloss
directory.
-- Jeff J.
Index: configure.host
===================================================================
RCS file: /cvs/cvsfiles/devo/newlib/configure.host,v
retrieving revision 1.146
diff -u -r1.146 configure.host
--- configure.host 17 Mar 2005 20:17:52 -0000 1.146
+++ configure.host 22 Mar 2005 20:46:49 -0000
@@ -587,6 +587,9 @@
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
fi
;;
+ arc*)
+ newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
+ ;;
avr*)
newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
;;