0

I'm fully aware of this question asking for the same thing. That question is closed and rather old. Accepted answer suggests rather complicated way of making your own cross-compiler and it requires cygwin.

Maybe now there are some other, simpler ways of doing this?

jww
  • 97,681
  • 90
  • 411
  • 885
Amomum
  • 6,217
  • 8
  • 34
  • 62

2 Answers2

2

Actually, there is. If you want cross-compile for linux on ARM, you can use linaro toolchain, which is available for windows. It doesn't require cygwin.

If you want cross-compile for linux on x86, that's a bit of a problem. The only ready-to-use toolchain (apart pre-built solution in that answer) that I'm aware of is "cross-compile tools" for Intel Edison (here). There are some drawbacks to it:

  1. It will compile 32-bit linux binary
  2. Version for windows 64-bit requires cygwin
  3. Version for Windows 32-bit doesn't require cygwin but contains case-sensitive filenames (i.e. there are some files with names that differ only in case and windows will consider them the same file). You may have to make your Windows case-sensitive.

Windows binaries will be at "sysroots\x86_64-pokysdk-mingw32\usr\bin\i586-poky-linux"

To use edison toolchain you have to provide it with sysroot option for compilation and linking, something like this:

"i586-poky-linux-g++.exe" --sysroot=../../../../core2-32-poky-linux
Community
  • 1
  • 1
Amomum
  • 6,217
  • 8
  • 34
  • 62
1

ELLCC is available as a binary download for Windows, Linux, and Macs. It doesn't require cygwin, and can build Linux programs for several targets, including ARM. It is based on the clang/LLVM compiler.

Richard Pennington
  • 19,673
  • 4
  • 43
  • 72