summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-08-23 11:19:03 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-08-23 11:19:16 +0100
commit3e3d3f661fa3df6911db31e7496951aa23497389 (patch)
tree813263656c675163e7a5877a3d8db1af5e7716d9 /sys-libs/glibc/glibc-2.32.ebuild
parentsys-libs/glibc: reenable stack protection on powerpc-* (diff)
downloadgentoo-3e3d3f661fa3df6911db31e7496951aa23497389.tar.gz
gentoo-3e3d3f661fa3df6911db31e7496951aa23497389.tar.bz2
gentoo-3e3d3f661fa3df6911db31e7496951aa23497389.zip
sys-libs/glibc: disable multiarch on ppc32
By default glibc does not enable multiarch on powerpc-unknown-linux-gnu targets. Bug triggers only when CFLAGS= enables power4 or above (like, CFLAGS=-mcpu=7450). multiarch does not work on ppc with cache-block not equal to 128 bytes and breaks memset implementations. There 'dcbz' instruction is used for optimization to zero out cache-block with zeros at a time. memset implementation assumes cache-block=128. G4 hardware and qemu-ppc both have cache-block=32. This means memset() zero-initializes only 32 of each 128-byte block including .sbss and .bss sections. This breaks glibc's locks and many other things. The change disables multiarch for pps32 in Gentoo until glibc is fixed upstream. Reported-by: Daniel Gurney Bug: https://sourceware.org/PR26522 Closes:https://bugs.gentoo.org/737996 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-libs/glibc/glibc-2.32.ebuild')
-rw-r--r--sys-libs/glibc/glibc-2.32.ebuild5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-2.32.ebuild b/sys-libs/glibc/glibc-2.32.ebuild
index 2a750041ae48..a53946fa5628 100644
--- a/sys-libs/glibc/glibc-2.32.ebuild
+++ b/sys-libs/glibc/glibc-2.32.ebuild
@@ -420,6 +420,11 @@ want__thread() {
use_multiarch() {
# Allow user to disable runtime arch detection in multilib.
use multiarch || return 1
+ # multiarch does not work on ppc with cache-block not equal to 128 bytes
+ # and breaks memset:
+ # https://sourceware.org/PR26522
+ # https://bugs.gentoo.org/737996
+ [[ $(tc-arch ${CTARGET}) == ppc ]] && return 1
# Make sure binutils is new enough to support indirect functions,
# #336792. This funky sed supports gold and bfd linkers.
local bver nver