# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 11 Oct 2007; Chris Gianelloni <wolf31o2@gentoo.org>
+ targets/support/chroot-functions.sh:
+ Adding a slightly modified version of Andrew Gaffney's <agaffney@gentoo.org>
+ patch from bug #120076 to add cross-compiling support to our distcc
+ configuration.
+
11 Oct 2007; Chris Gianelloni <wolf31o2@gentoo.org>
targets/support/chroot-functions.sh:
Added a version of get_libdir from multilib.eclass so we can determine where
#fi
mkdir -p /etc/distcc
echo "${clst_distcc_hosts}" > /etc/distcc/hosts
+
+ # This sets up automatic cross-distcc-fu according to
+ # http://www.gentoo.org/doc/en/cross-compiling-distcc.xml
+ CHOST=$(portageq envvar CHOST)
+ # TODO: change to use get_libdir
+ cd /usr/lib/distcc/bin
+ rm cc gcc g++ c++ 2>/dev/null
+ echo -e '#!/bin/bash\nexec /usr/lib/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
+ chmod a+x /usr/lib/distcc/bin/${CHOST}-wrapper
+ for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done
fi
}
cleanup_distcc() {
rm -rf /etc/distcc/hosts
+ for i in cc gcc c++ g++; do
+ # TODO: change to use get_libdir
+ rm /usr/lib/distcc/bin/${i}
+ ln -s /usr/bin/distcc /usr/lib/distcc/bin/${i}
+ done
+ rm /usr/lib/distcc/bin/*-wrapper
}
update_env_settings(){