I have a complete --stage4 cross build.
/usr/aarch64-unknown-linux-gnu/etc/portage/make.conf has
Code: Select all
CHOST=aarch64-unknown-linux-gnu
CBUILD=x86_64-pc-linux-gnu
This minimal toolchain works perfectly fine in combination with distcc for Raspberry Pi 4.
But any cross-emerge fails at configuration stage with:
Code: Select all
configure: error: C compiler cannot create executables
axl was able to build his third linux with cross-emerge because both his host and target (guest) are arm64 systems, as he mentioned.
In my case the host machine architecture is amd64 and the target toolchain is arm64 (aarch64).
Unless there's another explanation, I think that's why guest's gcc cannot create executables when run on the host with cross-emerge.
It creates executables just fine when running on RPI (arm64 system) with distcc: the RPI sends compilation tasks through distcc to the amd64 machine, which runs its aarch64-unknown-linux-gnu-gcc and its resulting machine code is then sent back to the RPI which links it into an aarch64 executable.
For me, there would be one reason to use cross-emerge on the amd64 host: building an aarch64 llvm/clang to help with clang+distcc compilation on the RPI. Unfortunately, it looks like I can't do that, so I'm limited to gcc+distcc.