7

In which ways it can be an example of C/assembly/object/executable compiler?

I would like more pieces of information than the few ones Wikipedia gives about it. Also, if you can link some sources where I could find more about it, it would be great.

Adriana Longo
  • 83
  • 1
  • 1
  • 4

1 Answers1

10

From Wiktionary, a toolchain is:

A set of tools for software development, often used in sequence so that the output of one tool comprises the input of the next.

GCC is the GNU Compiler Collection; i.e. a set of compilers for different languages from GNU. From the official webpage:

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, and Go, as well as libraries for these languages (libstdc++,...).

Therefore, the GCC toolchain is a set of applications and libraries to compile programs written in several languages. For instance, for the C and C++ languages, that includes tools like:

  • cpp Preprocessor
  • gcc C compiler
  • g++ C++ compiler
  • gcov Test coverage program

And accompanying libraries like:

  • libbacktrace Symbolic backtraces producer
  • libquadmath Quad-Precision Math Library
  • libstdc++-v3 C++ Standard Library

Now, when someone refers to the GCC toolchain, typically they are also implicitly referring to other utilities that might not come from GCC's project/repository but are usually required for development. For instance, tools like:

  • ar Archive manipulation program
  • as Assembler
  • c++filt C++ demangler
  • ld Linker
  • nm Object file symbol listing
  • objdump Object file information dumper

If you are using the implementation of these tools from GNU, then you are using the GNU Binutils project:

The GNU Binutils are a collection of binary tools.

Acorn
  • 24,970
  • 5
  • 40
  • 69
  • It is right to add also a debugger to the toolchain? so in this case gdb after objdump –  Mar 26 '20 at 23:48
  • 1
    @Mondo-Cane In the extended definition (which in practice is used), sure! In fact, many compilers come with a debugger. – Acorn Mar 27 '20 at 10:59