This is the mail archive of the
mailing list for the newlib project.
Re: The thread model in newlib
Leif Ekblad wrote:
whereas newlib/libc/sys is for OSes (e.g. RTEMS, Linux, Cygwin). There
are few platforms like ARM that are in libc/sys but this is just
historical and they truly belong in libgloss. The libgloss library
allows an end-user to choose at compile/link time the actual target
board/simulator. Having ARM in newlib has proven a true nuisance so a
libgloss directory has been created and eventually we'll have gcc use
it exclusively and remove the libc/sys/arm directory altogether.
OK, I see.
RTEMS and Cygwin actually use newlib as a base that they override and
enhance so the syscalls, OS-specific functions are actually found in
their own projects. OTOH, the linux support was started in newlib and
has grown to where it is today. It too overrides functionality from
the shared sections of newlib as appropriate for Linux.
I'm not quite sure what to put into newlib and what to keep in my own
project. For example, I've done a 150k GAS interface file, rdos.s, for
in RDOS. This file is anticipated to change quite often as I add new
For sure the implementation of the required fiunctions in newlib will
linking to this object file. I configured GCC to always link this file
embedded the crt-startup code there. Should I put this file in newlib or
it in my project? Or both?
Regarding the number of changes you expect to make: I would have no
problem in giving you write-without-approval permission for the files in
the libc/sys/rdos directory. The files in question cannot have a
proprietary license and the GPL is avoided. A bsd-like license or freer
is usually preferred but LGPL is also ok for your OS-specific files. If
the project is complex and you need to have control over how it is
maintained or there are a number of contributors, then having a separate
project makes sense. If it is rather straightforward and you are the
principle maintainer, then having the files in newlib makes sense since
it is easier for the end-user to build.
There is also a shared rdos.h file in my project that contains
rdos.s that is used by both Win32 and GCC. This file must be both in
newlib and in my project.
Not a problem.