From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH] distcc: try more combinations of libdir
Date: Sat, 20 Feb 2021 21:05:11 -0500 [thread overview]
Message-ID: <CAEdQ38F6Mhpt80dT4LpJF=SMKtYLb9CKNc5HujumPNpgnOiRQg@mail.gmail.com> (raw)
In-Reply-To: <20210204110721.33846-4-gentoo.catalyst@xxoo.ws>
On Thu, Feb 4, 2021 at 6:08 AM Daniel Cordero <gentoo.catalyst@xxoo.ws> wrote:
>
> From: Daniel Cordero <catalyst@0xdc.io>
>
> On amd64 (17.1), distcc does not create /usr/lib64/distcc, despite get_libdir
> returning 'lib64'.
Looks like the couple of commits for bug 651030 [1] made it so
regardless of $(get_libdir) distcc always uses /usr/lib, so we can
simplify the patch. I'll do that locally and commit it.
Thanks!
[1] https://bugs.gentoo.org/651030
> Signed-off-by: Daniel Cordero <catalyst@0xdc.io>
> ---
> targets/support/chroot-functions.sh | 28 ++++++++++++++++------------
> 1 file changed, 16 insertions(+), 12 deletions(-)
>
> diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
> index 2aec018e..0c77ac75 100755
> --- a/targets/support/chroot-functions.sh
> +++ b/targets/support/chroot-functions.sh
> @@ -86,12 +86,14 @@ setup_features() {
> # This sets up automatic cross-distcc-fu according to
> # https://wiki.gentoo.org/wiki/Distcc/Cross-Compiling
> CHOST=$(portageq envvar CHOST)
> - LIBDIR=$(get_libdir)
> - cd /usr/${LIBDIR}/distcc/bin
> - rm cc gcc g++ c++ 2>/dev/null
> - 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
> + for LIBDIR in lib $(get_libdir); do
> + test -d /usr/${LIBDIR}/distcc/bin || continue
> + cd /usr/${LIBDIR}/distcc/bin
> + rm cc gcc g++ c++ 2>/dev/null
> + 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
> + done
> fi
>
> if [ -n "${clst_ICECREAM}" ]
> @@ -174,13 +176,15 @@ setup_gcc(){
> }
>
> cleanup_distcc() {
> - LIBDIR=$(get_libdir)
> - rm -rf /etc/distcc/hosts
> - for i in cc gcc c++ g++; do
> - rm -f /usr/${LIBDIR}/distcc/bin/${i}
> - ln -s /usr/bin/distcc /usr/${LIBDIR}/distcc/bin/${i}
> + rm -f /etc/distcc/hosts
> + for LIBDIR in lib $(get_libdir); do
> + test -d /usr/${LIBDIR}/distcc/bin || continue
> + for i in cc gcc c++ g++; do
> + rm -f /usr/${LIBDIR}/distcc/bin/${i}
> + ln -s /usr/bin/distcc /usr/${LIBDIR}/distcc/bin/${i}
> + done
> + rm -f /usr/${LIBDIR}/distcc/bin/*-wrapper
> done
> - rm -f /usr/${LIBDIR}/distcc/bin/*-wrapper
> }
>
> cleanup_icecream() {
> --
> 2.26.2
>
>
prev parent reply other threads:[~2021-02-21 2:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 11:07 [gentoo-catalyst] [PATCH] distcc: try more combinations of libdir Daniel Cordero
2021-02-21 2:05 ` Matt Turner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEdQ38F6Mhpt80dT4LpJF=SMKtYLb9CKNc5HujumPNpgnOiRQg@mail.gmail.com' \
--to=mattst88@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox