aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-09-05 19:06:28 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-09-05 19:06:28 +0100
commit74bdd9e7cc01112a7bdacc82730f6492113e37f6 (patch)
treee3bf28f8169aaf03de0c3c537a7d092bb6bcf4b2
parentgcc-config: make USE_CC_WRAPPERS=yes to install cc/f77 links (diff)
downloadgcc-config-74bdd9e7cc01112a7bdacc82730f6492113e37f6.tar.gz
gcc-config-74bdd9e7cc01112a7bdacc82730f6492113e37f6.tar.bz2
gcc-config-74bdd9e7cc01112a7bdacc82730f6492113e37f6.zip
gcc-config: maintain ABI ordering for LDPATHv2.3.2
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 <slyfox@gentoo.org>
-rwxr-xr-xgcc-config2
1 files changed, 1 insertions, 1 deletions
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