mosys: Use native compile for unit test.

- The cross-compiled mosys binaries aren't able to execute unit tests on
the build machine. Create a second mosys binary that can be executed on
the host machine, in order to run tests.
- Meson should in theory be able to detect that the cross-compiled
binary can be executed on the build machine in the case when both are
for x86. However, this feature doesn't seem to be working for us. This
is a workaround to get tests to run. There is a bit more discussion on
the bug about alternative approaches.

TEST=FEATURES='test' emerge-coral mosys
TEST=FEATURES='test' emerge-elm mosys

Change-Id: I11664005bbc08bbcda307790ab914426823c2fbf
Commit-Ready: Andrew Lamb <>
Tested-by: Andrew Lamb <>
Reviewed-by: Gregory Meinke <>
1 file changed