* [gentoo-commits] repo/gentoo:master commit in: eclass/, sys-libs/glibc/
@ 2017-12-20 9:53 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2017-12-20 9:53 UTC (permalink / raw
To: gentoo-commits
commit: ac450135f29ef850303589af998373d936955476
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 20 09:35:00 2017 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 09:52:55 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac450135
sys-libs/glibc: enable IFUNC support only on whitelisted ARCHes, bug #641216
We explicitly disable IFUNC support on the following targets:
alpha/hppa/ia64/mips/m68k/nios2/riscv/sh
to workaround weak IFUNC detection on binutils/glibc side.
Otherwise at least on ia64 glibc generates IFUNC entries against
compat librt.so.1 symbols (to redirect them back to libc.so.6)
but linker does not produce correct relocations. As a result all
IFUNC-backed functions don't work.
Reported-by: Émeric Maschino
Bug: https://sourceware.org/PR22634
Closes: https://bugs.gentoo.org/641216
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
eclass/toolchain-glibc.eclass | 11 +++++++++++
sys-libs/glibc/glibc-2.26-r3.ebuild | 11 +++++++++++
2 files changed, 22 insertions(+)
diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass
index 6580be2fb1e..d9c692f2ad8 100644
--- a/eclass/toolchain-glibc.eclass
+++ b/eclass/toolchain-glibc.eclass
@@ -815,6 +815,17 @@ glibc_do_configure() {
esac
fi
+ # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
+ # is not robust enough to detect proper support:
+ # https://bugs.gentoo.org/641216
+ # https://sourceware.org/PR22634#c0
+ case $(tc-arch ${CTARGET}) in
+ # Keep whitelist of targets where autodetection mostly works.
+ amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
+ # Blacklist everywhere else
+ *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
+ esac
+
if version_is_at_least 2.25 ; then
myconf+=( --enable-stackguard-randomization )
else
diff --git a/sys-libs/glibc/glibc-2.26-r3.ebuild b/sys-libs/glibc/glibc-2.26-r3.ebuild
index ceb5b684685..b936a612e1f 100644
--- a/sys-libs/glibc/glibc-2.26-r3.ebuild
+++ b/sys-libs/glibc/glibc-2.26-r3.ebuild
@@ -342,6 +342,17 @@ glibc_do_configure() {
esac
myconf+=( --enable-stackguard-randomization )
+ # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
+ # is not robust enough to detect proper support:
+ # https://bugs.gentoo.org/641216
+ # https://sourceware.org/PR22634#c0
+ case $(tc-arch ${CTARGET}) in
+ # Keep whitelist of targets where autodetection mostly works.
+ amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
+ # Blacklist everywhere else
+ *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
+ esac
+
[[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
if [[ $1 == "nptl" ]] ; then
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: eclass/, sys-libs/glibc/
@ 2021-06-07 22:16 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2021-06-07 22:16 UTC (permalink / raw
To: gentoo-commits
commit: 59ad8840f2ded712964ba82afb1833946bd45a69
Author: Alexei Colin <ac <AT> alexeicolin <DOT> com>
AuthorDate: Fri Jan 22 20:23:39 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jun 7 22:16:46 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59ad8840
sys-libs/glibc: fix ld.so symlink for ppc64 LE
From https://sourceware.org/glibc/wiki/ABIList#powerpc glibc
supports two dynamic linker paths:
- 64-bit ELFv1 BE: /lib64/ld64.so.1 (ELFv2 BE is not supported)
- 64-bit ELFv2 LE: /lib64/ld64.so.2 (ELFv1 LE is not supported)
Bug: https://bugs.gentoo.org/755551
Signed-off-by: Alexei Colin <ac <AT> alexeicolin.com>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
eclass/toolchain-glibc.eclass | 5 ++++-
sys-libs/glibc/glibc-2.33.ebuild | 5 ++++-
sys-libs/glibc/glibc-9999.ebuild | 5 ++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass
index f48f7050732..ffe7b9e1fd1 100644
--- a/eclass/toolchain-glibc.eclass
+++ b/eclass/toolchain-glibc.eclass
@@ -1240,7 +1240,6 @@ toolchain-glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# s390
s390 /lib/ld.so.1
s390x /lib/ld64.so.1
@@ -1253,12 +1252,16 @@ toolchain-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
diff --git a/sys-libs/glibc/glibc-2.33.ebuild b/sys-libs/glibc/glibc-2.33.ebuild
index 083cfa41311..239334c0899 100644
--- a/sys-libs/glibc/glibc-2.33.ebuild
+++ b/sys-libs/glibc/glibc-2.33.ebuild
@@ -1248,7 +1248,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
@@ -1266,12 +1265,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
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index fd820a1d523..f6c0a1f83f5 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-07 22:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20 9:53 [gentoo-commits] repo/gentoo:master commit in: eclass/, sys-libs/glibc/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2021-06-07 22:16 Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox