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 E89651382C5 for ; Tue, 9 Jun 2020 07:24:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 14ACEE08FF; Tue, 9 Jun 2020 07:24:21 +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 D8EFFE08FF for ; Tue, 9 Jun 2020 07:24:20 +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 4BDCD34ED71 for ; Tue, 9 Jun 2020 07:24:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DC45E21D for ; Tue, 9 Jun 2020 07:24:10 +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: <1591687447.b6558b4251e9dacfb8a866716820e43a7dc5d0fe.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-r4.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: b6558b4251e9dacfb8a866716820e43a7dc5d0fe X-VCS-Branch: master Date: Tue, 9 Jun 2020 07:24:10 +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: 0b10eacd-d916-4fdb-829f-f34f4c03475f X-Archives-Hash: 9223f458ebe36550077bb728d31ce261 commit: b6558b4251e9dacfb8a866716820e43a7dc5d0fe Author: Sergei Trofimovich gentoo org> AuthorDate: Tue Jun 9 07:23:10 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Tue Jun 9 07:24:07 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6558b42 sys-libs/glibc: always use NM and READELF for default ABI sys-devel/binutils-config[-native-symlinks] exposed a bug of not using 'readelf' / 'nm' if used ABI is not default. Breakage mahifested as ./configure failure for glibc[static-pie] for non-default ABIs. The fix uses NM and READELF from default ABI (specified by CTARGET). While at it set CC in early compile test checks. Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich gentoo.org> sys-libs/glibc/glibc-2.31-r4.ebuild | 13 +++++++++++-- sys-libs/glibc/glibc-9999.ebuild | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/sys-libs/glibc/glibc-2.31-r4.ebuild b/sys-libs/glibc/glibc-2.31-r4.ebuild index 24d169cae7a..487ca85ae40 100644 --- a/sys-libs/glibc/glibc-2.31-r4.ebuild +++ b/sys-libs/glibc/glibc-2.31-r4.ebuild @@ -230,7 +230,8 @@ do_compile_test() { rm -f glibc-test* printf '%b' "$*" > glibc-test.c - nonfatal emake glibc-test + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" ret=$? popd >/dev/null @@ -790,7 +791,7 @@ glibc_do_configure() { fi local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; do + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do einfo " $(printf '%15s' ${v}:) ${!v}" done @@ -819,6 +820,14 @@ glibc_do_configure() { fi einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + einfo " $(printf '%15s' 'Manual NM:') ${NM}" + einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" + echo local myconf=() diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 2355e5bce34..236e15c0792 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -225,7 +225,8 @@ do_compile_test() { rm -f glibc-test* printf '%b' "$*" > glibc-test.c - nonfatal emake glibc-test + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" ret=$? popd >/dev/null @@ -798,7 +799,7 @@ glibc_do_configure() { fi local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; do + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do einfo " $(printf '%15s' ${v}:) ${!v}" done @@ -827,6 +828,14 @@ glibc_do_configure() { fi einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + einfo " $(printf '%15s' 'Manual NM:') ${NM}" + einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" + echo local myconf=()