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

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

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-min-heapsize = 131072

传递的选项:-v -imultiarch x86_64-linux-gnu example.c -mtune = generic -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-inlining -feiminate- unused-debug-types -ffunction-cse -fgcse-lm -fgnu-runtime -fgnu-unique -fident -finline-atomics -fira-hoist-pressure -fira-share-save-slots -fira-share-spill-slots – fivopts -fkeep-static-consts -fleading-underscore -fmath-errno -fmerge-debug-strings -fmove-loop-invariants -fpeephole -fprefetch-loop-arrays -freg-struct-return -fsched-critical-path-heuristic – 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-volatile-bitfields -fsync-libcalls -ftrapping-math -ftree-coalesce-vars -ftree-cselim -ftree-forwprop – ftree-loop-if-convert -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-opti mize -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

我现在想知道: 启用的 选项传递的 选项有什么区别?

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

被激活的选项是已启用的选项,并且始终用于在特定系统上使用该特定gcc进行编译,只要通过选项,您就不会禁用其中的某些选项

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