public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: C Howland <cc1964t@gmail.com>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: [PATCH] newlib: remove unused fenv flags
Date: Thu, 10 Feb 2022 12:26:55 -0600	[thread overview]
Message-ID: <CAF9ehCXLT0BXQDfRtHamvTAc1ne0J1QuDGzEwjwhidqNCqHj0A@mail.gmail.com> (raw)
In-Reply-To: <CANk6obQ2c4Jpj3Z=2wnepawH+RYUvkOrZZntFPzGziLByQCC7Q@mail.gmail.com>

On Thu, Feb 10, 2022 at 12:03 PM C Howland <cc1964t@gmail.com> wrote:
>
> >
> >
> > ------------------------------
> > *From:* Newlib <newlib-bounces+craig.howland=caci.com@sourceware.org> on
> > behalf of Corinna Vinschen <vinschen@redhat.com>
> > *Sent:* Thursday, February 10, 2022 10:04 AM
> > *To:* newlib@sourceware.org <newlib@sourceware.org>
> > *Subject:* Re: [PATCH] newlib: remove unused fenv flags
> >
> >
> >
> > On Feb 10 00:53, Mike Frysinger wrote:
> > > These look like they were just copied & pasted from common/Makefile.am.
> > > The funcs in this dir are all stubs that don't actually call any math
> > > or builtin functions, and a simple compile shows they produce identical
> > > object code.  So delete to simplify the build rules.
> > > ---
> > >  newlib/libm/fenv/Makefile.am |  3 --
> > >  newlib/libm/fenv/Makefile.in | 90 +++---------------------------------
> > >  2 files changed, 6 insertions(+), 87 deletions(-)
> > >
> > > diff --git a/newlib/libm/fenv/Makefile.am b/newlib/libm/fenv/Makefile.am
> > > index 50b59004c17e..66755e394cb7 100644
> > > --- a/newlib/libm/fenv/Makefile.am
> > > +++ b/newlib/libm/fenv/Makefile.am
> > > @@ -6,11 +6,8 @@ src =        feclearexcept.c fe_dfl_env.c fegetenv.c
> > fegetexceptflag.c \
> > >       fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \
> > >       fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c
> > >
> > > -lib_a_CFLAGS = -fbuiltin -fno-math-errno
> > > -
> > >  noinst_LIBRARIES = lib.a
> > >  lib_a_SOURCES = $(src)
> > > -lib_a_CFLAGS += $(AM_CFLAGS)
> > >
> > >  # A partial dependency list.
> > >
> > > --
> > > 2.34.1
> >
> > Ok.
> >
> >
> > Thanks,
> > Corinna
> >
>
>
> No, not OK, it doesn't sound like.  The fenv functions are all
> machine-specific and the files in the libm/fenv directory are all stubs
> (which they clearly state internally).  Unless all targets were checked
> (and it doesn't sound like they were), the conclusion is faulty that no
> difference happens.  Taking away -fbuiltin would definitely break any
> machine source relying on it, but not the stubs.

I think these are analogous to the default implementations of
str* and mem* methods. All libm builds should get a stub if they
don't provide an architecture specific override. And the only way
to get a functional implementation AFAIK is to have an architecture
specific version.

I know I helped add a lot of these implementations but I'm drawing
a blank beyond that.

--joel

> Craig

  reply	other threads:[~2022-02-10 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10  5:53 Mike Frysinger
2022-02-10 15:04 ` Corinna Vinschen
     [not found]   ` <BN2P110MB154483250B72C97D261707D79A2F9@BN2P110MB1544.NAMP110.PROD.OUTLOOK.COM>
     [not found]     ` <CANk6obT5ChTU2cWvQWM5dcWDPmV3JOmKJGCLGsCvKD+np1EVrg@mail.gmail.com>
2022-02-10 18:02       ` C Howland
2022-02-10 18:26         ` Joel Sherrill [this message]
2022-02-10 18:41         ` Mike Frysinger
2022-02-10 19:18           ` C Howland
2022-02-10 19:53             ` Joel Sherrill
2022-02-11 10:09             ` Mike Frysinger
2022-02-11 16:10               ` C Howland
2022-02-12 20:42                 ` Mike Frysinger
2022-02-14 16:49                   ` C Howland
2022-02-14 17:51                     ` Joel Sherrill

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=CAF9ehCXLT0BXQDfRtHamvTAc1ne0J1QuDGzEwjwhidqNCqHj0A@mail.gmail.com \
    --to=joel@rtems.org \
    --cc=cc1964t@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).