Config.sub and rustc => Rustc Accepted Targets

I meant that every gcc executable can only compile for a single target triple, unlike rustc, clang and other LLVM based compiler that can compile for multiple target triples. Because gcc can only compile for a single target triple, there is no need to translate from a rustc target triple to a gcc target triple. Gcc doesn't have an option to specify the target triple anyway.

I do understand GCC single-target configuration etc. :wink:

To do cross-compilation similar to clang --target="$clang_target" etc., instead of plain gcc, you invoke $gnu_target-gcc (where that's indeed a separate build that has been configured with --target=$gnu_target). (... and thus, I argue, it follows that you do need the target translation.)

1 Like