> > But there would be many, many smaller issues of compatibility with
> > header files, data structures, etc.  This effort would be complex,
> > invasive, and probably more work than anyone really would want to
> > commit to doing.
> > He said it would be like “a death from a thousand cuts.”
>
> It depends if such incompatibilities are regarded as bugs in NuttX;
> when it comes to musl, it tries to be standards-compliant, it won't
> accomodate for non-standard expectations in NuttX.
>
> There is no standard governing the interface between the C library and the
OS.  Standards like POSIX rather specify the interface between an
application and the C library.  The C library then interfaces to the OS via
non-standard system calls like
https://elixir.bootlin.com/linux/latest/source/include/linux/syscalls.h for
the case of Linux.

It is the lack of any standard at this level that Tomas Cedro was lamenting.

There is little compatibility between Linux and NuttX system calls.
Compare to
https://github.com/apache/incubator-nuttx/blob/master/syscall/syscall.csv.
The NuttX system calls are closer to the application interface standard but
not very close to Linux.

So when I mentioned compatibility between header files and data structures,
I was referring to the header files and data structures that define the
non-standard, OS system call interface used by the C library and not the
standard application interface provided by the C library.

Another complexity is that there are two C libraries, both in Linux and
NuttX:  One built into the kernel logic and one made available for use by
the applications.  So there are, for example, two strcpy()
implementations:  One for use within the kernel and one for use by
applications).  In Linux these are separate files within the OS; for NuttX,
the C library may be built twice (with different configuration options),
depending upon  the build mode.

Reply via email to