GNU Compiler Collection

Darwin Condori
1 min readFeb 4, 2021

--

The GNU Compiler Collection (GCC) is the standard set of compilers shipped with all Enterprise Linux distributions. The IBM Linux on Power Toolchain team supports GCC for Linux on Power, providing enablement and exploitation of new features for each processor generation, and improved code generation for better performance.

GCC includes:

  • C compiler (gcc)
  • C++ compiler (g++)
  • Fortran compiler (gfortran)
  • Go compiler (gccgo)

Example:

nano hola.c

Create a c file and now we will compile it.

#include <stdio.h>
int main()
{
printf(“Hola ArchiTecnologia\n”);
return 0;
}

Compiling:

gcc -o hola hola.c

By the way, if you use that it may compile slower, but it will improve the result of the final binary. Another important thing, you know that gcc if you don’t pass a name with the -o option generates a binary named by default as a.out:

gcc hola.c
./a.out

If instead of generating a binary you want to generate the assembly code corresponding to your source code, you can use the -S option:

gcc -S hola.c

Obtain object code without linking with -c:

gcc -c hola.c
GNU Compiler Collection

--

--

Darwin Condori
Darwin Condori

No responses yet