# We can't skip packages in toolchain stage
SAVE_SKIP_PACKAGE_LIST=$SKIP_PACKAGE_LIST
SKIP_PACKAGE_LIST=
+
+ # Disable icecc in here
+ SAVE_ICECC=$ICECC
+ ICECC=off
+ iceccd_stop
toolchain_make stage1
- # make distcc first so that CCACHE_PREFIX works immediately
+ # make icecc first so that CCACHE_PREFIX works immediately
toolchain_make icecc
toolchain_make ccache
toolchain_make binutils PASS=1
toolchain_make gcc PASS=2
toolchain_make binutils PASS=2
toolchain_make test-toolchain PASS=2
+
+ ICECC=$SAVE_ICECC
+ unset SAVE_ICECC
+
+ ICECC_CC="${TOOLS_DIR}/bin/gcc" \
+ ICECC_CXX="${TOOLS_DIR}/bin/g++" \
+ icecc_build_native ${ICECC_TOOLCHAIN}
+ iceccd_start
+
toolchain_make ncurses
toolchain_make attr
toolchain_make acl
toolchain_make xz
toolchain_make strip
- ICECC_CC="${TOOLS_DIR}/bin/gcc" \
- ICECC_CXX="${TOOLS_DIR}/bin/g++" \
- icecc_build_native ${ICECC_TOOLCHAIN}
-
export PATH=$ORG_PATH SKIP_PACKAGE_LIST=$SAVE_SKIP_PACKAGE_LIST
unset SAVE_SKIP_PACKAGE_LIST
}
beautify message FAIL
fi
}
-
-distcc_mon() {
-
- # run gnome thing if we can...
- if [ -n "$DISPLAY" ]; then
- monitor=$(which distccmon-gnome 2>/dev/null)
- if [ -n "$monitor" ]; then
- DISTCC_DIR=$BASEDIR/distcc $monitor &
- return 0
- fi
- fi
-
- INTERVAL=1 # in seconds
-
- if [ -e $BASEDIR/distcc ]; then
- while sleep $INTERVAL; do
- clear
- echo "$NAME - Distcc monitor - Cancel with ctrl+c"
- echo
- PATH=$PATH:build_${TARGET}/${TOOLS_DIR}/usr/bin \
- DISTCC_DIR=${BASEDIR}/distcc \
- distccmon-text
- done
- else
- echo -n "You can't access the statistics if you didn't run ./make.sh build"
- beautify message FAIL
- fi
-}
-
-distccd_start() {
- echo -n "Running distcc daemon"
-
- if [ "$DISTCC_PORT" == "0" ]; then
- beautify message DISA
- return
- fi
-
- TOOLS_DIR=$TOOLS_DIR DISTCC_PORT=$DISTCC_PORT DISTCC_JOBS=$DISTCC_JOBS \
- LOGFILE=$BASEDIR/log_${TARGET}/_build.00-distccd.log \
- $BASEDIR/tools/make-compilers &
- if [ "$?" -eq "0" ]; then
- beautify message DONE
- else
- beautify message FAIL
- fi
-}
-
-distccd_stop() {
- echo -n "Stopping distcc daemon"
- killall distccd &>/dev/null
- if [ "$?" -eq "0" ]; then
- beautify message DONE
- else
- beautify message FAIL
- fi
-}
-
-distccd_restart() {
- distccd_stop
- distccd_start
-}
-
-distcc_get_hosts() {
- if [ -n "$DISTCC_HOSTS" ]; then
- logger --distcc "[INFO] Using local hosts: $DISTCC_HOSTS"
- echo "$DISTCC_HOSTS" > $BASEDIR/distcc/hosts
- return 0
- fi
- logger --distcc "[INFO] Getting hosts..."
- for i in $($BASEDIR/tools/buildspy uuid=$UUID action=get distcc=raw); do
- logger --distcc "[INFO] Got host: $i"
- echo "$i" | distcc_test_hosts >> $BASEDIR/distcc/hosts_new
- done
- if [ -s "$BASEDIR/distcc/hosts_new" ]; then
- mv $BASEDIR/distcc/hosts{_new,}
- fi
-}
-
-distcc_test_hosts() {
- while read i; do
- if [ "${i}" = "localhost" ] || [ "${i:0:2}" = "--" ]; then
- echo ${i}
- continue
- fi
-
- i=${i%,lzo}
- host=$(awk -F: '{ print $1 }' <<<${i})
- jobs=${i##*/}
- port=$(awk -F: '{ print $2 }' <<<${i} | awk -F/ '{ print $1 }')
- ip=$($BASEDIR/tools/resolver $host 2>/dev/null)
- [ -n "$ip" ] || continue
-
- if ping -c3 -w5 ${ip} &>/dev/null; then
- if [ -n "$(which nc 2>/dev/null)" ]; then
- if (echo | nc -w 15 ${ip} ${port} 2>/dev/null); then
- echo "${ip}:${port}/${jobs},lzo # ${host}"
- else
- echo "# Host $host ($ip) is reachable but distcc does not respond."
- fi
- continue
- fi
- echo "${ip}:${port}/${jobs},lzo # ${host}"
- else
- echo "# Host $host ($ip) is not reachable."
- fi
- done
-}
-
-distcc_reload() {
- local NOW=$(date "+%s")
- [ -z "$DISTCC_RELOAD_TIMESTAMP" ] && DISTCC_RELOAD_TIMESTAMP=$NOW
-
- # Exit if last reload is less than 5 minutes ago
- if [ $(( $DISTCC_RELOAD_TIMESTAMP + 300 )) -ge $NOW ]; then
- return 0
- fi
-
- logger --distcc "[INFO] Reloading distcc..."
- distcc_get_hosts
- DISTCC_RELOAD_TIMESTAMP=$NOW
-}
-
-if [ "$(basename $0)" == "make-compilers" ]; then
- # Exit, when distccd is already running
- pidof distccd &>/dev/null && exit
-
- # Run distccd
- DISTCCD_PATH=$TOOLS_DIR/bin \
- $TOOLS_DIR/usr/bin/distccd --daemon --allow 0.0.0.0/0 \
- --user nobody --nice 10 --jobs $DISTCC_JOBS --port $DISTCC_PORT \
- --log-file $LOGFILE --stats --job-lifetime 600 \
- --stats-port $(( $DISTCC_PORT + 1 )) &>/dev/null
-
- # When $TOOLS_DIR is not available (esp. gcc) --> exit
- while pidof distccd >/dev/null && [ -x $TOOLS_DIR/bin/gcc ]; do
- sleep 10
- done
-
- killall distccd &>/dev/null
-fi
KVER="${KVER}" \
EMB="${EMB}" \
\
+ CCACHE_DIR="${BASEDIR}/ccache" \
+ CCACHE_PREFIX="${CCACHE_PREFIX}" \
+ CCACHE_HASHDIR="${CCACHE_HASHDIR}" \
+ ICECC="${ICECC}" \
+ $([ -n "${ICECC_VERSION}" ] && echo ICECC_VERSION="${ICECC_TOOLCHAIN}") \
+ USE_SCHEDULER="${ICECC_SCHEDULER}" \
+ \
LINKER="${LINKER}" \
MACHINE="${MACHINE}" \
MACHINE_REAL="${MACHINE_REAL}" \
CCACHE_DIR="/usr/src/ccache" \
CCACHE_PREFIX="${CCACHE_PREFIX}" \
CCACHE_HASHDIR="${CCACHE_HASHDIR}" \
- ICECC="${ICECC}" \
- ICECC_VERSION="${ICECCD_TOOLCHAIN}" \
+ $([ -n "${ICECC_VERSION}" ] && echo ICECC_VERSION="${ICECC_TOOLCHAIN}")
+ ICECC_VERSION="${ICECC_TOOLCHAIN}" \
USE_SCHEDULER="${ICECC_SCHEDULER}" \
\
LINKER="${LINKER}" \