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

Ubuntu Touch to Land with Bq Aquaris e4.5 Phones in February

The first two companies that have been confirmed to release phones with Ubuntu Touch are Meizu and Bq. Until now, only Meizu showed any kind of involvement with Ubuntu Touch and they were the first to announce a launch window. On the other hand, Bq has been silent, but it seems to have been very busy and to be the first one out the door. Read more

Linux 3.19 Merge Window Closes Ahead Of Schedule

Linus announced on Friday night that he's closing the merge window early for 3.19. Torvalds said that he's pulling the last of the pull requests on Saturday -- related to KBuild and the READ_ONCE split-up -- but is planning to then close the merge window. Read more

X.Org Server 1.16.3 Released To Fix Security Issues

Julien Cristau of Debian announced the X.Org Server 1.16.3 release on Saturday morning. The primary focus of this release is on correcting the security issues within the GLX, DIX, XV, DRI3, RENDER, and other areas of the xorg-server code-base affected by outstanding security problems. Read more