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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1F92215800C for ; Wed, 28 Dec 2022 19:12:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70B15E09D1; Wed, 28 Dec 2022 19:12:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 43AF6E09D1 for ; Wed, 28 Dec 2022 19:12:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 571AB340FAB for ; Wed, 28 Dec 2022 19:12:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EBD9A7F2 for ; Wed, 28 Dec 2022 19:12:02 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1672254719.fc3edfcd1cc277a3457c0d17041f74452b4d3465.sam@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: gcc-config X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: fc3edfcd1cc277a3457c0d17041f74452b4d3465 X-VCS-Branch: master Date: Wed, 28 Dec 2022 19:12:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0583ca44-e8f8-427a-8f85-f4caab5ced17 X-Archives-Hash: f8d40fa5b28ed7fbb02d8461be381c0c commit: fc3edfcd1cc277a3457c0d17041f74452b4d3465 Author: James Le Cuirot gentoo org> AuthorDate: Mon Dec 26 10:14:34 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Dec 28 19:11:59 2022 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=fc3edfcd Read LIBDIR with portageq from EROOT instead of hardcoding the / value We fall back to the hardcoded / value if that fails. Signed-off-by: James Le Cuirot gentoo.org> Closes: https://github.com/gentoo/gcc-config/pull/1 Signed-off-by: Sam James gentoo.org> gcc-config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc-config b/gcc-config index 236c433..a44fced 100755 --- a/gcc-config +++ b/gcc-config @@ -41,7 +41,10 @@ fi PV="@PV@" [[ ${PV} == @*@ ]] && PV="git" -GENTOO_LIBDIR="@GENTOO_LIBDIR@" + +ABI=$(portageq envvar DEFAULT_ABI 2>/dev/null) +GENTOO_LIBDIR=$(portageq envvar LIBDIR_"${ABI}" 2>/dev/null) +[[ $? != 0 || -z ${GENTOO_LIBDIR} ]] && GENTOO_LIBDIR="@GENTOO_LIBDIR@" [[ ${GENTOO_LIBDIR} == @*@ ]] && GENTOO_LIBDIR="lib" usage() {