diff options
author | Ray Donnelly <mingw.android@gmail.com> | 2014-04-12 13:19:06 +0100 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2016-08-23 11:00:27 -0700 |
commit | cc86d80da26aa27c382dee5ef44d21f450b3ae60 (patch) | |
tree | 36d12943672cfa5eaba1cefc91d749e5e16cf7b9 /scripts/build/libc | |
parent | 27fed7e5f01495ce25dd605bb031954ed186f614 (diff) | |
download | crosstool-ng-cc86d80da26aa27c382dee5ef44d21f450b3ae60.tar.gz crosstool-ng-cc86d80da26aa27c382dee5ef44d21f450b3ae60.tar.bz2 crosstool-ng-cc86d80da26aa27c382dee5ef44d21f450b3ae60.zip |
glibc: Build manuals and locales last
Rather then building the manuals and locales for each multilib target, only
build the manuals on the last multilib target.
If you are not building a multilib toolchain, then the first libc build will
be the last.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'scripts/build/libc')
-rw-r--r-- | scripts/build/libc/glibc.sh | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 2efcf8dc..cff6d95e 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -72,6 +72,7 @@ do_libc_backend() { local multilib local multi_dir local multi_flags + local multi_last local target local extra_dir local target @@ -102,7 +103,14 @@ do_libc_backend() { # If gcc is not configured for multilib, it still prints # a single line for the default settings multilibs=( $("${CT_TARGET}-gcc" -print-multi-lib 2>/dev/null) ) + last_multi= for multilib in "${multilibs[@]}"; do + last_multi=$(( ${#multilibs[@]} - 1 )) + if [ "${multilib%%;*}" = "${multilibs[last_multi]%%;*}" ]; then + # This is the last multilib build or multilib is '.' + # (default target, not multilib) + multi_last=y + fi multi_dir="${multilib%%;*}" if [ "${multi_dir}" != "." ]; then CT_DoStep INFO "Building for multilib subdir='${multi_dir}'" @@ -167,7 +175,8 @@ do_libc_backend() { libc_headers="${libc_headers}" \ libc_startfiles="${libc_startfiles}" \ libc_full="${libc_full}" \ - libc_target="${target}" + libc_target="${target}" \ + multi_last="${multi_last}" CT_Popd if [ "${multi_dir}" != "." ]; then @@ -188,6 +197,7 @@ do_libc_backend() { # libc_full : Build full libc : bool : n # extra_flags : Extra CFLAGS to use (for multilib) : string : (empty) # extra_dir : Extra subdir for multilib : string : (empty) +# multi_last : The last multilib target : bool : n do_libc_backend_once() { local libc_headers local libc_startfiles @@ -205,6 +215,7 @@ do_libc_backend_once() { local float_extra local endian_extra local libc_target="${CT_TARGET}" + local multi_last local arg for arg in "$@"; do @@ -499,7 +510,10 @@ do_libc_backend_once() { install_root="${install_root}" \ install - if [ "${CT_BUILD_MANUALS}" = "y" ]; then + if [ "${CT_BUILD_MANUALS}" = "y" -a "${multi_last}" = "y" ]; then + # We only need to build the manuals once. Only build them on the + # last multilib target. If it's not multilib, it will happen on the + # only target. CT_DoLog EXTRA "Building and installing the C library manual" # Omit JOBSFLAGS as GLIBC has problems building the # manuals in parallel @@ -510,7 +524,7 @@ do_libc_backend_once() { ${CT_PREFIX_DIR}/share/doc fi - if [ "${CT_LIBC_LOCALES}" = "y" ]; then + if [ "${CT_LIBC_LOCALES}" = "y" -a "${multi_last}" = "y" ]; then do_libc_locales fi fi # libc_full == y |