Language Selection

English French German Italian Portuguese Spanish

Getting Familiar with GCC Parameters

Filed under
HowTos

gcc (GNU C Compiler) is actually a collection of frontend tools that does compilation, assembly, and linking. The goal is to produce a ready-to-run executable in a format acceptable to the OS. For Linux, this is ELF (Executable and Linking Format) on x86 (32-bit and 64-bit). But do you know what some of the gcc parameters can do for you? If you're looking for ways to optimize the resulted binary, prepare for a debugging session, or simply observe the steps gcc takes to turn your source code into an executable, getting familiar with these parameters is a must. So, please read on.

Recall that gcc does multiple steps, not just one. Here is a brief explanation of their meaning:

* Preprocessing: Producing code that no longer contains directives. Things like "#if" cannot be understood directly by the compiler, so this must be translated into real code. Macros are also expanded at this stage, making the resulting code larger than the original. [1]

* Compilation:

Full Story.

More in Tux Machines

today's howtos

Linux and Linux Foundation

KDE and GNOME

Debian Family

  • Devuan GNU/Linux 1.0.0 "Jessie" Just Around the Corner, Release Candidate Out
    It's been five almost five months since the developers behind the Debian-based Devuan GNU/Linux operating system launched the second Beta version towards the first stable release of the OS, and they now announced the Release Candidate. The Devuan project continues its vision of providing a libre Debian fork without using the systemd init system, and the Release Candidate (RC) version brings the GNU/Linux distribution closer to a final release. The interesting fact is that this RC appears to be stable enough to be used for production work.
  • Budgie 10.3 Released, Here’s How to Install it on Ubuntu
    A new version of the Budgie desktop is available to install on Ubuntu. Budgie 10.3 adds a new Alt+Tab switcher, and brings a stack of bug fixes to the table.
  • Ubuntu 17.10 Codename Released "Artful Aardvark"
  • openHAB
    Partners Canonical, openHAB Foundation and Azul Systems have collaborated hard to drive development of the new openHAB 2.0 smart-home platform as a snap package. An alternative to Apple Homekit and Samsung SmartThings, openHAB from openHAB Foundation is completely free and open source, and acts as a control hub for home IoT setups.