As I’ve been getting into embedded systems I’ve noticed that some projects (Arch Arm and OpenBSD for example) frown upon cross compiling. What is the reasoning for this? Is a cross-compiled binary somehow different from a natively compiled one?
OpenBSD suggests that building on the hardware ensures that the system is fully functional (and also self-hosting) and that makes complete sense. But do people actually develop and compile kernel drivers on the hardware they are developing for? It sounds very time consuming.
From OpenBSD FAQ:
“Cross-compiling tools are in the system, for use by developers bringing up a new platform. However, they are not maintained for general use.”
-http://www.openbsd.org/faq/faq5.html#ProbXComp
I’ll see if I can hunt down the IRC log where a developer from ArchLinux Arm told me that they don’t cross compile, though they seem to have updated their info on cross-compiling with DistCC: http://archlinuxarm.org/developers/distcc-cross-compiling
7
For projects like Arch Linux ARM and OpenBSD that are trying to build and maintain a complicated, interactive user environment, a strong preference for doing “native builds” (in OpenBSD terminology) forces developers to “eat their own dogfood” and minimizes the MxN problem of maintaining M code generators in N environments.
For an embedded systems project with one target environment and application code under the control of a small group of developers, that reasoning doesn’t apply.