From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 40BA4138359 for ; Sun, 23 Aug 2020 11:33:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 434C8E079E; Sun, 23 Aug 2020 11:33:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DEB74E079E for ; Sun, 23 Aug 2020 11:33:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7C5D83405BB for ; Sun, 23 Aug 2020 11:33:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D8BE630A for ; Sun, 23 Aug 2020 11:33:05 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1598182381.8cf656db6d13ce7e97966bb31c0a068731f8530e.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/glibc/glibc-2.31-r6.ebuild sys-libs/glibc/glibc-2.32.ebuild sys-libs/glibc/glibc-9999.ebuild X-VCS-Directories: sys-libs/glibc/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 8cf656db6d13ce7e97966bb31c0a068731f8530e X-VCS-Branch: master Date: Sun, 23 Aug 2020 11:33:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3ad70d1b-a9d0-4f75-8bcb-1e54a9a78806 X-Archives-Hash: 8c74f607eeac0b72cf252e5667d7c2ed commit: 8cf656db6d13ce7e97966bb31c0a068731f8530e Author: Sergei Trofimovich gentoo org> AuthorDate: Sun Aug 23 11:32:05 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sun Aug 23 11:33:01 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cf656db 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 gentoo.org> sys-libs/glibc/glibc-2.31-r6.ebuild | 8 ++++++++ sys-libs/glibc/glibc-2.32.ebuild | 8 ++++++++ sys-libs/glibc/glibc-9999.ebuild | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/sys-libs/glibc/glibc-2.31-r6.ebuild b/sys-libs/glibc/glibc-2.31-r6.ebuild index c010b578953..3ac5fb0e9b1 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 2a750041ae4..062f5445621 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 ef9ad2c0051..67b4c124000 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"