kumquat-buildroot/support/misc
Gleb Mazovetskiy 6fbdf51596 Makefile: Parallelize glibc locale generation
Parallelizes locale generation based on `BR2_JLEVEL` setting.

Locale generation always runs during the finalize stage and can consume
a significant amount of time. Parallelizing it greatly reduces that time
on multi-core machines.

To parallelize it, we first invoke `localedef` for every locale in
parallel with the `--no-archive` option. This creates the intermediate
locale data instead of writing to the finally archive directly.

Then, we invoke `localedef` again once to create the archive from the
intermediate compiled locale data files.

We have to do it this way because `localedef` does not do any locking
when writing to the archive file, so calling it without `--no-archive`
concurrently could result in a corrupt archive file or an archive file
that is missing some locales.

While we're at it, make two additional improvements:
- Remove locale-archive before adding to it. Otherwise, repeated
  applications of target-finalize will keep on growing the file.
- Sort the locales when creating locale-archive so its contents are
  reproducible.

We use `find` to collect the installed locales rather than LOCALES. This
makes it possible for something else (skeleton, overlay, custom package)
to create and install additional locales and still have them added to
locale-archive.

Signed-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>
[Arnout:
 - Remove -j$(PARALLEL_JOBS), it's already part of $(MAKE)
 - Remove HOST_DIR, TARGET_DIR, STAGING_DIR, they're already exported
 - Extend commit message
]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-07-25 16:46:30 +02:00
..
Buildroot.cmake support/cmake: Explicitly set CMAKE_SYSTEM 2019-08-03 19:17:32 +02:00
gen-glibc-locales.mk Makefile: Parallelize glibc locale generation 2021-07-25 16:46:30 +02:00
gitlab-ci.yml.in gitlab-ci: move before-script before script 2020-09-09 09:25:56 +02:00
relocate-sdk.sh support/scripts: relocate-sdk.sh now uses a normal pipe to find strings 2017-07-20 22:29:12 +02:00
target-dir-warning.txt support/misc/target-dir-warning.txt: fix typo 2017-06-14 21:14:59 +02:00
toolchainfile.cmake.in package/pkg-cmake.mk: don't unconditionally set CMAKE_CXX_COMPILER 2021-04-02 23:50:16 +02:00
utils.mk package/meson: bump to version 0.55.0 2020-07-18 15:53:43 +02:00
Vagrantfile Update for 2021.05 2021-06-06 23:21:08 +02:00