Next: Overall Options, Up: Invoking GCC
Here is a summary of all the options, grouped by type. Explanations are in the following sections.
-c -S -E -o file -combine -pipe -pass-exit-codes -ObjC (APPLE ONLY) -ObjC++ (APPLE ONLY) -arch arch (APPLE ONLY) -fsave-repository=file -x language -v -### --help --target-help --version
-ansi -std=standard -aux-info filename -faltivec (APPLE ONLY) -fasm-blocks (APPLE ONLY) -fno-asm -fno-builtin -fno-builtin-function -fhosted -ffreestanding -fms-extensions -trigraphs -no-integrated-cpp -traditional -traditional-cpp -fallow-single-precision -fcond-mismatch -fconstant-cfstrings (APPLE ONLY) -fnon-lvalue-assign (APPLE ONLY) -fno-nested-functions -fpch-preprocess (APPLE ONLY) -fsigned-bitfields -fsigned-char -fpascal-strings (APPLE ONLY) -Wno-#warnings (APPLE ONLY) -Wextra-tokens (APPLE ONLY) -Wnewline-eof (APPLE ONLY) -Wno-altivec-long-deprecated (APPLE ONLY) -funsigned-bitfields -funsigned-char -fwritable-strings
-fabi-version=n -fno-access-control -fcheck-new -fconserve-space -fno-const-strings -fno-elide-constructors -fno-enforce-eh-specs -ffor-scope -fno-for-scope -fno-gnu-keywords -fno-implicit-templates -fno-implicit-inline-templates -fno-implement-inlines -fms-extensions -fno-nonansi-builtins -fno-operator-names -fno-optional-diags -fpermissive -frepo -fno-rtti -fstats -ftemplate-depth-n -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ -fno-default-inline -fvisibility-inlines-hidden -fvisibility-ms-compat -Wabi -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Weffc++ -Wno-deprecated -Wstrict-null-sentinel -Wno-non-template-friend -Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wsign-promo
-fconstant-string-class=class-name -fgnu-runtime -fnext-runtime -fno-nil-receivers -fobjc-call-cxx-cdtors (APPLE ONLY) -fobjc-sjlj-exceptions -fobjc-gc -freplace-objc-classes -fzero-link -gen-decls -Wno-protocol -Wselector -Wstrict-selector-match -Wundeclared-selector
-fmessage-length=n -fdiagnostics-show-location=[once|every-line]
-fsyntax-only -pedantic -pedantic-errors -w -Wextra -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wno-deprecated-declarations -Wdisabled-optimization -Wno-div-by-zero -Wno-endif-labels -Werror -Werror-implicit-function-declaration -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 -Wno-format-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wno-import -Winit-self -Winline -Wno-int-to-pointer-cast -Wno-invalid-offsetof -Winvalid-pch -Wlarger-than-len -Wlong-long -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmost (APPLE ONLY) -Wno-multichar -Wnonnull -Wpacked -Wpadded -Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wstack-protector -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wvariadic-macros
-Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wtraditional -Wdeclaration-after-statement -Wno-discard-qual -Wno-pointer-sign
-dletters -dumpspecs -dumpmachine -dumpversion -fdump-unnumbered -fdump-translation-unit[-n] -fdump-class-hierarchy[-n] -fdump-ipa-all -fdump-ipa-cgraph -fdump-tree-all -fdump-tree-original[-n] -fdump-tree-optimized[-n] -fdump-tree-inlined[-n] -fdump-tree-cfg -fdump-tree-vcg -fdump-tree-alias -fdump-tree-ch -fdump-tree-ssa[-n] -fdump-tree-pre[-n] -fdump-tree-ccp[-n] -fdump-tree-dce[-n] -fdump-tree-gimple[-raw] -fdump-tree-mudflap[-n] -fdump-tree-scev [-n] -fdump-tree-ddall [-n] -fdump-tree-elck [-n] -fdump-tree-dom[-n] -fdump-tree-dse[-n] -fdump-tree-phiopt[-n] -fdump-tree-forwprop[-n] -fdump-tree-copyrename[-n] -fdump-tree-nrv -fdump-tree-vect -fdump-tree-sra[-n] -fdump-tree-fre[-n] -fdump-tree-loop[-n] -fdump-tree-vect[-n] -ftree-vectorizer-verbose=n -flimit-debug-info -feliminate-dwarf2-dups -feliminate-unused-debug-types -feliminate-unused-debug-symbols -fmem-report -fopt-diary -fprofile-arcs -ftree-based-profiling -frandom-seed=string -fsched-verbose=n -ftest-coverage -ftime-report -fvar-tracking -g -glevel -gcoff -gdwarf-2 -ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ -p -pg -print-file-name=library -print-libgcc-file-name -print-multi-directory -print-multi-lib -print-prog-name=program -print-search-dirs -Q -save-temps -time
-falign-functions=n -falign-jumps=n -falign-labels=n -falign-loops=n -falign-loops-max-skip=n -falign-jumps-max-skip=n -fbounds-check -fmudflap -fmudflapth -fmudflapir -fbranch-probabilities -fprofile-values -fvpt -fbranch-target-load-optimize -fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves -fcprop-registers -fcreate-profile -fcse-follow-jumps -fcse-skip-blocks -fcx-limited-range -fdata-sections -fdelayed-branch -fdelete-null-pointer-checks -fexpensive-optimizations -ffast-math -ffloat-store -fforce-addr -fforce-mem -ffunction-sections -fgcse -fgcse-lm -fgcse-sm -fgcse-las -fgcse-after-reload -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2 -finline-functions -finline-limit=n -fkeep-inline-functions -fkeep-static-consts -fmerge-constants -fmerge-all-constants -fmodulo-sched -fno-branch-count-reg -fno-default-inline -fno-defer-pop -floop-optimize2 -fmove-loop-invariants -fno-function-cse -fno-guess-branch-probability -fno-inline -fno-math-errno -fno-peephole -fno-peephole2 -funsafe-math-optimizations -ffinite-math-only -fno-trapping-math -fno-zero-initialized-in-bss -mstackrealign -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls -fprefetch-loop-arrays -fprofile-generate -fprofile-use -fregmove -frename-registers -freorder-blocks -freorder-blocks-and-partition -freorder-functions -frerun-cse-after-loop -frerun-loop-opt -frounding-math -fschedule-insns -fschedule-insns2 -fno-sched-interblock -fno-sched-spec -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=n -sched-stalled-insns-dep=n -fsched2-use-superblocks -fsched2-use-traces -freschedule-modulo-scheduled-loops -fsignaling-nans -fsingle-precision-constant -fspeculative-prefetching -fstack-protector -fstack-protector-all -fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps -funroll-all-loops -funroll-loops -fpeel-loops -fsplit-ivs-in-unroller -funswitch-loops -fvariable-expansion-in-unroller -ftree-pre -ftree-ccp -ftree-dce -ftree-loop-optimize -ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts -ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-ch -ftree-sra -ftree-ter -ftree-lrs -ftree-fre -ftree-vectorize -fuse-profile -fweb -fscalar-evolutions -fall-data-deps --param name=value -O -O0 -O1 -O2 -O3 -Os -Oz (APPLE ONLY) -fast (APPLE ONLY)
-Aquestion=answer -A-question[=answer] -C -dD -dI -dM -dN -Dmacro[=defn] -E -H -idirafter dir -include file -imacros file -iprefix file -iwithprefix dir -iwithprefixbefore dir -isystem dir -M -MM -MF -MG -MP -MQ -MT -nostdinc -P -fworking-directory -remap -trigraphs -undef -Umacro -Wp,option -Xpreprocessor option
-Wa,option -Xassembler option
object-file-name -llibrary -nostartfiles -nodefaultlibs -nostdlib -pie -s -static -static-libgcc -shared -shared-libgcc -symbolic -Wl,option -Xlinker option -u symbol
-Bprefix -Idir -iquotedir -Ldir -specs=file -I-
-V version -b machine
ARM Options
-mapcs-frame -mno-apcs-frame -mabi=name -mapcs-stack-check -mno-apcs-stack-check -mapcs-float -mno-apcs-float -mapcs-reentrant -mno-apcs-reentrant -msched-prolog -mno-sched-prolog -mlittle-endian -mbig-endian -mwords-little-endian -mfloat-abi=name -msoft-float -mhard-float -mfpe -mthumb-interwork -mno-thumb-interwork -mcpu=name -march=name -mfpu=name -mstructure-size-boundary=n -mabort-on-noreturn -mlong-calls -mno-long-calls -msingle-pic-base -mno-single-pic-base -mpic-register=reg -mnop-fun-dllimport -mcirrus-fix-invalid-insns -mno-cirrus-fix-invalid-insns -mpoke-function-name -mthumb -marm -mtpcs-frame -mtpcs-leaf-frame -mcaller-super-interworking -mcallee-super-interworking
Darwin Options
-all_load -allowable_client -arch -arch_errors_fatal -arch_only -bind_at_load -bundle -bundle_loader -client_name -compatibility_version -current_version -dead_strip -dependency-file -dylib_file -dylinker_install_name -dynamic -dynamiclib -exported_symbols_list -filelist -flat_namespace -force_cpusubtype_ALL -force_flat_namespace -headerpad_max_install_names -iframework -image_base -init -install_name -keep_private_externs -multi_module -multiply_defined -multiply_defined_unused -noall_load -no_dead_strip_inits_and_terms -nofixprebinding -nomultidefs -noprebind -noseglinkedit -pagezero_size -prebind -prebind_all_twolevel_modules -private_bundle -read_only_relocs -sectalign -sectobjectsymbols -whyload -seg1addr -sectcreate -sectobjectsymbols -sectorder -segaddr -segs_read_only_addr -segs_read_write_addr -seg_addr_table -seg_addr_table_filename -seglinkedit -segprot -segs_read_only_addr -segs_read_write_addr -single_module -static -sub_library -sub_umbrella -twolevel_namespace -umbrella -undefined -unexported_symbols_list -weak_reference_mismatches -whatsloaded -F -gused -gfull -mmacosx-version-min=version -mkernel -mone-byte-bool
i386 and x86-64 Options
-mtune=cpu-type -march=cpu-type -mfpmath=unit -masm=dialect -mno-fancy-math-387 -mno-fp-ret-in-387 -msoft-float -msvr3-shlib -mno-wide-multiply -mrtd -malign-double -mpreferred-stack-boundary=num -mmmx -msse -msse2 -msse3 -mssse3 -m3dnow -mthreads -mno-align-stringops -minline-all-stringops -mpush-args -maccumulate-outgoing-args -m128bit-long-double -m96bit-long-double -mregparm=num -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs -mcmodel=code-model -m32 -m64
PowerPC Options See RS/6000 and PowerPC Options.
RS/6000 and PowerPC Options
-mcpu=cpu-type -mtune=cpu-type -mpower -mno-power -mpower2 -mno-power2 -mpowerpc -mpowerpc64 -mno-powerpc -maltivec -mno-altivec -mpim-altivec -mno-pim-altivec -mpowerpc-gpopt -mno-powerpc-gpopt -mpowerpc-gfxopt -mno-powerpc-gfxopt -mnew-mnemonics -mold-mnemonics -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc -m64 -m32 -mxl-compat -mno-xl-compat -mpe -malign-power -malign-natural -msoft-float -mhard-float -mmultiple -mno-multiple -mstring -mno-string -mupdate -mno-update -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align -mstrict-align -mno-strict-align -mrelocatable -mno-relocatable -mrelocatable-lib -mno-relocatable-lib -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian -mdynamic-no-pic -mprioritize-restricted-insns=priority -msched-costly-dep=dependence_type -minsert-sched-nops=scheme -mcall-sysv -mcall-netbsd -maix-struct-return -msvr4-struct-return -mabi=altivec -mabi=no-altivec -mabi=spe -mabi=no-spe -misel=yes -misel=no -mspe=yes -mspe=no -mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double -mprototype -mno-prototype -msim -mmvme -mads -myellowknife -memb -msdata -msdata=opt -mvxworks -mwindiss -G num -pthread
-fcall-saved-reg -fcall-used-reg -ffixed-reg -fexceptions -fnon-call-exceptions -funwind-tables -fasynchronous-unwind-tables -finhibit-size-directive -finstrument-functions -fno-common -fno-ident -fpcc-struct-return -fpic -fPIC -fpie -fPIE -freg-struct-return -fshared-data -fshort-enums -fshort-double -fshort-wchar -fverbose-asm -fpack-struct[=n] -fstack-check -fstack-limit-register=reg -fstack-limit-symbol=sym -fargument-alias -fargument-noalias -fargument-noalias-global -fleading-underscore -ftls-model=model -ftrapv -fwrapv -fbounds-check -fvisibility