@item C++ Language Options
@xref{C++ Dialect Options,,Options Controlling C++ Dialect}.
@gccoptlist{-fabi-version=@var{n} -fno-access-control -fcheck-new @gol
--fconserve-space -fno-const-strings @gol
+-fconserve-space -ffriend-injection -fno-const-strings @gol
-fno-elide-constructors @gol
-fno-enforce-eh-specs @gol
-ffor-scope -fno-for-scope -fno-gnu-keywords @gol
-Wimport -Wno-import -Winit-self -Winline @gol
-Wno-int-to-pointer-cast @gol
-Wno-invalid-offsetof -Winvalid-pch @gol
--Wlarger-than-@var{len} -Wlong-long @gol
+-Wlarger-than-@var{len} -Wunsafe-loop-optimizations -Wlong-long @gol
-Wmain -Wmissing-braces -Wmissing-field-initializers @gol
-Wmissing-format-attribute -Wmissing-include-dirs @gol
-Wmissing-noreturn @gol
-Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast @gol
-Wredundant-decls @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
--Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 @gol
+-Wsign-compare -Wstack-protector @gol
+-Wstrict-aliasing -Wstrict-aliasing=2 @gol
-Wswitch -Wswitch-default -Wswitch-enum @gol
-Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
-Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
--Wunused-value -Wunused-variable -Wwrite-strings @gol
--Wvariadic-macros}
+-Wunused-value -Wunused-variable -Wvariadic-macros @gol
+-Wwrite-strings}
@item C-only Warning Options
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
-ftree-vectorizer-verbose=@var{n} @gol
-fdump-tree-storeccp@r{[}-@var{n}@r{]} @gol
-feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
--feliminate-unused-debug-symbols -fmem-report -fprofile-arcs -ftree-based-profiling @gol
+-feliminate-unused-debug-symbols -fmem-report -fprofile-arcs @gol
-frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
-ftest-coverage -ftime-report -fvar-tracking @gol
-g -g@var{level} -gcoff -gdwarf-2 @gol
-fforce-addr -ffunction-sections @gol
-fgcse -fgcse-lm -fgcse-sm -fgcse-las -fgcse-after-reload @gol
-floop-optimize -fcrossjumping -fif-conversion -fif-conversion2 @gol
--finline-functions -finline-limit=@var{n} -fkeep-inline-functions @gol
+-finline-functions -finline-functions-called-once @gol
+-finline-limit=@var{n} -fkeep-inline-functions @gol
-fkeep-static-consts -fmerge-constants -fmerge-all-constants @gol
-fmodulo-sched -fno-branch-count-reg @gol
-fno-default-inline -fno-defer-pop -floop-optimize2 -fmove-loop-invariants @gol
-fno-function-cse -fno-guess-branch-probability @gol
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
--funsafe-math-optimizations -ffinite-math-only @gol
+-funsafe-math-optimizations -funsafe-loop-optimizations -ffinite-math-only @gol
-fno-trapping-math -fno-zero-initialized-in-bss @gol
-fomit-frame-pointer -foptimize-register-move @gol
-foptimize-sibling-calls -fprefetch-loop-arrays @gol
-frounding-math -fschedule-insns -fschedule-insns2 @gol
-fno-sched-interblock -fno-sched-spec -fsched-spec-load @gol
-fsched-spec-load-dangerous @gol
--fsched-stalled-insns=@var{n} -sched-stalled-insns-dep=@var{n} @gol
+-fsched-stalled-insns=@var{n} -fsched-stalled-insns-dep=@var{n} @gol
-fsched2-use-superblocks @gol
-fsched2-use-traces -freschedule-modulo-scheduled-loops @gol
--fsignaling-nans -fsingle-precision-constant -fspeculative-prefetching @gol
+-fsignaling-nans -fsingle-precision-constant @gol
+-fstack-protector -fstack-protector-all @gol
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps @gol
-funroll-all-loops -funroll-loops -fpeel-loops @gol
-fsplit-ivs-in-unroller -funswitch-loops @gol
-ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts @gol
-ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-sink @gol
-ftree-ch -ftree-sra -ftree-ter -ftree-lrs -ftree-fre -ftree-vectorize @gol
--ftree-salias -fweb @gol
+-ftree-vect-loop-version -ftree-salias -fweb @gol
-ftree-copy-prop -ftree-store-ccp -ftree-store-copy-prop -fwhole-program @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
-include @var{file} -imacros @var{file} @gol
-iprefix @var{file} -iwithprefix @var{dir} @gol
-iwithprefixbefore @var{dir} -isystem @var{dir} @gol
+-isysroot @var{dir} @gol
-M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
-P -fworking-directory -remap @gol
-trigraphs -undef -U@var{macro} -Wp,@var{option} @gol
@item Linker Options
@xref{Link Options,,Options for Linking}.
@gccoptlist{@var{object-file-name} -l@var{library} @gol
--nostartfiles -nodefaultlibs -nostdlib -pie @gol
+-nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
-s -static -static-libgcc -shared -shared-libgcc -symbolic @gol
-Wl,@var{option} -Xlinker @var{option} @gol
-u @var{symbol}}
@item Directory Options
@xref{Directory Options,,Options for Directory Search}.
-@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir} -specs=@var{file} -I-}
+@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir}
+-specs=@var{file} -I- --sysroot=@var{dir}}
@item Target Options
@c I wrote this xref this way to avoid overfull hbox. -- rms
-mpoke-function-name @gol
-mthumb -marm @gol
-mtpcs-frame -mtpcs-leaf-frame @gol
--mcaller-super-interworking -mcallee-super-interworking}
+-mcaller-super-interworking -mcallee-super-interworking @gol
+-mtp=@var{name}}
@emph{AVR Options}
@gccoptlist{-mmcu=@var{mcu} -msize -minit-stack=@var{n} -mno-interrupts @gol
-melf -maout -melinux -mlinux -sim -sim2 @gol
-mmul-bug-workaround -mno-mul-bug-workaround}
+@emph{CRX Options}
+@gccoptlist{-mmac -mpush-args}
+
@emph{Darwin Options}
@gccoptlist{-all_load -allowable_client -arch -arch_errors_fatal @gol
-arch_only -bind_at_load -bundle -bundle_loader @gol
-single_module -static -sub_library -sub_umbrella @gol
-twolevel_namespace -umbrella -undefined @gol
-unexported_symbols_list -weak_reference_mismatches @gol
--whatsloaded -F -gused -gfull -mmacosx-min-version=@var{version} @gol
+-whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} @gol
-mone-byte-bool}
@emph{DEC Alpha Options}
-mlinked-fp -mlong-calls -malign-labels @gol
-mlibrary-pic -macc-4 -macc-8 @gol
-mpack -mno-pack -mno-eflags -mcond-move -mno-cond-move @gol
+-moptimize-membar -mno-optimize-membar @gol
-mscc -mno-scc -mcond-exec -mno-cond-exec @gol
-mvliw-branch -mno-vliw-branch @gol
-mmulti-cond-exec -mno-multi-cond-exec -mnested-cond-exec @gol
-m96bit-long-double -mregparm=@var{num} -msseregparm @gol
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
-mcmodel=@var{code-model} @gol
--m32 -m64}
+-m32 -m64 -mlarge-data-threshold=@var{num}}
@emph{IA-64 Options}
@gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
-mips16 -mno-mips16 -mabi=@var{abi} -mabicalls -mno-abicalls @gol
-mxgot -mno-xgot -mgp32 -mgp64 -mfp32 -mfp64 @gol
-mhard-float -msoft-float -msingle-float -mdouble-float @gol
--mpaired-single -mips3d @gol
+-mdsp -mpaired-single -mips3d @gol
-mlong64 -mlong32 -msym32 -mno-sym32 @gol
-G@var{num} -membedded-data -mno-embedded-data @gol
-muninit-const-in-rodata -mno-uninit-const-in-rodata @gol
@gccoptlist{-mmult-bug -mno-mult-bug @gol
-mam33 -mno-am33 @gol
-mam33-2 -mno-am33-2 @gol
+-mreturn-pointer-on-d0 @gol
-mno-crt0 -mrelax}
+@emph{MS1 Options}
+@gccoptlist{-mno-crt0 -mmul -mbacc -msim @gol
+-march=@var{cpu-type} }
+
@emph{PDP-11 Options}
@gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol
-mbcopy -mbcopy-builtin -mint32 -mno-int16 @gol
@itemx @var{file}.f95
Fortran 90/95 source code which should not be preprocessed.
+@item @var{file}.F90
+@itemx @var{file}.F95
+Fortran 90/95 source code which must be preprocessed (with the
+traditional preprocessor).
+
@c FIXME: Descriptions of Java file types.
@c @var{file}.java
@c @var{file}.class
assembler assembler-with-cpp
ada
f77 f77-cpp-input ratfor
-f95
+f95 f95-cpp-input
java
treelang
@end smallexample
This option is no longer useful on most targets, now that support has
been added for putting variables into BSS without making them common.
+@item -ffriend-injection
+@opindex ffriend-injection
+Inject friend functions into the enclosing namespace, so that they are
+visible outside the scope of the class in which they are declared.
+Friend functions were documented to work this way in the old Annotated
+C++ Reference Manual, and versions of G++ before 4.1 always worked
+that way. However, in ISO C++ a friend function which is not declared
+in an enclosing scope can only be found using argument dependent
+lookup. This option causes friends to be injected as they were in
+earlier releases.
+
+This option is for compatibility, and may be removed in a future
+release of G++.
+
@item -fno-const-strings
@opindex fno-const-strings
Give string constants type @code{char *} instead of type @code{const
@item -fno-enforce-eh-specs
@opindex fno-enforce-eh-specs
-Don't check for violation of exception specifications at runtime. This
-option violates the C++ standard, but may be useful for reducing code
-size in production builds, much like defining @samp{NDEBUG}. The compiler
-will still optimize based on the exception specifications.
+Don't generate code to check for violation of exception specifications
+at runtime. This option violates the C++ standard, but may be useful
+for reducing code size in production builds, much like defining
+@samp{NDEBUG}. This does not give user code permission to throw
+exceptions in violation of the exception specifications; the compiler
+will still optimize based on the specifications, so throwing an
+unexpected exception will result in undefined behavior.
@item -ffor-scope
@itemx -fno-for-scope
@item -Wold-style-cast @r{(C++ only)}
@opindex Wold-style-cast
Warn if an old-style (C-style) cast to a non-void type is used within
-a C++ program. The new-style casts (@samp{static_cast},
-@samp{reinterpret_cast}, and @samp{const_cast}) are less vulnerable to
-unintended effects and much easier to search for.
+a C++ program. The new-style casts (@samp{dynamic_cast},
+@samp{static_cast}, @samp{reinterpret_cast}, and @samp{const_cast}) are
+less vulnerable to unintended effects and much easier to search for.
@item -Woverloaded-virtual @r{(C++ only)}
@opindex Woverloaded-virtual
@item -Wunused-function
@opindex Wunused-function
Warn whenever a static function is declared but not defined or a
-non\-inline static function is unused.
+non-inline static function is unused.
This warning is enabled by @option{-Wall}.
@item -Wunused-label
@item -Wstrict-aliasing=2
@opindex Wstrict-aliasing=2
This option is only active when @option{-fstrict-aliasing} is active.
-It warns about all code which might break the strict aliasing rules that the
-compiler is using for optimization. This warning catches all cases, but
-it will also give a warning for some ambiguous cases that are safe.
+It warns about code which might break the strict aliasing rules that the
+compiler is using for optimization. This warning catches more cases than
+@option{-Wstrict-aliasing}, but it will also give a warning for some ambiguous
+cases that are safe.
@item -Wall
@opindex Wall
@opindex Wlarger-than
Warn whenever an object of larger than @var{len} bytes is defined.
+@item -Wunsafe-loop-optimizations
+@opindex Wunsafe-loop-optimizations
+Warn if the loop cannot be optimized because the compiler could not
+assume anything on the bounds of the loop indices. With
+@option{-funsafe-loop-optimizations} warn if the compiler made
+such assumptions.
+
@item -Wpointer-arith
@opindex Wpointer-arith
Warn about anything that depends on the ``size of'' a function type or
@item -Werror
@opindex Werror
Make all warnings into errors.
+
+@item -Wstack-protector
+This option is only active when @option{-fstack-protector} is active. It
+warns about functions that will not be protected against stack smashing.
+
@end table
@node Debugging Options
instrumentation code can be added to the block; otherwise, a new basic
block must be created to hold the instrumentation code.
-@item -ftree-based-profiling
-@opindex ftree-based-profiling
-This option is used in addition to @option{-fprofile-arcs} or
-@option{-fbranch-probabilities} to control whether those optimizations
-are performed on a tree-based or rtl-based internal representation.
-If you use this option when compiling with @option{-fprofile-arcs},
-you must also use it when compiling later with @option{-fbranch-probabilities}.
-Currently the tree-based optimization is in an early stage of
-development, and this option is recommended only for those people
-working on improving it.
-
@need 2000
@item -ftest-coverage
@opindex ftest-coverage
@option{-Os} disables the following optimization flags:
@gccoptlist{-falign-functions -falign-jumps -falign-loops @gol
--falign-labels -freorder-blocks -freorder-blocks-and-partition -fprefetch-loop-arrays}
+-falign-labels -freorder-blocks -freorder-blocks-and-partition @gol
+-fprefetch-loop-arrays -ftree-vect-loop-version}
If you use multiple @option{-O} options, with or without level numbers,
the last such option is the one that is effective.
Enabled at level @option{-O3}.
+@item -finline-functions-called-once
+@opindex finline-functions-called-once
+Consider all @code{static} functions called once for inlining into their
+caller even if they are not marked @code{inline}. If a call to a given
+function is integrated, then the function is not output as assembler code
+in its own right.
+
+Enabled if @option{-funit-at-a-time} is enabled.
+
@item -fearly-inlining
@opindex fearly-inlining
Inline functions marked by @code{always_inline} and functions whose body seems
(loop unrolling, peeling and unswitching, loop invariant motion) are enabled
by separate flags.
+@item -funsafe-loop-optimizations
+@opindex funsafe-loop-optimizations
+If given, the loop optimizer will assume that loop indices do not
+overflow, and that the loops with nontrivial exit condition are not
+infinite. This enables a wider range of loop optimizations even if
+the loop optimizer itself cannot prove that these assumptions are valid.
+Using @option{-Wunsafe-loop-optimizations}, the compiler will warn you
+if it finds this kind of loop.
+
@item -fcrossjumping
@opindex crossjumping
Perform cross-jumping transformation. This transformation unifies equivalent code and save code size. The
default at @option{-O} and higher.
@item -ftree-dominator-opts
-Perform dead code elimination (DCE) on trees. This flag is enabled by
-default at @option{-O} and higher.
+Perform a variety of simple scalar cleanups (constant/copy
+propagation, redundancy elimination, range propagation and expression
+simplification) based on a dominator tree traversal. This also
+performs jump threading (to reduce jumps to jumps). This flag is
+enabled by default at @option{-O} and higher.
@item -ftree-ch
Perform loop header copying on trees. This is beneficial since it increases
@item -ftree-vectorize
Perform loop vectorization on trees.
+@item -ftree-vect-loop-version
+@opindex ftree-vect-loop-version
+Perform loop versioning when doing loop vectorization on trees. When a loop
+appears to be vectorizable except that data alignment or data dependence cannot
+be determined at compile time then vectorized and non-vectorized versions of
+the loop are generated along with runtime checks for alignment or dependence
+to control which version is executed. This option is enabled by default
+except at level @option{-Os} where it is disabled.
+
@item -ftree-vrp
Perform Value Range Propagation on trees. This is similar to the
constant propagation pass, but instead of values, ranges of values are
Enable profile feedback directed optimizations, and optimizations
generally profitable only with profile feedback available.
-The following options are enabled: @code{-fbranch-probabilities},
-@code{-fvpt}, @code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}.
+The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt},
+@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer},
+@code{-fno-loop-optimize}.
@end table
Currently the optimizations include specialization of division operation
using the knowledge about the value of the denominator.
-@item -fspeculative-prefetching
-@opindex fspeculative-prefetching
-If combined with @option{-fprofile-arcs}, it instructs the compiler to add
-a code to gather information about addresses of memory references in the
-program.
-
-With @option{-fbranch-probabilities}, it reads back the data gathered
-and issues prefetch instructions according to them. In addition to the opportunities
-noticed by @option{-fprefetch-loop-arrays}, it also notices more complicated
-memory access patterns---for example accesses to the data stored in linked
-list whose elements are usually allocated sequentially.
-
-In order to prevent issuing double prefetches, usage of
-@option{-fspeculative-prefetching} implies @option{-fno-prefetch-loop-arrays}.
-
-Enabled with @option{-fprofile-generate} and @option{-fprofile-use}.
-
@item -frename-registers
@opindex frename-registers
Attempt to avoid false dependencies in scheduled code by making use
When performing branch target register load optimization, don't reuse
branch target registers in within any basic block.
+@item -fstack-protector
+Emit extra code to check for buffer overflows, such as stack smashing
+attacks. This is done by adding a guard variable to functions with
+vulnerable objects. This includes functions that call alloca, and
+functions with buffers larger than 8 bytes. The guards are initialized
+when a function is entered and then checked when the function exits.
+If a guard check fails, an error message is printed and the program exits.
+
+@item -fstack-protector-all
+Like @option{-fstack-protector} except that all functions are protected.
+
@item --param @var{name}=@var{value}
@opindex param
In some places, GCC uses various constants to control the amount of
value is ignored in the case where all instructions in the block being
crossjumped from are matched. The default value is 5.
+@item max-grow-copy-bb-insns
+The maximum code size expansion factor when copying basic blocks
+instead of jumping. The expansion is relative to a jump instruction.
+The default value is 8.
+
@item max-goto-duplication-insns
The maximum number of instructions to duplicate to a block that jumps
to a computed goto. To avoid @math{O(N^2)} behavior in a number of
enabled and @option{--param max-inline-recursive-depth-auto} is used. The
default value is 450.
+@item min-inline-recursive-probability
+Recursive inlining is profitable only for function having deep recursion
+in average and can hurt for function having little recursion depth by
+increasing the prologue size or complexity of function body to other
+optimizers.
+
+When profile feedback is available (see @option{-fprofile-generate}) the actual
+recursion depth can be guessed from probability that function will recurse via
+given call expression. This parameter limits inlining only to call expression
+whose probability exceeds given threshold (in percents). The default value is
+10.
+
@item inline-call-cost
Specify cost of call instruction relative to simple arithmetics operations
(having cost of 1). Increasing this cost disqualifies inlining of non-leaf
Bound on size of expressions used in the scalar evolutions analyzer.
Large expressions slow the analyzer.
+@item vect-max-version-checks
+The maximum number of runtime checks that can be performed when doing
+loop versioning in the vectorizer. See option ftree-vect-loop-version
+for more information.
+
@item max-iterations-to-track
The maximum number of iterations of a loop the brute force algorithm
Select fraction of the maximal frequency of executions of basic block in
function given basic block needs to have to be considered hot
+@item max-predicted-iterations
+The maximum number of loop iterations we predict statically. This is useful
+in cases where function contain single loop with known bound and other loop
+with unknown. We predict the known number of iterations correctly, while
+the unknown nummber of iterations average to roughly 10. This means that the
+loop without bounds would appear artifically cold relative to the other one.
+
@item tracer-dynamic-coverage
@itemx tracer-dynamic-coverage-feedback
Maximum number of basic blocks on path that cse considers. The default is 10.
+@item max-cse-insns
+The maximum instructions CSE process before flushing. The default is 1000.
+
@item global-var-threshold
Counts the number of function calls (@var{n}) and the number of
Increasing values mean more aggressive optimization, making the compile time
increase with probably slightly better performance. The default value is 500.
+@item max-flow-memory-location
+Similar as @option{max-cselib-memory-location} but for dataflow liveness.
+The default value is 100.
+
@item reorder-blocks-duplicate
@itemx reorder-blocks-duplicate-feedback
The maximum number of insns in a region to be considered for
interblock scheduling. The default value is 100.
+@item min-sched-prob
+The minimum probability of reaching a source block for interblock
+speculative scheduling. The default value is 40.
+
@item max-last-value-rtl
The maximum size measured as number of RTLs that can be recorded in an expression
SSA updater switches to a full update for those symbols. The default
ratio is 3.
+@item ssp-buffer-size
+The minimum size of buffers (i.e. arrays) that will receive stack smashing
+protection when @option{-fstack-protection} is used.
+
+@item max-jump-thread-duplication-stmts
+Maximum number of statements allowed in a block that needs to be
+duplicated when threading jumps.
@end table
@end table
that were used to generate code (@option{-fpie}, @option{-fPIE},
or model suboptions) when you specify this option.
+@item -rdynamic
+@opindex rdynamic
+Pass the flag @option{-export-dynamic} to the ELF linker, on targets
+that support it. This instructs the linker to add all symbols, not
+only used ones, to the dynamic symbol table. This option is needed
+for some uses of @code{dlopen} or to allow obtaining backtraces
+from within a program.
+
@item -s
@opindex s
Remove all symbol table and relocation information from the executable.
@option{-specs=@var{file}} can be specified on the command line, and they
are processed in order, from left to right.
+@item --sysroot=@var{dir}
+@opindex sysroot
+Use @var{dir} as the logical root directory for headers and libraries.
+For example, if the compiler would normally search for headers in
+@file{/usr/include} and libraries in @file{/usr/lib}, it will instead
+search @file{@var{dir}/usr/include} and @file{@var{dir}/usr/lib}.
+
+If you use both this option and the @option{-isysroot} option, then
+the @option{--sysroot} option will apply to libraries, but the
+@option{-isysroot} option will apply to header files.
+
+The GNU linker (beginning with version 2.16) has the necessary support
+for this option. If your linker does not support this option, the
+header file aspect of @option{--sysroot} will still work, but the
+library aspect will not.
+
@item -I-
@opindex I-
This option has been deprecated. Please use @option{-iquote} instead for
The value to use for @var{machine} is the same as was specified as the
machine type when configuring GCC as a cross-compiler. For
example, if a cross-compiler was configured with @samp{configure
-i386v}, meaning to compile for an 80386 running System V, then you
-would specify @option{-b i386v} to run that cross compiler.
+arm-elf}, meaning to compile for an arm processor with elf binaries,
+then you would specify @option{-b arm-elf} to run that cross compiler.
+Because there are other options beginning with @option{-b}, the
+configuration must contain a hyphen.
@item -V @var{version}
@opindex V
The argument @var{version} specifies which version of GCC to run.
This is useful when multiple versions are installed. For example,
-@var{version} might be @samp{2.0}, meaning to run GCC version 2.0.
+@var{version} might be @samp{4.0}, meaning to run GCC version 4.0.
@end table
The @option{-V} and @option{-b} options work by running the
* AVR Options::
* Blackfin Options::
* CRIS Options::
+* CRX Options::
* Darwin Options::
* DEC Alpha Options::
* DEC Alpha/VMS Options::
* MIPS Options::
* MMIX Options::
* MN10300 Options::
+* MS1 Options::
* PDP-11 Options::
* PowerPC Options::
* RS/6000 and PowerPC Options::
@item -mabi=@var{name}
@opindex mabi
Generate code for the specified ABI@. Permissible values are: @samp{apcs-gnu},
-@samp{atpcs}, @samp{aapcs} and @samp{iwmmxt}.
+@samp{atpcs}, @samp{aapcs}, @samp{aapcs-linux} and @samp{iwmmxt}.
@item -mapcs-frame
@opindex mapcs-frame
compiled for interworking or not. There is a small overhead in the cost
of executing a function pointer if this option is enabled.
+@item -mtp=@var{name}
+@opindex mtp
+Specify the access model for the thread local storage pointer. The valid
+models are @option{soft}, which generates calls to @code{__aeabi_read_tp},
+@option{cp15}, which fetches the thread pointer from @code{cp15} directly
+(supported in the arm6k architecture), and @option{auto}, which uses the
+best available method for the selected processor. The default setting is
+@option{auto}.
+
@end table
@node AVR Options
0x40000000 and zero-initialized data at 0x80000000.
@end table
+@node CRX Options
+@subsection CRX Options
+@cindex CRX Options
+
+These options are defined specifically for the CRX ports.
+
+@table @gcctabopt
+
+@item -mmac
+@opindex mmac
+Enable the use of multiply-accumulate instructions. Disabled by default.
+
+@item -mpush-args
+@opindex mpush-args
+Push instructions will be used to pass outgoing arguments when functions
+are called. Enabled by default.
+@end table
+
@node Darwin Options
@subsection Darwin Options
@cindex Darwin options
This switch is mainly for debugging the compiler and will likely be removed
in a future version.
+@item -moptimize-membar
+@opindex moptimize-membar
+
+This switch removes redundant @code{membar} instructions from the
+compiler generated code. It is enabled by default.
+
+@item -mno-optimize-membar
+@opindex mno-optimize-membar
+
+This switch disables the automatic removal of redundant @code{membar}
+instructions from the generated code.
+
@item -mtomcat-stats
@opindex mtomcat-stats
are passed to that ld. The ld that is called is determined by the
@option{--with-ld} configure option, GCC's program search path, and
finally by the user's @env{PATH}. The linker used by GCC can be printed
-using @samp{which `gcc -print-prog-name=ld`}.
+using @samp{which `gcc -print-prog-name=ld`}. This option is only available
+on the 64 bit HP-UX GCC, i.e. configured with @samp{hppa*64*-*-hpux*}.
@item -mhp-ld
@opindex hp-ld
ld. The ld that is called is determined by the @option{--with-ld}
configure option, GCC's program search path, and finally by the user's
@env{PATH}. The linker used by GCC can be printed using @samp{which
-`gcc -print-prog-name=ld`}.
+`gcc -print-prog-name=ld`}. This option is only available on the 64 bit
+HP-UX GCC, i.e. configured with @samp{hppa*64*-*-hpux*}.
@item -mlong-calls
@opindex mno-long-calls
@code{long double} will be modified. Hence they will not be binary
compatible with arrays or structures in code compiled without that switch.
+@item -mmlarge-data-threshold=@var{number}
+@opindex mlarge-data-threshold=@var{number}
+When @option{-mcmodel=medium} is specified, the data greater than
+@var{threshold} are placed in large data section. This value must be the
+same across all object linked into the binary and defaults to 65535.
@item -msvr3-shlib
@itemx -mno-svr3-shlib
@opindex mno-sse
@opindex m3dnow
@opindex mno-3dnow
-These switches enable or disable the use of built-in functions that allow
-direct access to the MMX, SSE, SSE2, SSE3 and 3Dnow extensions of the
-instruction set.
-
-@xref{X86 Built-in Functions}, for details of the functions enabled
-and disabled by these switches.
+These switches enable or disable the use of instructions in the MMX,
+SSE, SSE2 or 3DNow! extended instruction sets. These extensions are
+also available as built-in functions: see @ref{X86 Built-in Functions},
+for details of the functions enabled and disabled by these switches.
To have SSE/SSE2 instructions generated automatically from floating-point
-code, see @option{-mfpmath=sse}.
+code (as opposed to 387 instructions), see @option{-mfpmath=sse}.
+
+These options will enable GCC to use these extended instructions in
+generated code, even without @option{-mfpmath=sse}. Applications which
+perform runtime CPU detection must compile separate files for each
+supported architecture, using the appropriate flags. In particular,
+the file containing the CPU detection code should be compiled without
+these options.
@item -mpush-args
@itemx -mno-push-args
Specify bit size of immediate TLS offsets. Valid values are 14, 22, and
64.
-@item -mtune-arch=@var{cpu-type}
-@opindex mtune-arch
+@item -mtune=@var{cpu-type}
+@opindex mtune
Tune the instruction scheduling for a particular CPU, Valid values are
itanium, itanium1, merced, itanium2, and mckinley.
@samp{mips1}, @samp{mips2}, @samp{mips3}, @samp{mips4},
@samp{mips32}, @samp{mips32r2}, and @samp{mips64}.
The processor names are:
-@samp{4kc}, @samp{4kp}, @samp{5kc}, @samp{20kc},
+@samp{4kc}, @samp{4km}, @samp{4kp},
+@samp{5kc}, @samp{5kf},
+@samp{20kc},
+@samp{24k}, @samp{24kc}, @samp{24kf}, @samp{24kx},
@samp{m4k},
-@samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400},
-@samp{r4600}, @samp{r4650}, @samp{r6000}, @samp{r8000}, @samp{rm7000},
-@samp{rm9000},
@samp{orion},
+@samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400},
+@samp{r4600}, @samp{r4650}, @samp{r6000}, @samp{r8000},
+@samp{rm7000}, @samp{rm9000},
@samp{sb1},
+@samp{sr71000},
@samp{vr4100}, @samp{vr4111}, @samp{vr4120}, @samp{vr4130}, @samp{vr4300},
@samp{vr5000}, @samp{vr5400} and @samp{vr5500}.
The special value @samp{from-abi} selects the
Assume that the floating-point coprocessor supports double-precision
operations. This is the default.
+@itemx -mdsp
+@itemx -mno-dsp
+@opindex mdsp
+@opindex mno-dsp
+Use (do not use) the MIPS DSP ASE. @xref{MIPS DSP Built-in Functions}.
+
@itemx -mpaired-single
@itemx -mno-paired-single
@opindex mpaired-single
Do not generate code which uses features specific to the AM33 processor. This
is the default.
+@item -mreturn-pointer-on-d0
+@opindex mreturn-pointer-on-d0
+When generating a function which returns a pointer, return the pointer
+in both @code{a0} and @code{d0}. Otherwise, the pointer is returned
+only in a0, and attempts to call such functions without a prototype
+would result in errors. Note that this option is on by default; use
+@option{-mno-return-pointer-on-d0} to disable it.
+
@item -mno-crt0
@opindex mno-crt0
Do not link in the C run-time initialization object file.
This option makes symbolic debugging impossible.
@end table
+@node MS1 Options
+@subsection MS1 Options
+@cindex MS1 options
+
+These @option{-m} options are defined for Morpho MS1 architectures:
+
+@table @gcctabopt
+
+@item -march=@var{cpu-type}
+@opindex march
+Generate code that will run on @var{cpu-type}, which is the name of a system
+representing a certain processor type. Possible values for
+@var{cpu-type} are @samp{MS1-64-001}, @samp{MS1-16-002}, and
+@samp{MS1-16-003}.
+
+When this option is not used, the default is @option{-march=MS1-16-003}.
+
+@item -mmul
+@opindex mmul
+Generate multiply instructions.
+
+@item -mno-mul
+@opindex mno-mul
+Do not generate multiply instructions.
+
+@item -mbacc
+@opindex mbacc
+Use byte loads and stores when generating code.
+
+@item -mno-bacc
+@opindex mno-bacc
+Do not use byte loads and stores when generating code.
+
+@item -msim
+@opindex msim
+Use simulator runtime
+
+@item -mno-crt0
+@opindex mno-crt0
+Do not link in the C run-time initialization object file
+@file{crti.o}. Other run-time initialization and termination files
+such as @file{startup.o} and @file{exit.o} are still included on the
+linker command line.
+
+@end table
+
@node PDP-11 Options
@subsection PDP-11 Options
@cindex PDP-11 Options
if the stack size is @var{stack-guard} bytes above the @var{stack-size}
(remember that the stack on s390 grows downward). These options are intended to
be used to help debugging stack overflow problems. The additionally emitted code
-cause only little overhead and hence can also be used in production like systems
+causes only little overhead and hence can also be used in production like systems
without greater performance degradation. The given values have to be exact
-powers of 2 and @var{stack-size} has to be greater than @var{stack-guard}.
+powers of 2 and @var{stack-size} has to be greater than @var{stack-guard} without
+exceeding 64k.
In order to be efficient the extra code makes the assumption that the stack starts
at an address aligned to the value given by @var{stack-size}.
@end table
This option instructs the compiler to assume that signed arithmetic
overflow of addition, subtraction and multiplication wraps around
using twos-complement representation. This flag enables some optimizations
-and disables other. This option is enabled by default for the Java
+and disables others. This option is enabled by default for the Java
front-end, as required by the Java language specification.
@item -fexceptions
is to use exactly the same options when generating and using the
precompiled header. The following are known to be safe:
-@gccoptlist{-fpreprocessed
+@gccoptlist{-fmessage-length= -fpreprocessed
-fsched-interblock -fsched-spec -fsched-spec-load -fsched-spec-load-dangerous
--fsched-verbose=<number> -fschedule-insns
+-fsched-verbose=<number> -fschedule-insns -fvisibility=
-pedantic-errors}
@end itemize