【发布时间】:2016-11-09 16:53:04
【问题描述】:
我正在寻找编译期间使用的默认编译器标志。因此我使用了命令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-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 -feliminate-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 -下划线 -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-optimize -ftree-parallelize-loops= -ft ree-phiprop -ftree-pta -ftree-reassoc -ftree-scev-cprop -ftree-slp-vectorize -ftree-vect-loop-version -funit-at-a-time -funwind-tables -fvar-tracking -fvar-跟踪分配-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
我现在想知道:启用的选项和通过的选项有什么区别?
【问题讨论】: