From: Matt Turner Date: Sat, 25 Jun 2011 17:50:22 +0000 (-0400) Subject: Use get_libdir instead of hard-coding lib for distcc X-Git-Tag: CATALYST-2.0.10~3^2~46 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=46f7d5ca4de8da33e2756078d48d0cd4e9364ce4;p=catalyst.git Use get_libdir instead of hard-coding lib for distcc --- diff --git a/ChangeLog b/ChangeLog index 30eb83a0..a449e4d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ # Distributed under the GPL v2 # $Id$ + 25 Jun 2011; Matt Turner + targets/support/chroot-functions.sh: + Use get_libdir instead of hard-coding lib for distcc + 25 Jun 2011; Matt Turner modules/catalyst/arch/mips.py: add multilib (and missing n64) classes diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index ee605e5a..395a91c1 100644 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -92,11 +92,11 @@ setup_myfeatures(){ # 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 + LIBDIR=$(get_libdir) + cd /usr/${LIBDIR}/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 + echo -e '#!/bin/bash\nexec /usr/'${LIBDIR}'/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper + chmod a+x /usr/${LIBDIR}/distcc/bin/${CHOST}-wrapper for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done fi @@ -172,13 +172,13 @@ setup_pkgmgr(){ } cleanup_distcc() { + LIBDIR=$(get_libdir) rm -rf /etc/distcc/hosts for i in cc gcc c++ g++; do - # TODO: change to use get_libdir - rm -f /usr/lib/distcc/bin/${i} - ln -s /usr/bin/distcc /usr/lib/distcc/bin/${i} + rm -f /usr/${LIBDIR}/distcc/bin/${i} + ln -s /usr/bin/distcc /usr/${LIBDIR}/distcc/bin/${i} done - rm -f /usr/lib/distcc/bin/*-wrapper + rm -f /usr/${LIBDIR}/distcc/bin/*-wrapper } cleanup_icecream() {