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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EFA75158094 for ; Sun, 25 Sep 2022 01:21:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13AD3E0B64; Sun, 25 Sep 2022 01:21:18 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ED1D7E0B64 for ; Sun, 25 Sep 2022 01:21:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0BF92340E94 for ; Sun, 25 Sep 2022 01:21:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7744C5D4 for ; Sun, 25 Sep 2022 01:21:15 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1664068742.8e62898af68131da0430c09cd99955d3eef1567c.sam@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.36-r3.ebuild sys-libs/glibc/glibc-9999.ebuild X-VCS-Directories: sys-libs/glibc/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8e62898af68131da0430c09cd99955d3eef1567c X-VCS-Branch: master Date: Sun, 25 Sep 2022 01:21:15 +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: 616c6d15-9874-4244-b21c-ace75a17827c X-Archives-Hash: aecf817cfe07e4debd9827788e69c59c commit: 8e62898af68131da0430c09cd99955d3eef1567c Author: Sam James gentoo org> AuthorDate: Fri Sep 9 14:23:43 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sun Sep 25 01:19:02 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e62898a sys-libs/glibc: avoid gcc-major-version failure I ended up getting a weird failure (which I can't reproduce any longer, but it maeks sense still I think): ``` x86_64-pc-linux-gnu-gcc -m64 -pipe -march=native -fdiagnostics-color=always -ggdb3 -O2 -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs -fuse-ld=bfd -Wl,-O1 -Wl,--as-needed -pipe -march=native -fdiagnostics-color=always -ggdb3 -O2 -m32 -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs -fuse-ld=bfd -Wl,-O1 -Wl,--as-needed glibc-test.c -o glibc-test /var/tmp/portage/sys-libs/glibc-2.36-r1/temp/environment: line 3892: ((: #define == 11: syntax error: operand expected (error token is "#define == 11") * Running do_src_configure for ABI x86 * ABI: x86 * CBUILD: x86_64-pc-linux-gnu ``` It's because tc-getCPP can't handle at least a large amount of CFLAGS (seems to handle some okay though). Strip them all out and just use barebones CC when calling gcc-major-version and friends, then restor after. Signed-off-by: Sam James gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/27418 Signed-off-by: Sam James gentoo.org> sys-libs/glibc/glibc-2.36-r3.ebuild | 4 ++++ sys-libs/glibc/glibc-9999.ebuild | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys-libs/glibc/glibc-2.36-r3.ebuild b/sys-libs/glibc/glibc-2.36-r3.ebuild index 012d6984dd74..7d7069dadec8 100644 --- a/sys-libs/glibc/glibc-2.36-r3.ebuild +++ b/sys-libs/glibc/glibc-2.36-r3.ebuild @@ -336,10 +336,14 @@ setup_target_flags() { use stack-realign && export CFLAGS_x86+=" -mstackrealign" # Workaround for bug #823780. + # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that. + CC_mangled=${CC} + CC=${glibc__GLIBC_CC} if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f" einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})" fi + CC=${CC_mangled} fi ;; mips) diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 8456c2a16fe4..68bafd8c3c33 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -26,8 +26,7 @@ PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then inherit git-r3 else - #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" - KEYWORDS="" + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" fi @@ -337,10 +336,14 @@ setup_target_flags() { use stack-realign && export CFLAGS_x86+=" -mstackrealign" # Workaround for bug #823780. + # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that. + CC_mangled=${CC} + CC=${glibc__GLIBC_CC} if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f" einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})" fi + CC=${CC_mangled} fi ;; mips)