aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rwxr-xr-xcore/sbase/build10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/sbase/build b/core/sbase/build
index 6781199d..c4f56dc7 100755
--- a/core/sbase/build
+++ b/core/sbase/build
@@ -1,7 +1,13 @@
#!/bin/sh -e
-make LDFLAGS="$LDFLAGS -static" sbase-box
-make PREFIX=/usr DESTDIR="$1" sbase-box-install
+[ "$CPT_CROSS_TRIPLET" ] && CC=$CPT_CROSS_TRIPLET-cc \
+ AR=$CPT_CROSS_TRIPLET-ar \
+ RANLIB=$CPT_CROSS_TRIPLET-ranlib
+
+: ${CC:=cc} ${AR:=ar} ${RANLIB:=ranlib}
+
+make CC=$CC AR=$AR RANLIB=$RANLIB LDFLAGS="$LDFLAGS -static" sbase-box
+make PREFIX=/usr DESTDIR="$1" sbase-box-install
unlink "$1/usr/bin/tar"
unlink "$1/usr/bin/sed"