Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH] distcc: try more combinations of libdir
Date: Sun, 21 Feb 2021 02:05:27
Message-Id: CAEdQ38F6Mhpt80dT4LpJF=SMKtYLb9CKNc5HujumPNpgnOiRQg@mail.gmail.com
In Reply to: [gentoo-catalyst] [PATCH] distcc: try more combinations of libdir by Daniel Cordero
1 On Thu, Feb 4, 2021 at 6:08 AM Daniel Cordero <gentoo.catalyst@××××.ws> wrote:
2 >
3 > From: Daniel Cordero <catalyst@××××.io>
4 >
5 > On amd64 (17.1), distcc does not create /usr/lib64/distcc, despite get_libdir
6 > returning 'lib64'.
7
8 Looks like the couple of commits for bug 651030 [1] made it so
9 regardless of $(get_libdir) distcc always uses /usr/lib, so we can
10 simplify the patch. I'll do that locally and commit it.
11
12 Thanks!
13
14 [1] https://bugs.gentoo.org/651030
15
16
17 > Signed-off-by: Daniel Cordero <catalyst@××××.io>
18 > ---
19 > targets/support/chroot-functions.sh | 28 ++++++++++++++++------------
20 > 1 file changed, 16 insertions(+), 12 deletions(-)
21 >
22 > diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
23 > index 2aec018e..0c77ac75 100755
24 > --- a/targets/support/chroot-functions.sh
25 > +++ b/targets/support/chroot-functions.sh
26 > @@ -86,12 +86,14 @@ setup_features() {
27 > # This sets up automatic cross-distcc-fu according to
28 > # https://wiki.gentoo.org/wiki/Distcc/Cross-Compiling
29 > CHOST=$(portageq envvar CHOST)
30 > - LIBDIR=$(get_libdir)
31 > - cd /usr/${LIBDIR}/distcc/bin
32 > - rm cc gcc g++ c++ 2>/dev/null
33 > - echo -e '#!/bin/bash\nexec /usr/'${LIBDIR}'/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
34 > - chmod a+x /usr/${LIBDIR}/distcc/bin/${CHOST}-wrapper
35 > - for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done
36 > + for LIBDIR in lib $(get_libdir); do
37 > + test -d /usr/${LIBDIR}/distcc/bin || continue
38 > + cd /usr/${LIBDIR}/distcc/bin
39 > + rm cc gcc g++ c++ 2>/dev/null
40 > + echo -e '#!/bin/bash\nexec /usr/'${LIBDIR}'/distcc/bin/'${CHOST}'-g${0:$[-2]} "$@"' > ${CHOST}-wrapper
41 > + chmod a+x /usr/${LIBDIR}/distcc/bin/${CHOST}-wrapper
42 > + for i in cc gcc g++ c++; do ln -s ${CHOST}-wrapper ${i}; done
43 > + done
44 > fi
45 >
46 > if [ -n "${clst_ICECREAM}" ]
47 > @@ -174,13 +176,15 @@ setup_gcc(){
48 > }
49 >
50 > cleanup_distcc() {
51 > - LIBDIR=$(get_libdir)
52 > - rm -rf /etc/distcc/hosts
53 > - for i in cc gcc c++ g++; do
54 > - rm -f /usr/${LIBDIR}/distcc/bin/${i}
55 > - ln -s /usr/bin/distcc /usr/${LIBDIR}/distcc/bin/${i}
56 > + rm -f /etc/distcc/hosts
57 > + for LIBDIR in lib $(get_libdir); do
58 > + test -d /usr/${LIBDIR}/distcc/bin || continue
59 > + for i in cc gcc c++ g++; do
60 > + rm -f /usr/${LIBDIR}/distcc/bin/${i}
61 > + ln -s /usr/bin/distcc /usr/${LIBDIR}/distcc/bin/${i}
62 > + done
63 > + rm -f /usr/${LIBDIR}/distcc/bin/*-wrapper
64 > done
65 > - rm -f /usr/${LIBDIR}/distcc/bin/*-wrapper
66 > }
67 >
68 > cleanup_icecream() {
69 > --
70 > 2.26.2
71 >
72 >