From 9bb4f83a08956ed0a038b53b3d4b3244ab974ee8 Mon Sep 17 00:00:00 2001 From: "yann.morin@orange.com" Date: Fri, 14 Oct 2022 13:18:25 +0200 Subject: [PATCH] Makefile: really generate glibc locales in parallel To generate the glibc locale data, we call into a recursive Makefile, so as to generate locales in parallel. This is done as part of a target-finalize hook. However, that hook is registered after all packages have been parsed, and as such, it maye be registered after hooks defined in packages. Furthermore, the expansion of target-finalize hooks is done in a recipe, so it is not easy to understand whether this generates a "simple" rule or not. As a consequence, despite the use of $(MAKE), make may not notice that the command is a recursive call, and will decide to close the jobserver file-descriptors, yielding warnings like: make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. This causes the lcoale data to not be generated in parallel, which is initially all the fuss about using a sub-makefile... So, do as suggested, and prepend the hook with a '+', so that it is explicit to make that it should not close its jobserver fds. Fixes: 6fbdf5159607 (Makefile: Parallelize glibc locale generation) Signed-off-by: Yann E. MORIN Cc: Gleb Mazovetskiy Signed-off-by: Yann E. MORIN (cherry picked from commit 4164ed24f277b24096ab065aa85b7de9d0c80c02) Signed-off-by: Peter Korsgaard --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 93125e16a6..03f2154f9f 100644 --- a/Makefile +++ b/Makefile @@ -664,7 +664,7 @@ ifneq ($(GLIBC_GENERATE_LOCALES),) PACKAGES += host-localedef define GENERATE_GLIBC_LOCALES - $(MAKE) -f support/misc/gen-glibc-locales.mk \ + +$(MAKE) -f support/misc/gen-glibc-locales.mk \ ENDIAN=$(call LOWERCASE,$(BR2_ENDIAN)) \ LOCALES="$(GLIBC_GENERATE_LOCALES)" \ Q=$(Q)