From 8d9702f91e80063c9edd592ecf17bc22a4bb4a9e Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Sun, 27 Dec 2020 21:21:41 +0300 Subject: busybox: fix cross build --- core/busybox/build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/busybox/build b/core/busybox/build index 2a3f38c1..766bc487 100755 --- a/core/busybox/build +++ b/core/busybox/build @@ -10,11 +10,12 @@ for patch in *.patch; do patch -p1 < "$patch" done -[ "$CPT_CROSS_TRIPLET" ] && CC=$CPT_CROSS_TRIPLET-cc +[ "$CPT_CROSS_TRIPLET" ] && +sed -i "/^CONFIG_CROSS_COMPILER_PREFIX/s/=.*/=\"$CPT_CROSS_TRIPLET-\"/" .config .config-suid # Build and install regular busybox. # This excludes utilities which require 'suid' to function. -make CC="${CC:=gcc}" +make make CONFIG_PREFIX="$1/usr" install # Rename the binary temporarily. @@ -23,7 +24,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" +make make CONFIG_PREFIX="$1/usr" install # Aptly name the busybox binaries. -- cgit v1.2.3