Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The good news is that Clang can cross-compile fairly easily. Much better than gcc.

How so? The complications in cross compiling come from setting up all the system libraries, not the compiler and linker.



I remember getting annoyed needing a windows driver that was part of an open source package. That needed autotools to build. I got annoyed trying to make it compile under mysys/MinGW. So I built a gcc cross compiler under linux. Compiled the damn driver and it just worked(tm).


by default it supports a variety of targets, you don't need to set it up.

setting up the system libraries is relatively easy, make a copy of the target you're building for, assuming it has a setup for compilation, and use --sysroot=/path/to/target.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: