Skip to content

Commit f091c0e

Browse files
committed
zlib: fix cross-compilation not producing shared libraries
Apply patch that already has been applied upstream: - madler/zlib#607 - madler/zlib@05796d3
1 parent e2166cd commit f091c0e

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

pkgs/development/libraries/zlib/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ stdenv.mkDerivation (rec {
4040
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
4141
'';
4242

43+
patches = [
44+
./fix-configure-issue-cross.patch
45+
];
46+
4347
outputs = [ "out" "dev" ]
4448
++ lib.optional splitStaticOutput "static";
4549
setOutputFlags = false;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
From 05796d3d8d5546cf1b4dfe2cd72ab746afae505d Mon Sep 17 00:00:00 2001
2+
From: Mark Adler <madler@alumni.caltech.edu>
3+
Date: Mon, 28 Mar 2022 18:34:10 -0700
4+
Subject: [PATCH] Fix configure issue that discarded provided CC definition.
5+
6+
---
7+
configure | 3 +++
8+
1 file changed, 3 insertions(+)
9+
10+
diff --git a/configure b/configure
11+
index 52ff4a04e..3fa3e8618 100755
12+
--- a/configure
13+
+++ b/configure
14+
@@ -174,7 +174,10 @@ if test -z "$CC"; then
15+
else
16+
cc=${CROSS_PREFIX}cc
17+
fi
18+
+else
19+
+ cc=${CC}
20+
fi
21+
+
22+
cflags=${CFLAGS-"-O3"}
23+
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
24+
case "$cc" in

0 commit comments

Comments
 (0)