scripts: PARALLELMFLAGS is evil, rename

The reunification of the glibc/eglibc code paths exposed a nasty
bug in the glibc build: use of PARALLELMFLAGS breaks the build.

See the explanations in that bug report against FC6:
    https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=212111

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
Yann E. MORIN" 2011-01-22 22:35:43 +01:00
parent b343b0216b
commit 49ab32ffe2
14 changed files with 38 additions and 41 deletions

View File

@ -80,7 +80,7 @@ do_binutils() {
fi
CT_DoLog EXTRA "Building binutils"
CT_DoExecLog ALL make "${extra_make_flags[@]}" ${PARALLELMFLAGS}
CT_DoExecLog ALL make "${extra_make_flags[@]}" ${JOBSFLAGS}
CT_DoLog EXTRA "Installing binutils"
CT_DoExecLog ALL make install
@ -149,7 +149,7 @@ do_binutils_target() {
${CT_BINUTILS_EXTRA_CONFIG}
CT_DoLog EXTRA "Building binutils' libraries (${targets[*]}) for target"
CT_DoExecLog ALL make ${PARALLELMFLAGS} "${build_targets[@]}"
CT_DoExecLog ALL make ${JOBSFLAGS} "${build_targets[@]}"
CT_DoLog EXTRA "Installing binutils' libraries (${targets[*]}) for target"
CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" "${install_targets[@]}"

View File

@ -52,7 +52,7 @@ do_elf2flt() {
${CT_ELF2FLT_EXTRA_CONFIG}
CT_DoLog EXTRA "Building elf2flt"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing elf2flt"
CT_DoExecLog ALL make install

View File

@ -269,17 +269,17 @@ do_cc_core() {
# So much easier if we just edit the source tree, but hey...
if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then
CT_DoExecLog CFG make configure-libiberty
CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libiberty libiberty.a
CT_DoExecLog ALL make ${JOBSFLAGS} -C libiberty libiberty.a
CT_DoExecLog CFG make configure-gcc configure-libcpp
CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp
CT_DoExecLog ALL make ${JOBSFLAGS} all-libcpp
else
CT_DoExecLog CFG make configure-gcc configure-libcpp configure-build-libiberty
CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp all-build-libiberty
CT_DoExecLog ALL make ${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-${CT_CC_VERSION}/libdecnumber" ]; then
CT_DoExecLog CFG make configure-libdecnumber
CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libdecnumber libdecnumber.a
CT_DoExecLog ALL make ${JOBSFLAGS} -C libdecnumber libdecnumber.a
fi
# Starting with GCC 4.3, libgcc.mk is no longer built,
@ -304,7 +304,7 @@ do_cc_core() {
repair_cc=""
fi
CT_DoExecLog ALL make ${PARALLELMFLAGS} -C gcc ${libgcc_rule} \
CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \
${repair_cc}
sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
else # build_libgcc
@ -317,7 +317,7 @@ do_cc_core() {
fi
CT_DoLog EXTRA "Building ${mode} core C compiler"
CT_DoExecLog ALL make ${PARALLELMFLAGS} "${core_targets[@]/#/all-}"
CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/all-}"
CT_DoLog EXTRA "Installing ${mode} core C compiler"
CT_DoExecLog ALL make "${core_targets[@]/#/install-}"
@ -520,11 +520,11 @@ do_cc() {
if [ "${CT_CANADIAN}" = "y" ]; then
CT_DoLog EXTRA "Building libiberty"
CT_DoExecLog ALL make ${PARALLELMFLAGS} all-build-libiberty
CT_DoExecLog ALL make ${JOBSFLAGS} all-build-libiberty
fi
CT_DoLog EXTRA "Building final compiler"
CT_DoExecLog ALL make ${PARALLELMFLAGS} all
CT_DoExecLog ALL make ${JOBSFLAGS} all
CT_DoLog EXTRA "Installing final compiler"
CT_DoExecLog ALL make install

View File

@ -75,11 +75,11 @@ do_cloog() {
"${cloog_opts[@]}"
CT_DoLog EXTRA "Building CLooG/ppl"
CT_DoExecLog ALL make ${PARALLELMFLAGS} libcloog.la
CT_DoExecLog ALL make ${JOBSFLAGS} libcloog.la
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
CT_DoLog EXTRA "Checking CLooG/ppl"
CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
fi
CT_DoLog EXTRA "Installing CLooG/ppl"

View File

@ -48,11 +48,11 @@ do_gmp() {
"${gmp_opts[@]}"
CT_DoLog EXTRA "Building GMP"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
CT_DoLog EXTRA "Checking GMP"
CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
fi
CT_DoLog EXTRA "Installing GMP"

View File

@ -48,11 +48,11 @@ do_mpc() {
"${mpc_opts[@]}"
CT_DoLog EXTRA "Building MPC"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
CT_DoLog EXTRA "Checking MPC"
CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
fi
CT_DoLog EXTRA "Installing MPC"

View File

@ -97,11 +97,11 @@ do_mpfr() {
"${mpfr_opts[@]}"
CT_DoLog EXTRA "Building MPFR"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
CT_DoLog EXTRA "Checking MPFR"
CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
fi
CT_DoLog EXTRA "Installing MPFR"

View File

@ -59,11 +59,11 @@ do_ppl() {
# --enable-optimization=speed or sspeed (yes, with 2 's')
CT_DoLog EXTRA "Building PPL"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
CT_DoLog EXTRA "Checking PPL"
CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
CT_DoExecLog ALL make ${JOBSFLAGS} -s check
fi
CT_DoLog EXTRA "Installing PPL"

View File

@ -123,7 +123,7 @@ do_debug_gdb_build() {
"${cross_extra_config[@]}"
CT_DoLog EXTRA "Building cross-gdb"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing cross-gdb"
CT_DoExecLog ALL make install
@ -169,8 +169,8 @@ do_debug_gdb_build() {
# extension appended to executables. Find that.
tic_ext=$(grep -E '^x[[:space:]]*=' progs/Makefile |sed -r -e 's/^.*=[[:space:]]*//;')
CT_DoExecLog ALL make ${PARALLELMFLAGS} -C include
CT_DoExecLog ALL make ${PARALLELMFLAGS} -C progs "tic${tic_ext}"
CT_DoExecLog ALL make ${JOBSFLAGS} -C include
CT_DoExecLog ALL make ${JOBSFLAGS} -C progs "tic${tic_ext}"
CT_DoExecLog ALL install -d -m 0755 "${CT_PREFIX_DIR}/buildtools"
CT_DoExecLog ALL install -m 0755 "progs/tic${tic_ext}" "${CT_PREFIX_DIR}/buildtools"
@ -192,7 +192,7 @@ do_debug_gdb_build() {
--enable-termcap \
"${ncurses_opts[@]}"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make install
@ -219,7 +219,7 @@ do_debug_gdb_build() {
--enable-static \
--disable-shared
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoExecLog ALL make install
native_extra_config+=("--with-expat")
@ -269,7 +269,7 @@ do_debug_gdb_build() {
"${native_extra_config[@]}"
CT_DoLog EXTRA "Building native gdb"
CT_DoExecLog ALL make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC}
CT_DoExecLog ALL make ${JOBSFLAGS} CC=${CT_TARGET}-${CT_CC}
CT_DoLog EXTRA "Installing native gdb"
CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
@ -334,7 +334,7 @@ do_debug_gdb_build() {
"${gdbserver_extra_config[@]}"
CT_DoLog EXTRA "Building gdbserver"
CT_DoExecLog ALL make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC}
CT_DoExecLog ALL make ${JOBSFLAGS} CC=${CT_TARGET}-${CT_CC}
CT_DoLog EXTRA "Installing gdbserver"
CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install

View File

@ -227,14 +227,12 @@ do_libc() {
RANLIB=${CT_TARGET}-ranlib \
OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
PARALLELMFLAGS="${PARALLELMFLAGS}" \
all
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \
${LIBC_SYSROOT_ARG} \
OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
PARALLELMFLAGS="${PARALLELMFLAGS}" \
install
# This doesn't seem to work when building a crosscompiler,

View File

@ -70,7 +70,7 @@ do_libc() {
--host=${CT_TARGET}
CT_DoLog EXTRA "Building W32-API"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing W32-API"
CT_DoExecLog ALL make install
@ -89,7 +89,7 @@ do_libc() {
--host=${CT_TARGET}
CT_DoLog EXTRA "Building MinGW Runtime"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing MinGW Runtime"
CT_DoExecLog ALL make install
@ -148,7 +148,7 @@ do_libc_finish() {
--enable-static
CT_DoLog EXTRA "Building GnuRX development files"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing GnuRX development files"
CT_DoExecLog ALL make install-dev

View File

@ -101,7 +101,7 @@ do_libc_start_files() {
"${newlib_opts[@]}"
CT_DoLog EXTRA "Building C library"
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL make install install_root="${CT_SYSROOT_DIR}"

View File

@ -138,7 +138,7 @@ do_libc_start_files() {
if [ "${CT_THREADS}" = "nptl" ]; then
CT_DoLog EXTRA "Building start files"
CT_DoExecLog ALL \
make ${CT_LIBC_UCLIBC_PARALLEL:+${PARALLELMFLAGS}} \
make ${CT_LIBC_UCLIBC_PARALLEL:+${JOBSFLAGS}} \
CROSS="${cross}" \
PREFIX="${CT_SYSROOT_DIR}/" \
STRIPTOOL=true \
@ -208,7 +208,7 @@ do_libc() {
LOCALE_DATA_FILENAME="${uclibc_local_tarball}.tgz" \
pregen
CT_DoExecLog ALL \
make ${CT_LIBC_UCLIBC_PARALLEL:+${PARALLELMFLAGS}} \
make ${CT_LIBC_UCLIBC_PARALLEL:+${JOBSFLAGS}} \
CROSS=${CT_TARGET}- \
PREFIX="${CT_SYSROOT_DIR}/" \
STRIPTOOL=true \
@ -228,7 +228,7 @@ do_libc() {
# We do _not_ want to strip anything for now, in case we specifically
# asked for a debug toolchain, hence the STRIPTOOL= assignment
#
# Note: PARALLELMFLAGS is not usefull for installation.
# Note: JOBSFLAGS is not usefull for installation.
#
CT_DoLog EXTRA "Installing C library"
CT_DoExecLog ALL \

View File

@ -495,10 +495,9 @@ if [ -z "${CT_RESTART}" ]; then
export SHELL="${CT_SHELL}" # for Makefiles
# And help make go faster
PARALLELMFLAGS=
[ ${CT_PARALLEL_JOBS} -ne 0 ] && PARALLELMFLAGS="${PARALLELMFLAGS} -j${CT_PARALLEL_JOBS}"
[ ${CT_LOAD} -ne 0 ] && PARALLELMFLAGS="${PARALLELMFLAGS} -l${CT_LOAD}"
export PARALLELMFLAGS
JOBSFLAGS=
[ ${CT_PARALLEL_JOBS} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -j${CT_PARALLEL_JOBS}"
[ ${CT_LOAD} -ne 0 ] && JOBSFLAGS="${JOBSFLAGS} -l${CT_LOAD}"
CT_DoLog EXTRA "Installing user-supplied crosstool-NG configuration"
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"