LINUX.ORG.RU

История изменений

Исправление imatveev13, (текущая версия) :

Хочешь компилить для ARM? Пересобери компилятор из сорцов. Хочешь компилить под MIPS? Пересобери компилятор из сорцов. Хочешь компилить под RISC-V? Пересобери компилятор из сорцов. Хочешь компилить под другую операционную систему? Пересобери компилятор из сорцов!

https://clang.llvm.org/docs/CrossCompilation.html

In GCC world, every host/target combination has its own set of binaries, headers, libraries, etc. So, it’s usually simple to download a package with all files in, unzip to a directory and point the build system to that compiler, that will know about its location and find all it needs to when compiling your code.

On the other hand, Clang/LLVM is natively a cross-compiler, meaning that one set of programs can compile to all targets by setting the -target option. That makes it a lot easier for programmers wishing to compile to different platforms and architectures, and for compiler developers that only have to maintain one build system, and for OS distributions, that need only one set of main packages.

Исходная версия imatveev13, :

Хочешь компилить для ARM? Пересобери компилятор из сорцов. Хочешь компилить под MIPS? Пересобери компилятор из сорцов. Хочешь компилить под RISC-V? Пересобери компилятор из сорцов. Хочешь компилить под другую операционную систему? Пересобери компилятор из сорцов!

In GCC world, every host/target combination has its own set of binaries, headers, libraries, etc. So, it’s usually simple to download a package with all files in, unzip to a directory and point the build system to that compiler, that will know about its location and find all it needs to when compiling your code.

On the other hand, Clang/LLVM is natively a cross-compiler, meaning that one set of programs can compile to all targets by setting the -target option. That makes it a lot easier for programmers wishing to compile to different platforms and architectures, and for compiler developers that only have to maintain one build system, and for OS distributions, that need only one set of main packages.