diff options
author | 2020-09-05 19:06:28 +0100 | |
---|---|---|
committer | 2020-09-05 19:06:28 +0100 | |
commit | 74bdd9e7cc01112a7bdacc82730f6492113e37f6 (patch) | |
tree | e3bf28f8169aaf03de0c3c537a7d092bb6bcf4b2 | |
parent | gcc-config: make USE_CC_WRAPPERS=yes to install cc/f77 links (diff) | |
download | gcc-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-x | gcc-config | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |