From c0cc73cd6f3040ea08dc09384aa289540b3fb2a2 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 13 Dec 2016 22:18:50 -0800 Subject: Install canadian crosses into a separate subdir. Makes them sorted out by host, and removes the need for similar hack in samples.mk. Change how canadian crosses are named: using `=' character resulted in Glibc build failure. Move loading config into a common function, CT_LoadConfig. Signed-off-by: Alexey Neyman diff --git a/Makefile.in b/Makefile.in index 4fb85bb..8d629c9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -157,7 +157,7 @@ uninstall: real-uninstall build-bin: $(PROG_NAME) \ scripts/crosstool-NG.sh \ scripts/saveSample.sh \ - scripts/showTuple.sh + scripts/showConfig.sh @chmod 755 $^ build-lib: config/configure.in \ @@ -262,8 +262,8 @@ clean-bin: @rm -f scripts/crosstool-NG.sh @echo " RM 'scripts/saveSample.sh'" @rm -f scripts/saveSample.sh - @echo " RM 'scripts/showTuple.sh'" - @rm -f scripts/showTuple.sh + @echo " RM 'scripts/showConfig.sh'" + @rm -f scripts/showConfig.sh clean-lib: @echo " RM 'paths'" diff --git a/config/global/paths.in b/config/global/paths.in index 8ebe47f..5e9bcc4 100644 --- a/config/global/paths.in +++ b/config/global/paths.in @@ -43,7 +43,7 @@ config WORK_DIR config PREFIX_DIR string prompt "Prefix directory" if ! BACKEND - default "${HOME}/x-tools/${CT_TARGET}" + default "${HOME}/x-tools/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}" help This is the path the toolchain will run from. diff --git a/ct-ng.in b/ct-ng.in index 51b1ff6..bc63bc8 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -142,7 +142,7 @@ help-env:: $< >$@ show-tuple: .config.2 - $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showTuple.sh + $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showConfig.sh '$${CT_TARGET}' # Actual build source: .config.2 diff --git a/scripts/.gitignore b/scripts/.gitignore index 07af16d..a38259b 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -1,3 +1,3 @@ crosstool-NG.sh saveSample.sh -showTuple.sh +showConfig.sh diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index ba36bc8..68716f8 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -17,13 +17,13 @@ # most notably: # - set trap handler on errors, # - don't hash commands lookups, -# - initialise logging. . "${CT_LIB_DIR}/scripts/functions" -# Parse the configuration file -# It has some info about the logging facility, so include it early -. .config.2 # Yes! We can do full logging from now on! +CT_LogEnable + +# Read the sample settings +CT_LoadConfig # Check running as root if [ -z "${CT_ALLOW_BUILD_AS_ROOT_SURE}" ]; then @@ -126,7 +126,7 @@ CT_STAR_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S) # Log real begining of build, now CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}" -# We really need to extract from ,config and not .config.2, as we +# We really need to extract from .config and not .config.2, as we # do want the kconfig's values, not our mangled config with arrays. CT_DoStep DEBUG "Dumping user-supplied crosstool-NG configuration" CT_DoExecLog DEBUG ${grep} -E '^(# )?CT_' .config @@ -138,26 +138,6 @@ export MAKEFLAGS CT_DoLog INFO "Building environment variables" -# Include sub-scripts instead of calling them: that way, we do not have to -# export any variable, nor re-parse the configuration and functions files. -. "${CT_LIB_DIR}/scripts/build/internals.sh" -. "${CT_LIB_DIR}/scripts/build/arch.sh" -. "${CT_LIB_DIR}/scripts/build/companion_tools.sh" -. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh" -. "${CT_LIB_DIR}/scripts/build/companion_libs.sh" -. "${CT_LIB_DIR}/scripts/build/binutils/${CT_BINUTILS}.sh" -. "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" -. "${CT_LIB_DIR}/scripts/build/cc.sh" -. "${CT_LIB_DIR}/scripts/build/debug.sh" -. "${CT_LIB_DIR}/scripts/build/test_suite.sh" - -# Target tuple: CT_TARGET needs a little love: -CT_DoBuildTargetTuple - -# Kludge: If any of the configured options needs CT_TARGET, -# then rescan the options file now: -. .config.2 - # Sanity check some directories CT_TestAndAbort "'CT_PREFIX_DIR' is not set: where should I install?" -z "${CT_PREFIX_DIR}" @@ -691,12 +671,12 @@ CT_DoEnd INFO # From now-on, it can become impossible to log any time, because # either we're compressing the log file, or it can become RO any -# moment... Restore original stdout, stderr and stdin +# moment... CT_DoLog INFO "Finishing installation (may take a few seconds)..." -exec >&6 2>&7 <&8 +CT_LogDisable rm -f ${CT_PREFIX_DIR}/build.log.bz2 if [ "${CT_LOG_TO_FILE}" = "y" ]; then - cp "${tmp_log_file}" "${CT_PREFIX_DIR}/build.log" + cp "${CT_BUILD_LOG}" "${CT_PREFIX_DIR}/build.log" if [ "${CT_LOG_FILE_COMPRESS}" = y ]; then bzip2 -9 "${CT_PREFIX_DIR}/build.log" fi diff --git a/scripts/functions b/scripts/functions index cbef48b..baaf51e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -4,6 +4,50 @@ # Copyright 2007 Yann E. MORIN # Licensed under the GPL v2. See COPYING in the root of this package +CT_LoadConfig() { + # Parse the configuration file + # It has some info about the logging facility, so include it early + # It also sets KERNEL/ARCH/... for file inclusion below. Does not handle + # recursive definitions yet. + CT_TestOrAbort "Configuration file not found. Please create one." -r .config.2 + . .config.2 + + # Include sub-scripts instead of calling them: that way, we do not have to + # export any variable, nor re-parse the configuration and functions files. + . "${CT_LIB_DIR}/scripts/build/internals.sh" + . "${CT_LIB_DIR}/scripts/build/arch.sh" + . "${CT_LIB_DIR}/scripts/build/companion_tools.sh" + . "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh" + . "${CT_LIB_DIR}/scripts/build/companion_libs.sh" + . "${CT_LIB_DIR}/scripts/build/binutils/${CT_BINUTILS}.sh" + . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" + . "${CT_LIB_DIR}/scripts/build/cc.sh" + . "${CT_LIB_DIR}/scripts/build/debug.sh" + . "${CT_LIB_DIR}/scripts/build/test_suite.sh" + + # Target tuple: CT_TARGET needs a little love: + CT_DoBuildTargetTuple + + # Kludge: If any of the configured options needs CT_TARGET, + # then rescan the options file now. This also handles recursive variables; + # but we don't want to loop forever if there's a circular reference. + touch ${CT_TOP_DIR}/.config.out.1 + try=0 + while [ "$try" -le 10 ]; do + . .config.2 + set | ${grep} -E '^CT_' > ${CT_TOP_DIR}/.config.out.2 + if cmp -s ${CT_TOP_DIR}/.config.out.1 ${CT_TOP_DIR}/.config.out.2; then + break + fi + mv ${CT_TOP_DIR}/.config.out.2 ${CT_TOP_DIR}/.config.out.1 + try=$[ try + 1 ] + done + if [ "$try" -gt 10 ]; then + CT_Abort "Variables in .config recurse too deep." + fi + rm -f ${CT_TOP_DIR}/.config.out.[12] +} + # Prepare the fault handler CT_OnError() { local ret=$? @@ -48,7 +92,7 @@ CT_OnError() { old_trap="$(trap -p ERR)" trap -- ERR ( - exec >&6 2>&7 <&8 + CT_LogDisable # In this subshell printf "\r \n\nCurrent command" if [ -n "${cur_cmd}" ]; then printf ":\n %s\n" "${cur_cmd}" @@ -132,12 +176,22 @@ set +o hashall # Log policy: # - first of all, save stdout so we can see the live logs: fd #6 -# (also save stdin and stderr for use by CT_DEBUG_INTERACTIVE) -exec 6>&1 7>&2 8<&0 -# - then point stdout to the log file -tmp_log_file="${CT_TOP_DIR}/build.log" -rm -f "${tmp_log_file}" -exec >>"${tmp_log_file}" +# (also save stdin and stderr for use by CT_DEBUG_INTERACTIVE) +# FIXME: it doesn't look like anyone is overriding stdin/stderr. Do we need +# to save/restore them? +CT_LogEnable() { + exec 6>&1 7>&2 8<&0 + CT_BUILD_LOG="${CT_TOP_DIR}/build.log" + CT_LOG_ENABLED=y + rm -f "${CT_BUILD_LOG}" + exec >>"${CT_BUILD_LOG}" +} + +# Restore original stdout, stderr and stdin +CT_LogDisable() { + exec >&6 2>&7 <&8 + CT_LOG_ENABLED= +} # The different log levels: CT_LOG_LEVEL_ERROR=0 @@ -197,14 +251,20 @@ CT_DoLog() { *) cur_L="${LEVEL}"; cur_l="${level}";; esac # There will always be a log file (stdout, fd #1), be it /dev/null - printf "[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}" - if [ ${cur_l} -le ${max_level} ]; then - # Only print to console (fd #6) if log level is high enough. - printf "${CT_LOG_PROGRESS_BAR:+\r}[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}" >&6 - fi - if [ "${CT_LOG_PROGRESS_BAR}" = "y" ]; then - printf "\r[%02d:%02d] %s " $((SECONDS/60)) $((SECONDS%60)) "${_prog_bar[$((_prog_bar_cpt/10))]}" >&6 - _prog_bar_cpt=$(((_prog_bar_cpt+1)%40)) + if [ -n "${CT_LOG_ENABLED}" ]; then + printf "[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}" + # If log file has been set up, fd#6 is console and it only + # gets the most important messages. + if [ ${cur_l} -le ${max_level} ]; then + # Only print to console (fd #6) if log level is high enough. + printf "${CT_LOG_PROGRESS_BAR:+\r}[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}" >&6 + fi + if [ "${CT_LOG_PROGRESS_BAR}" = "y" ]; then + printf "\r[%02d:%02d] %s " $((SECONDS/60)) $((SECONDS%60)) "${_prog_bar[$((_prog_bar_cpt/10))]}" >&6 + _prog_bar_cpt=$(((_prog_bar_cpt+1)%40)) + fi + elif [ ${cur_l} -le ${CT_LOG_LEVEL_WARN} ]; then + printf "[%-5s]%*s%s%s\n" "${cur_L}" "${indent}" " " "${line}" fi done ) diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index a070dc2..701c660 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -10,29 +10,14 @@ # Parse the tools' paths configuration . "${CT_LIB_DIR}/paths.sh" - -# We'll need the stdout later, save it -exec 7>&1 - . "${CT_LIB_DIR}/scripts/functions" -# Don't care about any log file -exec >/dev/null -rm -f "${tmp_log_file}" - -# Parse the configuration file -# Don't use CT_TestOrAbort, it prints the test string to [DEBUG] -# Note: we just need the non-mangled .config, not .config.2 -if [ ! -f .config ]; then - CT_Abort "Configuration file not found. Please create one." -fi -. .config +CT_LoadConfig # We can not reliably save a sample which either uses local patches # and/or custom Linux kernel headers. Warn the user about this issue # and continue if he/she confirms sving the sample. if [ "${CT_CUSTOM_PATCH}" = "y" ]; then - exec >&7 echo "You are using local patches." echo "You will not be able to (easily) share this sample in this case." read -p "Press Ctrl-C to stop now, or Enter to continue..." @@ -41,17 +26,6 @@ fi # Do not use a progress bar unset CT_LOG_PROGRESS_BAR -# Parse architecture and kernel specific functions -. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh" -. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh" - -# Target tuple: CT_TARGET needs a little love: -CT_DoBuildTargetTuple - -# Kludge: if any of the config options needs either CT_TARGET or CT_TOP_DIR, -# re-parse them: -. .config - # Override log options unset CT_LOG_PROGRESS_BAR CT_LOG_ERROR CT_LOG_INFO CT_LOG_EXTRA CT_LOG_DEBUG LOG_ALL CT_LOG_WARN=y @@ -114,9 +88,6 @@ export KCONFIG_CONFIG="$(pwd)/.defconfig" ${CONF} --savedefconfig="${samp_dir}/crosstool.config" "${KCONFIG_TOP}" rm -f .defconfig -# Restore stdout now, to be interactive -exec >&7 - # Fill-in the reported-by info [ -f "${samp_dir}/reported.by" ] && . "${samp_dir}/reported.by" old_name="${reporter_name}" diff --git a/scripts/showConfig.sh.in b/scripts/showConfig.sh.in new file mode 100644 index 0000000..b439995 --- /dev/null +++ b/scripts/showConfig.sh.in @@ -0,0 +1,15 @@ +#!@@CT_bash@@ + +# What we need: +# - the .config file + +# Parse the tools' paths configuration +. "${CT_LIB_DIR}/paths.sh" + +# Parse the common functions +. "${CT_LIB_DIR}/scripts/functions" + +# Read the sample settings +CT_LoadConfig + +eval "echo \"$1\"" diff --git a/scripts/showTuple.sh.in b/scripts/showTuple.sh.in deleted file mode 100644 index 5389539..0000000 --- a/scripts/showTuple.sh.in +++ /dev/null @@ -1,30 +0,0 @@ -#!@@CT_bash@@ - -# What we need: -# - the .config file - -# Parse the tools' paths configuration -. "${CT_LIB_DIR}/paths.sh" - -# We'll need the stdout later, save it -exec 9>&1 - -# Parse the common functions -. "${CT_LIB_DIR}/scripts/functions" - -# Don't care about any log file -exec >/dev/null -rm -f "${tmp_log_file}" - -# Parse the configuration file -. .config.2 - -# Parse architecture and kernel specific functions -. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh" -. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh" - -# Build CT_TARGET -CT_DoBuildTargetTuple - -# All this for this single echo... :-( Sigh, I'll have to re-arrange things... -echo "${CT_TARGET}" >&9 -- cgit v0.10.2-6-g49f6 From 955f5bc0b8a879ba5d1b9a65a31cc235c9fd9be8 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 13 Dec 2016 18:07:21 -0800 Subject: Get rid of .config.2. Now handled by CT_LoadConfig. Signed-off-by: Alexey Neyman diff --git a/.gitignore b/.gitignore index 1a510d7..98480b0 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ paths.* !paths.in config.gen/ .config -.config.2 # Temporaries .*.swp diff --git a/ct-ng.in b/ct-ng.in index bc63bc8..d856828 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -136,19 +136,14 @@ help-env:: @echo "or configure an existing sample." @false -.config.2: .config - $(SILENT)$(sed) -r -e 's/^([^=]+_ARRAY)="(.*)"$$/\1=( \2 )/;' \ - -e '/^[^=]+_ARRAY=/s/\\(.)/\1/g;' \ - $< >$@ - -show-tuple: .config.2 +show-tuple: .config $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showConfig.sh '$${CT_TARGET}' # Actual build -source: .config.2 +source: .config $(SILENT)CT_SOURCE=y $(CT_LIB_DIR)/scripts/crosstool-NG.sh -build: .config.2 +build: .config $(SILENT)$(CT_LIB_DIR)/scripts/crosstool-NG.sh build.%: diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 68716f8..303e5fc 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -126,8 +126,6 @@ CT_STAR_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S) # Log real begining of build, now CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}" -# We really need to extract from .config and not .config.2, as we -# do want the kconfig's values, not our mangled config with arrays. CT_DoStep DEBUG "Dumping user-supplied crosstool-NG configuration" CT_DoExecLog DEBUG ${grep} -E '^(# )?CT_' .config CT_EndStep @@ -571,8 +569,6 @@ if [ -z "${CT_RESTART}" ]; then fi rm -f "${testc}" - # We need to save the real .config with kconfig's value, - # not our mangled .config.2 with arrays. CT_DoLog EXTRA "Installing user-supplied crosstool-NG configuration" CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin" CT_DoExecLog DEBUG ${install} -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config" diff --git a/scripts/functions b/scripts/functions index baaf51e..9aa4fc7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -5,12 +5,14 @@ # Licensed under the GPL v2. See COPYING in the root of this package CT_LoadConfig() { + local o + # Parse the configuration file # It has some info about the logging facility, so include it early # It also sets KERNEL/ARCH/... for file inclusion below. Does not handle - # recursive definitions yet. - CT_TestOrAbort "Configuration file not found. Please create one." -r .config.2 - . .config.2 + # recursive definitions yet. We don't need arrays at this point. + CT_TestOrAbort "Configuration file not found. Please create one." -r .config + . .config # Include sub-scripts instead of calling them: that way, we do not have to # export any variable, nor re-parse the configuration and functions files. @@ -31,21 +33,25 @@ CT_LoadConfig() { # Kludge: If any of the configured options needs CT_TARGET, # then rescan the options file now. This also handles recursive variables; # but we don't want to loop forever if there's a circular reference. - touch ${CT_TOP_DIR}/.config.out.1 + oldvals="" try=0 while [ "$try" -le 10 ]; do - . .config.2 - set | ${grep} -E '^CT_' > ${CT_TOP_DIR}/.config.out.2 - if cmp -s ${CT_TOP_DIR}/.config.out.1 ${CT_TOP_DIR}/.config.out.2; then + . .config + vals=`set | ${grep} -E '^CT_'` + if [ "$oldvals" = "$vals" ]; then break fi - mv ${CT_TOP_DIR}/.config.out.2 ${CT_TOP_DIR}/.config.out.1 + oldvals="$vals" try=$[ try + 1 ] done if [ "$try" -gt 10 ]; then CT_Abort "Variables in .config recurse too deep." fi - rm -f ${CT_TOP_DIR}/.config.out.[12] + # Double eval: first eval substitutes option name, second eval unescapes quotes + # and whitespace. + for o in `set | sed -rn 's/^(CT_[A-Za-z0-9_]*_ARRAY)=.*/\1/p'`; do + eval "eval $o=(\"\$$o\")" + done } # Prepare the fault handler diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index 701c660..4fa1c87 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -40,9 +40,7 @@ esac samp_dir="samples/${samp_name}" mkdir -p "${samp_dir}" -# Tweak the .config file -# We need to be based on the real .config with kconfig's values, -# not our mangled .config.2 with shell arrays +# Tweak the .config file. cp .config .defconfig "${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \ -e 's|^# CT_LOG_TO_FILE is not set$|CT_LOG_TO_FILE=y|;' \ -- cgit v0.10.2-6-g49f6 From 3e4d4870c9b7506c7a114fdb8789f78fd551c171 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 13 Dec 2016 18:40:47 -0800 Subject: Simplify config saving. Instead of hardcoding defaults in saveSample.sh.in, have the same defaults in config. Then we can just remove them when saving the config. diff --git a/config/global/logging.in b/config/global/logging.in index 0c77e88..a7e7696 100644 --- a/config/global/logging.in +++ b/config/global/logging.in @@ -5,8 +5,7 @@ comment "Logging" choice bool prompt "Maximum log level to see:" - default LOG_INFO if !DEBUG_CT - default LOG_DEBUG if DEBUG_CT + default LOG_EXTRA config LOG_ERROR bool diff --git a/config/global/paths.in b/config/global/paths.in index 5e9bcc4..308d8d1 100644 --- a/config/global/paths.in +++ b/config/global/paths.in @@ -5,7 +5,7 @@ comment "Paths" config LOCAL_TARBALLS_DIR string prompt "Local tarballs directory" if ! BACKEND - default "" + default "${HOME}/src" help If you have previously downloaded the tarballs, enter the PATH where you stored them here. @@ -14,7 +14,7 @@ config SAVE_TARBALLS bool prompt "Save new tarballs" if ! BACKEND depends on LOCAL_TARBALLS_DIR != "" || BACKEND - default y if BACKEND + default y help If you say 'y' here, new downloaded tarballs will be saved in the directory you entered above. diff --git a/scripts/saveSample.sh.in b/scripts/saveSample.sh.in index 4fa1c87..646c189 100644 --- a/scripts/saveSample.sh.in +++ b/scripts/saveSample.sh.in @@ -40,14 +40,17 @@ esac samp_dir="samples/${samp_name}" mkdir -p "${samp_dir}" -# Tweak the .config file. -cp .config .defconfig -"${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \ - -e 's|^# CT_LOG_TO_FILE is not set$|CT_LOG_TO_FILE=y|;' \ - -e 's|^# CT_LOG_FILE_COMPRESS is not set$|CT_LOG_FILE_COMPRESS=y|;' \ - -e 's|^(CT_LOCAL_TARBALLS_DIR)=.*|\1="${HOME}/src"|;' \ - <.config \ - >.defconfig +# Tweak the .config file: remove the options that we want to keep +# at default setting in samples. +force_default_opts=( \ + PREFIX_DIR LOG_TO_FILE LOG_FILE_COMPRESS \ + LOCAL_TARBALLS_DIR SAVE_TARBALLS \ + LOG_ERROR LOG_WARN LOG_INFO LOG_EXTRA LOG_ALL LOG_DEBUG \ + LOG_PROGRESS_BAR + ) +regexp=${force_default_opts[*]} +regexp=${regexp// /|} +grep -v -E '^(# )?CT_('"${regexp}"')' .config > .defconfig # Function to copy a file to the sample directory # Needed in case the file is already there (think of a previously available sample) -- cgit v0.10.2-6-g49f6 From 7fad3936351bc145630ec882a92063153d601d4d Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 13 Dec 2016 19:14:26 -0800 Subject: Run samples through 'ct-ng update-samples'. Signed-off-by: Alexey Neyman diff --git a/samples/aarch64-rpi3-linux-gnueabi/crosstool.config b/samples/aarch64-rpi3-linux-gnueabi/crosstool.config index 6ee2a68..798943d 100644 --- a/samples/aarch64-rpi3-linux-gnueabi/crosstool.config +++ b/samples/aarch64-rpi3-linux-gnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a53" CT_ARCH_64=y CT_ARCH_arm=y diff --git a/samples/aarch64-unknown-linux-gnueabi/crosstool.config b/samples/aarch64-unknown-linux-gnueabi/crosstool.config index 20b8509..cd0bbd5 100644 --- a/samples/aarch64-unknown-linux-gnueabi/crosstool.config +++ b/samples/aarch64-unknown-linux-gnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_arm=y CT_TARGET_VENDOR="" diff --git a/samples/alphaev56-unknown-linux-gnu/crosstool.config b/samples/alphaev56-unknown-linux-gnu/crosstool.config index 2e90761..67a5807 100644 --- a/samples/alphaev56-unknown-linux-gnu/crosstool.config +++ b/samples/alphaev56-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="ev56" CT_ARCH_ALPHA_EV56=y CT_KERNEL_linux=y diff --git a/samples/alphaev67-unknown-linux-gnu/crosstool.config b/samples/alphaev67-unknown-linux-gnu/crosstool.config index f6d5124..41cc753 100644 --- a/samples/alphaev67-unknown-linux-gnu/crosstool.config +++ b/samples/alphaev67-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="ev67" CT_ARCH_ALPHA_EV67=y CT_KERNEL_linux=y diff --git a/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config b/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config index 144f5eb..97a866d 100644 --- a/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config +++ b/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-m3" CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y diff --git a/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config b/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config index 07a9590..b100e84 100644 --- a/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config +++ b/samples/arm-cortex_a15-linux-gnueabihf/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a15" CT_ARCH_FPU="neon-vfpv4" CT_ARCH_FLOAT_HW=y diff --git a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config index a80bb74..112e15e 100644 --- a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config +++ b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a8" CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y diff --git a/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config b/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config index b8b31b6..fff252e 100644 --- a/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config +++ b/samples/arm-cortexa5-linux-uclibcgnueabihf/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a5" CT_ARCH_FPU="vfpv4-d16" CT_ARCH_FLOAT_HW=y diff --git a/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config b/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config index 4580410..f373f95 100644 --- a/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config +++ b/samples/arm-cortexa9_neon-linux-gnueabihf/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a9" CT_ARCH_FPU="neon" CT_ARCH_FLOAT_HW=y diff --git a/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config b/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config index 19bf836..e01942d 100644 --- a/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config +++ b/samples/arm-multilib-linux-uclibcgnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y CT_MULTILIB=y diff --git a/samples/arm-unknown-eabi/crosstool.config b/samples/arm-unknown-eabi/crosstool.config index bdac978..140cc4f 100644 --- a/samples/arm-unknown-eabi/crosstool.config +++ b/samples/arm-unknown-eabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y CT_LIBC_NEWLIB_IO_C99FMT=y diff --git a/samples/arm-unknown-linux-gnueabi/crosstool.config b/samples/arm-unknown-linux-gnueabi/crosstool.config index ed48825..48cfc4b 100644 --- a/samples/arm-unknown-linux-gnueabi/crosstool.config +++ b/samples/arm-unknown-linux-gnueabi/crosstool.config @@ -1,7 +1,4 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y # CT_REMOVE_DOCS is not set -CT_LOG_EXTRA=y CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y CT_KERNEL_linux=y diff --git a/samples/arm-unknown-linux-musleabi/crosstool.config b/samples/arm-unknown-linux-musleabi/crosstool.config index 50cfcd6..e2335a7 100644 --- a/samples/arm-unknown-linux-musleabi/crosstool.config +++ b/samples/arm-unknown-linux-musleabi/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_arm=y CT_KERNEL_linux=y CT_BINUTILS_LINKER_LD_GOLD=y diff --git a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config index 0c285a5..9b8f73a 100644 --- a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config +++ b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="arm926ej-s" CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y diff --git a/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config index ddf6e74..d657934 100644 --- a/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config +++ b/samples/arm-unknown-linux-uclibcgnueabihf/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="arm926ej-s" CT_ARCH_FLOAT_HW=y CT_ARCH_arm=y diff --git a/samples/armeb-unknown-eabi/crosstool.config b/samples/armeb-unknown-eabi/crosstool.config index d2c2aba..6941150 100644 --- a/samples/armeb-unknown-eabi/crosstool.config +++ b/samples/armeb-unknown-eabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_BE=y CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y diff --git a/samples/armeb-unknown-linux-gnueabi/crosstool.config b/samples/armeb-unknown-linux-gnueabi/crosstool.config index a9ac884..ebb73ba 100644 --- a/samples/armeb-unknown-linux-gnueabi/crosstool.config +++ b/samples/armeb-unknown-linux-gnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_ARCH="armv5te" CT_ARCH_BE=y CT_ARCH_FLOAT_SW=y diff --git a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config index 3867dce..2a8f139 100644 --- a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config +++ b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="xscale" CT_ARCH_BE=y CT_ARCH_FLOAT_SW=y diff --git a/samples/armv6-rpi-linux-gnueabi/crosstool.config b/samples/armv6-rpi-linux-gnueabi/crosstool.config index bf5a2d0..03f2be4 100644 --- a/samples/armv6-rpi-linux-gnueabi/crosstool.config +++ b/samples/armv6-rpi-linux-gnueabi/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="arm1176jzf-s" CT_ARCH_FPU="vfp" CT_ARCH_arm=y diff --git a/samples/armv7-rpi2-linux-gnueabihf/crosstool.config b/samples/armv7-rpi2-linux-gnueabihf/crosstool.config index 0e98048..9229a0e 100644 --- a/samples/armv7-rpi2-linux-gnueabihf/crosstool.config +++ b/samples/armv7-rpi2-linux-gnueabihf/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a7" CT_ARCH_FPU="neon-vfpv4" CT_ARCH_FLOAT_HW=y diff --git a/samples/armv8-rpi3-linux-gnueabihf/crosstool.config b/samples/armv8-rpi3-linux-gnueabihf/crosstool.config index 16f35ae..f1ed5fc 100644 --- a/samples/armv8-rpi3-linux-gnueabihf/crosstool.config +++ b/samples/armv8-rpi3-linux-gnueabihf/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a53" CT_ARCH_FPU="neon-vfpv4" CT_ARCH_FLOAT_HW=y diff --git a/samples/avr/crosstool.config b/samples/avr/crosstool.config index 3fc0344..3a3016f 100644 --- a/samples/avr/crosstool.config +++ b/samples/avr/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_avr=y CT_CC_LANG_CXX=y CT_DEBUG_gdb=y diff --git a/samples/i586-geode-linux-uclibc/crosstool.config b/samples/i586-geode-linux-uclibc/crosstool.config index a10f9ea..540a69e 100644 --- a/samples/i586-geode-linux-uclibc/crosstool.config +++ b/samples/i586-geode-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_ARCH="pentium-mmx" CT_ARCH_x86=y CT_TARGET_VENDOR="geode" diff --git a/samples/i686-nptl-linux-gnu/crosstool.config b/samples/i686-nptl-linux-gnu/crosstool.config index 3259d05..c1a0676 100644 --- a/samples/i686-nptl-linux-gnu/crosstool.config +++ b/samples/i686-nptl-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_ARCH="i686" CT_ARCH_x86=y CT_TARGET_VENDOR="nptl" diff --git a/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config index e0075fd..f514937 100644 --- a/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config +++ b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config @@ -1,8 +1,5 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y # CT_REMOVE_DOCS is not set -CT_LOG_EXTRA=y CT_ARCH_nios2=y CT_STATIC_TOOLCHAIN=y CT_TOOLCHAIN_BUGURL="https://bitbucket.org/netzimme/eax-gcc/issues?status=new&status=open" diff --git a/samples/i686-w64-mingw32/crosstool.config b/samples/i686-w64-mingw32/crosstool.config index aa0c515..afa49d0 100644 --- a/samples/i686-w64-mingw32/crosstool.config +++ b/samples/i686-w64-mingw32/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_ARCH="i686" CT_ARCH_x86=y CT_TARGET_VENDOR="w64" diff --git a/samples/m68k-unknown-elf/crosstool.config b/samples/m68k-unknown-elf/crosstool.config index 07ca76d..b7f64fc9 100644 --- a/samples/m68k-unknown-elf/crosstool.config +++ b/samples/m68k-unknown-elf/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="cpu32" CT_ARCH_m68k=y CT_ARCH_BINFMT_FLAT=y diff --git a/samples/m68k-unknown-uclinux-uclibc/crosstool.config b/samples/m68k-unknown-uclinux-uclibc/crosstool.config index 05bf58e..ab0fbe5 100644 --- a/samples/m68k-unknown-uclinux-uclibc/crosstool.config +++ b/samples/m68k-unknown-uclinux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_m68k=y CT_KERNEL_linux=y CT_THREADS_LT=y diff --git a/samples/mips-ar2315-linux-gnu/crosstool.config b/samples/mips-ar2315-linux-gnu/crosstool.config index 75af884..ec2c554 100644 --- a/samples/mips-ar2315-linux-gnu/crosstool.config +++ b/samples/mips-ar2315-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_ARCH="4kc" CT_ARCH_TUNE="4kc" CT_ARCH_FLOAT_SW=y diff --git a/samples/mips-malta-linux-gnu/crosstool.config b/samples/mips-malta-linux-gnu/crosstool.config index 7b33e25..308a4d8 100644 --- a/samples/mips-malta-linux-gnu/crosstool.config +++ b/samples/mips-malta-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_mips=y CT_TARGET_VENDOR="malta" CT_KERNEL_linux=y diff --git a/samples/mips-unknown-elf/crosstool.config b/samples/mips-unknown-elf/crosstool.config index 9b7fecc..49dbadd 100644 --- a/samples/mips-unknown-elf/crosstool.config +++ b/samples/mips-unknown-elf/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_FLOAT_SW=y CT_ARCH_mips=y CT_LIBC_none=y diff --git a/samples/mips-unknown-linux-uclibc/crosstool.config b/samples/mips-unknown-linux-uclibc/crosstool.config index cc4fb42..12c45fe 100644 --- a/samples/mips-unknown-linux-uclibc/crosstool.config +++ b/samples/mips-unknown-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_ARCH="mips1" CT_ARCH_FLOAT_SW=y CT_ARCH_mips=y diff --git a/samples/mips64el-multilib-linux-uclibc/crosstool.config b/samples/mips64el-multilib-linux-uclibc/crosstool.config index bced5d1..d5c1865 100644 --- a/samples/mips64el-multilib-linux-uclibc/crosstool.config +++ b/samples/mips64el-multilib-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_LE=y CT_ARCH_64=y CT_ARCH_FLOAT_SW=y diff --git a/samples/mipsel-multilib-linux-gnu/crosstool.config b/samples/mipsel-multilib-linux-gnu/crosstool.config index 4f52c97..f118fd2 100644 --- a/samples/mipsel-multilib-linux-gnu/crosstool.config +++ b/samples/mipsel-multilib-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_LE=y CT_ARCH_FLOAT_SW=y CT_ARCH_mips=y diff --git a/samples/mipsel-sde-elf/crosstool.config b/samples/mipsel-sde-elf/crosstool.config index a2c010b..81a4f3c 100644 --- a/samples/mipsel-sde-elf/crosstool.config +++ b/samples/mipsel-sde-elf/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_LE=y CT_ARCH_FLOAT_SW=y CT_ARCH_mips=y diff --git a/samples/mipsel-unknown-linux-gnu/crosstool.config b/samples/mipsel-unknown-linux-gnu/crosstool.config index 7506d4c..d24c8d1 100644 --- a/samples/mipsel-unknown-linux-gnu/crosstool.config +++ b/samples/mipsel-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_ARCH="mips1" CT_ARCH_LE=y CT_ARCH_FLOAT_SW=y diff --git a/samples/powerpc-405-linux-gnu/crosstool.config b/samples/powerpc-405-linux-gnu/crosstool.config index 80f7104..1df4d50 100644 --- a/samples/powerpc-405-linux-gnu/crosstool.config +++ b/samples/powerpc-405-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="405" CT_ARCH_FLOAT_SW=y CT_ARCH_powerpc=y diff --git a/samples/powerpc-860-linux-gnu/crosstool.config b/samples/powerpc-860-linux-gnu/crosstool.config index aa1625e..d1bb075 100644 --- a/samples/powerpc-860-linux-gnu/crosstool.config +++ b/samples/powerpc-860-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="860" CT_ARCH_FLOAT_SW=y CT_ARCH_powerpc=y diff --git a/samples/powerpc-e300c3-linux-gnu/crosstool.config b/samples/powerpc-e300c3-linux-gnu/crosstool.config index 739a29f..9a0f7d3 100644 --- a/samples/powerpc-e300c3-linux-gnu/crosstool.config +++ b/samples/powerpc-e300c3-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="e300c3" CT_ARCH_powerpc=y CT_TARGET_VENDOR="e300c3" diff --git a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config index a57dae9..1c3a7e3 100644 --- a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config +++ b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="8548" CT_ARCH_FLOAT_SW=y CT_TARGET_CFLAGS="-mfloat-gprs=double -Wa,-me500x2" diff --git a/samples/powerpc-unknown-linux-gnu/crosstool.config b/samples/powerpc-unknown-linux-gnu/crosstool.config index a794eef..8fbfb0b 100644 --- a/samples/powerpc-unknown-linux-gnu/crosstool.config +++ b/samples/powerpc-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_powerpc=y CT_KERNEL_linux=y CT_BINUTILS_PLUGINS=y diff --git a/samples/powerpc-unknown-linux-uclibc/crosstool.config b/samples/powerpc-unknown-linux-uclibc/crosstool.config index e797ccb..a53a098 100644 --- a/samples/powerpc-unknown-linux-uclibc/crosstool.config +++ b/samples/powerpc-unknown-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_FLOAT_SW=y CT_ARCH_powerpc=y CT_KERNEL_linux=y diff --git a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config index 17e62e1..12108db 100644 --- a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config +++ b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_FLOAT_SW=y CT_ARCH_powerpc=y CT_TARGET_VENDOR="unknown_nofpu" diff --git a/samples/powerpc64-multilib-linux-gnu/crosstool.config b/samples/powerpc64-multilib-linux-gnu/crosstool.config index 71d2f78..d8b0c8c 100644 --- a/samples/powerpc64-multilib-linux-gnu/crosstool.config +++ b/samples/powerpc64-multilib-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_powerpc=y CT_MULTILIB=y diff --git a/samples/powerpc64-unknown-linux-gnu/crosstool.config b/samples/powerpc64-unknown-linux-gnu/crosstool.config index 13b9052..da858b2 100644 --- a/samples/powerpc64-unknown-linux-gnu/crosstool.config +++ b/samples/powerpc64-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_powerpc=y CT_KERNEL_linux=y diff --git a/samples/powerpc64le-unknown-linux-gnu/crosstool.config b/samples/powerpc64le-unknown-linux-gnu/crosstool.config index 5359d42..8bea162 100644 --- a/samples/powerpc64le-unknown-linux-gnu/crosstool.config +++ b/samples/powerpc64le-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_LE=y CT_ARCH_64=y CT_ARCH_powerpc=y diff --git a/samples/s390-ibm-linux-gnu/crosstool.config b/samples/s390-ibm-linux-gnu/crosstool.config index b81ab98..2312934 100644 --- a/samples/s390-ibm-linux-gnu/crosstool.config +++ b/samples/s390-ibm-linux-gnu/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_s390=y CT_KERNEL_linux=y CT_BINUTILS_PLUGINS=y diff --git a/samples/s390x-ibm-linux-gnu/crosstool.config b/samples/s390x-ibm-linux-gnu/crosstool.config index 7e6bb40..7df41c9 100644 --- a/samples/s390x-ibm-linux-gnu/crosstool.config +++ b/samples/s390x-ibm-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_s390=y CT_KERNEL_linux=y diff --git a/samples/sh4-multilib-linux-gnu/crosstool.config b/samples/sh4-multilib-linux-gnu/crosstool.config index 9a3e1dc..e8c40f4 100644 --- a/samples/sh4-multilib-linux-gnu/crosstool.config +++ b/samples/sh4-multilib-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_sh=y CT_ARCH_SH_SH4=y CT_TARGET_VENDOR="multilib" diff --git a/samples/sh4-multilib-linux-uclibc/crosstool.config b/samples/sh4-multilib-linux-uclibc/crosstool.config index 06e6d0c..26ad038 100644 --- a/samples/sh4-multilib-linux-uclibc/crosstool.config +++ b/samples/sh4-multilib-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_sh=y CT_ARCH_SH_SH4=y CT_TARGET_VENDOR="multilib" diff --git a/samples/sh4-unknown-linux-gnu/crosstool.config b/samples/sh4-unknown-linux-gnu/crosstool.config index d43ccbd..ba17f06 100644 --- a/samples/sh4-unknown-linux-gnu/crosstool.config +++ b/samples/sh4-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_sh=y CT_ARCH_SH_SH4=y CT_KERNEL_linux=y diff --git a/samples/sparc-leon-linux-uclibc/crosstool.config b/samples/sparc-leon-linux-uclibc/crosstool.config index c877632..a29bdeb 100644 --- a/samples/sparc-leon-linux-uclibc/crosstool.config +++ b/samples/sparc-leon-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_CPU="leon" CT_ARCH_TUNE="leon" CT_ARCH_FLOAT_SW=y diff --git a/samples/sparc-unknown-linux-gnu/crosstool.config b/samples/sparc-unknown-linux-gnu/crosstool.config index afb9f04..9590037 100644 --- a/samples/sparc-unknown-linux-gnu/crosstool.config +++ b/samples/sparc-unknown-linux-gnu/crosstool.config @@ -1,5 +1,2 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_sparc=y CT_KERNEL_linux=y diff --git a/samples/sparc64-multilib-linux-gnu/crosstool.config b/samples/sparc64-multilib-linux-gnu/crosstool.config index c9b89cf..4dae2b4 100644 --- a/samples/sparc64-multilib-linux-gnu/crosstool.config +++ b/samples/sparc64-multilib-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_sparc=y CT_MULTILIB=y diff --git a/samples/x86_64-multilib-linux-gnu/crosstool.config b/samples/x86_64-multilib-linux-gnu/crosstool.config index b6663e8..f9a16ae 100644 --- a/samples/x86_64-multilib-linux-gnu/crosstool.config +++ b/samples/x86_64-multilib-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_x86=y CT_MULTILIB=y diff --git a/samples/x86_64-multilib-linux-musl/crosstool.config b/samples/x86_64-multilib-linux-musl/crosstool.config index e633110..c099136 100644 --- a/samples/x86_64-multilib-linux-musl/crosstool.config +++ b/samples/x86_64-multilib-linux-musl/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_x86=y CT_MULTILIB=y diff --git a/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config b/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config index af0e7bd..a243ac4 100644 --- a/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config +++ b/samples/x86_64-multilib-linux-uclibc,powerpc-unknown-elf/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_powerpc=y CT_TARGET_VENDOR="" CT_CANADIAN=y diff --git a/samples/x86_64-multilib-linux-uclibc/crosstool.config b/samples/x86_64-multilib-linux-uclibc/crosstool.config index 2a29629..3642b95 100644 --- a/samples/x86_64-multilib-linux-uclibc/crosstool.config +++ b/samples/x86_64-multilib-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_x86=y CT_MULTILIB=y diff --git a/samples/x86_64-unknown-linux-gnu/crosstool.config b/samples/x86_64-unknown-linux-gnu/crosstool.config index 0e45471..7f16ffd 100644 --- a/samples/x86_64-unknown-linux-gnu/crosstool.config +++ b/samples/x86_64-unknown-linux-gnu/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_x86=y CT_KERNEL_linux=y diff --git a/samples/x86_64-unknown-linux-uclibc/crosstool.config b/samples/x86_64-unknown-linux-uclibc/crosstool.config index 31af80b..3ddc085 100644 --- a/samples/x86_64-unknown-linux-uclibc/crosstool.config +++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_x86=y CT_KERNEL_linux=y diff --git a/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config b/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config index cb9e187..42a37c3 100644 --- a/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config +++ b/samples/x86_64-w64-mingw32,x86_64-pc-linux-gnu/crosstool.config @@ -1,8 +1,5 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y # CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES is not set -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_x86=y CT_TARGET_VENDOR="pc" diff --git a/samples/x86_64-w64-mingw32/crosstool.config b/samples/x86_64-w64-mingw32/crosstool.config index 9bb218b..eba51a4 100644 --- a/samples/x86_64-w64-mingw32/crosstool.config +++ b/samples/x86_64-w64-mingw32/crosstool.config @@ -1,7 +1,4 @@ CT_EXPERIMENTAL=y -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_64=y CT_ARCH_x86=y CT_TARGET_VENDOR="w64" diff --git a/samples/xtensa-fsf-linux-uclibc/crosstool.config b/samples/xtensa-fsf-linux-uclibc/crosstool.config index 5033622..92b7276 100644 --- a/samples/xtensa-fsf-linux-uclibc/crosstool.config +++ b/samples/xtensa-fsf-linux-uclibc/crosstool.config @@ -1,6 +1,3 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y CT_ARCH_BE=y CT_TARGET_CFLAGS="-mlongcalls -mtext-section-literals" CT_ARCH_xtensa=y -- cgit v0.10.2-6-g49f6 From 832bee87c03ce2fecdbf8b00996fc1fca8f2b2e0 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 14 Dec 2016 00:59:08 -0800 Subject: Make build-all rely on kconfig options. For that, make CT_BUILD_TOP_DIR a non-settable config option (so that it is recursively expanded with CT_HOST/CT_TARGET). Use a common prefix, with same default as for regular sample build. Use showConfig.sh to determine host toolchain path (for canadian crosses) and build directory to be removed. Remove LIBC_SYSROOT_ARG (unused). Signed-off-by: Alexey Neyman diff --git a/config/global/paths.in b/config/global/paths.in index 308d8d1..5313d0d 100644 --- a/config/global/paths.in +++ b/config/global/paths.in @@ -40,10 +40,14 @@ config WORK_DIR Do *NOT* change it if you don't know better. +config BUILD_TOP_DIR + string + default "${CT_WORK_DIR}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}" + config PREFIX_DIR string prompt "Prefix directory" if ! BACKEND - default "${HOME}/x-tools/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}" + default "${CT_PREFIX:-${HOME}/x-tools}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}" help This is the path the toolchain will run from. diff --git a/samples/samples.mk b/samples/samples.mk index bf51135..5c8f130 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -26,7 +26,7 @@ help-samples:: @echo ' show- - show a brief overview of (list with list-samples)' @echo ' - preconfigure crosstool-NG with (list with list-samples)' @echo ' build-all[.#] - Build *all* samples (list with list-samples) and install in' - @echo ' $${CT_PREFIX} (which you must set)' + @echo ' $${CT_PREFIX} (set to ~/x-tools by default)' help-distrib:: @echo ' check-samples - Verify if samples need updates due to Kconfig changes' @@ -177,14 +177,7 @@ $(CT_SAMPLES): config_files # ---------------------------------------------------------- # Some helper functions - -# Construct a CT_PREFIX_DIR path from the sample name. Sample names use -# comma as a separator between host and target triplets in canadian cross -# configurations, but ct-ng does not allow commas in the path. Substitute -# with = (equal sign). -# $1: sample __comma = , -prefix_dir = $(CT_PREFIX)/$(subst $(__comma),=,$(1)) host_triplet = $(if $(findstring $(__comma),$(1)),$(firstword $(subst $(__comma), ,$(1)))) target_triplet = $(if $(findstring $(__comma),$(1)),$(word 2,$(subst $(__comma), ,$(1))),$(1)) @@ -193,16 +186,15 @@ target_triplet = $(if $(findstring $(__comma),$(1)),$(word 2,$(subst $(__comma), define build_sample @$(CT_ECHO) ' CONF $(1)' $(SILENT)$(CONF) -s --defconfig=$(call sample_dir,$(1))/crosstool.config $(KCONFIG_TOP) - $(SILENT)$(sed) -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(call prefix_dir,$(1))":;' .config + $(SILENT)[ -n "$(CT_PREFIX)" ] && $(sed) -i -r -e 's:^(CT_PREFIX=).*$$:\1"$(CT_PREFIX)":;' .config || : $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config $(SILENT)$(sed) -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config - $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config - $(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config $(SILENT)$(CONF) -s --oldconfig $(KCONFIG_TOP) @$(CT_ECHO) ' BUILD $(1)' - $(SILENT)if [ ! -z "$(call host_triplet,$(1))" -a -d "$(call prefix_dir,$(call host_triplet,$(1)))" ]; then \ - PATH="$$PATH:$(call prefix_dir,$(call host_triplet,$(1)))/bin"; \ + $(SILENT)h=$(call host_triplet,$(1)); \ + if [ -n "$${h}" -a -r ".build-all/PASS/$${h}/prefix" ]; then \ + PATH=`cat .build-all/PASS/$${h}/prefix`/bin:$${PATH}; \ fi; \ if $(MAKE) -rf $(CT_NG) V=0 build; then \ status=PASS; \ @@ -214,7 +206,12 @@ define build_sample printf '\r %-5s %s\n' $$status '$(1)'; \ mkdir -p .build-all/$$status/$(1); \ bzip2 < build.log > .build-all/$$status/$(1)/build.log.bz2; \ - [ "$$status" = PASS -a -z "$(CT_PRESERVE_PASSED_BUILDS)" ] && rm -rf .build/$(call target_triplet,$(1)) || : + if [ "$$status" = PASS ]; then \ + blddir=`$(bash) $(CT_LIB_DIR)/scripts/showConfig.sh '$${CT_BUILD_TOP_DIR}'`; \ + [ -z "$(CT_PRESERVE_PASSED_BUILDS)" ] && rm -rf $${blddir}; \ + $(bash) $(CT_LIB_DIR)/scripts/showConfig.sh '$${CT_PREFIX_DIR}' > .build-all/PASS/$(1)/prefix; \ + fi; \ + : endef # ---------------------------------------------------------- @@ -224,10 +221,6 @@ endef ifneq ($(strip $(MAKECMDGOALS)),) ifneq ($(strip $(filter $(patsubst %,build-%,$(CT_SAMPLES)) build-all,$(MAKECMDGOALS))),) -ifeq ($(strip $(CT_PREFIX)),) -$(error Please set 'CT_PREFIX' to where you want to install generated toolchain samples!) -endif - endif # MAKECMDGOALS contains a build sample rule endif # MAKECMDGOALS != "" diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 303e5fc..eeb7800 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -19,12 +19,12 @@ # - don't hash commands lookups, . "${CT_LIB_DIR}/scripts/functions" -# Yes! We can do full logging from now on! -CT_LogEnable - # Read the sample settings CT_LoadConfig +# Yes! We can do full logging from now on! +CT_LogEnable + # Check running as root if [ -z "${CT_ALLOW_BUILD_AS_ROOT_SURE}" ]; then if [ $(id -u) -eq 0 ]; then @@ -156,8 +156,8 @@ CT_PKGVERSION="crosstool-NG ${CT_VERSION}${CT_TOOLCHAIN_PKGVERSION:+ - ${CT_TOOL # Compute the working directories names CT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs" CT_SRC_DIR="${CT_WORK_DIR}/src" -CT_BUILD_DIR="${CT_WORK_DIR}/${CT_TARGET}/build" -CT_BUILDTOOLS_PREFIX_DIR="${CT_WORK_DIR}/${CT_TARGET}/buildtools" +CT_BUILD_DIR="${CT_BUILD_TOP_DIR}/build" +CT_BUILDTOOLS_PREFIX_DIR="${CT_BUILD_TOP_DIR}/buildtools" CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state" # Note about HOST_COMPLIBS_DIR: it's always gonna be in the buildtools dir, or a # sub-dir. So we won't have to save/restore it, not even create it. @@ -288,7 +288,6 @@ if [ -z "${CT_RESTART}" ]; then BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}" CC_CORE_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}" CC_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}" - LIBC_SYSROOT_ARG="" # glibc's prefix must be exactly /usr, else --with-sysroot'd gcc will get # confused when $sysroot/usr/include is not present. # Note: --prefix=/usr is magic! @@ -307,7 +306,6 @@ if [ -z "${CT_RESTART}" ]; then # building libgcc, and you'll have no profiling CC_CORE_SYSROOT_ARG="--without-headers" CC_SYSROOT_ARG="--with-headers=${CT_HEADERS_DIR}" - LIBC_SYSROOT_ARG="prefix=" fi CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}" CT_DoExecLog ALL mkdir -p "${CT_DEBUGROOT_DIR}" -- cgit v0.10.2-6-g49f6