diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-08-23 12:32:05 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-08-23 12:33:01 +0100 |
commit | 8cf656db6d13ce7e97966bb31c0a068731f8530e (patch) | |
tree | 76a49dfcf9c06234b2c31c9e3c799b2945f5991c /sys-libs | |
parent | dev-libs/folks: bump to 0.14.0, re-enable tests (diff) | |
download | gentoo-8cf656db6d13ce7e97966bb31c0a068731f8530e.tar.gz gentoo-8cf656db6d13ce7e97966bb31c0a068731f8530e.tar.bz2 gentoo-8cf656db6d13ce7e97966bb31c0a068731f8530e.zip |
sys-libs/glibc: disable submachine detection on ppc32
By default glibc does not enable multiarch on
powerpc-unknown-linux-gnu targets.
Bug triggers only when CFLAGS value 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 submachine detection for ppc32 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')
-rw-r--r-- | sys-libs/glibc/glibc-2.31-r6.ebuild | 8 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.32.ebuild | 8 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-9999.ebuild | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-2.31-r6.ebuild b/sys-libs/glibc/glibc-2.31-r6.ebuild index c010b578953a..3ac5fb0e9b15 100644 --- a/sys-libs/glibc/glibc-2.31-r6.ebuild +++ b/sys-libs/glibc/glibc-2.31-r6.ebuild @@ -301,6 +301,14 @@ setup_target_flags() { # The mips abi cannot support the GNU style hashes. #233233 filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both ;; + ppc) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; sparc) # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. filter-flags "-fcall-used-g7" diff --git a/sys-libs/glibc/glibc-2.32.ebuild b/sys-libs/glibc/glibc-2.32.ebuild index 2a750041ae48..062f5445621b 100644 --- a/sys-libs/glibc/glibc-2.32.ebuild +++ b/sys-libs/glibc/glibc-2.32.ebuild @@ -301,6 +301,14 @@ setup_target_flags() { # The mips abi cannot support the GNU style hashes. #233233 filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both ;; + ppc) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; sparc) # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. filter-flags "-fcall-used-g7" diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index ef9ad2c0051e..67b4c1240006 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -302,6 +302,14 @@ setup_target_flags() { # The mips abi cannot support the GNU style hashes. #233233 filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both ;; + ppc) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; sparc) # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. filter-flags "-fcall-used-g7" |