aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-12-27 20:51:20 +0300
committerCem Keylan <cem@ckyln.com>2020-12-27 20:51:20 +0300
commit78bcf949e785ca49928e9f2130ad67d1d7577dbd (patch)
treeb2665d486dea974977d1b1208c198f9abc458267 /core
parentbe9ca67885bccc82f07e097ec732860cf64ff53a (diff)
downloadrepository-78bcf949e785ca49928e9f2130ad67d1d7577dbd.tar.gz
bzip2: fix cross build
Diffstat (limited to 'core')
-rwxr-xr-xcore/bzip2/build11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/bzip2/build b/core/bzip2/build
index df18b2c2..4145c782 100755
--- a/core/bzip2/build
+++ b/core/bzip2/build
@@ -1,9 +1,14 @@
#!/bin/sh -e
-[ "$CPT_CROSS_TRIPLET" ] && CC=$CPT_CROSS_TRIPLET-cc
+[ "$CPT_CROSS_TRIPLET" ] &&
+ CC=$CPT_CROSS_TRIPLET-cc AR=$CPT_CROSS_TRIPLET-ar RANLIB=$CPT_CROSS_TRIPLET-ranlib
-make CC="${CC:=cc} $CFLAGS -fPIC $LDFLAGS" LD=$CC -f Makefile-libbz2_so
-make CC="$CC $CFLAGS -fPIC $LDFLAGS -static" LD=$CC bzip2 bzip2recover libbz2.a
+LD=${CC:=cc}
+CC="$CC $CFLAGS -fPIC $LDFLAGS"
+
+make CC="$CC" LD="$LD" -f Makefile-libbz2_so
+make CC="$CC" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" LD="$LD" \
+ bzip2 bzip2recover libbz2.a
for bin in bzip2 bzdiff bzgrep bzip2recover bzmore; do
install -Dm755 "$bin" "$1/usr/bin/$bin"