4 ms·
> he `clang` program is a compiler driver and compiler AND assembler um, gcc does all those things.
by zabzonk 4y ago
> he `clang` program is a compiler driver and compiler AND assembler
um, gcc does all those things.
- jcranmer 4y agogcc uses gas (from binutils) as its assembler, unlike clang.
- citizen_friend 4y agoAs a user, why would I care if the actual compilation occurs: - in the process - in a fork of the process - in a child process The outcome to me is the same.
- jcranmer 4y agoIn the gcc/gas distinction, the fact that gas is part of binutils, a completely separate project from gcc, means that there is another package you might have to update to use a new feature.
- fhuygfthdsafrsd 4y agoThe parent comment did say: > is one of my favorite things to tell newbie compiler engineers.
- sigjuice 4y agoExactly. This is all implementation trivia that is of absolutely no concern to me as a user.
- bregma 4y agoThat's right, It's all just stuff that happens when you hit F5 in your IDE. It's like not needing to know how an internal combustion engine works since all you have to do is tell the driver where you want to go.
- izacus 4y agoBecause it helps when the process breaks and you don't end up being helpless and unable to fix the most important tool you use at your work. Being ignorant is cute until its your job to be an engineer and fix problems.
- citizen_friend 4y agoI'm not doubting that it would be helpful to have a deeper knowledge of the tools you use. I'm just not sure there is a distinction for users between gcc in and clang in this regard.
- mshockwave 4y agoclang packs all three things into a single executable. GCC however will always call out to external executables for compiler (cc1) and assembler (as)
- bregma 4y agoUm, no. `gcc` is a driver that runs cc1 (a C compiler from the GNU compiler collection), cc1plus (a C++ compiler from the GNU compiler collection), (g)as (an assembler from GNU binutils) and ld (a static linker from GNU binutils) and sometimes other front-ends for other languages, and sometimes other back-ends for other reasons, and sometimes some special middle-ends. All `gcc` does is parse come command-line options and then invoke other programs to do the actual job of preprocessing, compiling, assembling, and linking.