Re: Building libm library
Harish <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CA+BROwDWvctuDaNJXhwOaHOgpDFuvn7pRFqfhEcEqNmJTnmy8Q@mail.gmail.com> |
Got it, Thank you :) On Fri, Jul 16, 2021 at 9:16 AM Jeff Johnston <[email protected]> wrote: > > > On Thu, Jul 15, 2021 at 8:54 PM Harish <[email protected]> wrote: > >> Ok, thanks for the clarification. One more question. I would like to use >> math library on a baremetal and want to know if the newlib math library >> uses system calls?. If yes, is there any other implementation which can be >> used for baremetals? >> >> > libm does not call system calls. If you want to implement libc but don't > want to implement system calls, you can use libnosys which is a stub > library (e.g. reads fail, writes fail, etc...). > It is built as part of libgloss and you simply reference it using -lnosys > in your link. > > Regards, >> Harish >> >> On Thu, 15 Jul, 2021, 11:19 pm Jeff Johnston, <[email protected]> >> wrote: >> >>> Hello Harish, >>> >>> It isn't supported. There are no top Makefile targets for you to do >>> this and building targets directly from Makefiles in subdirectories often >>> runs into issues (e.g. missing headers that haven't been copied or >>> paths/vars set incorrectly since they are supposed to be set by parent >>> Makefiles). >>> In addition, the errno/reentrant mechanisms used by libm.a are supplied >>> by libc.a. >>> >>> -- Jeff J. >>> >>> On Thu, Jul 15, 2021 at 7:44 AM Harish <[email protected]> wrote: >>> >>>> Hi newlib, >>>> >>>> I would like to build just libm.a library, is it possible? if yes, >>>> please >>>> let me know how can I do it. >>>> >>>> >>>> Thanks, >>>> Harish C >>>> >>>>