Re: [PATCH v2 5/6] Makefile: Order the top-level stamp files before the subdirectory fan-out
Sam James <[email protected]> Thu, 06 Aug 2026 19:05:55 +0100
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Organization | Gentoo |
| Message-ID | <[email protected]> |
Adhemerval Zanella <[email protected]> writes: > The archive rules in Makerules list every stamp file as a prerequisite, > including the top level's own, and the elf sub-make evaluates them to > build libc_pic.a for the librtld.map link. A sub-make can only create > the stamp files of its own directory, so when the top-level ones do not > exist yet it fails with: > > make[2]: *** No rule to make target '.../stamp.os', needed by > '.../libc_pic.a'. Stop. > > The serial recursion created them before the subdirectories through the > prerequisite order of subdir_lib; the parallel recursion (commit > 7cac99621e96) does not. Add them as prerequisites of the object-building > per-subdirectory targets. Reviewed-by: Sam James <[email protected]> > --- > Makefile | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Makefile b/Makefile > index b9fac6f47c6..d559c428736 100644 > --- a/Makefile > +++ b/Makefile > @@ -575,6 +575,14 @@ $(foreach t,$(+elf_last_subdir_targets),$(eval \ > elf/$(t): $(addsuffix /$(t),$(filter-out elf,$(subdirs))))) > endif > > +# The archive rules in Makerules list every stamp file as a > +# prerequisite of libc_pic.a, which the elf sub-make evaluates for the > +# librtld.map link, but a sub-make can only create its own directory's > +# stamps. Create the top-level ones before the fan-out. > +$(foreach t,$(+elf_last_subdir_targets),$(eval \ > + $(addsuffix /$(t),$(subdirs)): \ > + $(foreach o,$(object-suffixes-for-libc),$(common-objpfx)stamp$(o)))) > + > # Pass barriers: a subdirectory 'others' build links programs against > # the libraries, so the 'lib' pass (including the top-level libc.so > # link) must have completed.
signature.asc
(application/pgp-signature, 418 B)
-----BEGIN PGP SIGNATURE----- iQEBBAEWCgCpFiEEJaa7iN2bdkxrVUHCc4QJ9SDfkZAFAmp0zQMbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyNUE2QkI4OEREOUI3NjRDNkI1NTQx QzI3Mzg0MDlGNTIwREY5MTkwDxxzYW1AZ2VudG9vLm9yZwAKCRBzhAn1IN+RkD8n AQCc5GH7eCzbGMG8Jiof2xxdzaT6W9BBGLuruHvNfhA3GwEAgACw/WXzH1JfhUJM MdYJ1IuS4TlGuRnXv28zWd8PaQk= =0LI9 -----END PGP SIGNATURE-----