Draft: Fixes to allow for cross-compilation
This includes various other minor changes, if this approach seems generally reasonable I'll split this MR into various sensible commits.
I used this locally to successfully build a plasma desktop environment for CheriBSD (a version of FreeBSD that supports CHERI-enable architectures such as the Arm Morello prototype) from both my macOS laptop and also on an Ubuntu 18.04 Linux server.
Depends on kcoreaddons!117 (merged)