public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@redhat.com>
To: Harish <harishcse44@gmail.com>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: Building libm library
Date: Thu, 15 Jul 2021 23:45:56 -0400	[thread overview]
Message-ID: <CAOox84uPnoowphGg2mx_pN7P_S37Fd5cGXNeSmG7F4ztLF7QaQ@mail.gmail.com> (raw)
In-Reply-To: <CA+BROwCMmqg+1EgGoq7TaTrgnqQZqisSO2wi+-N-bh9wdJOCjQ@mail.gmail.com>

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
>>>
>>>

  reply	other threads:[~2021-07-16  3:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 11:43 Harish
2021-07-15 17:48 ` Jeff Johnston
2021-07-16  0:54   ` Harish
2021-07-16  3:45     ` Jeff Johnston [this message]
2021-07-16  5:04       ` Harish
2021-07-19  8:19 ` Paul Zimmermann
2021-07-19  8:22   ` Harish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOox84uPnoowphGg2mx_pN7P_S37Fd5cGXNeSmG7F4ztLF7QaQ@mail.gmail.com \
    --to=jjohnstn@redhat.com \
    --cc=harishcse44@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).