[4/6] Fix configure file
Source: https://github.com/madler/zlib/pull/607
This commit is contained in:
parent
bddff11ae1
commit
4e76ca623c
46
zlib-1.2.12-fix-configure.patch
Normal file
46
zlib-1.2.12-fix-configure.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From a6cd9e1230acdb535bd57bbc350020da3d24eaf3 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
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 <sam@gentoo.org>
|
||||
---
|
||||
configure | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index a21be36..cdf0e5b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -185,7 +185,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
|
||||
--
|
||||
2.34.3
|
||||
|
Loading…
Reference in New Issue
Block a user