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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 15A43158020 for ; Mon, 5 Dec 2022 10:52:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 563A9E0837; Mon, 5 Dec 2022 10:52:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1D8BFE07EE for ; Mon, 5 Dec 2022 10:52:07 +0000 (UTC) From: Sam James To: gentoo-dev@lists.gentoo.org Cc: pgsql-bugs@gentoo.org, base-system@gentoo.org, toolchain@gentoo.org, Sam James Subject: [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: stop using which(1) Date: Mon, 5 Dec 2022 10:51:50 +0000 Message-Id: <20221205105153.634699-1-sam@gentoo.org> X-Mailer: git-send-email 2.38.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 0883a9b3-f7a1-4717-9442-df670dcf3cdf X-Archives-Hash: bb0f248a28746b2a519cfa7691c2681d It's non-portable and we're looking to remove it from @system. Bug: https://bugs.gentoo.org/487696 Bug: https://bugs.gentoo.org/646588 Signed-off-by: Sam James --- eclass/toolchain-funcs.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index fea2a6885c46..6fa103fc110e 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -609,7 +609,7 @@ tc-ld-force-bfd() { # to its value (like multilib). #545218 local ld=$(tc-getLD "$@") local bfd_ld="${ld%% *}.bfd" - local path_ld=$(which "${bfd_ld}" 2>/dev/null) + local path_ld=$(type -P "${bfd_ld}" 2>/dev/null) [[ -e ${path_ld} ]] && export LD=${bfd_ld} # Set up LDFLAGS to select bfd based on the gcc / clang version. @@ -1154,7 +1154,7 @@ gen_usr_ldscript() { # If they're using gold, manually invoke the old bfd. #487696 local d="${T}/bfd-linker" mkdir -p "${d}" - ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld + ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld flags+=( -B"${d}" ) fi output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p') -- 2.38.1