Okay, so the issue is that you're trying to compile the .c code yourself using gcc. But whatever the Nim compiler does seems to be working fine.
I would suggest taking a look at `nimcache/docker_nim_dev_example.json`, it will contain information about how to compile the C sources. That should help you out. If this doesn't help you can resort to `strace`'ing the Nim process to see what `gcc` process it runs :) That said, I would suggest not doing it this way. I'm not 100% sure why you're doing it this way, but AFAIK cross-compiling can be accomplished using `nim` only. You can tell it what flags to pass to gcc, what gcc to use, etc. This might help: [https://forum.nim-lang.org/t/3487](https://forum.nim-lang.org/t/3487)