diff --git a/core/zlib/build b/core/zlib/build index 39962de2..e77abad9 100755 --- a/core/zlib/build +++ b/core/zlib/build @@ -2,6 +2,8 @@ export CFLAGS="$CFLAGS -fPIC" +patch -p1 < Fix-CC-logic-in-configure.patch + ./configure \ --prefix=/usr diff --git a/core/zlib/checksums b/core/zlib/checksums index ec1ba07f..587b875b 100644 --- a/core/zlib/checksums +++ b/core/zlib/checksums @@ -1 +1,2 @@ -c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 +91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9 +f35eb05334a4f8d7b40b6c5610a6369f654863b5fa1a19c2507888f918025238 diff --git a/core/zlib/patches/Fix-CC-logic-in-configure.patch b/core/zlib/patches/Fix-CC-logic-in-configure.patch new file mode 100644 index 00000000..f34c4044 --- /dev/null +++ b/core/zlib/patches/Fix-CC-logic-in-configure.patch @@ -0,0 +1,43 @@ +From 80d086357a55b94a13e43756cf3e131f25eef0e4 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Mon, 28 Mar 2022 08:40:45 +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}. It was throwing away any pre-set CC value as +a result. + +The rest of the script then cascades down a bad path because it's convinced +it's not GCC or a GCC-like compiler. + +This led to e.g. misdetection of inability to build shared libs +for say, multilib cases (w/ CC being one thing from the environment being used +for one test (e.g. x86_64-unknown-linux-gnu-gcc -m32 and then 'cc' used for +shared libs (but missing "-m32"!)). Obviously just one example of how +the old logic could break. + +This restores the old default of 'CC' if nothing overrides it later +in configure. + +Bug: https://bugs.gentoo.org/836308 +Signed-off-by: Sam James +--- + configure | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure b/configure +index 52ff4a04e..3fa3e8618 100755 +--- a/configure ++++ b/configure +@@ -174,7 +174,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/core/zlib/sources b/core/zlib/sources index c52cb60b..27b7fe11 100644 --- a/core/zlib/sources +++ b/core/zlib/sources @@ -1 +1,2 @@ https://zlib.net/zlib-VERSION.tar.gz +patches/Fix-CC-logic-in-configure.patch diff --git a/core/zlib/version b/core/zlib/version index 41acf3fe..d9f2a341 100644 --- a/core/zlib/version +++ b/core/zlib/version @@ -1 +1 @@ -1.2.11 3 +1.2.12 1