From 59dc1125501d4d181113b6cb736254e1ee2d536b Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Wed, 30 Dec 2020 23:11:09 +0300 Subject: sbase: fix cross build --- core/sbase/build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'core/sbase') 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" -- cgit v1.2.3