From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D10F813835A for ; Sun, 21 Feb 2021 02:05:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BDBEE0880; Sun, 21 Feb 2021 02:05:27 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17BBEE0880 for ; Sun, 21 Feb 2021 02:05:27 +0000 (UTC) Received: by mail-ej1-f51.google.com with SMTP id k13so21351238ejs.10 for ; Sat, 20 Feb 2021 18:05:25 -0800 (PST) X-Gm-Message-State: AOAM531LeMPD1gZ9JbWdhWwwyJyHJirM9/P6/qshP5CZQ2KScnQnMat+ aSkFfwNkDJImNgUCjnJk5YNGfjHZxSCco4JJJR0= X-Google-Smtp-Source: ABdhPJyixJahxWBw51kL7GGw5wRKVnzAYXYpx/tobM2Sa5uxy2igr49q39sugB7EZNJG/NdmSM46auCX59DziZBri/E= X-Received: by 2002:a17:906:7687:: with SMTP id o7mr15314856ejm.209.1613873122854; Sat, 20 Feb 2021 18:05:22 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20210204110721.33846-4-gentoo.catalyst@xxoo.ws> In-Reply-To: <20210204110721.33846-4-gentoo.catalyst@xxoo.ws> From: Matt Turner Date: Sat, 20 Feb 2021 21:05:11 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-catalyst] [PATCH] distcc: try more combinations of libdir To: gentoo-catalyst@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 74a58539-481a-468f-8a75-615610e72817 X-Archives-Hash: 3a4983881d233f35a52ddd0baf83eeb1 On Thu, Feb 4, 2021 at 6:08 AM Daniel Cordero wrote: > > From: Daniel Cordero > > 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 > --- > 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 > >