22 ms·
> why do we usually need to build software for a target architecture/system on the same architecture/system? Because that's the path of least resistance in ter
by fer 2y ago
> why do we usually need to build software for a target architecture/system on the same architecture/system?
Because that's the path of least resistance in terms of development, at least unless you need to industrially build for many architectures. If the compiler runs on $ARCH, the output runs on $ARCH, I guess there's some exception but it's that, an exception.
> Unless the build includes tests
Build should indeed include tests, unless you want to ship software that potentially fails in architectures you claim to support.
Cross compiling isn't a first class citizen in many languages, and when it is, cross testing usually isn't, but you can have a toolchain that includes qemu (as a vm or as a dynamic binary translator) to cover those cases.