Raspberry Pi - Hybrid build environment

apt-get install debootstrap qemu-user-static binfmt-support

Raspbian Buster

qemu-debootstrap --arch armhf buster /srv/raspbian-buster-cross http://archive.raspbian.org/raspbian --no-check-gpg
mount -t proc proc /srv/raspbian-buster-cross/proc/
mount -t devpts devpts /srv/raspbian-buster-cross/dev/pts

LANG=C LC_ALL=C chroot /srv/raspbian-buster-cross
cd

apt-get install perl
apt-get install dialog wget
wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2019.1_all.deb
dpkg -i debian-archive-keyring_2019.1_all.deb
rm debian-archive-keyring_2019.1_all.deb

echo 'deb [arch=amd64] http://ftp.be.debian.org/debian buster main' > /etc/apt/sources.list
echo '#deb [arch=amd64] http://security.debian.org/ buster/updates main' >> /etc/apt/sources.list
echo 'deb [arch=armhf] http://mirrordirector.raspbian.org/raspbian buster main' >> /etc/apt/sources.list
echo 'deb [trusted=yes] http://twolife.be/raspbian/multiarchcross-buster/ ./' >> /etc/apt/sources.list
echo '#deb [arch=armhf] https://twolife.be/raspbian/ buster main test' >> /etc/apt/sources.list
echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf

dpkg --add-architecture amd64
apt-get update
apt-get remove --purge gcc-4.9-base gcc-5-base gcc-6-base gcc-7-base
apt-get install -d binutils-arm-linux-gnueabihf:amd64 make:amd64
apt-get install binutils
[hack /var/lib/dpkg/status 'Package: binutils' => binutils-arm-linux-gnueabihf:any]
dpkg --purge --force-all binutils-arm-linux-gnueabihf
dpkg -i /var/cache/apt/archives/binutils-arm-linux-gnueabihf*amd64.deb

apt-get install gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf cpp-8-crosslinks g++-8-crosslinks gcc-8-crosslinks
apt-get install build-essential bash-completion mc:amd64 most:amd64 m4:amd64 bzip2:amd64 xz-utils:amd64

[hack '/var/lib/dpkg/status build-essential' (make), dpkg-dev (make)]
dpkg --purge --force-all make
dpkg -i /var/cache/apt/archives/make*amd64.deb

apt-get clean
apt-get install --purge bash:amd64 dash:amd64
apt-get install -d tar:amd64 gzip:amd64 findutils:amd64
[big hack]