For both 32bit and 64bit architectures ARCH=arm is used, but we need different toolchains to compile them. Pick the correct one based on the CONFIG_CPU_64 symbol. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- MAKEALL | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAKEALL b/MAKEALL index ad95cfe040..dd61f89827 100755 --- a/MAKEALL +++ b/MAKEALL @@ -104,6 +104,13 @@ do_build_target() { check_pipe_status configure_result="$?" + if [ ${arch} = "arm" ]; then + grep -q "CONFIG_CPU_64=y" ${BUILDDIR}/.config + if [ $? = 0 ]; then + arch=arm64 + fi + fi + cross_compile=$(eval echo '$CROSS_COMPILE_'${tmp}) cross_compile_set=$(eval echo '${CROSS_COMPILE_'${tmp}'+set}') if [ "${cross_compile_set}" = "" ] -- 2.39.2