• Like
  • Save
Gcc
Upcoming SlideShare
Loading in...5
×
 

Gcc

on

  • 835 views

 

Statistics

Views

Total Views
835
Views on SlideShare
835
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Gcc Gcc Presentation Transcript

    • GCC on Linux The beast and it's taming Mark Veltzer mark.veltzer@gmail.com
    • Getting data from stdin ● Input file would be - ● You have to specify the input language using the -x flag ● Possible values include: c,c++,objective- c,objective-c++,assembler,assembler-with- cpp,ada,f77,f95,java and many more ● Example: gcc -x c - ● Output file either specified with -o or would be the standard (a.out).
    • Getting help ● man gcc – good for quick reference to flags ● Info gcc – more in depth (warning: entire book!) ● gcc – help – only most common flags but good for 99% of the cases (two minuses!) ● gcc –target-help – shows options that have to do with target code generation ● gcc –help=warnings – shows all warning flags
    • What version of gcc are you running? ● On the command line you can use the following ● gcc –version – first line shows the compiler version ● gcc -v – more info (including threading model, configuration and ● Or you can use your package management utilities to determine the version of the gcc package ● In your source code (TODO)
    • What version of gcc are you running? ● In your source code you can use the following macros ● __VERSION__ - has the compiler version you are using as a string ● __GXX_ABI_VERSION – has the C++ ABI version that the current compiler implements ● linux, __linux, __linux__, unix, __unix, __unix__, __gnu_linux__ are defined symbols
    • What version of gcc are you running? (cont) ● __GNUC__ - is your compilers major version number ● __GNUC_MINOR__ - has the minor version of your compiler ● __GNUC_PATCHLEVEL__ - has the patch level of your compiler
    • The preprocessor ● cpp on the command line ● echo | g[cc|++] -E -dM - - will dump your preprocessors defined symbols for C