博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
GCC选项
阅读量:4982 次
发布时间:2019-06-12

本文共 4446 字,大约阅读时间需要 14 分钟。

 

-g:

  Debugging Option. 提供给GDB的debugging信息的选项;

-fno-omit-frame-pointer:

  Optimization Option;

-Wstrict-prototypes:

  Warning Option. 当Linux内核在体系结构差异较大的平台移植时,会产生与数据类型相关的问题,在编译内核事,使用该选项,可以避免很多错误产生。(C and Object-C Only Warning Option)

-Wundef:

  Warning Option. Warn if an undefined identifier is evaluated in an '#if' directive;

-Wtrigraphs:

  Warning Option. Warn if any trigraphs are encountered that might change the meaning of the program. This warning is enabled by -Wall;

-fstrict-aliasing:

  Optimization Option. Enabled at the levels -O2, -O3, -Os;(not allowed by -fno-strict-aliasing)

-fno-common: 

  Options for Code Generation Conventions. In C code, controls the placement of uninitialized global variables. Unix C compilers have traditionally permitted multiple definitions of such variables in different compilation units by placing the variables in a common block. This is the behavior specified by -fcommon, and is the default for GCC on most targets. On the other hand, this behavior is not required by ISO C, and on some targets may carry a speed or code size penalty on variable references. The -fno-common option specifies that the compiler should place uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without extern) in two different compilations, you get a multiple-definition error when you link them. In this case, you must compile with -fcommon instead. Compiling with -fno-common is useful on targets for which it provides better performance, or if you wish to verify that the program will work on other systems that always treat uninitialized variable declarations this way. 

-foptimize-sibling-calling:

  Optimization Option. Optimize sibling and tail recursive calls.(not allowed by -fno-strict-aliasing)

-nostdinc:

  Preprocessor Option. Do not search the standard system directories for header files. Only the directories you have specified with -I options (and the directory of the current file, if appropriate) are searched. 

-meabi:

   支持软件浮点和硬件实现浮点功能混用;

-ffreestanding:

  C Dialect Option. Assert that compilation targets a freestanding environment. This implies -fno-builtin. A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at main. The most obvious example is an OS kernel. This is equivalent to -fno-hosted.

-isystem dir:

  Preprocessor Option. Search dir for header files, after all directories specified by -I but before the standard system directories. Mark it as a system directory, so that it gets the same special treatment as is applied to the standard system directories. If dir begins with =, then the = will be replaced by the sysroot prefix; see -sysroot and -isysroot

-pipe:

  Overall Option. Use pipes rather than temporary files for communication between the various stages of compilation. This fails to work on some systems where the assembler is unable to read from a pipe; but the GNU assembler has no trouble.

-mregnames: 

  Allow symbolic names for registers.(Disallow by -mno-regnames)

-fexceptions:

  Code Generation Option. Enable exception handling. Generates extra code needed to propagate exceptions. For some targets, this implies GCC generates frame unwind information for all functions, which can produce significant data size overhead, although it does not affect execution. If you do not specify this option, GCC enables it by default for languages like C++ that normally require exception handling, and disables it for languages like C that do not normally require it. However, you may need to enable this option when compiling C code that needs to interoperate properly with exception handlers written in C++. You may also wish to disable this option if you are compiling older C++ programs that don't use exception handling. 

-ffixed-reg:

  Code Generation Option.Treat the register named reg as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role).reg must be the name of a register. The register names accepted are machine-specific and are defined in the REGISTER_NAMES macro in the machine description macro file.This flag does not have a negative form, because it specifies a three-way choice.

-mhard-float:

   输出包含浮点指令;

 

 

参考文献:

[1] [2] [3] 

转载于:https://www.cnblogs.com/cnpirate/p/3254879.html

你可能感兴趣的文章
认清世界,认清自我,超凡脱俗
查看>>
在yii框架中如何连接数据库mongodb
查看>>
只 能处理少于 32766 个字符的字符串
查看>>
表达式语言之EL表达式
查看>>
需求分析
查看>>
解决Win7下网络应用只有进程没有界面的问题
查看>>
半监督学习(一)
查看>>
[置顶] SPL讲解(6)--Condition篇
查看>>
在MyEclipse中配置Weblogic10服务器
查看>>
浙江大学PAT上机题解析之2-11. 两个有序链表序列的合并
查看>>
java中equals和==的区别详解
查看>>
数据类型(字符串)
查看>>
Something about Swing
查看>>
设计模式看了又忘,忘了又看?
查看>>
hdu4465 2012 Asia Chengdu Regional Contest 概率期望计算+对数放大/缩小幂指数+对数还原...
查看>>
安装magento主题模板
查看>>
JZOJ.4732 函数
查看>>
Linux:重命名
查看>>
Common Subsequence--poj1458(最长公共子序列)
查看>>
Sql Server2000分页存储过程
查看>>