Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main/zlib: upgrade to 1.2.12 (CVE-2018-25032)
Include fixes from upstream PRs: madler/zlib#607 madler/zlib#599
- Loading branch information
Showing
3 changed files
with
131 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 80d086357a55b94a13e43756cf3e131f25eef0e4 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 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
From 37c9730ba474d274f4cc6a974943eef95087b9f6 Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <raj.khem@gmail.com> | ||
Date: Tue, 8 Mar 2022 22:38:47 -0800 | ||
Subject: [PATCH] configure: Pass LDFLAGS to link tests | ||
|
||
LDFLAGS can contain critical flags without which linking wont succeed | ||
therefore ensure that all configure tests involving link time checks are | ||
using LDFLAGS on compiler commandline along with CFLAGS to ensure the | ||
tests perform correctly. Without this some tests may fail resulting in | ||
wrong confgure result, ending in miscompiling the package | ||
|
||
Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
--- | ||
configure | 12 ++++++------ | ||
1 file changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/configure b/configure | ||
index e974d1fd7..69dfa3f69 100755 | ||
--- a/configure | ||
+++ b/configure | ||
@@ -410,7 +410,7 @@ if test $shared -eq 1; then | ||
echo Checking for shared library support... | tee -a configure.log | ||
# we must test in two steps (cc then ld), required at least on SunOS 4.x | ||
if try $CC -w -c $SFLAGS $test.c && | ||
- try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then | ||
+ try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test.o; then | ||
echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log | ||
elif test -z "$old_cc" -a -z "$old_cflags"; then | ||
echo No shared library support. | tee -a configure.log | ||
@@ -492,7 +492,7 @@ int main(void) { | ||
} | ||
EOF | ||
fi | ||
- if try $CC $CFLAGS -o $test $test.c; then | ||
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then | ||
sizet=`./$test` | ||
echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log | ||
else | ||
@@ -530,7 +530,7 @@ int main(void) { | ||
return 0; | ||
} | ||
EOF | ||
- if try $CC $CFLAGS -o $test $test.c; then | ||
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then | ||
echo "Checking for fseeko... Yes." | tee -a configure.log | ||
else | ||
CFLAGS="${CFLAGS} -DNO_FSEEKO" | ||
@@ -547,7 +547,7 @@ cat > $test.c <<EOF | ||
#include <errno.h> | ||
int main() { return strlen(strerror(errno)); } | ||
EOF | ||
-if try $CC $CFLAGS -o $test $test.c; then | ||
+if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then | ||
echo "Checking for strerror... Yes." | tee -a configure.log | ||
else | ||
CFLAGS="${CFLAGS} -DNO_STRERROR" | ||
@@ -654,7 +654,7 @@ int main() | ||
return (mytest("Hello%d\n", 1)); | ||
} | ||
EOF | ||
- if try $CC $CFLAGS -o $test $test.c; then | ||
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then | ||
echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log | ||
|
||
echo >> configure.log | ||
@@ -744,7 +744,7 @@ int main() | ||
} | ||
EOF | ||
|
||
- if try $CC $CFLAGS -o $test $test.c; then | ||
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then | ||
echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log | ||
|
||
echo >> configure.log |