Re: Can musl libc replace the libc of nuttx system?

2022-07-14 Thread Gregory Nutt
> > 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.” > > I

Re: Can musl libc replace the libc of nuttx system?

2022-07-14 Thread Nathan Hartman
On Thu, Jul 14, 2022 at 5:30 PM Alan Carvalho de Assis wrote: > > You are right, currently Apex RTOS and RT-Thread (only their "Smart > brand" that only works on CPU with MMU) are using musl lib. > > So it could be useful to have musl support for NuttX. Why not make NuttX libc as good as possibl

Re: Can musl libc replace the libc of nuttx system?

2022-07-14 Thread Alan Carvalho de Assis
On 7/14/22, Ismael Luceno wrote: > On 12/Jul/2022 10:38, Xiang Xiao wrote: >> musl is designed to work exclusively with Linux and then there is no OS >> abstraction layer. So it's hard to adapt musl to other OS. > > Not really, adapting to another kernel is as simple as either providing > the miss

Re: Can musl libc replace the libc of nuttx system?

2022-07-14 Thread Ismael Luceno
On 12/Jul/2022 10:38, Xiang Xiao wrote: > musl is designed to work exclusively with Linux and then there is no OS > abstraction layer. So it's hard to adapt musl to other OS. Not really, adapting to another kernel is as simple as either providing the missing syscalls, adding stubs, or emulating th

Re: Can musl libc replace the libc of nuttx system?

2022-07-14 Thread Ismael Luceno
On 11/Jul/2022 21:10, Gregory Nutt wrote: <...> > MUSL supports only Linux. Hopefully, the MUSL OS interface is > well modularized to support use of a different OS. Musl is well-structured, ports aren't difficult. <...> > But there would be many, many smaller issues of compatibility with > heade

Re: Can musl libc replace the libc of nuttx system?

2022-07-12 Thread Tomek CEDRO
On Tue, Jul 12, 2022 at 4:38 AM Xiang Xiao wrote: > musl is designed to work exclusively with Linux and then there is no OS > abstraction layer. So it's hard to adapt musl to other OS. > Alan asks a good question: what benefit do you want to get from replacing > NuttX' libc with musl? Just my 2 c

Re: Can musl libc replace the libc of nuttx system?

2022-07-11 Thread Gregory Nutt
People have talked about using other C libraries in the past, but no one has been successful. C libraries support an operating specific interface. For example, a Linux LibC will need to use Linux system calls and Linux data structures to interface with the kernel. A similar interface would be

Re: Can musl libc replace the libc of nuttx system?

2022-07-11 Thread Xiang Xiao
musl is designed to work exclusively with Linux and then there is no OS abstraction layer. So it's hard to adapt musl to other OS. Alan asks a good question: what benefit do you want to get from replacing NuttX' libc with musl? On Tue, Jul 12, 2022 at 9:50 AM Alan Carvalho de Assis wrote: > Hi P

Re: Can musl libc replace the libc of nuttx system?

2022-07-11 Thread Alan Carvalho de Assis
Hi Prelude, I don't think someone already tried it before. BTW, why do you want to do it? BR, Alan On Monday, July 11, 2022, prelude wrote: > > > I am currently working on a project that I want to transplant musl LIC to > nuttx to replace the built-in libc, have any friends done similar work