In reply to @eightbit_dboy "I'm getting this error": I went through and looked at some of the cross-compilation code paths... I dunno if you have already looked at these: - https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L207 - https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L220 - https://github.com/nim-lang/Nim/blob/devel/lib/system/platforms.nim#L15 - https://github.com/nim-lang/Nim/blob/devel/lib/system/platforms.nim#L78 It looks like Nim needs to know about the sizes of int and friends, and it needs to know endian'ness. You could try picking something that matches those specs and then forcing the compiler for the real target; which seems to be what you are attempting .. but there is the chance that the `--cpu` you pick might have some secret sauce hiding inside. I have noticed a few targets, such as `hppa`, have unique conditions that the Nim source considers. I haven't found any really self-evident way to pass all the necessary compiler+linker flags to Nim to make any attempt to create a "custom" target. Looks like the best that can be done is variations of an existing target, so it will likely be that stuff like `sh4` needs a target defined in the sources.