From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 041D13840025 for ; Fri, 16 Jul 2021 03:46:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 041D13840025 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626407170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iCZxlijGNq+RGrXECnUFFu5nNYkCzNUe9NVtRfcqC4c=; b=dnz/jI62FcqqB/KQw2bIjkjdVGEA5ZTrluJAkXoMCCDBYXEo2Ex5+mB/p+9KKnt5Kp9iIC 7/uFDEFIsXL8CtOhWBgHtPHnk8WN7ABxXRqcs43+A43ksQITcMXlY4S16yBF4nka/1kaV2 TbXvoIddiL5aYRpDmLH6b5tZRQi9ngU= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-240-_DTVWi2sMMGMuChb9jzUOg-1; Thu, 15 Jul 2021 23:46:08 -0400 X-MC-Unique: _DTVWi2sMMGMuChb9jzUOg-1 Received: by mail-pf1-f197.google.com with SMTP id q22-20020a62e1160000b029032b880fc048so5930657pfh.21 for ; Thu, 15 Jul 2021 20:46:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iCZxlijGNq+RGrXECnUFFu5nNYkCzNUe9NVtRfcqC4c=; b=HTPC86gzM2NzOzAXltgci/4+JFl/v/wsknNu9ZpQFCUCkMZaM5xN1ETn62Cw7AipgK s+QIYLqbQmv26DLJL1/c/olyfBRYPUyDtaz24oeieF4E0AmC5ZhI4irzbEeU/t1BSRnz eNacB/E+lQ2oBVCjPJXNxiRDULKn3Sk9/EPxl4Qt1knfZkj3w+5pkMgAJMpBQGchFAzc bos/hVki9II8EqroicaMOudKOowSNEeOxLRQX/lbVIN7n6FBlsCun4h9W7c9lE8GzMWu eRgZ+4gEbv3fsAPrJG+HTyWGm8M7k1cVPwQT/KhtrFl4Arnna7c/GbPKx+vdNH5idJv/ YIMA== X-Gm-Message-State: AOAM5304PFsSlArQdA9oT8ObcU7YnJHhxzyOjSEd6GW290MEIabAMct6 G39CPJ30hbPx6VeP5wo76fpSjHaGgQlIrUVcu0qRy8Gt3ie7mCz/GyMglEQRqIGfluFGxLCVWsC +kS5Gi/ojtnaXwnm0N6GRHdnP9vic0G8= X-Received: by 2002:a17:90b:ecd:: with SMTP id gz13mr7732216pjb.152.1626407167693; Thu, 15 Jul 2021 20:46:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys7ParoUn45e5rJHc/0kxUEVZAhoX3UyGPZC0jG+iEah4GsKcsdqoV068osn3GQWALpD2KZNgVsWCAnJfAxVY= X-Received: by 2002:a17:90b:ecd:: with SMTP id gz13mr7732207pjb.152.1626407167491; Thu, 15 Jul 2021 20:46:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jeff Johnston Date: Thu, 15 Jul 2021 23:45:56 -0400 Message-ID: Subject: Re: Building libm library To: Harish Cc: Newlib Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jjohnstn@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2021 03:46:12 -0000 On Thu, Jul 15, 2021 at 8:54 PM Harish 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, 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 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 >>> >>>