Re: [PATCH 1/7] newlib: move AC_NO_EXECUTABLES logic up to common code

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <YgSTx7mFtp3obegW@vapier>
On 09 Feb 2022 19:42, Jon Turney wrote:
> On 05/02/2022 07:34, Mike Frysinger wrote:
> > This logic was added to libc & libm to get it working again after some
> > reworks in the CPP handling, but now that that's settled, let's move
> > this to the common newlib configure logic.  This will make it easier
> > to consolidate all the configure calls into the top-level newlib dir.
> > 
> > This does create a lot of noise in the generate scripts, but that's
> > because of the ordering of the calls, not because of correctness. We
> > will try to draw that back down in follow up commits as we modernize
> > the toolchain calls in here.
> 
> Somehow, this change seems to prevent a self-hosted cygwin build from 
> working.
> 
> See e.g. https://github.com/cygwin/cygwin/runs/5118411294
> 
> Comparing this with the previous successful run, it looks like:
> 
> Because doc/makedoc appears in noinst_DATA, which the target all depends 
> on, it tries to make the target doc/makedoc (without EXEEXT_FOR_BUILD 
> appended), which uses a one step built-in(?) compiler rule, and fails as 
> the directory $builddir/doc/ doesn't exist yet.
> 
> Note that 'make info' still works, as this properly depends on $(MKDOC).
> 
> So maybe something like this is needed?  But I have no idea what this 
> change did to stop it working as before...
> 
> > --- a/newlib/doc/local.mk
> > +++ b/newlib/doc/local.mk
> > @@ -1,8 +1,8 @@
> > -# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> > -noinst_DATA += doc/makedoc
> > -
> >  MKDOC = doc/makedoc$(EXEEXT_FOR_BUILD)
> >  
> > +# We can't use noinst_PROGRAMS, because automake will add $(EXEEXT).
> > +noinst_DATA += $(MKDOC)
> > +
> >  # We don't use CFLAGS with CC_FOR_BUILD because here CFLAGS will
> >  # actually be CFLAGS_FOR_TARGET, and in some cases that will include
> >  # -Os, which CC_FOR_BUILD may not recognize.

i don't have an answer off the top of my head as to why it was working but
now is not, but if we focus on the failures, i think we have bugs regardless
here that should be fixed.

first your change here looks correct.  but i don't think it suffices.  we
also need the actual .def files to depend on the tool since they need it to
exist.  i'll push a fix shortly.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIEk8cACgkQQWM7n+g3
9YEHKxAAyVY1t5+fZkJbIiN5zeHvd/KXuhdwMajBDYFlsQ87r5qwR80JxyGlu3xb
yyD+Kzv4eWkGhqVKX+ZdduxkUE5pzhLnfn2lOkYYo7d3+Nd3PvCuyweFzpPImC/J
RboCGCN8HDKXt9ncHZaJ3KPZU61omHJJ1Qts7M9i5ieg8qDES7y4m4zAlYVn20jX
MVBmHC+sc9sjtevvWwaTWFZiobYIyXWFKP40ZGBfwLb3z1DsD60crXrnKEgWfIEB
sQ7y9qRwflWAeDtzDJvy3OR7lLMAlFVNRLWwFFgZD1Xe1+orxkI5s75dXb/Iob54
BQq8igV3Oayv4Zn7YbNQ+LgYphlcnvblY+glLLFTaGB2jKAHsZxU737he8gHrclb
GXCJRchb6hURtKGCYLsQuN3m/Y/+abnb6FNYUk4i0v8Lz/El6YKXZSG8gDst/cVx
LVoYDG+up7//7Ffrnnu6gpyJmsFUo5b9yLzRc+BxXF9z+WrlU6/O99x9PDnnGfX6
rtcK8CV3s6o5Gf5IZdXCiCTZTZAlVuKrvfutoCBB50xK1YB5j9uYTYhDTd51MEKY
IO1KoZ6M4UmwhAcTZt1p6V4vcxj6GEqblVaWHnn4wgxYeQucN53D164V6ClDHvj0
ZQp9VovlI4xUlDiZyBP3M8Vxt5R402kFQ7Mf6fn7mCyEYce2rMQ=
=ubd/
-----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.