aboutsummaryrefslogtreecommitdiff
path: root/core/bzip2
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-12-27 20:26:32 +0300
committerCem Keylan <cem@ckyln.com>2020-12-27 20:26:32 +0300
commit38f6aa7f5401d8322daa0b978df10d5fda2a613e (patch)
tree6fb948ff52a57a6e2220025a51ef705dd9d98e0c /core/bzip2
parentd9f26f27eb38c4727ff8446e36fbb0ed7efb0532 (diff)
downloadrepository-38f6aa7f5401d8322daa0b978df10d5fda2a613e.tar.gz
experimental: add initial cross-compilation support
Diffstat (limited to 'core/bzip2')
-rwxr-xr-xcore/bzip2/build8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/bzip2/build b/core/bzip2/build
index ac1055b2..209cce27 100755
--- a/core/bzip2/build
+++ b/core/bzip2/build
@@ -1,10 +1,12 @@
#!/bin/sh -e
+[ "$CPT_CROSS_TARGET" ] && CC=$CPT_CROSS_TARGET-cc
+
make CC="${CC:-cc} $CFLAGS -fPIC $LDFLAGS" -f Makefile-libbz2_so
-make CC="${CC:-cc} $CFLAGS -fPIC $LDFLAGS" bzip2recover libbz2.a
+make CC="${CC:-cc} $CFLAGS -fPIC $LDFLAGS -static" bzip2 bzip2recover libbz2.a
-for bin in bzip2-shared bzdiff bzgrep bzip2recover bzmore; do
- install -Dm755 "$bin" "$1/usr/bin/${bin%%-shared}"
+for bin in bzip2 bzdiff bzgrep bzip2recover bzmore; do
+ install -Dm755 "$bin" "$1/usr/bin/$bin"
done
install -Dm755 libbz2.so.1.0.8 "$1/usr/lib/libbz2.so.1.0.8"