码迷,mamicode.com
首页 > 其他好文 > 详细

gcc compilation process..

时间:2016-08-04 21:39:04      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:

gcc -Iproj/src myfile.c -o myfile
gcc -c myfile.c "compile without linking
gcc -D DEBUG myfile.c -o myfile
gcc -glevel  "level=0,1,3,null
"gcc -l links with a library file.
"gcc -L looks in directory for library files. "Link -l with library name without the lib prefix and the .a or .so extensions
gcc myfile.c -o myfile
gcc -Wall  "enable all warnings..

gcc

-I -L -l -D -g -O -o -Wall

about the -0 option.. ref to the following table..

Set the compiler‘s optimization level.

optionoptimization levelexecution timecode sizememory usagecompile time
-O0 optimization for compilation time (default) + + - -
-O1 or -O optimization for code size and execution time - - + +
-O2 optimization more for code size and execution time --   + ++
-O3 optimization more for code size and execution time ---   + +++
-Os optimization for code size   --   ++
-Ofast O3 with fast none accurate math calculations ---   + +++

+increase ++increase more +++increase even more -reduce --reduce more ---reduce even more

gcc compilation process..

标签:

原文地址:http://www.cnblogs.com/sansna/p/5738238.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!