使用 gcc -Q -v “启用选项”和“通过选项”之间有什么区别

2023-12-10

我正在寻找编译期间使用的默认编译器标志。因此我使用了命令gcc -Q -v <example.c>感兴趣的输出如下所示:

GNU C (Ubuntu 4.8.4-2ubuntu1~14.04.3) 版本 4.8.4 (x86_64-linux-gnu) 由GNU C版本4.8.4、GMP版本5.1.3、MPFR版本3.1.2-p3、MPC版本1.0.1编译

GGC 启发式: --param ggc-min-expand=100 --param ggc-最小堆大小=131072

传递的选项:-v -imultiarch x86_64-linux-gnu example.c -mtune=通用 -march=x86-64 -fstack-protector -Wformat -Wformat-security

启用选项:-faggressive-loop-optimizations -fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg -fcommon -fdelete-null-pointer-checks -fdwarf2-cfi-asm -fearly-inlined -feliminate-unused-debug-types -ffunction-cse -fgcse-lm -fgnu-runtime -fgnu-unique -fident -finline-atomics -fira-hoist-压力 -fira-share-save-slots -fira-share-spill-slots -fivoopts -fkeep-static-consts -fleading -下划线-fmath-errno -fmerge-debug-strings -fmove-loop-invariants -fpeephole -fprefetch-loop-arrays -freg-struct-return -fsched-关键路径启发式-fsched-dep-count-heuristic -fsched -group-heuristic -fsched-interblock -fsched-last-insn-heuristic -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic -fsched-stalled-insns-dep -fshow-column -fsigned-zeros -fsplit-ivs-in-unroller -fstack-protector -fstrict-易失性位域 -fsync-libcalls -ftrapping-math -ftree-coalesce-vars -ftree-cselim -ftree-forwprop -ftree-loop-if-convert -ftree -loop-im -ftree-loop-ivcanon -ftree-loop-optimize -ftree-parallelize-loops= -ftree-phiprop -ftree-pta -ftree-reassoc -ftree-scev-cprop -ftree-slp-vectorize -ftree- vect-loop-version -funit-at-a-time -funwind-tables -fvar-tracking -fvar-tracking-assignments -fzero-initialized-in-bss -m128bit-long-double -m64 -m80387 -maccumulate-outgoing- args -malign-stringops -mfancy-math-387 -mfp-ret-in-387 -mfxsr -mglibc -mieee-fp -mlong-double-80 -mmmx -mno-sse4 -mpush-args -mred-zone -msse - msse2-mtls-direct-seg-refs

我现在想知道:有什么区别启用选项 and 选项已通过?


选项已通过是添加到命令行的选项,通过配置添加,例如-march=x86-64 -fstack-protector,或通过命令调用,例如-v。这意味着这些选项默认情况下不启用,必须由 gcc 命令指定。

选项已启用是启用的选项,并且始终用于与特定的编译gcc就具体系统而言,选项已通过你没有禁用其中一些。

例如。在清晰的环境中调用gcc example.c会给你example.c作为唯一传递的选项,但所有启用的选项仍然相同。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 gcc -Q -v “启用选项”和“通过选项”之间有什么区别 的相关文章

随机推荐