gcc

GCC, the GNU Compiler Collection

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada,
 Go, and D, as well as libraries for these languages (libstdc++,...). GCC was originally
 written as the compiler for the GNU operating system. The GNU system was developed to
 be 100% free software, free in the sense that it respects the user's freedom.


We strive to provide regular, high quality releases, which we want to work well on a
 variety of native and cross targets (including GNU/Linux), and encourage everyone to
 contribute changes or help testing GCC. Our sources are readily and freely available 
via Git and weekly snapshots.

https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/

https://gcc.gnu.org/onlinedocs/10.1.0/

https://gcc.gnu.org/

------------------------------------------------------------

gcc操作手册:

https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc.pdf

gcc的安装:

https://gcc.gnu.org/install/

----------------------------------------------------------------

gcc Host/Target 参数说明

https://gcc.gnu.org/install/specific.html

gcc

gcc

gcc编译

一步到位编译:gcc hello.c -o hello
预处理 -E (.i) 编译 -S (.s) 汇编-c (.o) 连接-o
预处理
gcc -E hello.c -o hello.i -E:仅执行编译预处理
-o:将结果输出并指定输出文件的文件名
编译为汇编代码
gcc -S hello.c(.i) -o hello.s -S:将C代码转换为汇编代码
汇编:
gcc -c hello.c -o hello.o -c:仅执行编译操作,不进行连接操作
连接:
gcc hello.o -o hello
-o:将结果输出并指定输出文件的文件名
-O0、-O1、-O2、-O3:编译优化选项的四个级别,-O0 表示没有优化, -O1 为默认值,-O3 优化级别最高
-g:只是编译器,在编译的时候,产生调试信息

gdb

https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/gdb.html

linux工具使用教程

https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/lsof.html

 

 

 

原文链接: https://www.cnblogs.com/time93/p/13246365.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍;

也有高质量的技术群,里面有嵌入式、搜广推等BAT大佬

    gcc

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/360768

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年3月2日 下午1:29
下一篇 2023年3月2日 下午1:29

相关推荐