aboutsummaryrefslogtreecommitdiff
path: root/core/busybox/build
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/busybox/build
parentd9f26f27eb38c4727ff8446e36fbb0ed7efb0532 (diff)
downloadrepository-38f6aa7f5401d8322daa0b978df10d5fda2a613e.tar.gz
experimental: add initial cross-compilation support
Diffstat (limited to 'core/busybox/build')
-rwxr-xr-xcore/busybox/build6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/busybox/build b/core/busybox/build
index df00282d..2a3f38c1 100755
--- a/core/busybox/build
+++ b/core/busybox/build
@@ -10,9 +10,11 @@ for patch in *.patch; do
patch -p1 < "$patch"
done
+[ "$CPT_CROSS_TRIPLET" ] && CC=$CPT_CROSS_TRIPLET-cc
+
# Build and install regular busybox.
# This excludes utilities which require 'suid' to function.
-make CC="${CC:-gcc}"
+make CC="${CC:=gcc}"
make CONFIG_PREFIX="$1/usr" install
# Rename the binary temporarily.
@@ -21,7 +23,7 @@ mv "$1/usr/bin/busybox" "$1/usr/bin/busybox-nosuid"
# Build and install suid busybox.
# This _only_ includes utlities which require 'suid' to function.
cp -f .config-suid .config
-make CC="${CC:-gcc}"
+make CC="$CC"
make CONFIG_PREFIX="$1/usr" install
# Aptly name the busybox binaries.