public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
Date: Mon, 28 Mar 2022 07:28:12 +0000 (UTC)	[thread overview]
Message-ID: <1648452483.0a91cef90a3879f5fe3763a01c0f37c336bd1a6c.sam@gentoo> (raw)

commit:     0a91cef90a3879f5fe3763a01c0f37c336bd1a6c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 28 07:27:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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 <sam@gentoo.org>
+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 <sam@gentoo.org>
+--- 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"


             reply	other threads:[~2022-03-28  7:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28  7:28 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-04  2:24 [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/ Sam James
2024-01-24  8:05 Sam James
2023-10-30 10:21 Sam James
2022-11-23  4:25 Sam James
2022-03-11 15:18 Sam James
2022-01-28  7:53 Sam James
2015-09-29 13:26 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1648452483.0a91cef90a3879f5fe3763a01c0f37c336bd1a6c.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox