try chrooting to the root filesystem - assuming it has a build environment... you can then use the arm compiler.... something like:-
cp /usr/bin/qemu-aarch64-static usr/bin
cp /run/systemd/resolve/stub-resolv.conf run/resolvconf/resolv.conf
mount /sys ./sys -o bind
mount /proc ./proc -o bind
mount /dev ./dev -o bind
sudo LC_ALL=C ...