* Building libm library @ 2021-07-15 11:43 Harish 2021-07-15 17:48 ` Jeff Johnston 2021-07-19 8:19 ` Paul Zimmermann 0 siblings, 2 replies; 7+ messages in thread From: Harish @ 2021-07-15 11:43 UTC (permalink / raw) To: newlib 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building libm library 2021-07-15 11:43 Building libm library Harish @ 2021-07-15 17:48 ` Jeff Johnston 2021-07-16 0:54 ` Harish 2021-07-19 8:19 ` Paul Zimmermann 1 sibling, 1 reply; 7+ messages in thread From: Jeff Johnston @ 2021-07-15 17:48 UTC (permalink / raw) To: Harish; +Cc: Newlib 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 <harishcse44@gmail.com> 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 > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building libm library 2021-07-15 17:48 ` Jeff Johnston @ 2021-07-16 0:54 ` Harish 2021-07-16 3:45 ` Jeff Johnston 0 siblings, 1 reply; 7+ messages in thread From: Harish @ 2021-07-16 0:54 UTC (permalink / raw) To: Jeff Johnston; +Cc: Newlib 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? Regards, Harish On Thu, 15 Jul, 2021, 11:19 pm Jeff Johnston, <jjohnstn@redhat.com> 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 <harishcse44@gmail.com> 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 >> >> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building libm library 2021-07-16 0:54 ` Harish @ 2021-07-16 3:45 ` Jeff Johnston 2021-07-16 5:04 ` Harish 0 siblings, 1 reply; 7+ messages in thread From: Jeff Johnston @ 2021-07-16 3:45 UTC (permalink / raw) To: Harish; +Cc: Newlib On Thu, Jul 15, 2021 at 8:54 PM Harish <harishcse44@gmail.com> 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, <jjohnstn@redhat.com> 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 <harishcse44@gmail.com> 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 >>> >>> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building libm library 2021-07-16 3:45 ` Jeff Johnston @ 2021-07-16 5:04 ` Harish 0 siblings, 0 replies; 7+ messages in thread From: Harish @ 2021-07-16 5:04 UTC (permalink / raw) To: Jeff Johnston; +Cc: Newlib Got it, Thank you :) On Fri, Jul 16, 2021 at 9:16 AM Jeff Johnston <jjohnstn@redhat.com> wrote: > > > On Thu, Jul 15, 2021 at 8:54 PM Harish <harishcse44@gmail.com> 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, <jjohnstn@redhat.com> >> 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 <harishcse44@gmail.com> 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 >>>> >>>> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building libm library 2021-07-15 11:43 Building libm library Harish 2021-07-15 17:48 ` Jeff Johnston @ 2021-07-19 8:19 ` Paul Zimmermann 2021-07-19 8:22 ` Harish 1 sibling, 1 reply; 7+ messages in thread From: Paul Zimmermann @ 2021-07-19 8:19 UTC (permalink / raw) To: Harish; +Cc: newlib Hi Harish, > I would like to build just libm.a library, is it possible? if yes, please > let me know how can I do it. I don't know if this answers your question, but here is how I compile Newlib libm.a on x86_64 under Linux: tar xf newlib-4.1.0.tar.gz cd newlib-4.1.0 mkdir build cd build ../configure --prefix=/tmp --target=x86_64 --disable-multilib make -j4 Best regards, Paul ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building libm library 2021-07-19 8:19 ` Paul Zimmermann @ 2021-07-19 8:22 ` Harish 0 siblings, 0 replies; 7+ messages in thread From: Harish @ 2021-07-19 8:22 UTC (permalink / raw) To: Paul Zimmermann; +Cc: Newlib Thanks, Paul. I'm able to build Newlib. On Mon, Jul 19, 2021 at 1:49 PM Paul Zimmermann <Paul.Zimmermann@inria.fr> wrote: > Hi Harish, > > > I would like to build just libm.a library, is it possible? if yes, please > > let me know how can I do it. > > I don't know if this answers your question, but here is how I compile > Newlib > libm.a on x86_64 under Linux: > > tar xf newlib-4.1.0.tar.gz > cd newlib-4.1.0 > mkdir build > cd build > ../configure --prefix=/tmp --target=x86_64 --disable-multilib > make -j4 > > Best regards, > Paul > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-07-19 8:22 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-07-15 11:43 Building libm library Harish 2021-07-15 17:48 ` Jeff Johnston 2021-07-16 0:54 ` Harish 2021-07-16 3:45 ` Jeff Johnston 2021-07-16 5:04 ` Harish 2021-07-19 8:19 ` Paul Zimmermann 2021-07-19 8:22 ` Harish
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).