From 581e530c692e842cd9d8bd854c880c9575623e80 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 26 Oct 2026 02:00:59 +0900 Subject: internal/rosa/package/toybox: cross-compile via wrapper This works around the rather janky Makefile not properly supporting additional CC flags for cross-compilation. Signed-off-by: Ophestra --- internal/rosa/package/toybox.az | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'internal') diff --git a/internal/rosa/package/toybox.az b/internal/rosa/package/toybox.az index 720c736a..c2b8fb53 100644 --- a/internal/rosa/package/toybox.az +++ b/internal/rosa/package/toybox.az @@ -34,7 +34,7 @@ chmod +w /bin/ ln -rs "$(which bash)" /bin/ || true chmod +w kconfig tests -rm \ +rm -f \ tests/du.test \ tests/sed.test \ tests/tar.test \ @@ -91,8 +91,16 @@ LDFLAGS="${LDFLAGS:-''} -static" chmod +w /bin/ ln -rs "$(which bash)" /bin/ || true +if [ -n "${CC+x}" ]; then + echo '#!/bin/sh' > '/system/bin/`+linuxArch+`-cc' + echo "exec $CC "'"$@"' >> '/system/bin/`+linuxArch+`-cc' + chmod +x '/system/bin/`+linuxArch+`-cc' + unset CC + export CROSS_COMPILE=`+linuxArch+`- +fi + chmod +w kconfig tests -rm \ +rm -f \ tests/du.test \ tests/sed.test \ tests/tar.test \ -- cgit v1.3.1