public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@redhat.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: *ping* [Patch] (2/n) newlib: Move vasniprintf.c to ELIX 1 (was: Build-dependency issues with ELIX_LEVEL)
Date: Wed, 6 Apr 2022 12:25:59 -0400	[thread overview]
Message-ID: <CAOox84vNhBfjoEDYTmSuvm035R+C410V3YApQT4SuAXtELK-nQ@mail.gmail.com> (raw)
In-Reply-To: <fef133d2-b92e-18a6-6038-2e627473a9d0@codesourcery.com>

Tobias,

Looking at the standard:
https://www.sourceware.org/elix/api/current/api.html

vasnprintf and vasniprintf should not be made lower than vasprintf and
aprintf which are
specifically mentioned in the standard as 2.   Regardless, vdprintf and
vdiprintf should never have been Level 1.
I think that moving vdprintf/vdiprintf to level 4 is the correct solution
as part of the EL/IX level benefit is to reduce unused/unneeded
functionality in the lower levels.  As no one has found this before,
vdprintf or vdiprintf are clearly not basic Level 1 functions and
moving to 4 won't affect current users as it wouldn't work unless the level
is 4 or unspecified.

-- Jeff J.


On Wed, Apr 6, 2022 at 1:12 AM Tobias Burnus <tobias@codesourcery.com>
wrote:

> *ping*
>
> On 30.03.22 12:56, Tobias Burnus wrote:
> > Attached is a revised version of the patch in the first email in the
> > thread.
> > Found when looking for referenced but not provided functions
> > with nvptx, which sets ELIX Level to 1.
> >
> >
> > libc/stdio/vdiprintf.c's _vdiprintf_r calls _vasniprintf_r
> > The file is compiled with ELIX Level 1.
> >
> > The function _vasniprintf_r is provided either via
> > * libc/stdio/vasniprintf.c which calls _svfiprintf_r
> > * libc/stdio/vasnprintf.c (only '#ifdef _NANO_FORMATTED_IO')
> >   which calls _svfprintf_r
> >
> > We can ignore the second file as no NANO function calls
> > it. Thus, only the first file (vasniprintf.c) remains.
> >
> > The _svfiprintf_r / _svfiprintf_r are provided by
> > libc/stdio/(nano-)vfprintf.c
> > Those files are also available with ELIX Level 1.
> >
> >
> > Solution: Also build vasniprintf.c with ELIX Level 1
> > instead of building it with ELIX Level 4.
> >
> > The change should be save as the only library call I see
> > in that file (vasniprintf.c) is to vfprintf.c. And on the
> > caller side, the call to _vasniprintf_r is not guarded by
> > any #if. Thus, no new dependencies should get introduced
> > by this change.
> >
> >
> > OK? Comments?
> >
> > Tobias
> > (Makefile.inc patch + regenerated Makefile.in as separate patch)
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201,
> 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer:
> Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München;
> Registergericht München, HRB 106955
>
>

      reply	other threads:[~2022-04-06 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29  9:14 Build-dependency issues with ELIX_LEVEL Tobias Burnus
2022-03-30  9:43 ` [Patch] (1/n) newlib: Only call _fputwc_r if ELIX_LEVEL >= 4 (was: Build-dependency issues with ELIX_LEVEL) Tobias Burnus
2022-03-30 20:02   ` Jeff Johnston
2022-03-30 10:56 ` [Patch] (2/n) newlib: Move vasniprintf.c to ELIX 1 " Tobias Burnus
2022-04-06  5:11   ` *ping* " Tobias Burnus
2022-04-06 16:25     ` Jeff Johnston [this message]

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=CAOox84vNhBfjoEDYTmSuvm035R+C410V3YApQT4SuAXtELK-nQ@mail.gmail.com \
    --to=jjohnstn@redhat.com \
    --cc=newlib@sourceware.org \
    --cc=tobias@codesourcery.com \
    /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).