public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: C Howland <cc1964t@gmail.com>
Cc: newlib@sourceware.org
Subject: Re: [PATCH] newlib: remove unused fenv flags
Date: Fri, 11 Feb 2022 05:09:54 -0500	[thread overview]
Message-ID: <YgY18sCOk3wQZ/4y@vapier> (raw)
In-Reply-To: <CANk6obTZuJX4Tc=u_cfYVtU=T+iYkt5dYeprX51TRepAzwzE+Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2740 bytes --]

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.

>      The second is if the main branch is intended to also be a template for
> new machine directories.  The C part of it definitely is, but the makefile
> does not necessarily fall into that category.  So I'll turn that into a
> question:  if the main branch makefile does not serve as a template for the
> machine directories, where would that be?  That is, while these arguments
> are superfluous in the main dir,  should they remain in comments as an aid
> to machine developers, in the same manner in which the source code is
> annotated?  (It's not so much these specific arguments, themselves, but
> having an example how ones like this would be added.  These particular ones
> are reasonable for serving that purpose, however.)  The real makefile seems
> the best place for this.  We could have Makefile.template, or something
> along those lines, but the real one is forced to be valid by being used,
> while maintaining a separate template would be additional maintenance work.
>      So if I'm wrong about the viewpathing model, a suggestion:  rather
> than deleting the lines, comment them out and add some comment text
> suitable for a template.  If you're amenable to this approach and would
> like, I (or possibly Joel if he's interested) could contribute suggested
> comments for you to use.

this isn't specific to fenv/.  you can make this argument against any of
the subdirs.

even then, the use of -fbuiltin & -fno-math-errno kind of seem like the
opposite of what you're arguing.  -fno-math-errno shouldn't be used in
general as it is an optimization that can break correctness wrt IEEE
standards.  -fbuiltin probably shouldn't be applied to entire subdirs
without strict review since it allows the compiler to rewrite calls
that assume C library behavior, but the C library might be violating
those assumptions specifically as part of its implementation.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2022-02-11 10:09 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 [this message]
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=YgY18sCOk3wQZ/4y@vapier \
    --to=vapier@gentoo.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).