diff --git a/Makefile.am b/Makefile.am index 6c224c1a..37c32399 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,6 @@ SUBDIRS = kconfig bin_SCRIPTS = ct-ng CLEANFILES = ct-ng bash-completion/ct-ng docs/ct-ng.1 EXTRA_DIST = bootstrap ct-ng.in bash-completion/ct-ng.in \ - config/configure.in.in \ docs/ct-ng.1.in packages maintainer testing if INSTALL_BASH_COMPLETION @@ -18,9 +17,9 @@ endif man1_MANS = docs/ct-ng.1 -# paths.sh generated by configure +# paths.sh and configure.in are generated by configure nobase_dist_pkgdata_DATA = $(verbatim_data) -nobase_nodist_pkgdata_DATA = paths.sh +nobase_nodist_pkgdata_DATA = paths.sh config/configure.in # ct-ng, as renamed by the installation ctng_progname = `echo ct-ng | sed '$(transform)'` diff --git a/bootstrap b/bootstrap index 787966ed..6c3d6ae2 100755 --- a/bootstrap +++ b/bootstrap @@ -801,10 +801,10 @@ msg "*** Gathering the list of data files to install" scripts/compile | scripts/missing | scripts/depcomp | scripts/ltmain.sh | scripts/install-sh) continue ;; - # Special hack for configure.in.in - replace with the file that configure + # # will produce. FIXME: create this file at the time of 'ct-ng build'. - config/configure.in.in) - f=config/configure.in + config/configure.in.in | config/configure.in) + continue ;; esac # Checks & substitutions above may result in duplicate files diff --git a/config/arch/riscv.in b/config/arch/riscv.in index 109556a7..f4b3eeb7 100644 --- a/config/arch/riscv.in +++ b/config/arch/riscv.in @@ -11,6 +11,8 @@ ## select ARCH_SUPPORTS_WITH_ARCH ## select ARCH_SUPPORTS_WITH_TUNE ## select GCC_REQUIRE_7_or_later +## select BINUTILS_REQUIRE_2_28_or_later +## select GDB_REQUIRE_8_0_or_later if DEBUG_GDB ## help The RISC-V architecture, as defined by: ## help http://www.riscv.org/ diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 6f68334d..849b1ad0 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -174,6 +174,7 @@ config CC_GCC_USE_LTO bool "Enable LTO" default y depends on ! STATIC_TOOLCHAIN + select ZLIB_NEEDED help Enable the Link Time Optimisations. diff --git a/config/debug/gdb.in.native b/config/debug/gdb.in.native index 1ee8ad12..101e8246 100644 --- a/config/debug/gdb.in.native +++ b/config/debug/gdb.in.native @@ -6,7 +6,7 @@ config GDB_NATIVE depends on ! BARE_METAL depends on ! LIBC_BIONIC depends on CC_LANG_CXX || !GDB_8_0_or_later - select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC && GDB_8_0_or_later + select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC select EXPAT_TARGET select NCURSES_TARGET help @@ -26,10 +26,12 @@ if GDB_NATIVE || GDB_GDBSERVER config GDB_NATIVE_BUILD_IPA_LIB bool prompt "Build the IPA library" + depends on LIBC_GLIBC depends on GDB_HAS_IPA_LIB && !GDB_NATIVE_STATIC help gdbserver >= 7.2 comes with an optional library to use tracepoints, - the In Process Agent (IPA) library, libinproctrace.so. + the In Process Agent (IPA) library, libinproctrace.so. This library + uses some GNU extensions from the C library. Say 'y' if you intend to use tracepoints when debugging your programs with gdbserver. diff --git a/config/global.in b/config/global.in index f5df002d..94d2191b 100644 --- a/config/global.in +++ b/config/global.in @@ -38,6 +38,9 @@ config CONFIG_VERSION default "0" if VCHECK = "load" || VCHECK = "save" default CONFIG_VERSION_CURRENT +config INVALID_CONFIGURATION + bool + if VCHECK = "warning" comment "*************************************************************************" comment "Loaded configuration was generated by a previous version of crosstool-NG." diff --git a/maintainer/kconfig-versions.template b/maintainer/kconfig-versions.template index 3db512e2..61414f50 100644 --- a/maintainer/kconfig-versions.template +++ b/maintainer/kconfig-versions.template @@ -276,6 +276,26 @@ config @@fork|@@_VERY_OLD #!end-foreach endchoice + +# A flag indicating that no valid selections exist for the version. +# This may happen if there are conflicting requirements set by +# the host system and/or other packages. +config @@fork|@@_NO_VERSIONS + bool + select INVALID_CONFIGURATION + default n if @@fork|@@_VERY_NEW +#!foreach version + default n if @@fork|@@_V_@@ver_sel|@@ +#!end-foreach + default n if @@fork|@@_VERY_OLD + default y + +if @@fork|@@_NO_VERSIONS +comment "WARNING!" +comment "| The @@master@@ package has no viable versions" +comment "| due to conflicting constraints." +endif + #!end-if #!if [ -n "@@versionlocked@@" ] diff --git a/samples/xtensa-fsf-elf/crosstool.config b/samples/xtensa-fsf-elf/crosstool.config index 131df9e6..1caffd1f 100644 --- a/samples/xtensa-fsf-elf/crosstool.config +++ b/samples/xtensa-fsf-elf/crosstool.config @@ -10,17 +10,17 @@ CT_TARGET_CFLAGS="-mlongcalls" CT_TARGET_VENDOR="fsf" CT_BINUTILS_SRC_DEVEL=y CT_BINUTILS_DEVEL_URL="https://github.com/espressif/binutils-gdb.git" -CT_BINUTILS_DEVEL_BRANCH="esp32-2018r1_binutils-2_30" +CT_BINUTILS_DEVEL_REVISION="0104f7d3" CT_BINUTILS_V_2_30=y CT_NEWLIB_SRC_DEVEL=y CT_NEWLIB_DEVEL_URL="https://github.com/espressif/newlib-esp32.git" -CT_NEWLIB_DEVEL_BRANCH="esp32-2018r1_newlib-2_2_0" +CT_NEWLIB_DEVEL_REVISION="fdbb7b81" CT_LIBC_NEWLIB_TARGET_CFLAGS="-DSIGNAL_PROVIDED -DABORT_PROVIDED -DMALLOC_PROVIDED" CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y CT_GCC_SRC_DEVEL=y CT_GCC_DEVEL_VCS_git=y CT_GCC_DEVEL_URL="https://github.com/espressif/gcc.git" -CT_GCC_DEVEL_BRANCH="esp32-2018r1_gcc-8_2_0" +CT_GCC_DEVEL_REVISION="bae67e9e" CT_CC_GCC_ENABLE_CXX_FLAGS="-fno-rtti -ffunction-sections" CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--enable-threads=posix" CT_CC_GCC_EXTRA_CONFIG_ARRAY="--disable-libstdcxx-verbose --enable-threads=posix --enable-gcov-custom-rtio" @@ -31,7 +31,7 @@ CT_CC_LANG_CXX=y CT_DEBUG_GDB=y CT_GDB_SRC_DEVEL=y CT_GDB_DEVEL_URL="https://github.com/espressif/binutils-gdb.git" -CT_GDB_DEVEL_BRANCH="esp32-2018r1_gdb-8_1" +CT_GDB_DEVEL_REVISION="a9ff2591" CT_GDB_V_8_1=y CT_ISL_V_0_19=y CT_COMP_TOOLS_AUTOCONF=y diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 4d1bf46c..2a738deb 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -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[@]}" diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index ce7fea4c..60f259df 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -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" diff --git a/scripts/build/companion_libs/050-zlib.sh b/scripts/build/companion_libs/050-zlib.sh index 868bf3de..8c6a0f6f 100644 --- a/scripts/build/companion_libs/050-zlib.sh +++ b/scripts/build/companion_libs/050-zlib.sh @@ -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 diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh index 272af662..4e8c12fb 100644 --- a/scripts/build/companion_libs/100-gmp.sh +++ b/scripts/build/companion_libs/100-gmp.sh @@ -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" diff --git a/scripts/build/companion_libs/110-mpfr.sh b/scripts/build/companion_libs/110-mpfr.sh index b4be3f43..d2cb9f68 100644 --- a/scripts/build/companion_libs/110-mpfr.sh +++ b/scripts/build/companion_libs/110-mpfr.sh @@ -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" diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh index d96e9cec..8b1b7203 100644 --- a/scripts/build/companion_libs/121-isl.sh +++ b/scripts/build/companion_libs/121-isl.sh @@ -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" diff --git a/scripts/build/companion_libs/130-cloog.sh b/scripts/build/companion_libs/130-cloog.sh index e0f89ebb..9ee897ab 100644 --- a/scripts/build/companion_libs/130-cloog.sh +++ b/scripts/build/companion_libs/130-cloog.sh @@ -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" diff --git a/scripts/build/companion_libs/140-mpc.sh b/scripts/build/companion_libs/140-mpc.sh index 3136ab41..2166ef1b 100644 --- a/scripts/build/companion_libs/140-mpc.sh +++ b/scripts/build/companion_libs/140-mpc.sh @@ -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" diff --git a/scripts/build/companion_libs/210-expat.sh b/scripts/build/companion_libs/210-expat.sh index d2ca6a02..68667f6e 100644 --- a/scripts/build/companion_libs/210-expat.sh +++ b/scripts/build/companion_libs/210-expat.sh @@ -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}" } diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh index decfa9e3..f1fcd1a1 100644 --- a/scripts/build/companion_libs/220-ncurses.sh +++ b/scripts/build/companion_libs/220-ncurses.sh @@ -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" diff --git a/scripts/build/companion_libs/320-libiconv.sh b/scripts/build/companion_libs/320-libiconv.sh index ad571a9b..9748ba28 100644 --- a/scripts/build/companion_libs/320-libiconv.sh +++ b/scripts/build/companion_libs/320-libiconv.sh @@ -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}" diff --git a/scripts/build/companion_libs/330-gettext.sh b/scripts/build/companion_libs/330-gettext.sh index f3f14971..149d7d73 100644 --- a/scripts/build/companion_libs/330-gettext.sh +++ b/scripts/build/companion_libs/330-gettext.sh @@ -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 diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 15e0684d..91393317 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -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 @@ -114,15 +114,15 @@ do_debug_gdb_build() native_extra_config+=("--disable-gdbserver") else native_extra_config+=("--enable-gdbserver") - if [ "${CT_GDB_NATIVE_BUILD_IPA_LIB}" = "y" ]; then - gdbserver_extra_config+=("--enable-inprocess-agent") - else - gdbserver_extra_config+=("--disable-inprocess-agent") - fi if [ "${CT_GDB_NATIVE}" != "y" ]; then subdir=gdb/gdbserver/ fi fi + if [ "${CT_GDB_NATIVE_BUILD_IPA_LIB}" = "y" ]; then + native_extra_config+=("--enable-inprocess-agent") + else + native_extra_config+=("--disable-inprocess-agent") + fi export ac_cv_func_strncmp_works=yes @@ -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}"} diff --git a/scripts/build/libc/avr-libc.sh b/scripts/build/libc/avr-libc.sh index ce63b4a1..34eb0f55 100644 --- a/scripts/build/libc/avr-libc.sh +++ b/scripts/build/libc/avr-libc.sh @@ -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 diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index aebc898d..221752d0 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -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 } diff --git a/scripts/build/libc/mingw-w64.sh b/scripts/build/libc/mingw-w64.sh index a5b89d16..683f8be9 100644 --- a/scripts/build/libc/mingw-w64.sh +++ b/scripts/build/libc/mingw-w64.sh @@ -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 diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh index 63d68040..807b3bd8 100644 --- a/scripts/build/libc/musl.sh +++ b/scripts/build/libc/musl.sh @@ -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 diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 69d2b464..95ab7910 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -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 diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index 2ae6e0c5..5c04b328 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -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 diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index db15b890..31942b14 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -32,6 +32,8 @@ if [ -z "${CT_ALLOW_BUILD_AS_ROOT_SURE}" ]; then fi fi +CT_TestAndAbort "Invalid configuration. Run 'ct-ng menuconfig' and check which options select INVALID_CONFIGURATION." -n "${CT_INVALID_CONFIGURATION}" + # If we want an interactive debug-shell, we must ensure these FDs # are indeed connected to a terminal (and not redirected in any way). if [ "${CT_DEBUG_INTERACTIVE}" = "y" -a ! \( -t 0 -a -t 6 -a -t 2 \) ]; then @@ -576,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 @@ -587,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