使用gcc -v --help可以列出gcc的所有可选项
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Usage: gcc [options] file...
Options:
-pass-exit-codes Exit with highest error code from a phase
--help Display this information
--target-help Display target specific command line options
-dumpspecs Display all of the built in spec strings
-dumpversion Display the version of the compiler
-dumpmachine Display the compiler's target processor
-print-search-dirs Display the directories in the compiler's search path
-print-libgcc-file-name Display the name of the compiler's companion library
-print-file-name=
Display the full path to library
-print-prog-name= Display the full path to compiler component
-print-multi-directory Display the root directory for versions of libgcc
-print-multi-lib Display the mapping between command line options and
multiple library search directories
-print-multi-os-directory Display the relative path to OS libraries
-Wa, Pass comma-separated on to the assembler
-Wp, Pass comma-separated on to the preprocessor
-Wl, Pass comma-separated on to the linker
-Xassembler Pass on to the assembler
-Xpreprocessor Pass on to the preprocessor
-Xlinker Pass on to the linker
-save-temps Do not delete intermediate files
-pipe Use pipes rather than intermediate files
-time Time the execution of each subprocess
-specs= Override built-in specs with the contents of
-std= Assume that the input sources are for
-B Add to the compiler's search paths
-b Run gcc for target , if installed
-V Run gcc version number , if installed
-v Display the programs invoked by the compiler
-### Like -v but options quoted and commands not executed
-E Preprocess only; do not compile, assemble or link
-S Compile only; do not assemble or link
-c Compile and assemble, but do not link
-o Place the output into
-x Specify the language of the following input files
Permissible languages include: c c++ assembler none
'none' means revert to the default behavior of
guessing the language based on the file's extension
Options starting with -g, -f, -m, -O, -W, or --param are automatically
passed on to the various sub-processes invoked by gcc. In order to pass
other options on to these processes the -W options must be used.
Configured
with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk
--host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
/usr/libexec/gcc/x86_64-redhat-linux/3.4.6/cc1
-quiet -v help-dummy -quiet -dumpbase help-dummy -mtune=k8 -auxbase
help-dummy -version --help -o /tmp/cc0yUXP4.s
The following options are language-independent:
--help Display this information
--param = Set parameter to value. See below for a complete list of parameters
--target-help This switch lacks documentation
--version This switch lacks documentation
-G Put global and static data smaller
than bytes into a special section (on some targets)
-O Set optimization level to
-Os Optimize for space rather than speed
-W This switch is deprecated; use -Wextra instead
-Waggregate-return Warn about returning structures, unions or arrays
-Wcast-align Warn about pointer casts which increase alignment
-Wdeprecated-declarations Warn about uses of __attribute__((deprecated)) declarations
-Wdisabled-optimization Warn when an optimization pass is disabled
-Werror Treat all warnings as errors
-Wextra Print extra (possibly unwanted) warnings
-Winline Warn when an inlined function cannot be inlined
-Wlarger-than- Warn if an object is larger than bytes
-Wmissing-noreturn Warn about functions which might be candidates for __attribute__((noreturn))
-Wpacked Warn when the packed attribute has no effect on struct layout
-Wpadded Warn when padding is required to align structure members
-Wshadow Warn when one local variable shadows another
-Wstrict-aliasing Warn about code which might break strict aliasing rules
-Wswitch Warn about enumerated switches, with no default, missing a case
-Wswitch-default Warn about enumerated switches missing a "default:" statement
-Wswitch-enum Warn about all enumerated switches missing a specific case
-Wsystem-headers Do not suppress warnings from system headers
-Wuninitialized Warn about uninitialized automatic variables
-Wunreachable-code Warn about code that will never be executed
-Wunused Enable all -Wunused- warnings
-Wunused-function Warn when a function is unused
-Wunused-label Warn when a label is unused
-Wunused-parameter Warn when a function parameter is unused
-Wunused-value Warn when an expression value is unused
-Wunused-variable Warn when a variable is unused
-aux-info Emit declaration information into
-aux-info= This switch lacks documentation
-auxbase This switch lacks documentation
-auxbase-strip This switch lacks documentation
-d Enable dumps from specific passes of the compiler
-dumpbase Set the file basename to be used for dumps
-fPIC This switch lacks documentation
-fPIE This switch lacks documentation
-fabi-version= This switch lacks documentation
-falign-functions Align the start of functions
-falign-functions= This switch lacks documentation
-falign-jumps Align labels which are only reached by jumping
-falign-jumps= This switch lacks documentation
-falign-labels Align all labels
-falign-labels= This switch lacks documentation
-falign-loops Align the start of loops
-falign-loops= This switch lacks documentation
-fargument-alias Specify that arguments may alias each other and globals
-fargument-noalias Assume arguments may alias globals but not each other
-fargument-noalias-global Assume arguments alias neither each other nor globals
-fasynchronous-unwind-tables Generate unwind tables that are exact at each instruction boundary
-fbounds-check Generate code to check bounds before indexing arrays
-fbranch-count-reg Replace add, compare, branch with branch on count register
-fbranch-probabilities Use profiling information for branch probabilities
-fbranch-target-load-optimize Perform branch target load optimization before prologue / epilogue threading
-fbranch-target-load-optimize2 Perform branch target load optimization after prologue / epilogue threading
-fcall-saved- Mark as being preserved across functions
-fcall-used- Mark as being corrupted by function calls
-fcaller-saves Save registers around function calls
-fcommon Do not put uninitialized globals in the common section
-fcprop-registers Perform a register copy-propagation optimization pass
-fcrossjumping Perform cross-jumping optimization
-fcse-follow-jumps When running CSE, follow jumps to their targets
-fcse-skip-blocks When running CSE, follow conditional jumps
-fdata-sections Place data items into their own section
-fdefer-pop Defer popping functions args from stack until later
-fdelayed-branch Attempt to fill delay slots of branch instructions
-fdelete-null-pointer-checks Delete useless null pointer checks
-fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped
diagnostics
-fdump-unnumbered Suppress output of instruction numbers and line number notes in debugging dumps
-feliminate-dwarf2-dups Perform DWARF2 duplicate elimination
-feliminate-unused-debug-symbols Perform unused type elimination in debug info
-feliminate-unused-debug-types Perform unused type elimination in debug info
-fexceptions Enable exception handling
-fexpensive-optimizations Perform a number of minor, expensive optimizations
-ffast-math This switch lacks documentation
-ffinite-math-only Assume no NaNs or infinities are generated
-ffixed- Mark as being unavailable to the compiler
-ffloat-store Do not store floats in registers
-fforce-addr Copy memory address constants into registers before use
-fforce-mem Copy memory operands into registers before use
-fframe-base-loclist Allow use of DWARF2 location lists for frame base
-ffunction-cse Allow function addresses to be held in registers
-ffunction-sections Place each function into its own section
-fgcse Perform global common subexpression elimination
-fgcse-las Perform redundant load after store elimination in global common subexpression elimination
-fgcse-lm Perform enhanced load motion during global common subexpression elimination
-fgcse-sm Perform store motion after global common subexpression elimination
-fguess-branch-probability Enable guessing of branch probabilities
-fident
阅读(2177) | 评论(0) | 转发(0) |