Linux/ FreeBSD GNU GCC Common option for C compiler

November 15, 2010 by: upa_kid


gcc is a GNU project C and C++ compiler for Linux, UNIX, FreeBSD etc. From the wikipedia:

GCC is a key component of the GNU toolchain. As well as being the official compiler of the GNU system, GCC has been adopted as the standard compiler by most other modern Unix-like computer operating systems, including Linux, the BSD family and Mac OS X. GCC has been ported to a wide variety of computer architectures, and is widely deployed as a tool in commercial and closed development environments.

Common gcc options:

cc -E :preprocessor
cc -S :create or show assembly coding
cc -o :o bject filename
cc -g :debug info
cc -O :o ptimized code
cc -O2 :o ptimized code with optimization level increased
cc -Wall :create or show all warning
cc -D_SYMBOL_ : Symbol for prerpcessor

You can use gcc instead of cc.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
Have you found this script useful? Please support author by PayPal donation.

Leave a Reply