diff options
Diffstat (limited to 'sys-libs/glibc/glibc-9999.ebuild')
-rw-r--r-- | sys-libs/glibc/glibc-9999.ebuild | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index fd820a1d5235..112a714c393e 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -1249,7 +1249,6 @@ glibc_do_src_install() { n64 /lib64/ld.so.1 # powerpc ppc /lib/ld.so.1 - ppc64 /lib64/ld64.so.1 # riscv ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 ilp32 /lib/ld-linux-riscv32-ilp32.so.1 @@ -1267,12 +1266,16 @@ glibc_do_src_install() { ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 ) ;; big) ldso_abi_list+=( # arm arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 ) ;; esac @@ -1289,6 +1292,27 @@ glibc_do_src_install() { fi done + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + # With devpts under Linux mounted properly, we do not need the pt_chown # binary to be setuid. This is because the default owners/perms will be # exactly what we want. |