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 0784215808B for ; Mon, 28 Mar 2022 07:28:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A6B5E0982; Mon, 28 Mar 2022 07:28:16 +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 AC69AE0982 for ; Mon, 28 Mar 2022 07:28:15 +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 728CE34133D for ; Mon, 28 Mar 2022 07:28:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CE9A1177 for ; Mon, 28 Mar 2022 07:28:12 +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: <1648452483.0a91cef90a3879f5fe3763a01c0f37c336bd1a6c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/zlib/files/zlib-1.2.12-fix-CC-logic-in-configure.patch sys-libs/zlib/zlib-1.2.12.ebuild X-VCS-Directories: sys-libs/zlib/files/ sys-libs/zlib/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0a91cef90a3879f5fe3763a01c0f37c336bd1a6c X-VCS-Branch: master Date: Mon, 28 Mar 2022 07:28:12 +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: 4263db2c-a44f-4862-a819-05d0ecd5c128 X-Archives-Hash: c76538dae5ea5bacb75020f97e0d65a7 commit: 0a91cef90a3879f5fe3763a01c0f37c336bd1a6c Author: Sam James gentoo org> AuthorDate: Mon Mar 28 07:27:31 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Mar 28 07:28:03 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a91cef9 sys-libs/zlib: fix CC detection in configure Notably fixes multilib (although it actually silently skipped for me) in at least one way. Closes: https://bugs.gentoo.org/836308 Signed-off-by: Sam James gentoo.org> .../zlib-1.2.12-fix-CC-logic-in-configure.patch | 27 ++++++++++++++++++++++ sys-libs/zlib/zlib-1.2.12.ebuild | 4 ++++ 2 files changed, 31 insertions(+) diff --git a/sys-libs/zlib/files/zlib-1.2.12-fix-CC-logic-in-configure.patch b/sys-libs/zlib/files/zlib-1.2.12-fix-CC-logic-in-configure.patch new file mode 100644 index 000000000000..da9455519b6f --- /dev/null +++ b/sys-libs/zlib/files/zlib-1.2.12-fix-CC-logic-in-configure.patch @@ -0,0 +1,27 @@ +From 95b9053f10710f9f881f4daec2f2e78da87560cf Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Mon, 28 Mar 2022 08:21:18 +0100 +Subject: [PATCH] Fix CC logic in configure + +In https://github.com/madler/zlib/commit/e9a52aa129efe3834383e415580716a7c4027f8d, +the logic was changed to try check harder for GCC, but it dropped +the default setting of cc=${CC}. + +This led to e.g. misdetection of inability to build shared libs +for say, multilib cases (w/ CC being one thing (e.g. x86_64-unknown-linux-gnu-gcc -m32 +and then 'cc' used for shared libs being w/o -m32). + +Signed-off-by: Sam James +--- a/configure ++++ b/configure +@@ -180,7 +180,10 @@ if test -z "$CC"; then + else + cc=${CROSS_PREFIX}cc + fi ++else ++ cc=${CC} + fi ++ + cflags=${CFLAGS-"-O3"} + # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure + case "$cc" in diff --git a/sys-libs/zlib/zlib-1.2.12.ebuild b/sys-libs/zlib/zlib-1.2.12.ebuild index d43f2e1853c7..1a031b3c2526 100644 --- a/sys-libs/zlib/zlib-1.2.12.ebuild +++ b/sys-libs/zlib/zlib-1.2.12.ebuild @@ -36,6 +36,9 @@ PATCHES=( # bug #831628 "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch + + # Fix broken CC logic + "${FILESDIR}"/${PN}-1.2.12-fix-CC-logic-in-configure.patch ) src_prepare() { @@ -85,6 +88,7 @@ multilib_src_configure() { *) # bug #347167 local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) + local myconf=( --shared --prefix="${EPREFIX}/usr"