summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ptxdist33
-rw-r--r--config/setup/Kconfig20
-rwxr-xr-xscripts/wrapper/g++-wrapper2
-rwxr-xr-xscripts/wrapper/gcc-wrapper2
-rwxr-xr-xscripts/wrapper/host-g++-wrapper1
-rwxr-xr-xscripts/wrapper/host-gcc-wrapper1
-rw-r--r--scripts/wrapper/libwrapper.sh4
7 files changed, 61 insertions, 2 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 43dad5833..baf60f1ab 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -708,6 +708,26 @@ check_compiler() {
ptxd_replace_link "${SCRIPTSDIR}/wrapper/${cc}-wrapper" "${wrapper_dir}/${compiler_prefix}${cc}"
done
PATH="${wrapper_dir}:${PATH}"
+ if [ -n "${PTXDIST_ICECC}" ]; then
+ local icecc_dir="${sysroot_host}/lib/icecc"
+ if [ "$(readlink -f "${icecc_dir}/toolchain")" != "${toolchain}" ]; then
+ rm -rf "${icecc_dir}"
+ mkdir -p "${icecc_dir}/target" "${icecc_dir}/host"
+ ln -s "${toolchain}" "${icecc_dir}/toolchain"
+ (
+ cd "${icecc_dir}/target"
+ "${PTXDIST_ICECC_CREATE_ENV}" --gcc \
+ "${wrapper_dir}/real/${compiler_prefix}gcc" \
+ "${wrapper_dir}/real/${compiler_prefix}g++" > /dev/null
+ cd "${icecc_dir}/host"
+ "${PTXDIST_ICECC_CREATE_ENV}" --gcc \
+ "${wrapper_dir}/real/gcc" \
+ "${wrapper_dir}/real/g++" > /dev/null
+ )
+ fi
+ export ICECC_VERSION_TARGET="$(ls "${icecc_dir}/target"/*.tar.gz)"
+ export ICECC_VERSION_HOST="$(ls "${icecc_dir}/host"/*.tar.gz)"
+ fi
}
@@ -2405,6 +2425,18 @@ setup_path() {
sleep 3
fi
fi
+ if [ -n "${PTXCONF_SETUP_ICECC}" ]; then
+ PTXDIST_ICECC="$(which icecc 2>/dev/null)"
+ PTXDIST_ICECC_CREATE_ENV="$(which "${PTXCONF_SETUP_ICECC_CREATE_ENV}")"
+ if [ -z "${PTXDIST_ICECC}" -o -z "${PTXDIST_ICECC_CREATE_ENV}" ]; then
+ echo
+ echo "${PTXDIST_LOG_PROMPT}warning: icecc has been activated, but was not found on your system"
+ echo "${PTXDIST_LOG_PROMPT}warning: install icecc, disable it ('ptxdist setup' -> 'Developer Options' menu)"
+ echo "${PTXDIST_LOG_PROMPT}warning: or ignore this warning."
+ echo
+ sleep 3
+ fi
+ fi
}
@@ -2488,6 +2520,7 @@ setup_export() {
\
PTXDIST_CCACHE \
PTXDIST_FORCE_DOWNLOAD \
+ PTXDIST_ICECC \
PTXDIST_LOG_PROMPT \
PTXDIST_PEDANTIC \
PTXDIST_QUIET \
diff --git a/config/setup/Kconfig b/config/setup/Kconfig
index f61160368..e09cf7a03 100644
--- a/config/setup/Kconfig
+++ b/config/setup/Kconfig
@@ -301,6 +301,26 @@ config SETUP_CHECK_EXIT_ON_ERROR
quite aggressive error checking. Don't turn this on until
you know what you're doing.
+config SETUP_ICECC
+ bool "use icecc"
+ depends on !SETUP_CCACHE
+ help
+ icecc (also known as Icecream) is a distributed compile system.
+ It allows parallel compiling by distributing the compile jobs to
+ several nodes of a compile network running the icecc daemon. The
+ icecc scheduler routes the jobs and provides status and
+ statistics information to the icecc monitor.
+
+if SETUP_ICECC
+
+config SETUP_ICECC_CREATE_ENV
+ string
+ default "/usr/lib/icecc/icecc-create-env"
+ prompt "icecc-create-env path"
+ help
+ The full path to icecc-create-env
+
+endif
config SETUP_CCACHE
bool "use ccache"
diff --git a/scripts/wrapper/g++-wrapper b/scripts/wrapper/g++-wrapper
index 61e3a64bb..4f7153c17 100755
--- a/scripts/wrapper/g++-wrapper
+++ b/scripts/wrapper/g++-wrapper
@@ -2,6 +2,8 @@
. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
+export ICECC_VERSION="${ICECC_VERSION_TARGET}"
+
cc_check_args "${@}"
cc_add_target_ld_args
diff --git a/scripts/wrapper/gcc-wrapper b/scripts/wrapper/gcc-wrapper
index 6b75f6fa1..4bbc75a80 100755
--- a/scripts/wrapper/gcc-wrapper
+++ b/scripts/wrapper/gcc-wrapper
@@ -2,6 +2,8 @@
. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
+export ICECC_VERSION="${ICECC_VERSION_TARGET}"
+
cc_check_args "${@}"
cc_add_target_ld_args
diff --git a/scripts/wrapper/host-g++-wrapper b/scripts/wrapper/host-g++-wrapper
index 68966133a..c5d187cc1 100755
--- a/scripts/wrapper/host-g++-wrapper
+++ b/scripts/wrapper/host-g++-wrapper
@@ -2,6 +2,7 @@
. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
+export ICECC_VERSION="${ICECC_VERSION_HOST}"
HOST=true
cc_check_args "${@}"
diff --git a/scripts/wrapper/host-gcc-wrapper b/scripts/wrapper/host-gcc-wrapper
index 07c00c473..6ec29e934 100755
--- a/scripts/wrapper/host-gcc-wrapper
+++ b/scripts/wrapper/host-gcc-wrapper
@@ -2,6 +2,7 @@
. "$(dirname "$(readlink -f "$0")")/libwrapper.sh" || exit
+export ICECC_VERSION="${ICECC_VERSION_HOST}"
HOST=true
cc_check_args "${@}"
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index bed465348..d501c8ed1 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -23,9 +23,9 @@ fi
wrapper_exec() {
PATH="$(echo "${PATH}" | sed "s;${PTXDIST_PATH_SYSROOT_HOST}/lib/wrapper:;;")"
if [ "${PTXDIST_VERBOSE}" = 1 -a -n "${PTXDIST_FD_LOGFILE}" ]; then
- echo "wrapper: ${PTXDIST_CCACHE} ${0##*/} ${ARG_LIST} $* ${LATE_ARG_LIST}" >&${PTXDIST_FD_LOGFILE}
+ echo "wrapper: ${PTXDIST_ICECC}${PTXDIST_CCACHE} ${0##*/} ${ARG_LIST} $* ${LATE_ARG_LIST}" >&${PTXDIST_FD_LOGFILE}
fi
- exec ${PTXDIST_CCACHE} "${0%/*}/real/${0##*/}" ${ARG_LIST} "$@" ${LATE_ARG_LIST}
+ exec ${PTXDIST_ICECC}${PTXDIST_CCACHE} "${0%/*}/real/${0##*/}" ${ARG_LIST} "$@" ${LATE_ARG_LIST}
}
cc_check_args() {