Re: [PATCH] newlib: remove unused fenv flags

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <YgVcdXkmU/w5+V+W@vapier>
On 10 Feb 2022 13:02, C Howland wrote:
> > 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.
> 
> 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.

you seemed to be confused as to how this works.  there is no machine code
here.  there are only stubs.  machine code lives under libm/machine/$arch/,
not under libm/fenv/.  compiler flags in one directory only affects files
in that one directory, they don't propagate out to every other directory in
the build.

i'll also note that none of the machine code explicitly uses -fno-builtin.
there is a configure option for it that affects all newlib files instead.

so either cite exactly what doesn't work, or withdraw your objection please.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIFXHUACgkQQWM7n+g3
9YEtzg/+ONB002JyeOjRXE75QG7AlpGLNvh+/MmESlU3XVLfPNuRzZhgnhMzwKtA
Euu/d5gsSiTDMTLMInPEs4oofgtAphKGRTcrI2SCnq7i/N9F76PoNY6Aq7jY5reZ
HzQcLYPBIEEp1QC0odDq9YgFp2cQKfBSDGJu9cSD8rnDSxo7ZF3Lq94qvonarn7n
Z/N6RUrXPEMLAgrmZHIiuW6V0FgBrMP54H00T3ztLAQ0Oyvjt7HJv4v7eRVzoinU
4zqw0H9iHNh1Lw/+idEqUGJ7+i3J5E2HyhemdLliiP+TgawGXdYU7+beEu04W7fg
SrdBejQy3YJS90d5zTZbJ4NZFff3avELYTdMEdipZ20XiZ+pXh3oMctjif7GBbEQ
8Ih5xIHZYYvGeOYIrw+F09tP2w5bE4l8IXQUAkuCXnNNtl+UxoJgZS3ED3L9xrfX
7l5mewEHhFgsiKUZ+vA438mNo6O5bJLX4mHr29JidJaT14aADzGGL7oClQlQcJqB
npNSnrqjrZ2v+3jfKrD3xEM5lOGeZY70stknBFP7dKBb4uFxQYREEsQqkrTPJ0Gx
ibhLK0vv06/RR2QmrIMSgv3NjZjJLQoY1btisjnvEOvvQ+LUxG9dm8KF5gyiw1jW
39CQcQ/q0GzMLhOQZtbxgdfoOcPVlUGYS7z5DqBq7a9+PZ7wsSA=
=6gYd
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.