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 5091E138359 for ; Sat, 5 Sep 2020 18:11:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BDB1E088B; Sat, 5 Sep 2020 18:11:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 5E07BE088B for ; Sat, 5 Sep 2020 18:11:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0766B33BE6B for ; Sat, 5 Sep 2020 18:11:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 61B50335 for ; Sat, 5 Sep 2020 18:11:44 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1599329188.74bdd9e7cc01112a7bdacc82730f6492113e37f6.slyfox@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: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 74bdd9e7cc01112a7bdacc82730f6492113e37f6 X-VCS-Branch: master Date: Sat, 5 Sep 2020 18:11:44 +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: 2938e0b6-061e-4e49-8e70-8e19752aa4d5 X-Archives-Hash: fc93ac997ea825fd3e988424bb2ad80d commit: 74bdd9e7cc01112a7bdacc82730f6492113e37f6 Author: Sergei Trofimovich gentoo org> AuthorDate: Sat Sep 5 18:06:28 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Sep 5 18:06:28 2020 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=74bdd9e7 gcc-config: maintain ABI ordering for LDPATH Before the change we ordered paths in reverse order for both gcc versions and ABI lists: $ cat /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/32 /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 After the change we preserved ABI ordering and use reverse gcc version ordering: $ cat /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0 /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/32 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/32 In theory both should work. I practice some systems (like riscv today) do not distinct between some ABIs. Let's list valid ABI first to keep such systems running. Signed-off-by: Sergei Trofimovich gentoo.org> gcc-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc-config b/gcc-config index dee6f98..615e43b 100755 --- a/gcc-config +++ b/gcc-config @@ -720,7 +720,7 @@ switch_profile() { local MY_LDPATH MY_LDPATH=$(${SED} -n \ -e '/^LDPATH=/{s|LDPATH=||;s|"||g;s|:|\n|g;p}' \ - $(version_sorted_paths "${GCC_ENV_D}"/${CHOST}-*) | tac + $(version_sorted_paths "${GCC_ENV_D}"/${CHOST}-* | tac) ) # Pass all by default