Rename JOBSFLAGS -> CT_JOBSFLAGS

... so that it is saved/restored when restarting the build.

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2019-04-04 16:47:50 -07:00
parent 8e24bb22d0
commit 693d3943b1
20 changed files with 53 additions and 53 deletions

View File

@ -199,11 +199,11 @@ do_binutils_backend() {
if [ "${static_build}" = "y" ]; then
extra_make_flags+=("LDFLAGS=${ldflags} -all-static")
CT_DoLog EXTRA "Prepare binutils for static build"
CT_DoExecLog ALL make ${JOBSFLAGS} configure-host
CT_DoExecLog ALL make ${CT_JOBSFLAGS} configure-host
fi
CT_DoLog EXTRA "Building binutils"
CT_DoExecLog ALL make "${extra_make_flags[@]}" ${JOBSFLAGS}
CT_DoExecLog ALL make "${extra_make_flags[@]}" ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing binutils"
CT_DoExecLog ALL make install
@ -222,7 +222,7 @@ do_binutils_backend() {
fi
manuals_install=( "${manuals_for[@]/#/install-pdf-}" )
manuals_install+=( "${manuals_for[@]/#/install-html-}" )
CT_DoExecLog ALL make ${JOBSFLAGS} pdf html
CT_DoExecLog ALL make ${CT_JOBSFLAGS} pdf html
CT_DoExecLog ALL make "${manuals_install[@]}"
fi
@ -290,7 +290,7 @@ do_elf2flt_backend() {
"${CT_ELF2FLT_EXTRA_CONFIG_ARRAY[@]}"
CT_DoLog EXTRA "Building elf2flt"
CT_DoExecLog ALL make ${JOBSFLAGS} CPU=${CT_ARCH}
CT_DoExecLog ALL make ${CT_JOBSFLAGS} CPU=${CT_ARCH}
CT_DoLog EXTRA "Installing elf2flt"
CT_DoExecLog ALL make install
@ -349,7 +349,7 @@ do_binutils_for_target() {
"${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
CT_DoLog EXTRA "Building binutils' libraries (${targets[*]}) for target"
CT_DoExecLog ALL make ${JOBSFLAGS} "${build_targets[@]}"
CT_DoExecLog ALL make ${CT_JOBSFLAGS} "${build_targets[@]}"
CT_DoLog EXTRA "Installing binutils' libraries (${targets[*]}) for target"
CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" "${install_targets[@]}"

View File

@ -618,23 +618,23 @@ do_gcc_core_backend() {
# Next we have to configure gcc, create libgcc.mk then edit it...
# So much easier if we just edit the source tree, but hey...
if [ ! -f "${CT_SRC_DIR}/gcc/gcc/BASE-VER" ]; then
CT_DoExecLog CFG make ${JOBSFLAGS} configure-libiberty
CT_DoExecLog ALL make ${JOBSFLAGS} -C libiberty libiberty.a
CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp
CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp
CT_DoExecLog CFG make ${CT_JOBSFLAGS} configure-libiberty
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -C libiberty libiberty.a
CT_DoExecLog CFG make ${CT_JOBSFLAGS} configure-gcc configure-libcpp
CT_DoExecLog ALL make ${CT_JOBSFLAGS} all-libcpp
else
CT_DoExecLog CFG make ${JOBSFLAGS} configure-gcc configure-libcpp configure-build-libiberty
CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp all-build-libiberty
CT_DoExecLog CFG make ${CT_JOBSFLAGS} configure-gcc configure-libcpp configure-build-libiberty
CT_DoExecLog ALL make ${CT_JOBSFLAGS} all-libcpp all-build-libiberty
fi
# HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here.
if [ -d "${CT_SRC_DIR}/gcc/libdecnumber" ]; then
CT_DoExecLog CFG make ${JOBSFLAGS} configure-libdecnumber
CT_DoExecLog ALL make ${JOBSFLAGS} -C libdecnumber libdecnumber.a
CT_DoExecLog CFG make ${CT_JOBSFLAGS} configure-libdecnumber
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -C libdecnumber libdecnumber.a
fi
# HACK: gcc-4.8 uses libbacktrace to make libgcc.mvars, so make it here.
if [ -d "${CT_SRC_DIR}/gcc/libbacktrace" ]; then
CT_DoExecLog CFG make ${JOBSFLAGS} configure-libbacktrace
CT_DoExecLog ALL make ${JOBSFLAGS} -C libbacktrace
CT_DoExecLog CFG make ${CT_JOBSFLAGS} configure-libbacktrace
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -C libbacktrace
fi
libgcc_rule="libgcc.mvars"
@ -652,7 +652,7 @@ do_gcc_core_backend() {
repair_cc=""
fi
CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -C gcc ${libgcc_rule} \
${repair_cc}
sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
else # build_libgcc
@ -681,9 +681,9 @@ do_gcc_core_backend() {
esac
CT_DoLog EXTRA "Building ${log_txt}"
CT_DoExecLog ALL make ${JOBSFLAGS} ${core_targets_all}
CT_DoExecLog ALL make ${CT_JOBSFLAGS} ${core_targets_all}
# Do not pass ${JOBSFLAGS} here: recent GCC builds have been failing
# Do not pass ${CT_JOBSFLAGS} here: recent GCC builds have been failing
# in parallel 'make install' at random locations: libitm, libcilk,
# always for the files that are installed more than once to the same
# location (such as libitm.info).
@ -1169,11 +1169,11 @@ do_gcc_backend() {
if [ "${CT_CANADIAN}" = "y" ]; then
CT_DoLog EXTRA "Building libiberty"
CT_DoExecLog ALL make ${JOBSFLAGS} all-build-libiberty
CT_DoExecLog ALL make ${CT_JOBSFLAGS} all-build-libiberty
fi
CT_DoLog EXTRA "Building final gcc compiler"
CT_DoExecLog ALL make ${JOBSFLAGS} all
CT_DoExecLog ALL make ${CT_JOBSFLAGS} all
# See the note on issues with parallel 'make install' in GCC above.
CT_DoLog EXTRA "Installing final gcc compiler"

View File

@ -113,7 +113,7 @@ do_zlib_backend() {
esac
CT_DoLog EXTRA "Building zlib"
CT_DoExecLog ALL make "${extra_make[@]}" ${JOBSFLAGS}
CT_DoExecLog ALL make "${extra_make[@]}" ${CT_JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
if [ "${host}" = "${CT_BUILD}" ]; then

View File

@ -105,12 +105,12 @@ do_gmp_backend() {
"${extra_config[@]}"
CT_DoLog EXTRA "Building GMP"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
if [ "${host}" = "${CT_BUILD}" ]; then
CT_DoLog EXTRA "Checking GMP"
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -s check
else
# Cannot run host binaries on build in a canadian cross
CT_DoLog EXTRA "Skipping check for GMP on the host"

View File

@ -122,12 +122,12 @@ do_mpfr_backend() {
--enable-static
CT_DoLog EXTRA "Building MPFR"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
if [ "${host}" = "${CT_BUILD}" ]; then
CT_DoLog EXTRA "Checking MPFR"
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -s check
else
# Cannot run host binaries on build in a canadian cross
CT_DoLog EXTRA "Skipping check for MPFR on the host"

View File

@ -110,12 +110,12 @@ do_isl_backend() {
--with-clang=no
CT_DoLog EXTRA "Building ISL"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
if [ "${host}" = "${CT_BUILD}" ]; then
CT_DoLog EXTRA "Checking ISL"
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -s check
else
# Cannot run host binaries on build in a canadian cross
CT_DoLog EXTRA "Skipping check for ISL on the host"

View File

@ -101,12 +101,12 @@ do_cloog_backend() {
"${cloog_opts[@]}"
CT_DoLog EXTRA "Building CLooG"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
if [ "${host}" = "${CT_BUILD}" ]; then
CT_DoLog EXTRA "Checking CLooG"
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -s check
else
# Cannot run host binaries on build in a canadian cross
CT_DoLog EXTRA "Skipping check for CLooG on the host"

View File

@ -94,12 +94,12 @@ do_mpc_backend() {
--enable-static
CT_DoLog EXTRA "Building MPC"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
if [ "${host}" = "${CT_BUILD}" ]; then
CT_DoLog EXTRA "Checking MPC"
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
CT_DoExecLog ALL make ${CT_JOBSFLAGS} -s check
else
# Cannot run host binaries on build in a canadian cross
CT_DoLog EXTRA "Skipping check for MPC on the host"

View File

@ -103,7 +103,7 @@ do_expat_backend() {
"${extra_config[@]}"
CT_DoLog EXTRA "Building expat"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing expat"
CT_DoExecLog ALL make install DESTDIR="${destdir}"
}

View File

@ -174,7 +174,7 @@ do_ncurses_backend() {
# it also builds ncurses anyway, and dedicated targets (install.includes and
# install.progs) do not do well with parallel make (-jX).
CT_DoLog EXTRA "Building ncurses"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
# STRIPPROG is handled by our wrapper around install.
CT_DoLog EXTRA "Installing ncurses"

View File

@ -100,7 +100,7 @@ do_libiconv_backend() {
"${extra_config[@]}" \
CT_DoLog EXTRA "Building libiconv"
CT_DoExecLog ALL make CC="${host}-gcc ${cflags}" ${JOBSFLAGS}
CT_DoExecLog ALL make CC="${host}-gcc ${cflags}" ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing libiconv"
CT_DoExecLog ALL make install CC="${host}-gcc ${cflags}"

View File

@ -131,7 +131,7 @@ do_gettext_backend() {
"${extra_config[@]}"
CT_DoLog EXTRA "Building gettext"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing gettext"
CT_DoExecLog ALL make install

View File

@ -67,7 +67,7 @@ do_debug_gdb_build()
if [ "${CT_BUILD_MANUALS}" = "y" ]; then
CT_DoLog EXTRA "Building and installing the cross-GDB manuals"
CT_DoExecLog ALL make ${JOBSFLAGS} pdf html
CT_DoExecLog ALL make ${CT_JOBSFLAGS} pdf html
CT_DoExecLog ALL make install-{pdf,html}-gdb
fi
@ -278,7 +278,7 @@ do_gdb_backend()
"${extra_config[@]}" \
CT_DoLog EXTRA "Building ${buildtype} gdb"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing ${buildtype} gdb"
CT_DoExecLog ALL make install ${destdir:+DESTDIR="${destdir}"}

View File

@ -20,7 +20,7 @@ avr_libc_post_cc()
"${CT_LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY[@]}"
CT_DoLog EXTRA "Building C library"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make install

View File

@ -321,7 +321,7 @@ glibc_backend_once()
# use the 'install-headers' makefile target to install the
# headers
CT_DoExecLog ALL make ${JOBSFLAGS} \
CT_DoExecLog ALL make ${CT_JOBSFLAGS} \
install_root=${multi_root} \
install-bootstrap-headers=yes \
"${extra_make_args[@]}" \
@ -371,7 +371,7 @@ glibc_backend_once()
# there are a few object files needed to link shared libraries,
# which we build and install by hand
CT_DoExecLog ALL mkdir -p "${startfiles_dir}"
CT_DoExecLog ALL make ${JOBSFLAGS} \
CT_DoExecLog ALL make ${CT_JOBSFLAGS} \
"${extra_make_args[@]}" \
csu/subdir_lib
CT_DoExecLog ALL cp csu/crt1.o csu/crti.o csu/crtn.o \
@ -392,12 +392,12 @@ glibc_backend_once()
if [ "${libc_mode}" = "final" ]; then
CT_DoLog EXTRA "Building C library"
CT_DoExecLog ALL make ${JOBSFLAGS} \
CT_DoExecLog ALL make ${CT_JOBSFLAGS} \
"${extra_make_args[@]}" \
all
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make ${JOBSFLAGS} \
CT_DoExecLog ALL make ${CT_JOBSFLAGS} \
"${extra_make_args[@]}" \
install_root="${multi_root}" \
install
@ -407,7 +407,7 @@ glibc_backend_once()
# 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
# Omit CT_JOBSFLAGS as GLIBC has problems building the
# manuals in parallel
CT_DoExecLog ALL make pdf html
CT_DoExecLog ALL mkdir -p ${CT_PREFIX_DIR}/share/doc
@ -546,7 +546,7 @@ glibc_locales()
"${extra_config[@]}"
CT_DoLog EXTRA "Building C library localedef"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
# The target's endianness and uint32_t alignment should be passed as options
# to localedef, but glibc's localedef does not support these options, which
@ -554,7 +554,7 @@ glibc_locales()
# only if it has the same endianness and uint32_t alignment as the host's.
CT_DoLog EXTRA "Installing C library locales"
CT_DoExecLog ALL make ${JOBSFLAGS} \
CT_DoExecLog ALL make ${CT_JOBSFLAGS} \
install_root="${CT_SYSROOT_DIR}" \
localedata/install-locales
}

View File

@ -196,7 +196,7 @@ mingw_w64_main()
# mingw-w64-crt has a missing dependency occasionally breaking the
# parallel build. See https://github.com/crosstool-ng/crosstool-ng/issues/246
# Do not pass ${JOBSFLAGS} - build serially.
# Do not pass ${CT_JOBSFLAGS} - build serially.
CT_DoLog EXTRA "Building mingw-w64-crt"
CT_DoExecLog ALL make

View File

@ -128,7 +128,7 @@ musl_backend_once() {
"${multi_root}${multilib_dir}/libc.so"
CT_DoLog EXTRA "Building C library"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make DESTDIR="${multi_root}" install

View File

@ -108,7 +108,7 @@ ENABLE_TARGET_OPTSPACE:target-optspace
"${CT_LIBC_NEWLIB_EXTRA_CONFIG_ARRAY[@]}"
CT_DoLog EXTRA "Building C library"
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make ${CT_JOBSFLAGS}
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make install

View File

@ -44,7 +44,7 @@ uClibc_backend_once()
local libc_mode
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count
local multilib_dir startfiles_dir
local jflag=${CT_LIBC_UCLIBC_PARALLEL:+${JOBSFLAGS}}
local jflag=${CT_LIBC_UCLIBC_PARALLEL:+${CT_JOBSFLAGS}}
local -a make_args
local extra_cflags f cfg_cflags cf
local hdr_install_subdir

View File

@ -578,7 +578,7 @@ if [ -z "${CT_RESTART}" ]; then
CT_DoLog DEBUG "LDFLAGS for host compiler: '${CT_LDFLAGS_FOR_HOST}'"
# And help make go faster
JOBSFLAGS=
CT_JOBSFLAGS=
# Override the configured jobs with what's been given on the command line
if [ -n "${CT_JOBS}" ]; then
if [ ! -z "`echo "${CT_JOBS}" | ${sed} 's/[0-9]//g'`" ]; then
@ -589,9 +589,9 @@ if [ -z "${CT_RESTART}" ]; then
# Use the number of processors+1 when automatically setting the number of
# parallel jobs.
AUTO_JOBS=$[ BUILD_NCPUS + 1 ]
[ ${CT_PARALLEL_JOBS} -eq 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${AUTO_JOBS}"
[ ${CT_PARALLEL_JOBS} -gt 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}"
[ ${CT_PARALLEL_JOBS} -eq 0 ] && CT_JOBSFLAGS="${CT_JOBSFLAGS} -j${AUTO_JOBS}"
[ ${CT_PARALLEL_JOBS} -gt 0 ] && CT_JOBSFLAGS="${CT_JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
CT_JOBSFLAGS="${CT_JOBSFLAGS} -l${CT_LOAD}"
# Override 'download only' option
[ -n "${CT_SOURCE}" ] && CT_ONLY_DOWNLOAD=y