首页 > 其他 > 详细

gcc compilation process..

时间:2016-08-04 21:38:23      阅读:228      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!