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: Mon, 14 Feb 2022 11:51:06 -0600	[thread overview]
Message-ID: <CAF9ehCUP5g4sUderzUit4bEBofsVdJ=OS-v-7Yec8Smax+USYg@mail.gmail.com> (raw)
In-Reply-To: <CANk6obQpW49VG7_URpLaub55-ZkkjLDN_12OZp8LG+qXbeQu2w@mail.gmail.com>

On Mon, Feb 14, 2022, 10:50 AM C Howland <cc1964t@gmail.com> wrote:

> On Sat, 12 Feb 2022 at 15:42, Mike Frysinger <vapier@gentoo.org> wrote:
>
> > On 11 Feb 2022 11:10, C Howland wrote:
> > > On Fri, 11 Feb 2022 at 05:09, Mike Frysinger wrote:
> > > > On 10 Feb 2022 14:18, C Howland wrote:
> > > > >      First, would be if a machine directory can override just some
> > files
> > > > > from the main--as if viewpathed--and this can also apply to the
> > makefile.
> > > > > (Does the machine directory totally replace the main branch
> > directory, or
> > > > > can it be supplemental?  My impression was a viewpath model, which
> > can be
> > > > > supplementary or replace all.)  If I'm wrong about this, no
> problem,
> > no
> > > > > objection for this specific reason.
> > > >
> > > > assuming "viewpathed" means "VPATH in the makefile", then no, that's
> > not
> > > > how newlib works.  that is how glibc works, so maybe you're thinking
> > of that.
> > > > newlib compiles all objects in all subdirs in isolation.  it then
> > assembles
> > > > the final libm.a/libc.a in a specific order (with the machine dir
> > last).
> > > > so it adds fenv/*.o to libm.a by basename, then replaces any existing
> > ones
> > > > with machine/$arch/*.o.
> > >
> > > Yes, I meant as in VPATH in a makefile with individual file
> granularity.
> > > So, yes, I was thinking not the right thing for newlib, sorry for
> > > conflating Newlib with other things.
> >
> > i'm not sure pulling off a vpath build in newlib would be that easy.  or
> at
> > least, it would require writing more custom logic that we get for free
> when
> > we use automake.  at this point, with the size of newlib, i'm not sure we
> > would gain that much.  yes, we double compile the common code, but since
> > the
> > files are small and so few, so eh.
> >
> > > OK, neither you nor Joel think templating for the makefile to be of
> much
> > > use, that makes a majority in comments so far and I'll go along.
> (Since
> > > fenv is special and tricky I think we would be better off with better
> > > instructions for this one particularly, as it would encourage/help
> people
> > > to add new targets.)
> > > I agree that these specific compiler options do need care taken.  But
> > > that's part of the reason they're good examples for the fenv
> environment,
> > > as that's a tricky subject that needs special attention and might need
> > > things like them.  But at the same time I agree that they are also for
> > the
> > > same reason potentially dangerous to suggest.
> >
> > with the new unified non-recursive automake patch i posted, it actually
> > would be feasible to put compiler settings in one makefile and have them
> > apply to others (by declaring the flags by filename).  but the question
> > of whether we even want to do that in the first place is still open.
> > -mike
> >
>
>
> Given the "take whole machine directory" model, it's probably best to take
> this patch as proposed.  The thoughts about templating fenv to keep it easy
> for people not familiar with automake stuff, trying to avoid that aspect
> being an impediment to people taking on doing fenv for a new platform, can
> be handled separately by adding some separate notes.
>

I don't know that any of the fenv implementations would have benefited from
a template approach anyway. All the ones I was involved in ported from some
other existing source. We just tried to minimize the changes as we merged
it into the newlib structure.

Certainly if someone does implement it from scratch for newlib first, they
can always copy from an existing implementation. But unless it is unusual
embedded only architecture, will probably always port from another project.

--joel

Craig
>

      reply	other threads:[~2022-02-14 17:51 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
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 [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='CAF9ehCUP5g4sUderzUit4bEBofsVdJ=OS-v-7Yec8Smax+USYg@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).