From 377069b96b7a5f294d58d087209d879757d235c7 Mon Sep 17 00:00:00 2001 From: Thomas Glanzmann Date: Thu, 8 Dec 2022 10:47:34 +0100 Subject: [PATCH 1/1] use the right compiler and prepare for crosscompiling --- gpu.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gpu.sh b/gpu.sh index 960ccbe..4789b2c 100644 --- a/gpu.sh +++ b/gpu.sh @@ -12,6 +12,16 @@ cd "$(dirname "$0")" unset LC_CTYPE unset LANG +handle_crosscompile() +{ + if [ "`uname -m`" != 'aarch64' ]; then + export ARCH=arm64 + export CROSS_COMPILE=aarch64-linux-gnu- + export DEBOOTSTRAP=qemu-debootstrap + sudo apt install -y libc6-dev-arm64-cross + fi +} + build_linux() { ( @@ -22,7 +32,7 @@ build_linux() source "$HOME/.cargo/env" cat ../../config-gpu.txt > .config make LLVM=-14 olddefconfig - make -j `nproc` V=0 bindeb-pkg > /dev/null + make -j `nproc` LLVM=-14 V=0 bindeb-pkg > /dev/null ) } @@ -54,6 +64,7 @@ build_uboot() mkdir -p build cd build +handle_crosscompile build_linux build_m1n1 build_uboot -- 2.39.5