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 7872E138334 for ; Sun, 17 Nov 2019 10:42:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C57FCE0895; Sun, 17 Nov 2019 10:42:09 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 979B8E0895 for ; Sun, 17 Nov 2019 10:42:09 +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 834FE34CF05 for ; Sun, 17 Nov 2019 10:42:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D445E85C for ; Sun, 17 Nov 2019 10:42:06 +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: <1573987320.525bc6c0fef5bc316812df10a93dceafdfe25e16.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.30-r2.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: 525bc6c0fef5bc316812df10a93dceafdfe25e16 X-VCS-Branch: master Date: Sun, 17 Nov 2019 10:42:06 +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: 296af556-5f3c-432a-8590-c2e445f5a4af X-Archives-Hash: f8513b104f54d59663a16c16d4dcc568 commit: 525bc6c0fef5bc316812df10a93dceafdfe25e16 Author: Sergei Trofimovich gentoo org> AuthorDate: Sun Nov 17 10:41:08 2019 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sun Nov 17 10:42:00 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=525bc6c0 sys-libs/glibc: mangle bad -march= only for ABI=x86 Normally setup_target_flags() attempts to guard against too conservative (or missing) -march= value by chacking if sync primitives can be compiled. If it can't be compiled glibc assumes -march= value to be too low. Unfortunately, test always runs against 32-bit ABI without checking if current ABI is actually 32-bit. This causes the test mis-fire on USE=-multilib ARCH=amd64 systems. Sweep workaround under ABI=x86 case. Reported-by: Klaus Kusche Closes: https://bugs.gentoo.org/700232 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Sergei Trofimovich gentoo.org> sys-libs/glibc/glibc-2.30-r2.ebuild | 5 ++--- sys-libs/glibc/glibc-9999.ebuild | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys-libs/glibc/glibc-2.30-r2.ebuild b/sys-libs/glibc/glibc-2.30-r2.ebuild index 910396913f2..21a2145abdd 100644 --- a/sys-libs/glibc/glibc-2.30-r2.ebuild +++ b/sys-libs/glibc/glibc-2.30-r2.ebuild @@ -256,9 +256,8 @@ setup_target_flags() { ;; amd64) # -march needed for #185404 #199334 - # Note: This test only matters when the x86 ABI is enabled, so we could - # optimize a bit and elide it. # TODO: See cross-compile issues listed above for x86. + [[ ${ABI} == x86 ]] && if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then local t=${CTARGET_OPT:-${CTARGET}} t=${t%%-*} @@ -269,7 +268,7 @@ setup_target_flags() { # ugly, ugly, ugly. ugly. CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") export CFLAGS_x86="${CFLAGS_x86} -march=${t}" - einfo "Auto adding -march=${t} to CFLAGS_x86 #185404" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" fi ;; mips) diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index f1b57d70806..4ddf0a27321 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -257,9 +257,8 @@ setup_target_flags() { ;; amd64) # -march needed for #185404 #199334 - # Note: This test only matters when the x86 ABI is enabled, so we could - # optimize a bit and elide it. # TODO: See cross-compile issues listed above for x86. + [[ ${ABI} == x86 ]] && if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then local t=${CTARGET_OPT:-${CTARGET}} t=${t%%-*} @@ -270,7 +269,7 @@ setup_target_flags() { # ugly, ugly, ugly. ugly. CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") export CFLAGS_x86="${CFLAGS_x86} -march=${t}" - einfo "Auto adding -march=${t} to CFLAGS_x86 #185404" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" fi ;; mips)