[PATCH] newlib: remove unused fenv flags

Mike Frysinger vapier@gentoo.org
Sat Feb 12 20:42:09 GMT 2022

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20220212/4194e7cb/attachment.sig>

More information about the Newlib mailing list