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 .
Ramana Radhakrishnan wrote:
Jeff,
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.
Thanks for reviewing the patch . Yes your suggestion seems to work
correctly.
Ok, I will check the code in with the errno changes as well.
As an aside, the syscalls should eventually be migrated into the
libgloss directory.
I will look at migrating these into libgloss and get back .
See the arm code.
What we do for arm is to duplicate the syscalls in the libgloss directory and
then there is a configuration flag in newlib which can be used to not allow
syscalls being defined. This allows a migration path where if someone needs to
have a new bsp, they can do so easily.
-- Jeff J.
cheers
Ramana
-- 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"
;;