| Index: gcc/gcc/doc/invoke.texi
|
| diff --git a/gcc/gcc/doc/invoke.texi b/gcc/gcc/doc/invoke.texi
|
| index 9ce803b79361178db7b2f249b06bc159f4628c97..bf3cd181889d851825fd37341ca980004ae3fc5a 100644
|
| --- a/gcc/gcc/doc/invoke.texi
|
| +++ b/gcc/gcc/doc/invoke.texi
|
| @@ -1,5 +1,5 @@
|
| @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
| -@c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
| +@c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
| @c Free Software Foundation, Inc.
|
| @c This is part of the GCC manual.
|
| @c For copying conditions, see the file gcc.texi.
|
| @@ -11,7 +11,7 @@
|
|
|
| @c man begin COPYRIGHT
|
| Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
| -1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
| +1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
| Free Software Foundation, Inc.
|
|
|
| Permission is granted to copy, distribute and/or modify this document
|
| @@ -148,7 +148,6 @@ only one of these two forms, whichever one is not the default.
|
| and register usage.
|
| * Environment Variables:: Env vars that affect GCC.
|
| * Precompiled Headers:: Compiling a header once, and using it many times.
|
| -* Running Protoize:: Automatically adding or removing function prototypes.
|
| @end menu
|
|
|
| @c man begin OPTIONS
|
| @@ -162,9 +161,10 @@ in the following sections.
|
| @table @emph
|
| @item Overall Options
|
| @xref{Overall Options,,Options Controlling the Kind of Output}.
|
| -@gccoptlist{-c -S -E -o @var{file} -combine -pipe -pass-exit-codes @gol
|
| +@gccoptlist{-c -S -E -o @var{file} -combine -no-canonical-prefixes @gol
|
| +-pipe -pass-exit-codes @gol
|
| -x @var{language} -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help @gol
|
| ---version -wrapper@@@var{file}}
|
| +--version -wrapper@@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg}}
|
|
|
| @item C Language Options
|
| @xref{C Dialect Options,,Options Controlling C Dialect}.
|
| @@ -189,11 +189,12 @@ in the following sections.
|
| -fno-implement-inlines -fms-extensions @gol
|
| -fno-nonansi-builtins -fno-operator-names @gol
|
| -fno-optional-diags -fpermissive @gol
|
| --frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol
|
| +-fno-pretty-templates @gol
|
| +-frepo -fno-rtti -fstats -ftemplate-depth=@var{n} @gol
|
| -fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
|
| -fno-default-inline -fvisibility-inlines-hidden @gol
|
| -fvisibility-ms-compat @gol
|
| --Wabi -Wctor-dtor-privacy @gol
|
| +-Wabi -Wconversion-null -Wctor-dtor-privacy @gol
|
| -Wnon-virtual-dtor -Wreorder @gol
|
| -Weffc++ -Wstrict-null-sentinel @gol
|
| -Wno-non-template-friend -Wold-style-cast @gol
|
| @@ -238,7 +239,7 @@ Objective-C and Objective-C++ Dialects}.
|
| -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
|
| -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
|
| -Wformat-security -Wformat-y2k @gol
|
| --Wframe-larger-than=@var{len} -Wignored-qualifiers @gol
|
| +-Wframe-larger-than=@var{len} -Wjump-misses-init -Wignored-qualifiers @gol
|
| -Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
|
| -Winit-self -Winline @gol
|
| -Wno-int-to-pointer-cast -Wno-invalid-offsetof @gol
|
| @@ -258,9 +259,9 @@ Objective-C and Objective-C++ Dialects}.
|
| -Wstrict-overflow -Wstrict-overflow=@var{n} @gol
|
| -Wswitch -Wswitch-default -Wswitch-enum -Wsync-nand @gol
|
| -Wsystem-headers -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized @gol
|
| --Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol
|
| --Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
|
| --Wunused-value -Wunused-variable @gol
|
| +-Wunknown-pragmas -Wno-pragmas @gol
|
| +-Wunsuffixed-float-constants -Wunused -Wunused-function @gol
|
| +-Wunused-label -Wunused-parameter -Wno-unused-result -Wunused-value -Wunused-variable @gol
|
| -Wvariadic-macros -Wvla @gol
|
| -Wvolatile-register-var -Wwrite-strings}
|
|
|
| @@ -275,7 +276,7 @@ Objective-C and Objective-C++ Dialects}.
|
| @xref{Debugging Options,,Options for Debugging Your Program or GCC}.
|
| @gccoptlist{-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol
|
| -fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
|
| --fdump-noaddr -fdump-unnumbered @gol
|
| +-fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links @gol
|
| -fdump-translation-unit@r{[}-@var{n}@r{]} @gol
|
| -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
|
| -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol
|
| @@ -290,33 +291,40 @@ Objective-C and Objective-C++ Dialects}.
|
| -fdump-tree-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-dom@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-dse@r{[}-@var{n}@r{]} @gol
|
| +-fdump-tree-phiprop@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-phiopt@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-copyrename@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-nrv -fdump-tree-vect @gol
|
| -fdump-tree-sink @gol
|
| -fdump-tree-sra@r{[}-@var{n}@r{]} @gol
|
| +-fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-fre@r{[}-@var{n}@r{]} @gol
|
| -fdump-tree-vrp@r{[}-@var{n}@r{]} @gol
|
| -ftree-vectorizer-verbose=@var{n} @gol
|
| -fdump-tree-storeccp@r{[}-@var{n}@r{]} @gol
|
| +-fdump-final-insns=@var{file} @gol
|
| +-fcompare-debug@r{[}=@var{opts}@r{]} -fcompare-debug-second @gol
|
| -feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
|
| -feliminate-unused-debug-symbols -femit-class-debug-always @gol
|
| +-fenable-icf-debug @gol
|
| -fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol
|
| -frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
|
| -fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol
|
| -ftest-coverage -ftime-report -fvar-tracking @gol
|
| --g -g@var{level} -gcoff -gdwarf-2 @gol
|
| --ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
|
| +-fvar-tracking-assignments -fvar-tracking-assignments-toggle @gol
|
| +-g -g@var{level} -gtoggle -gcoff -gdwarf-@var{version} @gol
|
| +-ggdb -gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol
|
| +-gvms -gxcoff -gxcoff+ @gol
|
| -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
|
| -fdebug-prefix-map=@var{old}=@var{new} @gol
|
| -femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
|
| -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol
|
| -p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
|
| --print-multi-directory -print-multi-lib @gol
|
| +-print-multi-directory -print-multi-lib -print-multi-os-directory @gol
|
| -print-prog-name=@var{program} -print-search-dirs -Q @gol
|
| -print-sysroot -print-sysroot-headers-suffix @gol
|
| --save-temps -time}
|
| +-save-temps -save-temps=cwd -save-temps=obj -time@r{[}=@var{file}@r{]}}
|
|
|
| @item Optimization Options
|
| @xref{Optimize Options,,Options that Control Optimization}.
|
| @@ -329,19 +337,22 @@ Objective-C and Objective-C++ Dialects}.
|
| -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules -fcx-limited-range @gol
|
| -fdata-sections -fdce -fdce @gol
|
| -fdelayed-branch -fdelete-null-pointer-checks -fdse -fdse @gol
|
| --fearly-inlining -fexpensive-optimizations -ffast-math @gol
|
| --ffinite-math-only -ffloat-store -fforward-propagate @gol
|
| --ffunction-sections -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
|
| +-fearly-inlining -fipa-sra -fexpensive-optimizations -ffast-math @gol
|
| +-ffinite-math-only -ffloat-store -fexcess-precision=@var{style} @gol
|
| +-fforward-propagate -ffunction-sections @gol
|
| +-fgcse -fgcse-after-reload -fgcse-las -fgcse-lm @gol
|
| -fgcse-sm -fif-conversion -fif-conversion2 -findirect-inlining @gol
|
| -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
|
| --finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg -fipa-pta @gol
|
| +-finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg -fipa-pta @gol
|
| -fipa-pure-const -fipa-reference -fipa-struct-reorg @gol
|
| -fipa-type-escape -fira-algorithm=@var{algorithm} @gol
|
| --fira-region=@var{region} -fira-coalesce -fno-ira-share-save-slots @gol
|
| +-fira-region=@var{region} -fira-coalesce @gol
|
| +-fira-loop-pressure -fno-ira-share-save-slots @gol
|
| -fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
|
| -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
|
| --floop-block -floop-interchange -floop-strip-mine @gol
|
| --fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
|
| +-floop-block -floop-interchange -floop-strip-mine -fgraphite-identity @gol
|
| +-floop-parallelize-all -flto -flto-compression-level -flto-report -fltrans @gol
|
| +-fltrans-output-list -fmerge-all-constants -fmerge-constants -fmodulo-sched @gol
|
| -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fmudflap @gol
|
| -fmudflapir -fmudflapth -fno-branch-count-reg -fno-default-inline @gol
|
| -fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol
|
| @@ -356,10 +367,13 @@ Objective-C and Objective-C++ Dialects}.
|
| -freciprocal-math -fregmove -frename-registers -freorder-blocks @gol
|
| -freorder-blocks-and-partition -freorder-functions @gol
|
| -frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol
|
| --frounding-math -frtl-abstract-sequences -fsched2-use-superblocks @gol
|
| --fsched2-use-traces -fsched-spec-load -fsched-spec-load-dangerous @gol
|
| +-frounding-math -fsched2-use-superblocks -fsched-pressure @gol
|
| +-fsched-spec-load -fsched-spec-load-dangerous @gol
|
| -fsched-stalled-insns-dep[=@var{n}] -fsched-stalled-insns[=@var{n}] @gol
|
| --fschedule-insns -fschedule-insns2 -fsection-anchors -fsee @gol
|
| +-fsched-group-heuristic -fsched-critical-path-heuristic @gol
|
| +-fsched-spec-insn-heuristic -fsched-rank-heuristic @gol
|
| +-fsched-last-insn-heuristic -fsched-dep-count-heuristic @gol
|
| +-fschedule-insns -fschedule-insns2 -fsection-anchors @gol
|
| -fselective-scheduling -fselective-scheduling2 @gol
|
| -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol
|
| -fsignaling-nans -fsingle-precision-constant -fsplit-ivs-in-unroller @gol
|
| @@ -367,16 +381,16 @@ Objective-C and Objective-C++ Dialects}.
|
| -fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer @gol
|
| -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop @gol
|
| -ftree-copyrename -ftree-dce @gol
|
| --ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol
|
| --ftree-loop-distribution @gol
|
| +-ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-loop-im @gol
|
| +-ftree-phiprop -ftree-loop-distribution @gol
|
| -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
|
| --ftree-parallelize-loops=@var{n} -ftree-pre -ftree-reassoc @gol
|
| +-ftree-parallelize-loops=@var{n} -ftree-pre -ftree-pta -ftree-reassoc @gol
|
| -ftree-sink -ftree-sra -ftree-switch-conversion @gol
|
| -ftree-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp @gol
|
| -funit-at-a-time -funroll-all-loops -funroll-loops @gol
|
| -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
|
| -fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol
|
| --fwhole-program @gol
|
| +-fwhole-program -fwhopr -fwpa -fuse-linker-plugin @gol
|
| --param @var{name}=@var{value}
|
| -O -O0 -O1 -O2 -O3 -Os}
|
|
|
| @@ -404,7 +418,8 @@ Objective-C and Objective-C++ Dialects}.
|
| @xref{Link Options,,Options for Linking}.
|
| @gccoptlist{@var{object-file-name} -l@var{library} @gol
|
| -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
|
| --s -static -static-libgcc -shared -shared-libgcc -symbolic @gol
|
| +-s -static -static-libgcc -static-libstdc++ -shared @gol
|
| +-shared-libgcc -symbolic @gol
|
| -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
|
| -u @var{symbol}}
|
|
|
| @@ -438,6 +453,7 @@ Objective-C and Objective-C++ Dialects}.
|
| -msched-prolog -mno-sched-prolog @gol
|
| -mlittle-endian -mbig-endian -mwords-little-endian @gol
|
| -mfloat-abi=@var{name} -msoft-float -mhard-float -mfpe @gol
|
| +-mfp16-format=@var{name}
|
| -mthumb-interwork -mno-thumb-interwork @gol
|
| -mcpu=@var{name} -march=@var{name} -mfpu=@var{name} @gol
|
| -mstructure-size-boundary=@var{n} @gol
|
| @@ -456,8 +472,8 @@ Objective-C and Objective-C++ Dialects}.
|
| -mfix-cortex-m3-ldrd}
|
|
|
| @emph{AVR Options}
|
| -@gccoptlist{-mmcu=@var{mcu} -msize -mno-interrupts @gol
|
| --mcall-prologues -mno-tablejump -mtiny-stack -mint8}
|
| +@gccoptlist{-mmcu=@var{mcu} -mno-interrupts @gol
|
| +-mcall-prologues -mtiny-stack -mint8}
|
|
|
| @emph{Blackfin Options}
|
| @gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol
|
| @@ -522,7 +538,7 @@ Objective-C and Objective-C++ Dialects}.
|
| -mmemory-latency=@var{time}}
|
|
|
| @emph{DEC Alpha/VMS Options}
|
| -@gccoptlist{-mvms-return-codes}
|
| +@gccoptlist{-mvms-return-codes -mdebug-main=@var{prefix} -mmalloc64}
|
|
|
| @emph{FR30 Options}
|
| @gccoptlist{-msmall-model -mno-lsim}
|
| @@ -574,37 +590,49 @@ Objective-C and Objective-C++ Dialects}.
|
| -mno-wide-multiply -mrtd -malign-double @gol
|
| -mpreferred-stack-boundary=@var{num}
|
| -mincoming-stack-boundary=@var{num}
|
| --mcld -mcx16 -msahf -mrecip @gol
|
| +-mcld -mcx16 -msahf -mmovbe -mcrc32 -mrecip @gol
|
| -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx @gol
|
| --maes -mpclmul @gol
|
| --msse4a -m3dnow -mpopcnt -mabm -msse5 @gol
|
| +-maes -mpclmul -mfused-madd @gol
|
| +-msse4a -m3dnow -mpopcnt -mabm -mfma4 -mxop -mlwp @gol
|
| -mthreads -mno-align-stringops -minline-all-stringops @gol
|
| -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol
|
| -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
|
| -m96bit-long-double -mregparm=@var{num} -msseregparm @gol
|
| -mveclibabi=@var{type} -mpc32 -mpc64 -mpc80 -mstackrealign @gol
|
| -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
|
| --mcmodel=@var{code-model} @gol
|
| +-mcmodel=@var{code-model} -mabi=@var{name} @gol
|
| -m32 -m64 -mlarge-data-threshold=@var{num} @gol
|
| --mfused-madd -mno-fused-madd -msse2avx}
|
| +-msse2avx}
|
|
|
| @emph{IA-64 Options}
|
| @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
|
| --mvolatile-asm-stop -mregister-names -mno-sdata @gol
|
| --mconstant-gp -mauto-pic -minline-float-divide-min-latency @gol
|
| +-mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol
|
| +-mconstant-gp -mauto-pic -mfused-madd @gol
|
| +-minline-float-divide-min-latency @gol
|
| -minline-float-divide-max-throughput @gol
|
| +-mno-inline-float-divide @gol
|
| -minline-int-divide-min-latency @gol
|
| -minline-int-divide-max-throughput @gol
|
| +-mno-inline-int-divide @gol
|
| -minline-sqrt-min-latency -minline-sqrt-max-throughput @gol
|
| --mno-dwarf2-asm -mearly-stop-bits @gol
|
| +-mno-inline-sqrt @gol
|
| +-mdwarf2-asm -mearly-stop-bits @gol
|
| -mfixed-range=@var{register-range} -mtls-size=@var{tls-size} @gol
|
| --mtune=@var{cpu-type} -mt -pthread -milp32 -mlp64 @gol
|
| --mno-sched-br-data-spec -msched-ar-data-spec -mno-sched-control-spec @gol
|
| +-mtune=@var{cpu-type} -milp32 -mlp64 @gol
|
| +-msched-br-data-spec -msched-ar-data-spec -msched-control-spec @gol
|
| -msched-br-in-data-spec -msched-ar-in-data-spec -msched-in-control-spec @gol
|
| --msched-ldc -mno-sched-control-ldc -mno-sched-spec-verbose @gol
|
| --mno-sched-prefer-non-data-spec-insns @gol
|
| --mno-sched-prefer-non-control-spec-insns @gol
|
| --mno-sched-count-spec-in-critical-path}
|
| +-msched-spec-ldc -msched-spec-control-ldc @gol
|
| +-msched-prefer-non-data-spec-insns -msched-prefer-non-control-spec-insns @gol
|
| +-msched-stop-bits-after-every-cycle -msched-count-spec-in-critical-path @gol
|
| +-msel-sched-dont-check-control-spec -msched-fp-mem-deps-zero-cost @gol
|
| +-msched-max-memory-insns-hard-limit -msched-max-memory-insns=@var{max-insns}}
|
| +
|
| +@emph{IA-64/VMS Options}
|
| +@gccoptlist{-mvms-return-codes -mdebug-main=@var{prefix} -mmalloc64}
|
| +
|
| +@emph{LM32 Options}
|
| +@gccoptlist{-mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled @gol
|
| +-msign-extend-enabled -muser-enabled}
|
|
|
| @emph{M32R/D Options}
|
| @gccoptlist{-m32r2 -m32rx -m32r @gol
|
| @@ -644,6 +672,13 @@ Objective-C and Objective-C++ Dialects}.
|
| -mno-callgraph-data -mslow-bytes -mno-slow-bytes -mno-lsim @gol
|
| -mlittle-endian -mbig-endian -m210 -m340 -mstack-increment}
|
|
|
| +@emph{MeP Options}
|
| +@gccoptlist{-mabsdiff -mall-opts -maverage -mbased=@var{n} -mbitops @gol
|
| +-mc=@var{n} -mclip -mconfig=@var{name} -mcop -mcop32 -mcop64 -mivc2 @gol
|
| +-mdc -mdiv -meb -mel -mio-volatile -ml -mleadz -mm -mminmax @gol
|
| +-mmult -mno-opts -mrepeat -ms -msatur -msdram -msim -msimnovec -mtf @gol
|
| +-mtiny=@var{n}}
|
| +
|
| @emph{MIPS Options}
|
| @gccoptlist{-EL -EB -march=@var{arch} -mtune=@var{arch} @gol
|
| -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 @gol
|
| @@ -676,7 +711,8 @@ Objective-C and Objective-C++ Dialects}.
|
| -mflush-func=@var{func} -mno-flush-func @gol
|
| -mbranch-cost=@var{num} -mbranch-likely -mno-branch-likely @gol
|
| -mfp-exceptions -mno-fp-exceptions @gol
|
| --mvr4130-align -mno-vr4130-align}
|
| +-mvr4130-align -mno-vr4130-align -msynci -mno-synci @gol
|
| +-mrelax-pic-calls -mno-relax-pic-calls -mmcount-ra-address}
|
|
|
| @emph{MMIX Options}
|
| @gccoptlist{-mlibfuncs -mno-libfuncs -mepsilon -mno-epsilon -mabi=gnu @gol
|
| @@ -714,7 +750,8 @@ See RS/6000 and PowerPC Options.
|
| -maltivec -mno-altivec @gol
|
| -mpowerpc-gpopt -mno-powerpc-gpopt @gol
|
| -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
|
| --mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mfprnd -mno-fprnd @gol
|
| +-mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mpopcntd -mno-popcntd @gol
|
| +-mfprnd -mno-fprnd @gol
|
| -mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mhard-dfp -mno-hard-dfp @gol
|
| -mnew-mnemonics -mold-mnemonics @gol
|
| -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol
|
| @@ -728,7 +765,7 @@ See RS/6000 and PowerPC Options.
|
| -mstrict-align -mno-strict-align -mrelocatable @gol
|
| -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
|
| -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
|
| --mdynamic-no-pic -maltivec -mswdiv @gol
|
| +-mdynamic-no-pic -maltivec -mswdiv @gol
|
| -mprioritize-restricted-insns=@var{priority} @gol
|
| -msched-costly-dep=@var{dependence_type} @gol
|
| -minsert-sched-nops=@var{scheme} @gol
|
| @@ -749,6 +786,18 @@ See RS/6000 and PowerPC Options.
|
| -msim -mmvme -mads -myellowknife -memb -msdata @gol
|
| -msdata=@var{opt} -mvxworks -G @var{num} -pthread}
|
|
|
| +@emph{RX Options}
|
| +@gccoptlist{-m64bit-doubles -m32bit-doubles -fpu -nofpu@gol
|
| +-mcpu= -patch=@gol
|
| +-mbig-endian-data -mlittle-endian-data @gol
|
| +-msmall-data @gol
|
| +-msim -mno-sim@gol
|
| +-mas100-syntax -mno-as100-syntax@gol
|
| +-mrelax@gol
|
| +-mmax-constant-size=@gol
|
| +-mint-register=@gol
|
| +-msave-acc-in-interrupts}
|
| +
|
| @emph{S/390 and zSeries Options}
|
| @gccoptlist{-mtune=@var{cpu-type} -march=@var{cpu-type} @gol
|
| -mhard-float -msoft-float -mhard-dfp -mno-hard-dfp @gol
|
| @@ -767,14 +816,16 @@ See RS/6000 and PowerPC Options.
|
| -mscore5 -mscore5u -mscore7 -mscore7d}
|
|
|
| @emph{SH Options}
|
| -@gccoptlist{-m1 -m2 -m2e -m3 -m3e @gol
|
| +@gccoptlist{-m1 -m2 -m2e @gol
|
| +-m2a-nofpu -m2a-single-only -m2a-single -m2a @gol
|
| +-m3 -m3e @gol
|
| -m4-nofpu -m4-single-only -m4-single -m4 @gol
|
| -m4a-nofpu -m4a-single-only -m4a-single -m4a -m4al @gol
|
| -m5-64media -m5-64media-nofpu @gol
|
| -m5-32media -m5-32media-nofpu @gol
|
| -m5-compact -m5-compact-nofpu @gol
|
| -mb -ml -mdalign -mrelax @gol
|
| --mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
|
| +-mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
|
| -mieee -mbitops -misize -minline-ic_invalidate -mpadstruct -mspace @gol
|
| -mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
|
| -mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
|
| @@ -800,7 +851,11 @@ See RS/6000 and PowerPC Options.
|
| -msafe-dma -munsafe-dma @gol
|
| -mbranch-hints @gol
|
| -msmall-mem -mlarge-mem -mstdmain @gol
|
| --mfixed-range=@var{register-range}}
|
| +-mfixed-range=@var{register-range} @gol
|
| +-mea32 -mea64 @gol
|
| +-maddress-space-conversion -mno-address-space-conversion @gol
|
| +-mcache-size=@var{cache-size} @gol
|
| +-matomic-updates -mno-atomic-updates}
|
|
|
| @emph{System V Options}
|
| @gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}}
|
| @@ -827,7 +882,8 @@ See i386 and x86-64 Options.
|
|
|
| @emph{i386 and x86-64 Windows Options}
|
| @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
|
| --mnop-fun-dllimport -mthread -mwin32 -mwindows}
|
| +-mnop-fun-dllimport -mthread -municode -mwin32 -mwindows
|
| +-fno-set-stack-executable}
|
|
|
| @emph{Xstormy16 Options}
|
| @gccoptlist{-msim}
|
| @@ -1189,8 +1245,8 @@ This will display the values recognized by the @option{--param}
|
| option.
|
|
|
| @item @var{language}
|
| -This will display the options supported for @var{language}, where
|
| -@var{language} is the name of one of the languages supported in this
|
| +This will display the options supported for @var{language}, where
|
| +@var{language} is the name of one of the languages supported in this
|
| version of GCC.
|
|
|
| @item @samp{common}
|
| @@ -1280,6 +1336,12 @@ gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts
|
| diff /tmp/O2-opts /tmp/O3-opts | grep enabled
|
| @end smallexample
|
|
|
| +@item -no-canonical-prefixes
|
| +@opindex no-canonical-prefixes
|
| +Do not expand any symbolic links, resolve references to @samp{/../}
|
| +or @samp{/./}, or make the path absolute when generating a relative
|
| +prefix.
|
| +
|
| @item --version
|
| @opindex version
|
| Display the version number and copyrights of the invoked GCC@.
|
| @@ -1297,6 +1359,19 @@ gcc -c t.c -wrapper gdb,--args
|
| This will invoke all subprograms of gcc under "gdb --args",
|
| thus cc1 invocation will be "gdb --args cc1 ...".
|
|
|
| +@item -fplugin=@var{name}.so
|
| +Load the plugin code in file @var{name}.so, assumed to be a
|
| +shared object to be dlopen'd by the compiler. The base name of
|
| +the shared object file is used to identify the plugin for the
|
| +purposes of argument parsing (See
|
| +@option{-fplugin-arg-@var{name}-@var{key}=@var{value}} below).
|
| +Each plugin should define the callback functions specified in the
|
| +Plugins API.
|
| +
|
| +@item -fplugin-arg-@var{name}-@var{key}=@var{value}
|
| +Define an argument called @var{key} with a value of @var{value}
|
| +for the plugin called @var{name}.
|
| +
|
| @include @value{srcdir}/../libiberty/at-file.texi
|
| @end table
|
|
|
| @@ -1350,7 +1425,7 @@ accepts:
|
| @cindex ISO support
|
| @item -ansi
|
| @opindex ansi
|
| -In C mode, this is equivalent to @samp{-std=c89}. In C++ mode, it is
|
| +In C mode, this is equivalent to @samp{-std=c90}. In C++ mode, it is
|
| equivalent to @samp{-std=c++98}.
|
|
|
| This turns off certain features of GCC that are incompatible with ISO
|
| @@ -1390,14 +1465,14 @@ affected.
|
| @opindex std
|
| Determine the language standard. @xref{Standards,,Language Standards
|
| Supported by GCC}, for details of these standard versions. This option
|
| -is currently only supported when compiling C or C++.
|
| +is currently only supported when compiling C or C++.
|
|
|
| -The compiler can accept several base standards, such as @samp{c89} or
|
| +The compiler can accept several base standards, such as @samp{c90} or
|
| @samp{c++98}, and GNU dialects of those standards, such as
|
| -@samp{gnu89} or @samp{gnu++98}. By specifying a base standard, the
|
| +@samp{gnu90} or @samp{gnu++98}. By specifying a base standard, the
|
| compiler will accept all programs following that standard and those
|
| using GNU extensions that do not contradict it. For example,
|
| -@samp{-std=c89} turns off certain features of GCC that are
|
| +@samp{-std=c90} turns off certain features of GCC that are
|
| incompatible with ISO C90, such as the @code{asm} and @code{typeof}
|
| keywords, but not other GNU extensions that do not have a meaning in
|
| ISO C90, such as omitting the middle term of a @code{?:}
|
| @@ -1407,13 +1482,14 @@ those features change the meaning of the base standard and some
|
| strict-conforming programs may be rejected. The particular standard
|
| is used by @option{-pedantic} to identify which features are GNU
|
| extensions given that version of the standard. For example
|
| -@samp{-std=gnu89 -pedantic} would warn about C++ style @samp{//}
|
| +@samp{-std=gnu90 -pedantic} would warn about C++ style @samp{//}
|
| comments, while @samp{-std=gnu99 -pedantic} would not.
|
|
|
| A value for this option must be provided; possible values are
|
|
|
| @table @samp
|
| -@item c89
|
| +@item c90
|
| +@itemx c89
|
| @itemx iso9899:1990
|
| Support all ISO C90 programs (certain GNU extensions that conflict
|
| with ISO C90 are disabled). Same as @option{-ansi} for C code.
|
| @@ -1426,10 +1502,11 @@ ISO C90 as modified in amendment 1.
|
| @itemx iso9899:1999
|
| @itemx iso9899:199x
|
| ISO C99. Note that this standard is not yet fully supported; see
|
| -@w{@uref{http://gcc.gnu.org/gcc-4.4/c99status.html}} for more information. The
|
| +@w{@uref{http://gcc.gnu.org/gcc-4.5/c99status.html}} for more information. The
|
| names @samp{c9x} and @samp{iso9899:199x} are deprecated.
|
|
|
| -@item gnu89
|
| +@item gnu90
|
| +@itemx gnu89
|
| GNU dialect of ISO C90 (including some C99 features). This
|
| is the default for C code.
|
|
|
| @@ -1472,7 +1549,8 @@ C99 mode. Using this option is roughly equivalent to adding the
|
| The option @option{-fno-gnu89-inline} explicitly tells GCC to use the
|
| C99 semantics for @code{inline} when in C99 or gnu99 mode (i.e., it
|
| specifies the default behavior). This option was first supported in
|
| -GCC 4.3. This option is not supported in C89 or gnu89 mode.
|
| +GCC 4.3. This option is not supported in @option{-std=c90} or
|
| +@option{-std=gnu90} mode.
|
|
|
| The preprocessor macros @code{__GNUC_GNU_INLINE__} and
|
| @code{__GNUC_STDC_INLINE__} may be used to check which semantics are
|
| @@ -1578,7 +1656,7 @@ freestanding and hosted environments.
|
| Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and
|
| @code{!$omp} in Fortran. When @option{-fopenmp} is specified, the
|
| compiler generates parallel code according to the OpenMP Application
|
| -Program Interface v2.5 @w{@uref{http://www.openmp.org/}}. This option
|
| +Program Interface v3.0 @w{@uref{http://www.openmp.org/}}. This option
|
| implies @option{-pthread}, and thus is only supported on targets that
|
| have support for @option{-pthread}.
|
|
|
| @@ -1705,6 +1783,13 @@ are fixed.
|
|
|
| The default is version 2.
|
|
|
| +Version 3 corrects an error in mangling a constant address as a
|
| +template argument.
|
| +
|
| +Version 4 implements a standard mangling for vector types.
|
| +
|
| +See also @option{-Wabi}.
|
| +
|
| @item -fno-access-control
|
| @opindex fno-access-control
|
| Turn off all access checking. This switch is mainly useful for working
|
| @@ -1855,6 +1940,19 @@ Downgrade some diagnostics about nonconformant code from errors to
|
| warnings. Thus, using @option{-fpermissive} will allow some
|
| nonconforming code to compile.
|
|
|
| +@item -fno-pretty-templates
|
| +@opindex fno-pretty-templates
|
| +When an error message refers to a specialization of a function
|
| +template, the compiler will normally print the signature of the
|
| +template followed by the template arguments and any typedefs or
|
| +typenames in the signature (e.g. @code{void f(T) [with T = int]}
|
| +rather than @code{void f(int)}) so that it's clear which template is
|
| +involved. When an error message refers to a specialization of a class
|
| +template, the compiler will omit any template arguments which match
|
| +the default template arguments for that template. If either of these
|
| +behaviors make it harder to understand the error message rather than
|
| +easier, using @option{-fno-pretty-templates} will disable them.
|
| +
|
| @item -frepo
|
| @opindex frepo
|
| Enable automatic template instantiation at link time. This option also
|
| @@ -1877,12 +1975,13 @@ unambiguous base classes.
|
| Emit statistics about front-end processing at the end of the compilation.
|
| This information is generally only useful to the G++ development team.
|
|
|
| -@item -ftemplate-depth-@var{n}
|
| +@item -ftemplate-depth=@var{n}
|
| @opindex ftemplate-depth
|
| Set the maximum instantiation depth for template classes to @var{n}.
|
| A limit on the template instantiation depth is needed to detect
|
| endless recursions during template class instantiation. ANSI/ISO C++
|
| -conforming programs must not rely on a maximum depth greater than 17.
|
| +conforming programs must not rely on a maximum depth greater than 17
|
| +(changed to 1024 in C++0x).
|
|
|
| @item -fno-threadsafe-statics
|
| @opindex fno-threadsafe-statics
|
| @@ -2007,7 +2106,30 @@ You should rewrite your code to avoid these warnings if you are
|
| concerned about the fact that code generated by G++ may not be binary
|
| compatible with code generated by other compilers.
|
|
|
| -The known incompatibilities at this point include:
|
| +The known incompatibilities in @option{-fabi-version=2} (the default) include:
|
| +
|
| +@itemize @bullet
|
| +
|
| +@item
|
| +A template with a non-type template parameter of reference type is
|
| +mangled incorrectly:
|
| +@smallexample
|
| +extern int N;
|
| +template <int &> struct S @{@};
|
| +void n (S<N>) @{2@}
|
| +@end smallexample
|
| +
|
| +This is fixed in @option{-fabi-version=3}.
|
| +
|
| +@item
|
| +SIMD vector types declared using @code{__attribute ((vector_size))} are
|
| +mangled in a non-standard way that does not allow for overloading of
|
| +functions taking vectors of different sizes.
|
| +
|
| +The mangling is changed in @option{-fabi-version=4}.
|
| +@end itemize
|
| +
|
| +The known incompatibilities in @option{-fabi-version=1} include:
|
|
|
| @itemize @bullet
|
|
|
| @@ -2723,7 +2845,7 @@ be quite different from @option{-pedantic}. We don't have plans to
|
| support such a feature in the near future.
|
|
|
| Where the standard specified with @option{-std} represents a GNU
|
| -extended dialect of C, such as @samp{gnu89} or @samp{gnu99}, there is a
|
| +extended dialect of C, such as @samp{gnu90} or @samp{gnu99}, there is a
|
| corresponding @dfn{base standard}, the version of ISO C on which the GNU
|
| extended dialect is based. Warnings from @option{-pedantic} are given
|
| where they are required by the base standard. (It would not make sense
|
| @@ -2752,6 +2874,7 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
|
| -Warray-bounds @r{(only with} @option{-O2}@r{)} @gol
|
| -Wc++0x-compat @gol
|
| -Wchar-subscripts @gol
|
| +-Wenum-compare @r{(in C/Objc; this is on by default in C++)} @gol
|
| -Wimplicit-int @gol
|
| -Wimplicit-function-declaration @gol
|
| -Wcomment @gol
|
| @@ -2816,21 +2939,21 @@ following cases:
|
| A pointer is compared against integer zero with @samp{<}, @samp{<=},
|
| @samp{>}, or @samp{>=}.
|
|
|
| -@item
|
| +@item
|
| (C++ only) An enumerator and a non-enumerator both appear in a
|
| conditional expression.
|
|
|
| -@item
|
| +@item
|
| (C++ only) Ambiguous virtual bases.
|
|
|
| -@item
|
| +@item
|
| (C++ only) Subscripting an array which has been declared @samp{register}.
|
|
|
| -@item
|
| +@item
|
| (C++ only) Taking the address of a variable which has been declared
|
| @samp{register}.
|
|
|
| -@item
|
| +@item
|
| (C++ only) A base class is not initialized in a derived class' copy
|
| constructor.
|
|
|
| @@ -3144,7 +3267,7 @@ Warn whenever a function is defined with a return-type that defaults
|
| to @code{int}. Also warn about any @code{return} statement with no
|
| return-value in a function whose return-type is not @code{void}
|
| (falling off the end of the function body is considered returning
|
| -without a value), and about a @code{return} statement with a
|
| +without a value), and about a @code{return} statement with an
|
| expression in a function whose return-type is @code{void}.
|
|
|
| For C++, a function without return type always produces a diagnostic
|
| @@ -3160,7 +3283,8 @@ Warn whenever a @code{switch} statement has an index of enumerated type
|
| and lacks a @code{case} for one or more of the named codes of that
|
| enumeration. (The presence of a @code{default} label prevents this
|
| warning.) @code{case} labels outside the enumeration range also
|
| -provoke warnings when this option is used.
|
| +provoke warnings when this option is used (even if there is a
|
| +@code{default} label).
|
| This warning is enabled by @option{-Wall}.
|
|
|
| @item -Wswitch-default
|
| @@ -3175,7 +3299,10 @@ case.
|
| Warn whenever a @code{switch} statement has an index of enumerated type
|
| and lacks a @code{case} for one or more of the named codes of that
|
| enumeration. @code{case} labels outside the enumeration range also
|
| -provoke warnings when this option is used.
|
| +provoke warnings when this option is used. The only difference
|
| +between @option{-Wswitch} and this option is that this option gives a
|
| +warning about an omitted enumeration code even if there is a
|
| +@code{default} label.
|
|
|
| @item -Wsync-nand @r{(C and C++ only)}
|
| @opindex Wsync-nand
|
| @@ -3214,6 +3341,13 @@ Warn whenever a function parameter is unused aside from its declaration.
|
| To suppress this warning use the @samp{unused} attribute
|
| (@pxref{Variable Attributes}).
|
|
|
| +@item -Wno-unused-result
|
| +@opindex Wunused-result
|
| +@opindex Wno-unused-result
|
| +Do not warn if a caller of a function marked with attribute
|
| +@code{warn_unused_result} (@pxref{Variable Attributes}) does not use
|
| +its return value. The default is @option{-Wunused-result}.
|
| +
|
| @item -Wunused-variable
|
| @opindex Wunused-variable
|
| @opindex Wno-unused-variable
|
| @@ -3366,9 +3500,9 @@ with n=3.
|
|
|
| Level 1: Most aggressive, quick, least accurate.
|
| Possibly useful when higher levels
|
| -do not warn but -fstrict-aliasing still breaks the code, as it has very few
|
| +do not warn but -fstrict-aliasing still breaks the code, as it has very few
|
| false negatives. However, it has many false positives.
|
| -Warns for all pointer conversions between possibly incompatible types,
|
| +Warns for all pointer conversions between possibly incompatible types,
|
| even if never dereferenced. Runs in the frontend only.
|
|
|
| Level 2: Aggressive, quick, not too precise.
|
| @@ -3377,12 +3511,12 @@ and few false negatives (but possibly more than level 1).
|
| Unlike level 1, it only warns when an address is taken. Warns about
|
| incomplete types. Runs in the frontend only.
|
|
|
| -Level 3 (default for @option{-Wstrict-aliasing}):
|
| -Should have very few false positives and few false
|
| +Level 3 (default for @option{-Wstrict-aliasing}):
|
| +Should have very few false positives and few false
|
| negatives. Slightly slower than levels 1 or 2 when optimization is enabled.
|
| -Takes care of the common punn+dereference pattern in the frontend:
|
| +Takes care of the common pun+dereference pattern in the frontend:
|
| @code{*(int*)&some_float}.
|
| -If optimization is enabled, it also runs in the backend, where it deals
|
| +If optimization is enabled, it also runs in the backend, where it deals
|
| with multiple statement cases using flow-sensitive points-to information.
|
| Only warns when the converted pointer is dereferenced.
|
| Does not warn about incomplete types.
|
| @@ -3680,6 +3814,19 @@ Warn whenever a pointer is cast so as to remove a type qualifier from
|
| the target type. For example, warn if a @code{const char *} is cast
|
| to an ordinary @code{char *}.
|
|
|
| +Also warn when making a cast which introduces a type qualifier in an
|
| +unsafe way. For example, casting @code{char **} to @code{const char **}
|
| +is unsafe, as in this example:
|
| +
|
| +@smallexample
|
| + /* p is char ** value. */
|
| + const char **q = (const char **) p;
|
| + /* Assignment of readonly string to const char * is OK. */
|
| + *q = "string";
|
| + /* Now char** pointer points to read-only memory. */
|
| + **p = 'b';
|
| +@end smallexample
|
| +
|
| @item -Wcast-align
|
| @opindex Wcast-align
|
| @opindex Wno-cast-align
|
| @@ -3723,25 +3870,44 @@ changed by the conversion like in @code{abs (2.0)}. Warnings about
|
| conversions between signed and unsigned integers can be disabled by
|
| using @option{-Wno-sign-conversion}.
|
|
|
| -For C++, also warn for conversions between @code{NULL} and non-pointer
|
| -types; confusing overload resolution for user-defined conversions; and
|
| -conversions that will never use a type conversion operator:
|
| -conversions to @code{void}, the same type, a base class or a reference
|
| -to them. Warnings about conversions between signed and unsigned
|
| -integers are disabled by default in C++ unless
|
| +For C++, also warn for confusing overload resolution for user-defined
|
| +conversions; and conversions that will never use a type conversion
|
| +operator: conversions to @code{void}, the same type, a base class or a
|
| +reference to them. Warnings about conversions between signed and
|
| +unsigned integers are disabled by default in C++ unless
|
| @option{-Wsign-conversion} is explicitly enabled.
|
|
|
| +@item -Wno-conversion-null @r{(C++ and Objective-C++ only)}
|
| +@opindex Wconversion-null
|
| +@opindex Wno-conversion-null
|
| +Do not warn for conversions between @code{NULL} and non-pointer
|
| +types. @option{-Wconversion-null} is enabled by default.
|
| +
|
| @item -Wempty-body
|
| @opindex Wempty-body
|
| @opindex Wno-empty-body
|
| Warn if an empty body occurs in an @samp{if}, @samp{else} or @samp{do
|
| while} statement. This warning is also enabled by @option{-Wextra}.
|
|
|
| -@item -Wenum-compare @r{(C++ and Objective-C++ only)}
|
| +@item -Wenum-compare
|
| @opindex Wenum-compare
|
| @opindex Wno-enum-compare
|
| -Warn about a comparison between values of different enum types. This
|
| -warning is enabled by default.
|
| +Warn about a comparison between values of different enum types. In C++
|
| +this warning is enabled by default. In C this warning is enabled by
|
| +@option{-Wall}.
|
| +
|
| +@item -Wjump-misses-init @r{(C, Objective-C only)}
|
| +@opindex Wjump-misses-init
|
| +@opindex Wno-jump-misses-init
|
| +Warn if a @code{goto} statement or a @code{switch} statement jumps
|
| +forward across the initialization of a variable, or jumps backward to a
|
| +label after the variable has been initialized. This only warns about
|
| +variables which are initialized when they are declared. This warning is
|
| +only supported for C and Objective C; in C++ this sort of branch is an
|
| +error in any case.
|
| +
|
| +@option{-Wjump-misses-init} is included in @option{-Wc++-compat}. It
|
| +can be disabled with the @option{-Wno-jump-misses-init} option.
|
|
|
| @item -Wsign-compare
|
| @opindex Wsign-compare
|
| @@ -4063,29 +4229,6 @@ cases where multiple declaration is valid and changes nothing.
|
| @opindex Wno-nested-externs
|
| Warn if an @code{extern} declaration is encountered within a function.
|
|
|
| -@item -Wunreachable-code
|
| -@opindex Wunreachable-code
|
| -@opindex Wno-unreachable-code
|
| -Warn if the compiler detects that code will never be executed.
|
| -
|
| -This option is intended to warn when the compiler detects that at
|
| -least a whole line of source code will never be executed, because
|
| -some condition is never satisfied or because it is after a
|
| -procedure that never returns.
|
| -
|
| -It is possible for this option to produce a warning even though there
|
| -are circumstances under which part of the affected line can be executed,
|
| -so care should be taken when removing apparently-unreachable code.
|
| -
|
| -For instance, when a function is inlined, a warning may mean that the
|
| -line is unreachable in only one inlined copy of the function.
|
| -
|
| -This option is not made part of @option{-Wall} because in a debugging
|
| -version of a program there is often substantial code which checks
|
| -correct functioning of the program and is, hopefully, unreachable
|
| -because the program does work. Another common use of unreachable
|
| -code is to provide behavior which is selectable at compile-time.
|
| -
|
| @item -Winline
|
| @opindex Winline
|
| @opindex Wno-inline
|
| @@ -4137,10 +4280,9 @@ the search path but can't be used.
|
| @item -Wlong-long
|
| @opindex Wlong-long
|
| @opindex Wno-long-long
|
| -Warn if @samp{long long} type is used. This is default. To inhibit
|
| -the warning messages, use @option{-Wno-long-long}. Flags
|
| -@option{-Wlong-long} and @option{-Wno-long-long} are taken into account
|
| -only when @option{-pedantic} flag is used.
|
| +Warn if @samp{long long} type is used. This is enabled by either
|
| +@option{-pedantic} or @option{-Wtraditional} in ISO C90 and C++98
|
| +modes. To inhibit the warning messages, use @option{-Wno-long-long}.
|
|
|
| @item -Wvariadic-macros
|
| @opindex Wvariadic-macros
|
| @@ -4203,12 +4345,21 @@ standard's minimum limit, but very portable programs should avoid
|
| using longer strings.
|
|
|
| The limit applies @emph{after} string constant concatenation, and does
|
| -not count the trailing NUL@. In C89, the limit was 509 characters; in
|
| +not count the trailing NUL@. In C90, the limit was 509 characters; in
|
| C99, it was raised to 4095. C++98 does not specify a normative
|
| minimum maximum, so we do not diagnose overlength strings in C++@.
|
|
|
| This option is implied by @option{-pedantic}, and can be disabled with
|
| @option{-Wno-overlength-strings}.
|
| +
|
| +@item -Wunsuffixed-float-constants @r{(C and Objective-C only)}
|
| +@opindex Wunsuffixed-float-constants
|
| +
|
| +GCC will issue a warning for any floating constant that does not have
|
| +a suffix. When used together with @option{-Wsystem-headers} it will
|
| +warn about such constants in system header files. This can be useful
|
| +when preparing code to use with the @code{FLOAT_CONST_DECIMAL64} pragma
|
| +from the decimal floating-point extension to C99.
|
| @end table
|
|
|
| @node Debugging Options
|
| @@ -4302,13 +4453,28 @@ use of these extensions is likely to make other debuggers crash or
|
| refuse to read the program, and may cause assemblers other than the GNU
|
| assembler (GAS) to fail with an error.
|
|
|
| -@item -gdwarf-2
|
| -@opindex gdwarf-2
|
| -Produce debugging information in DWARF version 2 format (if that is
|
| -supported). This is the format used by DBX on IRIX 6. With this
|
| -option, GCC uses features of DWARF version 3 when they are useful;
|
| -version 3 is upward compatible with version 2, but may still cause
|
| -problems for older debuggers.
|
| +@item -gdwarf-@var{version}
|
| +@opindex gdwarf-@var{version}
|
| +Produce debugging information in DWARF format (if that is
|
| +supported). This is the format used by DBX on IRIX 6. The value
|
| +of @var{version} may be either 2, 3 or 4; the default version is 2.
|
| +
|
| +Note that with DWARF version 2 some ports require, and will always
|
| +use, some non-conflicting DWARF 3 extensions in the unwind tables.
|
| +
|
| +Version 4 may require GDB 7.0 and @option{-fvar-tracking-assignments}
|
| +for maximum benefit.
|
| +
|
| +@item -gstrict-dwarf
|
| +@opindex gstrict-dwarf
|
| +Disallow using extensions of later DWARF standard version than selected
|
| +with @option{-gdwarf-@var{version}}. On most targets using non-conflicting
|
| +DWARF extensions from later standard versions is allowed.
|
| +
|
| +@item -gno-strict-dwarf
|
| +@opindex gno-strict-dwarf
|
| +Allow using extensions of later DWARF standard version than selected with
|
| +@option{-gdwarf-@var{version}}.
|
|
|
| @item -gvms
|
| @opindex gvms
|
| @@ -4342,7 +4508,65 @@ debug information in version 1 of the DWARF format (which is very
|
| different from version 2), and it would have been too confusing. That
|
| debug format is long obsolete, but the option cannot be changed now.
|
| Instead use an additional @option{-g@var{level}} option to change the
|
| -debug level for DWARF2.
|
| +debug level for DWARF.
|
| +
|
| +@item -gtoggle
|
| +@opindex gtoggle
|
| +Turn off generation of debug info, if leaving out this option would have
|
| +generated it, or turn it on at level 2 otherwise. The position of this
|
| +argument in the command line does not matter, it takes effect after all
|
| +other options are processed, and it does so only once, no matter how
|
| +many times it is given. This is mainly intended to be used with
|
| +@option{-fcompare-debug}.
|
| +
|
| +@item -fdump-final-insns@r{[}=@var{file}@r{]}
|
| +@opindex fdump-final-insns
|
| +Dump the final internal representation (RTL) to @var{file}. If the
|
| +optional argument is omitted (or if @var{file} is @code{.}), the name
|
| +of the dump file will be determined by appending @code{.gkd} to the
|
| +compilation output file name.
|
| +
|
| +@item -fcompare-debug@r{[}=@var{opts}@r{]}
|
| +@opindex fcompare-debug
|
| +@opindex fno-compare-debug
|
| +If no error occurs during compilation, run the compiler a second time,
|
| +adding @var{opts} and @option{-fcompare-debug-second} to the arguments
|
| +passed to the second compilation. Dump the final internal
|
| +representation in both compilations, and print an error if they differ.
|
| +
|
| +If the equal sign is omitted, the default @option{-gtoggle} is used.
|
| +
|
| +The environment variable @env{GCC_COMPARE_DEBUG}, if defined, non-empty
|
| +and nonzero, implicitly enables @option{-fcompare-debug}. If
|
| +@env{GCC_COMPARE_DEBUG} is defined to a string starting with a dash,
|
| +then it is used for @var{opts}, otherwise the default @option{-gtoggle}
|
| +is used.
|
| +
|
| +@option{-fcompare-debug=}, with the equal sign but without @var{opts},
|
| +is equivalent to @option{-fno-compare-debug}, which disables the dumping
|
| +of the final representation and the second compilation, preventing even
|
| +@env{GCC_COMPARE_DEBUG} from taking effect.
|
| +
|
| +To verify full coverage during @option{-fcompare-debug} testing, set
|
| +@env{GCC_COMPARE_DEBUG} to say @samp{-fcompare-debug-not-overridden},
|
| +which GCC will reject as an invalid option in any actual compilation
|
| +(rather than preprocessing, assembly or linking). To get just a
|
| +warning, setting @env{GCC_COMPARE_DEBUG} to @samp{-w%n-fcompare-debug
|
| +not overridden} will do.
|
| +
|
| +@item -fcompare-debug-second
|
| +@opindex fcompare-debug-second
|
| +This option is implicitly passed to the compiler for the second
|
| +compilation requested by @option{-fcompare-debug}, along with options to
|
| +silence warnings, and omitting other options that would cause
|
| +side-effect compiler outputs to files or to the standard output. Dump
|
| +files and preserved temporary files are renamed so as to contain the
|
| +@code{.gk} additional extension during the second compilation, to avoid
|
| +overwriting those generated by the first.
|
| +
|
| +When this option is passed to the compiler driver, it causes the
|
| +@emph{first} compilation to be skipped, which makes it useful for little
|
| +other than debugging the compiler proper.
|
|
|
| @item -feliminate-dwarf2-dups
|
| @opindex feliminate-dwarf2-dups
|
| @@ -4422,6 +4646,11 @@ The default is @samp{-femit-struct-debug-detailed=all}.
|
|
|
| This option works only with DWARF 2.
|
|
|
| +@item -fenable-icf-debug
|
| +@opindex fenable-icf-debug
|
| +Generate additional debug information to support identical code folding (ICF).
|
| +This option only works with DWARF version 2 or higher.
|
| +
|
| @item -fno-merge-debug-strings
|
| @opindex fmerge-debug-strings
|
| @opindex fno-merge-debug-strings
|
| @@ -4563,7 +4792,7 @@ Print the name and the counter upperbound for all debug counters.
|
|
|
| @item -fdbg-cnt=@var{counter-value-list}
|
| @opindex fdbg-cnt
|
| -Set the internal debug counter upperbound. @var{counter-value-list}
|
| +Set the internal debug counter upperbound. @var{counter-value-list}
|
| is a comma-separated list of @var{name}:@var{value} pairs
|
| which sets the upperbound of each debug counter @var{name} to @var{value}.
|
| All debug counters have the initial upperbound of @var{UINT_MAX},
|
| @@ -4576,13 +4805,14 @@ and dbg_cnt(tail_call) will return false always.
|
| @itemx -fdump-rtl-@var{pass}
|
| @opindex d
|
| Says to make debugging dumps during compilation at times specified by
|
| -@var{letters}. This is used for debugging the RTL-based passes of the
|
| -compiler. The file names for most of the dumps are made by appending a
|
| -pass number and a word to the @var{dumpname}. @var{dumpname} is generated
|
| -from the name of the output file, if explicitly specified and it is not
|
| -an executable, otherwise it is the basename of the source file. These
|
| -switches may have different effects when @option{-E} is used for
|
| -preprocessing.
|
| +@var{letters}. This is used for debugging the RTL-based passes of the
|
| +compiler. The file names for most of the dumps are made by appending
|
| +a pass number and a word to the @var{dumpname}, and the files are
|
| +created in the directory of the output file. @var{dumpname} is
|
| +generated from the name of the output file, if explicitly specified
|
| +and it is not an executable, otherwise it is the basename of the
|
| +source file. These switches may have different effects when
|
| +@option{-E} is used for preprocessing.
|
|
|
| Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
|
| @option{-d} option @var{letters}. Here are the possible
|
| @@ -4643,7 +4873,7 @@ Dump after duplicating the computed gotos.
|
| @opindex fdump-rtl-ce3
|
| @option{-fdump-rtl-ce1}, @option{-fdump-rtl-ce2}, and
|
| @option{-fdump-rtl-ce3} enable dumping after the three
|
| -if conversion passes.
|
| +if conversion passes.
|
|
|
| @itemx -fdump-rtl-cprop_hardreg
|
| @opindex fdump-rtl-cprop_hardreg
|
| @@ -4772,7 +5002,7 @@ Dump after sign extension elimination.
|
|
|
| @item -fdump-rtl-seqabstr
|
| @opindex fdump-rtl-seqabstr
|
| -Dump after common sequence discovery.
|
| +Dump after common sequence discovery.
|
|
|
| @item -fdump-rtl-shorten
|
| @opindex fdump-rtl-shorten
|
| @@ -4905,12 +5135,19 @@ This makes it more feasible to use diff on debugging dumps for compiler
|
| invocations with different options, in particular with and without
|
| @option{-g}.
|
|
|
| +@item -fdump-unnumbered-links
|
| +@opindex fdump-unnumbered-links
|
| +When doing debugging dumps (see @option{-d} option above), suppress
|
| +instruction numbers for the links to the previous and next instructions
|
| +in a sequence.
|
| +
|
| @item -fdump-translation-unit @r{(C++ only)}
|
| @itemx -fdump-translation-unit-@var{options} @r{(C++ only)}
|
| @opindex fdump-translation-unit
|
| Dump a representation of the tree structure for the entire translation
|
| unit to a file. The file name is made by appending @file{.tu} to the
|
| -source file name. If the @samp{-@var{options}} form is used, @var{options}
|
| +source file name, and the file is created in the same directory as the
|
| +output file. If the @samp{-@var{options}} form is used, @var{options}
|
| controls the details of the dump as described for the
|
| @option{-fdump-tree} options.
|
|
|
| @@ -4918,16 +5155,19 @@ controls the details of the dump as described for the
|
| @itemx -fdump-class-hierarchy-@var{options} @r{(C++ only)}
|
| @opindex fdump-class-hierarchy
|
| Dump a representation of each class's hierarchy and virtual function
|
| -table layout to a file. The file name is made by appending @file{.class}
|
| -to the source file name. If the @samp{-@var{options}} form is used,
|
| -@var{options} controls the details of the dump as described for the
|
| -@option{-fdump-tree} options.
|
| +table layout to a file. The file name is made by appending
|
| +@file{.class} to the source file name, and the file is created in the
|
| +same directory as the output file. If the @samp{-@var{options}} form
|
| +is used, @var{options} controls the details of the dump as described
|
| +for the @option{-fdump-tree} options.
|
|
|
| @item -fdump-ipa-@var{switch}
|
| @opindex fdump-ipa
|
| Control the dumping at various stages of inter-procedural analysis
|
| -language tree to a file. The file name is generated by appending a switch
|
| -specific suffix to the source file name. The following dumps are possible:
|
| +language tree to a file. The file name is generated by appending a
|
| +switch specific suffix to the source file name, and the file is created
|
| +in the same directory as the output file. The following dumps are
|
| +possible:
|
|
|
| @table @samp
|
| @item all
|
| @@ -4943,30 +5183,37 @@ Dump after function inlining.
|
| @end table
|
|
|
| @item -fdump-statistics-@var{option}
|
| -@opindex -fdump-statistics
|
| +@opindex fdump-statistics
|
| Enable and control dumping of pass statistics in a separate file. The
|
| -file name is generated by appending a suffix ending in @samp{.statistics}
|
| -to the source file name. If the @samp{-@var{option}} form is used,
|
| -@samp{-stats} will cause counters to be summed over the whole compilation unit
|
| -while @samp{-details} will dump every event as the passes generate them.
|
| -The default with no option is to sum counters for each function compiled.
|
| +file name is generated by appending a suffix ending in
|
| +@samp{.statistics} to the source file name, and the file is created in
|
| +the same directory as the output file. If the @samp{-@var{option}}
|
| +form is used, @samp{-stats} will cause counters to be summed over the
|
| +whole compilation unit while @samp{-details} will dump every event as
|
| +the passes generate them. The default with no option is to sum
|
| +counters for each function compiled.
|
|
|
| @item -fdump-tree-@var{switch}
|
| @itemx -fdump-tree-@var{switch}-@var{options}
|
| @opindex fdump-tree
|
| Control the dumping at various stages of processing the intermediate
|
| -language tree to a file. The file name is generated by appending a switch
|
| -specific suffix to the source file name. If the @samp{-@var{options}}
|
| -form is used, @var{options} is a list of @samp{-} separated options that
|
| -control the details of the dump. Not all options are applicable to all
|
| -dumps, those which are not meaningful will be ignored. The following
|
| -options are available
|
| +language tree to a file. The file name is generated by appending a
|
| +switch specific suffix to the source file name, and the file is
|
| +created in the same directory as the output file. If the
|
| +@samp{-@var{options}} form is used, @var{options} is a list of
|
| +@samp{-} separated options that control the details of the dump. Not
|
| +all options are applicable to all dumps, those which are not
|
| +meaningful will be ignored. The following options are available
|
|
|
| @table @samp
|
| @item address
|
| Print the address of each node. Usually this is not meaningful as it
|
| changes according to the environment and source file. Its primary use
|
| is for tying up a dump file with a debug environment.
|
| +@item asmname
|
| +If @code{DECL_ASSEMBLER_NAME} has been set for a given decl, use that
|
| +in the dump instead of @code{DECL_NAME}. Its primary use is ease of
|
| +use working backward from mangled names in the assembly file.
|
| @item slim
|
| Inhibit dumping of members of a scope or body of a function merely
|
| because that scope has been reached. Only dump such items when they
|
| @@ -4990,6 +5237,8 @@ Enable showing line numbers for statements.
|
| Enable showing the unique ID (@code{DECL_UID}) for each variable.
|
| @item verbose
|
| Enable showing the tree dump for each statement.
|
| +@item eh
|
| +Enable showing the EH region number holding each statement.
|
| @item all
|
| Turn on all options, except @option{raw}, @option{slim}, @option{verbose}
|
| and @option{lineno}.
|
| @@ -4999,9 +5248,11 @@ The following tree dumps are possible:
|
| @table @samp
|
|
|
| @item original
|
| +@opindex fdump-tree-original
|
| Dump before any tree based optimization, to @file{@var{file}.original}.
|
|
|
| @item optimized
|
| +@opindex fdump-tree-optimized
|
| Dump after all tree based optimization, to @file{@var{file}.optimized}.
|
|
|
| @item gimple
|
| @@ -5123,6 +5374,11 @@ file name.
|
| Dump each function after applying vectorization of loops. The file name is
|
| made by appending @file{.vect} to the source file name.
|
|
|
| +@item slp
|
| +@opindex fdump-tree-slp
|
| +Dump each function after applying vectorization of basic blocks. The file name
|
| +is made by appending @file{.slp} to the source file name.
|
| +
|
| @item vrp
|
| @opindex fdump-tree-vrp
|
| Dump each function after Value Range Propagation (VRP). The file name
|
| @@ -5148,19 +5404,21 @@ inner-most, single-bb, single-entry/exit loops. This is the same verbosity
|
| level that @option{-fdump-tree-vect-stats} uses.
|
| Higher verbosity levels mean either more information dumped for each
|
| reported loop, or same amount of information reported for more loops:
|
| -If @var{n}=3, alignment related information is added to the reports.
|
| -If @var{n}=4, data-references related information (e.g.@: memory dependences,
|
| +if @var{n}=3, vectorizer cost model information is reported.
|
| +If @var{n}=4, alignment related information is added to the reports.
|
| +If @var{n}=5, data-references related information (e.g.@: memory dependences,
|
| memory access-patterns) is added to the reports.
|
| -If @var{n}=5, the vectorizer reports also non-vectorized inner-most loops
|
| +If @var{n}=6, the vectorizer reports also non-vectorized inner-most loops
|
| that did not pass the first analysis phase (i.e., may not be countable, or
|
| may have complicated control-flow).
|
| -If @var{n}=6, the vectorizer reports also non-vectorized nested loops.
|
| -For @var{n}=7, all the information the vectorizer generates during its
|
| +If @var{n}=7, the vectorizer reports also non-vectorized nested loops.
|
| +If @var{n}=8, SLP related information is added to the reports.
|
| +For @var{n}=9, all the information the vectorizer generates during its
|
| analysis and transformation is reported. This is the same verbosity level
|
| that @option{-fdump-tree-vect-details} uses.
|
|
|
| @item -frandom-seed=@var{string}
|
| -@opindex frandom-string
|
| +@opindex frandom-seed
|
| This option provides a seed that GCC uses when it would otherwise use
|
| random numbers. It is used to generate certain symbol names
|
| that have to be different in every compiled file. It is also used to
|
| @@ -5176,7 +5434,7 @@ On targets that use instruction scheduling, this option controls the
|
| amount of debugging output the scheduler prints. This information is
|
| written to standard error, unless @option{-fdump-rtl-sched1} or
|
| @option{-fdump-rtl-sched2} is specified, in which case it is output
|
| -to the usual dump listing file, @file{.sched} or @file{.sched2}
|
| +to the usual dump listing file, @file{.sched1} or @file{.sched2}
|
| respectively. However for @var{n} greater than nine, the output is
|
| always printed to standard error.
|
|
|
| @@ -5189,6 +5447,7 @@ And for @var{n} over four, @option{-fsched-verbose} also includes
|
| dependence info.
|
|
|
| @item -save-temps
|
| +@itemx -save-temps=cwd
|
| @opindex save-temps
|
| Store the usual ``temporary'' intermediate files permanently; place them
|
| in the current directory and name them based on the source file. Thus,
|
| @@ -5203,11 +5462,46 @@ input source file with the same extension as an intermediate file.
|
| The corresponding intermediate file may be obtained by renaming the
|
| source file before using @option{-save-temps}.
|
|
|
| -@item -time
|
| +If you invoke GCC in parallel, compiling several different source
|
| +files that share a common base name in different subdirectories or the
|
| +same source file compiled for multiple output destinations, it is
|
| +likely that the different parallel compilers will interfere with each
|
| +other, and overwrite the temporary files. For instance:
|
| +
|
| +@smallexample
|
| +gcc -save-temps -o outdir1/foo.o indir1/foo.c&
|
| +gcc -save-temps -o outdir2/foo.o indir2/foo.c&
|
| +@end smallexample
|
| +
|
| +may result in @file{foo.i} and @file{foo.o} being written to
|
| +simultaneously by both compilers.
|
| +
|
| +@item -save-temps=obj
|
| +@opindex save-temps=obj
|
| +Store the usual ``temporary'' intermediate files permanently. If the
|
| +@option{-o} option is used, the temporary files are based on the
|
| +object file. If the @option{-o} option is not used, the
|
| +@option{-save-temps=obj} switch behaves like @option{-save-temps}.
|
| +
|
| +For example:
|
| +
|
| +@smallexample
|
| +gcc -save-temps=obj -c foo.c
|
| +gcc -save-temps=obj -c bar.c -o dir/xbar.o
|
| +gcc -save-temps=obj foobar.c -o dir2/yfoobar
|
| +@end smallexample
|
| +
|
| +would create @file{foo.i}, @file{foo.s}, @file{dir/xbar.i},
|
| +@file{dir/xbar.s}, @file{dir2/yfoobar.i}, @file{dir2/yfoobar.s}, and
|
| +@file{dir2/yfoobar.o}.
|
| +
|
| +@item -time@r{[}=@var{file}@r{]}
|
| @opindex time
|
| Report the CPU time taken by each subprocess in the compilation
|
| sequence. For C source files, this is the compiler proper and assembler
|
| -(plus the linker if linking is done). The output looks like this:
|
| +(plus the linker if linking is done).
|
| +
|
| +Without the specification of an output file, the output looks like this:
|
|
|
| @smallexample
|
| # cc1 0.12 0.01
|
| @@ -5219,6 +5513,18 @@ executing the program itself. The second number is ``system time'',
|
| time spent executing operating system routines on behalf of the program.
|
| Both numbers are in seconds.
|
|
|
| +With the specification of an output file, the output is appended to the
|
| +named file, and it looks like this:
|
| +
|
| +@smallexample
|
| +0.12 0.01 cc1 @var{options}
|
| +0.00 0.01 as @var{options}
|
| +@end smallexample
|
| +
|
| +The ``user time'' and the ``system time'' are moved before the program
|
| +name, and the options passed to the program are displayed, so that one
|
| +can later tell what file was being compiled, and with which options.
|
| +
|
| @item -fvar-tracking
|
| @opindex fvar-tracking
|
| Run variable tracking pass. It computes where variables are stored at each
|
| @@ -5229,6 +5535,23 @@ It is enabled by default when compiling with optimization (@option{-Os},
|
| @option{-O}, @option{-O2}, @dots{}), debugging information (@option{-g}) and
|
| the debug info format supports it.
|
|
|
| +@item -fvar-tracking-assignments
|
| +@opindex fvar-tracking-assignments
|
| +@opindex fno-var-tracking-assignments
|
| +Annotate assignments to user variables early in the compilation and
|
| +attempt to carry the annotations over throughout the compilation all the
|
| +way to the end, in an attempt to improve debug information while
|
| +optimizing. Use of @option{-gdwarf-4} is recommended along with it.
|
| +
|
| +It can be enabled even if var-tracking is disabled, in which case
|
| +annotations will be created and maintained, but discarded at the end.
|
| +
|
| +@item -fvar-tracking-assignments-toggle
|
| +@opindex fvar-tracking-assignments-toggle
|
| +@opindex fno-var-tracking-assignments-toggle
|
| +Toggle @option{-fvar-tracking-assignments}, in the same way that
|
| +@option{-gtoggle} toggles @option{-g}.
|
| +
|
| @item -print-file-name=@var{library}
|
| @opindex print-file-name
|
| Print the full absolute name of the library file @var{library} that
|
| @@ -5250,6 +5573,16 @@ that enable them. The directory name is separated from the switches by
|
| @samp{-}, without spaces between multiple switches. This is supposed to
|
| ease shell-processing.
|
|
|
| +@item -print-multi-os-directory
|
| +@opindex print-multi-os-directory
|
| +Print the path to OS libraries for the selected
|
| +multilib, relative to some @file{lib} subdirectory. If OS libraries are
|
| +present in the @file{lib} subdirectory and no multilibs are used, this is
|
| +usually just @file{.}, if OS libraries are present in @file{lib@var{suffix}}
|
| +sibling directories this prints e.g.@: @file{../lib64}, @file{../lib} or
|
| +@file{../lib32}, or if OS libraries are present in @file{lib/@var{subdir}}
|
| +subdirectories it prints e.g.@: @file{amd64}, @file{sparcv9} or @file{ev6}.
|
| +
|
| @item -print-prog-name=@var{program}
|
| @opindex print-prog-name
|
| Like @option{-print-file-name}, but searches for a program such as @samp{cpp}.
|
| @@ -5345,7 +5678,17 @@ the compiler to use information gained from all of the files when compiling
|
| each of them.
|
|
|
| Not all optimizations are controlled directly by a flag. Only
|
| -optimizations that have a flag are listed.
|
| +optimizations that have a flag are listed in this section.
|
| +
|
| +Most optimizations are only enabled if an @option{-O} level is set on
|
| +the command line. Otherwise they are disabled, even if individual
|
| +optimization flags are specified.
|
| +
|
| +Depending on the target and how GCC was configured, a slightly different
|
| +set of optimizations may be enabled at each @option{-O} level than
|
| +those listed here. You can invoke GCC with @samp{-Q --help=optimizers}
|
| +to find out the exact set of optimizations that are enabled at each level.
|
| +@xref{Overall Options}, for examples.
|
|
|
| @table @gcctabopt
|
| @item -O
|
| @@ -5370,7 +5713,6 @@ compilation time.
|
| -fguess-branch-probability @gol
|
| -fif-conversion2 @gol
|
| -fif-conversion @gol
|
| --finline-small-functions @gol
|
| -fipa-pure-const @gol
|
| -fipa-reference @gol
|
| -fmerge-constants
|
| @@ -5382,8 +5724,11 @@ compilation time.
|
| -ftree-dce @gol
|
| -ftree-dominator-opts @gol
|
| -ftree-dse @gol
|
| +-ftree-forwprop @gol
|
| -ftree-fre @gol
|
| +-ftree-phiprop @gol
|
| -ftree-sra @gol
|
| +-ftree-pta @gol
|
| -ftree-ter @gol
|
| -funit-at-a-time}
|
|
|
| @@ -5408,7 +5753,9 @@ also turns on the following optimization flags:
|
| -fdelete-null-pointer-checks @gol
|
| -fexpensive-optimizations @gol
|
| -fgcse -fgcse-lm @gol
|
| +-finline-small-functions @gol
|
| -findirect-inlining @gol
|
| +-fipa-sra @gol
|
| -foptimize-sibling-calls @gol
|
| -fpeephole2 @gol
|
| -fregmove @gol
|
| @@ -5488,8 +5835,8 @@ instructions and checks if the result can be simplified. If loop unrolling
|
| is active, two passes are performed and the second is scheduled after
|
| loop unrolling.
|
|
|
| -This option is enabled by default at optimization levels @option{-O2},
|
| -@option{-O3}, @option{-Os}.
|
| +This option is enabled by default at optimization levels @option{-O},
|
| +@option{-O2}, @option{-O3}, @option{-Os}.
|
|
|
| @item -fomit-frame-pointer
|
| @opindex fomit-frame-pointer
|
| @@ -5569,6 +5916,14 @@ having large chains of nested wrapper functions.
|
|
|
| Enabled by default.
|
|
|
| +@item -fipa-sra
|
| +@opindex fipa-sra
|
| +Perform interprocedural scalar replacement of aggregates, removal of
|
| +unused parameters and replacement of parameters passed by reference
|
| +by parameters passed by value.
|
| +
|
| +Enabled at levels @option{-O2}, @option{-O3} and @option{-Os}.
|
| +
|
| @item -finline-limit=@var{n}
|
| @opindex finline-limit
|
| By default, GCC limits the size of functions that can be inlined. This flag
|
| @@ -5603,7 +5958,7 @@ release to an another.
|
| In C, emit @code{static} functions that are declared @code{inline}
|
| into the object file, even if the function has been inlined into all
|
| of its callers. This switch does not affect functions using the
|
| -@code{extern inline} extension in GNU C89@. In C++, emit any and all
|
| +@code{extern inline} extension in GNU C90@. In C++, emit any and all
|
| inline functions into the object file.
|
|
|
| @item -fkeep-static-consts
|
| @@ -5855,17 +6210,22 @@ Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
|
|
|
| @item -fdelete-null-pointer-checks
|
| @opindex fdelete-null-pointer-checks
|
| -Use global dataflow analysis to identify and eliminate useless checks
|
| -for null pointers. The compiler assumes that dereferencing a null
|
| -pointer would have halted the program. If a pointer is checked after
|
| -it has already been dereferenced, it cannot be null.
|
| -
|
| -In some environments, this assumption is not true, and programs can
|
| -safely dereference null pointers. Use
|
| -@option{-fno-delete-null-pointer-checks} to disable this optimization
|
| +Assume that programs cannot safely dereference null pointers, and that
|
| +no code or data element resides there. This enables simple constant
|
| +folding optimizations at all optimization levels. In addition, other
|
| +optimization passes in GCC use this flag to control global dataflow
|
| +analyses that eliminate useless checks for null pointers; these assume
|
| +that if a pointer is checked after it has already been dereferenced,
|
| +it cannot be null.
|
| +
|
| +Note however that in some environments this assumption is not true.
|
| +Use @option{-fno-delete-null-pointer-checks} to disable this optimization
|
| for programs which depend on that behavior.
|
|
|
| -Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
|
| +Some targets, especially embedded ones, disable this option at all levels.
|
| +Otherwise it is enabled at all levels: @option{-O0}, @option{-O1},
|
| +@option{-O2}, @option{-O3}, @option{-Os}. Passes that use the information
|
| +are enabled independently at different optimization levels.
|
|
|
| @item -fexpensive-optimizations
|
| @opindex fexpensive-optimizations
|
| @@ -5913,6 +6273,15 @@ give the best results in most cases and for most architectures.
|
| Do optimistic register coalescing. This option might be profitable for
|
| architectures with big regular register files.
|
|
|
| +@item -fira-loop-pressure
|
| +@opindex fira-loop-pressure
|
| +Use IRA to evaluate register pressure in loops for decision to move
|
| +loop invariants. Usage of this option usually results in generation
|
| +of faster and smaller code on machines with big register files (>= 32
|
| +registers) but it can slow compiler down.
|
| +
|
| +This option is enabled at level @option{-O3} for some targets.
|
| +
|
| @item -fno-ira-share-save-slots
|
| @opindex fno-ira-share-save-slots
|
| Switch off sharing stack slots used for saving call used hard
|
| @@ -5948,7 +6317,7 @@ helps machines that have slow floating point or memory load instructions
|
| by allowing other instructions to be issued until the result of the load
|
| or floating point instruction is required.
|
|
|
| -Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
|
| +Enabled at levels @option{-O2}, @option{-O3}.
|
|
|
| @item -fschedule-insns2
|
| @opindex fschedule-insns2
|
| @@ -5971,6 +6340,16 @@ Don't allow speculative motion of non-load instructions. This is normally
|
| enabled by default when scheduling before register allocation, i.e.@:
|
| with @option{-fschedule-insns} or at @option{-O2} or higher.
|
|
|
| +@item -fsched-pressure
|
| +@opindex fsched-pressure
|
| +Enable register pressure sensitive insn scheduling before the register
|
| +allocation. This only makes sense when scheduling before register
|
| +allocation is enabled, i.e.@: with @option{-fschedule-insns} or at
|
| +@option{-O2} or higher. Usage of this option can improve the
|
| +generated code and decrease its size by preventing register pressure
|
| +increase above the number of available hard registers and as a
|
| +consequence register spills in the register allocation.
|
| +
|
| @item -fsched-spec-load
|
| @opindex fsched-spec-load
|
| Allow speculative motion of some load instructions. This only makes
|
| @@ -6017,23 +6396,51 @@ results from the algorithm.
|
| This only makes sense when scheduling after register allocation, i.e.@: with
|
| @option{-fschedule-insns2} or at @option{-O2} or higher.
|
|
|
| -@item -fsched2-use-traces
|
| -@opindex fsched2-use-traces
|
| -Use @option{-fsched2-use-superblocks} algorithm when scheduling after register
|
| -allocation and additionally perform code duplication in order to increase the
|
| -size of superblocks using tracer pass. See @option{-ftracer} for details on
|
| -trace formation.
|
| -
|
| -This mode should produce faster but significantly longer programs. Also
|
| -without @option{-fbranch-probabilities} the traces constructed may not
|
| -match the reality and hurt the performance. This only makes
|
| -sense when scheduling after register allocation, i.e.@: with
|
| -@option{-fschedule-insns2} or at @option{-O2} or higher.
|
| -
|
| -@item -fsee
|
| -@opindex fsee
|
| -Eliminate redundant sign extension instructions and move the non-redundant
|
| -ones to optimal placement using lazy code motion (LCM).
|
| +@item -fsched-group-heuristic
|
| +@opindex fsched-group-heuristic
|
| +Enable the group heuristic in the scheduler. This heuristic favors
|
| +the instruction that belongs to a schedule group. This is enabled
|
| +by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns}
|
| +or @option{-fschedule-insns2} or at @option{-O2} or higher.
|
| +
|
| +@item -fsched-critical-path-heuristic
|
| +@opindex fsched-critical-path-heuristic
|
| +Enable the critical-path heuristic in the scheduler. This heuristic favors
|
| +instructions on the critical path. This is enabled by default when
|
| +scheduling is enabled, i.e.@: with @option{-fschedule-insns}
|
| +or @option{-fschedule-insns2} or at @option{-O2} or higher.
|
| +
|
| +@item -fsched-spec-insn-heuristic
|
| +@opindex fsched-spec-insn-heuristic
|
| +Enable the speculative instruction heuristic in the scheduler. This
|
| +heuristic favors speculative instructions with greater dependency weakness.
|
| +This is enabled by default when scheduling is enabled, i.e.@:
|
| +with @option{-fschedule-insns} or @option{-fschedule-insns2}
|
| +or at @option{-O2} or higher.
|
| +
|
| +@item -fsched-rank-heuristic
|
| +@opindex fsched-rank-heuristic
|
| +Enable the rank heuristic in the scheduler. This heuristic favors
|
| +the instruction belonging to a basic block with greater size or frequency.
|
| +This is enabled by default when scheduling is enabled, i.e.@:
|
| +with @option{-fschedule-insns} or @option{-fschedule-insns2} or
|
| +at @option{-O2} or higher.
|
| +
|
| +@item -fsched-last-insn-heuristic
|
| +@opindex fsched-last-insn-heuristic
|
| +Enable the last-instruction heuristic in the scheduler. This heuristic
|
| +favors the instruction that is less dependent on the last instruction
|
| +scheduled. This is enabled by default when scheduling is enabled,
|
| +i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or
|
| +at @option{-O2} or higher.
|
| +
|
| +@item -fsched-dep-count-heuristic
|
| +@opindex fsched-dep-count-heuristic
|
| +Enable the dependent-count heuristic in the scheduler. This heuristic
|
| +favors the instruction that has more instructions depending on it.
|
| +This is enabled by default when scheduling is enabled, i.e.@:
|
| +with @option{-fschedule-insns} or @option{-fschedule-insns2} or
|
| +at @option{-O2} or higher.
|
|
|
| @item -freschedule-modulo-scheduled-loops
|
| @opindex freschedule-modulo-scheduled-loops
|
| @@ -6053,8 +6460,8 @@ scheduling runs instead of the second scheduler pass.
|
|
|
| @item -fsel-sched-pipelining
|
| @opindex fsel-sched-pipelining
|
| -Enable software pipelining of innermost loops during selective scheduling.
|
| -This option has no effect until one of @option{-fselective-scheduling} or
|
| +Enable software pipelining of innermost loops during selective scheduling.
|
| +This option has no effect until one of @option{-fselective-scheduling} or
|
| @option{-fselective-scheduling2} is turned on.
|
|
|
| @item -fsel-sched-pipelining-outer-loops
|
| @@ -6091,6 +6498,11 @@ at @option{-O} and higher.
|
| Perform partial redundancy elimination (PRE) on trees. This flag is
|
| enabled by default at @option{-O2} and @option{-O3}.
|
|
|
| +@item -ftree-forwprop
|
| +@opindex ftree-forwprop
|
| +Perform forward propagation on trees. This flag is enabled by default
|
| +at @option{-O} and higher.
|
| +
|
| @item -ftree-fre
|
| @opindex ftree-fre
|
| Perform full redundancy elimination (FRE) on trees. The difference
|
| @@ -6099,6 +6511,11 @@ that are computed on all paths leading to the redundant computation.
|
| This analysis is faster than PRE, though it exposes fewer redundancies.
|
| This flag is enabled by default at @option{-O} and higher.
|
|
|
| +@item -ftree-phiprop
|
| +@opindex ftree-phiprop
|
| +Perform hoisting of loads from conditional pointers on trees. This
|
| +pass is enabled by default at @option{-O} and higher.
|
| +
|
| @item -ftree-copy-prop
|
| @opindex ftree-copy-prop
|
| Perform copy propagation on trees. This pass eliminates unnecessary
|
| @@ -6118,9 +6535,9 @@ Enabled by default at @option{-O} and higher.
|
|
|
| @item -fipa-struct-reorg
|
| @opindex fipa-struct-reorg
|
| -Perform structure reorganization optimization, that change C-like structures
|
| -layout in order to better utilize spatial locality. This transformation is
|
| -affective for programs containing arrays of structures. Available in two
|
| +Perform structure reorganization optimization, that change C-like structures
|
| +layout in order to better utilize spatial locality. This transformation is
|
| +affective for programs containing arrays of structures. Available in two
|
| compilation modes: profile-based (enabled with @option{-fprofile-generate})
|
| or static (which uses built-in heuristics). Require @option{-fipa-type-escape}
|
| to provide the safety of this transformation. It works only in whole program
|
| @@ -6139,7 +6556,7 @@ and does not affect generated code.
|
| @opindex fipa-cp
|
| Perform interprocedural constant propagation.
|
| This optimization analyzes the program to determine when values passed
|
| -to functions are constants and then optimizes accordingly.
|
| +to functions are constants and then optimizes accordingly.
|
| This optimization can substantially increase performance
|
| if the application has constants passed to functions.
|
| This flag is enabled by default at @option{-O2}, @option{-Os} and @option{-O3}.
|
| @@ -6157,16 +6574,15 @@ This flag is enabled by default at @option{-O3}.
|
| @item -fipa-matrix-reorg
|
| @opindex fipa-matrix-reorg
|
| Perform matrix flattening and transposing.
|
| -Matrix flattening tries to replace a m-dimensional matrix
|
| -with its equivalent n-dimensional matrix, where n < m.
|
| +Matrix flattening tries to replace an @math{m}-dimensional matrix
|
| +with its equivalent @math{n}-dimensional matrix, where @math{n < m}.
|
| This reduces the level of indirection needed for accessing the elements
|
| of the matrix. The second optimization is matrix transposing that
|
| attempts to change the order of the matrix's dimensions in order to
|
| improve cache locality.
|
| -Both optimizations need the @option{-fwhole-program} flag.
|
| +Both optimizations need the @option{-fwhole-program} flag.
|
| Transposing is enabled only if profiling information is available.
|
|
|
| -
|
| @item -ftree-sink
|
| @opindex ftree-sink
|
| Perform forward store motion on trees. This flag is
|
| @@ -6190,9 +6606,9 @@ default at @option{-O} and higher.
|
|
|
| @item -ftree-builtin-call-dce
|
| @opindex ftree-builtin-call-dce
|
| -Perform conditional dead code elimination (DCE) for calls to builtin functions
|
| -that may set @code{errno} but are otherwise side-effect free. This flag is
|
| -enabled by default at @option{-O2} and higher if @option{-Os} is not also
|
| +Perform conditional dead code elimination (DCE) for calls to builtin functions
|
| +that may set @code{errno} but are otherwise side-effect free. This flag is
|
| +enabled by default at @option{-O2} and higher if @option{-Os} is not also
|
| specified.
|
|
|
| @item -ftree-dominator-opts
|
| @@ -6257,9 +6673,11 @@ Graphite loop transformation infrastructure.
|
|
|
| @item -floop-strip-mine
|
| Perform loop strip mining transformations on loops. Strip mining
|
| -splits a loop into two nested loops. The outer loop has strides
|
| -equal to the strip size and the inner loop has strides of the
|
| -original loop within a strip. For example, given a loop like:
|
| +splits a loop into two nested loops. The outer loop has strides
|
| +equal to the strip size and the inner loop has strides of the
|
| +original loop within a strip. The strip length can be changed
|
| +using the @option{loop-block-tile-size} parameter. For example,
|
| +given a loop like:
|
| @smallexample
|
| DO I = 1, N
|
| A(I) = A(I) + C
|
| @@ -6267,8 +6685,8 @@ ENDDO
|
| @end smallexample
|
| loop strip mining will transform the loop as if the user had written:
|
| @smallexample
|
| -DO II = 1, N, 4
|
| - DO I = II, min (II + 3, N)
|
| +DO II = 1, N, 51
|
| + DO I = II, min (II + 50, N)
|
| A(I) = A(I) + C
|
| ENDDO
|
| ENDDO
|
| @@ -6281,7 +6699,9 @@ enable the Graphite loop transformation infrastructure.
|
| @item -floop-block
|
| Perform loop blocking transformations on loops. Blocking strip mines
|
| each loop in the loop nest such that the memory accesses of the
|
| -element loops fit inside caches. For example, given a loop like:
|
| +element loops fit inside caches. The strip length can be changed
|
| +using the @option{loop-block-tile-size} parameter. For example, given
|
| +a loop like:
|
| @smallexample
|
| DO I = 1, N
|
| DO J = 1, M
|
| @@ -6291,10 +6711,10 @@ ENDDO
|
| @end smallexample
|
| loop blocking will transform the loop as if the user had written:
|
| @smallexample
|
| -DO II = 1, N, 64
|
| - DO JJ = 1, M, 64
|
| - DO I = II, min (II + 63, N)
|
| - DO J = JJ, min (JJ + 63, M)
|
| +DO II = 1, N, 51
|
| + DO JJ = 1, M, 51
|
| + DO I = II, min (II + 50, N)
|
| + DO J = JJ, min (JJ + 50, M)
|
| A(J, I) = B(I) + C(J)
|
| ENDDO
|
| ENDDO
|
| @@ -6309,6 +6729,21 @@ code transformation, GCC has to be configured with @option{--with-ppl}
|
| and @option{--with-cloog} to enable the Graphite loop transformation
|
| infrastructure.
|
|
|
| +@item -fgraphite-identity
|
| +@opindex fgraphite-identity
|
| +Enable the identity transformation for graphite. For every SCoP we generate
|
| +the polyhedral representation and transform it back to gimple. Using
|
| +@option{-fgraphite-identity} we can check the costs or benefits of the
|
| +GIMPLE -> GRAPHITE -> GIMPLE transformation. Some minimal optimizations
|
| +are also performed by the code generator CLooG, like index splitting and
|
| +dead code elimination in loops.
|
| +
|
| +@item -floop-parallelize-all
|
| +Use the Graphite data dependence analysis to identify loops that can
|
| +be parallelized. Parallelize all the loops that can be analyzed to
|
| +not contain loop carried dependences without checking that it is
|
| +profitable to parallelize the loops.
|
| +
|
| @item -fcheck-data-deps
|
| @opindex fcheck-data-deps
|
| Compare the results of several data dependence analyzers. This option
|
| @@ -6365,6 +6800,11 @@ rather than constrained e.g.@: by memory bandwidth. This option
|
| implies @option{-pthread}, and thus is only supported on targets
|
| that have support for @option{-pthread}.
|
|
|
| +@item -ftree-pta
|
| +@opindex ftree-pta
|
| +Perform function-local points-to analysis on trees. This flag is
|
| +enabled by default at @option{-O} and higher.
|
| +
|
| @item -ftree-sra
|
| @opindex ftree-sra
|
| Perform scalar replacement of aggregates. This pass replaces structure
|
| @@ -6391,6 +6831,11 @@ enabled by default at @option{-O} and higher.
|
| Perform loop vectorization on trees. This flag is enabled by default at
|
| @option{-O3}.
|
|
|
| +@item -ftree-slp-vectorize
|
| +@opindex ftree-slp-vectorize
|
| +Perform basic block vectorization on trees. This flag is enabled by default at
|
| +@option{-O3} and when @option{-ftree-vectorize} is enabled.
|
| +
|
| @item -ftree-vect-loop-version
|
| @opindex ftree-vect-loop-version
|
| Perform loop versioning when doing loop vectorization on trees. When a loop
|
| @@ -6722,17 +7167,253 @@ Enabled by default with @option{-funroll-loops}.
|
|
|
| @item -fwhole-program
|
| @opindex fwhole-program
|
| -Assume that the current compilation unit represents whole program being
|
| +Assume that the current compilation unit represents the whole program being
|
| compiled. All public functions and variables with the exception of @code{main}
|
| and those merged by attribute @code{externally_visible} become static functions
|
| -and in a affect gets more aggressively optimized by interprocedural optimizers.
|
| -While this option is equivalent to proper use of @code{static} keyword for
|
| -programs consisting of single file, in combination with option
|
| -@option{--combine} this flag can be used to compile most of smaller scale C
|
| -programs since the functions and variables become local for the whole combined
|
| -compilation unit, not for the single source file itself.
|
| +and in effect are optimized more aggressively by interprocedural optimizers.
|
| +While this option is equivalent to proper use of the @code{static} keyword for
|
| +programs consisting of a single file, in combination with option
|
| +@option{-combine}, @option{-flto} or @option{-fwhopr} this flag can be used to
|
| +compile many smaller scale programs since the functions and variables become
|
| +local for the whole combined compilation unit, not for the single source file
|
| +itself.
|
| +
|
| +This option implies @option{-fwhole-file} for Fortran programs.
|
| +
|
| +@item -flto
|
| +@opindex flto
|
| +This option runs the standard link-time optimizer. When invoked
|
| +with source code, it generates GIMPLE (one of GCC's internal
|
| +representations) and writes it to special ELF sections in the object
|
| +file. When the object files are linked together, all the function
|
| +bodies are read from these ELF sections and instantiated as if they
|
| +had been part of the same translation unit.
|
| +
|
| +To use the link-timer optimizer, @option{-flto} needs to be specified at
|
| +compile time and during the final link. For example,
|
| +
|
| +@smallexample
|
| +gcc -c -O2 -flto foo.c
|
| +gcc -c -O2 -flto bar.c
|
| +gcc -o myprog -flto -O2 foo.o bar.o
|
| +@end smallexample
|
| +
|
| +The first two invocations to GCC will save a bytecode representation
|
| +of GIMPLE into special ELF sections inside @file{foo.o} and
|
| +@file{bar.o}. The final invocation will read the GIMPLE bytecode from
|
| +@file{foo.o} and @file{bar.o}, merge the two files into a single
|
| +internal image, and compile the result as usual. Since both
|
| +@file{foo.o} and @file{bar.o} are merged into a single image, this
|
| +causes all the inter-procedural analyses and optimizations in GCC to
|
| +work across the two files as if they were a single one. This means,
|
| +for example, that the inliner will be able to inline functions in
|
| +@file{bar.o} into functions in @file{foo.o} and vice-versa.
|
| +
|
| +Another (simpler) way to enable link-time optimization is,
|
| +
|
| +@smallexample
|
| +gcc -o myprog -flto -O2 foo.c bar.c
|
| +@end smallexample
|
| +
|
| +The above will generate bytecode for @file{foo.c} and @file{bar.c},
|
| +merge them together into a single GIMPLE representation and optimize
|
| +them as usual to produce @file{myprog}.
|
| +
|
| +The only important thing to keep in mind is that to enable link-time
|
| +optimizations the @option{-flto} flag needs to be passed to both the
|
| +compile and the link commands.
|
| +
|
| +Note that when a file is compiled with @option{-flto}, the generated
|
| +object file will be larger than a regular object file because it will
|
| +contain GIMPLE bytecodes and the usual final code. This means that
|
| +object files with LTO information can be linked as a normal object
|
| +file. So, in the previous example, if the final link is done with
|
| +
|
| +@smallexample
|
| +gcc -o myprog foo.o bar.o
|
| +@end smallexample
|
| +
|
| +The only difference will be that no inter-procedural optimizations
|
| +will be applied to produce @file{myprog}. The two object files
|
| +@file{foo.o} and @file{bar.o} will be simply sent to the regular
|
| +linker.
|
| +
|
| +Additionally, the optimization flags used to compile individual files
|
| +are not necessarily related to those used at link-time. For instance,
|
| +
|
| +@smallexample
|
| +gcc -c -O0 -flto foo.c
|
| +gcc -c -O0 -flto bar.c
|
| +gcc -o myprog -flto -O3 foo.o bar.o
|
| +@end smallexample
|
| +
|
| +This will produce individual object files with unoptimized assembler
|
| +code, but the resulting binary @file{myprog} will be optimized at
|
| +@option{-O3}. Now, if the final binary is generated without
|
| +@option{-flto}, then @file{myprog} will not be optimized.
|
| +
|
| +When producing the final binary with @option{-flto}, GCC will only
|
| +apply link-time optimizations to those files that contain bytecode.
|
| +Therefore, you can mix and match object files and libraries with
|
| +GIMPLE bytecodes and final object code. GCC will automatically select
|
| +which files to optimize in LTO mode and which files to link without
|
| +further processing.
|
| +
|
| +There are some code generation flags that GCC will preserve when
|
| +generating bytecodes, as they need to be used during the final link
|
| +stage. Currently, the following options are saved into the GIMPLE
|
| +bytecode files: @option{-fPIC}, @option{-fcommon} and all the
|
| +@option{-m} target flags.
|
| +
|
| +At link time, these options are read-in and reapplied. Note that the
|
| +current implementation makes no attempt at recognizing conflicting
|
| +values for these options. If two or more files have a conflicting
|
| +value (e.g., one file is compiled with @option{-fPIC} and another
|
| +isn't), the compiler will simply use the last value read from the
|
| +bytecode files. It is recommended, then, that all the files
|
| +participating in the same link be compiled with the same options.
|
| +
|
| +Another feature of LTO is that it is possible to apply interprocedural
|
| +optimizations on files written in different languages. This requires
|
| +some support in the language front end. Currently, the C, C++ and
|
| +Fortran front ends are capable of emitting GIMPLE bytecodes, so
|
| +something like this should work
|
| +
|
| +@smallexample
|
| +gcc -c -flto foo.c
|
| +g++ -c -flto bar.cc
|
| +gfortran -c -flto baz.f90
|
| +g++ -o myprog -flto -O3 foo.o bar.o baz.o -lgfortran
|
| +@end smallexample
|
| +
|
| +Notice that the final link is done with @command{g++} to get the C++
|
| +runtime libraries and @option{-lgfortran} is added to get the Fortran
|
| +runtime libraries. In general, when mixing languages in LTO mode, you
|
| +should use the same link command used when mixing languages in a
|
| +regular (non-LTO) compilation. This means that if your build process
|
| +was mixing languages before, all you need to add is @option{-flto} to
|
| +all the compile and link commands.
|
| +
|
| +If LTO encounters objects with C linkage declared with incompatible
|
| +types in separate translation units to be linked together (undefined
|
| +behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
|
| +issued. The behavior is still undefined at runtime.
|
| +
|
| +If object files containing GIMPLE bytecode are stored in a library
|
| +archive, say @file{libfoo.a}, it is possible to extract and use them
|
| +in an LTO link if you are using @command{gold} as the linker (which,
|
| +in turn requires GCC to be configured with @option{--enable-gold}).
|
| +To enable this feature, use the flag @option{-fuse-linker-plugin} at
|
| +link-time:
|
| +
|
| +@smallexample
|
| +gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo
|
| +@end smallexample
|
|
|
| -This option is not supported for Fortran programs.
|
| +With the linker plugin enabled, @command{gold} will extract the needed
|
| +GIMPLE files from @file{libfoo.a} and pass them on to the running GCC
|
| +to make them part of the aggregated GIMPLE image to be optimized.
|
| +
|
| +If you are not using @command{gold} and/or do not specify
|
| +@option{-fuse-linker-plugin} then the objects inside @file{libfoo.a}
|
| +will be extracted and linked as usual, but they will not participate
|
| +in the LTO optimization process.
|
| +
|
| +Link time optimizations do not require the presence of the whole
|
| +program to operate. If the program does not require any symbols to
|
| +be exported, it is possible to combine @option{-flto} and
|
| +@option{-fwhopr} with @option{-fwhole-program} to allow the
|
| +interprocedural optimizers to use more aggressive assumptions which
|
| +may lead to improved optimization opportunities.
|
| +
|
| +Regarding portability: the current implementation of LTO makes no
|
| +attempt at generating bytecode that can be ported between different
|
| +types of hosts. The bytecode files are versioned and there is a
|
| +strict version check, so bytecode files generated in one version of
|
| +GCC will not work with an older/newer version of GCC.
|
| +
|
| +Link time optimization does not play well with generating debugging
|
| +information. Combining @option{-flto} or @option{-fwhopr} with
|
| +@option{-g} is experimental.
|
| +
|
| +This option is disabled by default.
|
| +
|
| +@item -fwhopr
|
| +@opindex fwhopr
|
| +This option is identical in functionality to @option{-flto} but it
|
| +differs in how the final link stage is executed. Instead of loading
|
| +all the function bodies in memory, the callgraph is analyzed and
|
| +optimization decisions are made (whole program analysis or WPA). Once
|
| +optimization decisions are made, the callgraph is partitioned and the
|
| +different sections are compiled separately (local transformations or
|
| +LTRANS)@. This process allows optimizations on very large programs
|
| +that otherwise would not fit in memory. This option enables
|
| +@option{-fwpa} and @option{-fltrans} automatically.
|
| +
|
| +Disabled by default.
|
| +
|
| +This option is experimental.
|
| +
|
| +@item -fwpa
|
| +@opindex fwpa
|
| +This is an internal option used by GCC when compiling with
|
| +@option{-fwhopr}. You should never need to use it.
|
| +
|
| +This option runs the link-time optimizer in the whole-program-analysis
|
| +(WPA) mode, which reads in summary information from all inputs and
|
| +performs a whole-program analysis based on summary information only.
|
| +It generates object files for subsequent runs of the link-time
|
| +optimizer where individual object files are optimized using both
|
| +summary information from the WPA mode and the actual function bodies.
|
| +It then drives the LTRANS phase.
|
| +
|
| +Disabled by default.
|
| +
|
| +@item -fltrans
|
| +@opindex fltrans
|
| +This is an internal option used by GCC when compiling with
|
| +@option{-fwhopr}. You should never need to use it.
|
| +
|
| +This option runs the link-time optimizer in the local-transformation (LTRANS)
|
| +mode, which reads in output from a previous run of the LTO in WPA mode.
|
| +In the LTRANS mode, LTO optimizes an object and produces the final assembly.
|
| +
|
| +Disabled by default.
|
| +
|
| +@item -fltrans-output-list=@var{file}
|
| +@opindex fltrans-output-list
|
| +This is an internal option used by GCC when compiling with
|
| +@option{-fwhopr}. You should never need to use it.
|
| +
|
| +This option specifies a file to which the names of LTRANS output files are
|
| +written. This option is only meaningful in conjunction with @option{-fwpa}.
|
| +
|
| +Disabled by default.
|
| +
|
| +@item -flto-compression-level=@var{n}
|
| +This option specifies the level of compression used for intermediate
|
| +language written to LTO object files, and is only meaningful in
|
| +conjunction with LTO mode (@option{-fwhopr}, @option{-flto}). Valid
|
| +values are 0 (no compression) to 9 (maximum compression). Values
|
| +outside this range are clamped to either 0 or 9. If the option is not
|
| +given, a default balanced compression setting is used.
|
| +
|
| +@item -flto-report
|
| +Prints a report with internal details on the workings of the link-time
|
| +optimizer. The contents of this report vary from version to version,
|
| +it is meant to be useful to GCC developers when processing object
|
| +files in LTO mode (via @option{-fwhopr} or @option{-flto}).
|
| +
|
| +Disabled by default.
|
| +
|
| +@item -fuse-linker-plugin
|
| +Enables the extraction of objects with GIMPLE bytecode information
|
| +from library archives. This option relies on features available only
|
| +in @command{gold}, so to use this you must configure GCC with
|
| +@option{--enable-gold}. See @option{-flto} for a description on the
|
| +effect of this flag and how to use it.
|
| +
|
| +Disabled by default.
|
|
|
| @item -fcprop-registers
|
| @opindex fcprop-registers
|
| @@ -6755,7 +7436,7 @@ default, GCC will emit an error message when an inconsistent profile is detected
|
| Set the directory to search the profile data files in to @var{path}.
|
| This option affects only the profile data generated by
|
| @option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs}
|
| -and used by @option{-fprofile-use} and @option{-fbranch-probabilities}
|
| +and used by @option{-fprofile-use} and @option{-fbranch-probabilities}
|
| and its related options.
|
| By default, GCC will use the current directory as @var{path}
|
| thus the profile data file will appear in the same directory as the object file.
|
| @@ -6812,6 +7493,32 @@ good, but a few programs rely on the precise definition of IEEE floating
|
| point. Use @option{-ffloat-store} for such programs, after modifying
|
| them to store all pertinent intermediate computations into variables.
|
|
|
| +@item -fexcess-precision=@var{style}
|
| +@opindex fexcess-precision
|
| +This option allows further control over excess precision on machines
|
| +where floating-point registers have more precision than the IEEE
|
| +@code{float} and @code{double} types and the processor does not
|
| +support operations rounding to those types. By default,
|
| +@option{-fexcess-precision=fast} is in effect; this means that
|
| +operations are carried out in the precision of the registers and that
|
| +it is unpredictable when rounding to the types specified in the source
|
| +code takes place. When compiling C, if
|
| +@option{-fexcess-precision=standard} is specified then excess
|
| +precision will follow the rules specified in ISO C99; in particular,
|
| +both casts and assignments cause values to be rounded to their
|
| +semantic types (whereas @option{-ffloat-store} only affects
|
| +assignments). This option is enabled by default for C if a strict
|
| +conformance option such as @option{-std=c99} is used.
|
| +
|
| +@opindex mfpmath
|
| +@option{-fexcess-precision=standard} is not implemented for languages
|
| +other than C, and has no effect if
|
| +@option{-funsafe-math-optimizations} or @option{-ffast-math} is
|
| +specified. On the x86, it also has no effect if @option{-mfpmath=sse}
|
| +or @option{-mfpmath=sse+387} is specified; in the former case, IEEE
|
| +semantics apply without excess precision, and in the latter, rounding
|
| +is unpredictable.
|
| +
|
| @item -ffast-math
|
| @opindex ffast-math
|
| Sets @option{-fno-math-errno}, @option{-funsafe-math-optimizations},
|
| @@ -6876,7 +7583,9 @@ thus cannot be used on a code which relies on rounding behavior like
|
| and thus may not be used when ordered comparisons are required.
|
| This option requires that both @option{-fno-signed-zeros} and
|
| @option{-fno-trapping-math} be in effect. Moreover, it doesn't make
|
| -much sense with @option{-frounding-math}.
|
| +much sense with @option{-frounding-math}. For Fortran the option
|
| +is automatically enabled when both @option{-fno-signed-zeros} and
|
| +@option{-fno-trapping-math} are in effect.
|
|
|
| The default is @option{-fno-associative-math}.
|
|
|
| @@ -6949,14 +7658,6 @@ Future versions of GCC may provide finer control of this setting
|
| using C99's @code{FENV_ACCESS} pragma. This command line option
|
| will be used to specify the default state for @code{FENV_ACCESS}.
|
|
|
| -@item -frtl-abstract-sequences
|
| -@opindex frtl-abstract-sequences
|
| -It is a size optimization method. This option is to find identical
|
| -sequences of code, which can be turned into pseudo-procedures and
|
| -then replace all occurrences with calls to the newly created
|
| -subroutine. It is kind of an opposite of @option{-finline-functions}.
|
| -This optimization runs at RTL level.
|
| -
|
| @item -fsignaling-nans
|
| @opindex fsignaling-nans
|
| Compile code assuming that IEEE signaling NaNs may generate user-visible
|
| @@ -7056,7 +7757,7 @@ debug information format adopted by the target, however, it can
|
| make debugging impossible, since variables will no longer stay in
|
| a ``home register''.
|
|
|
| -Enabled by default with @option{-funroll-loops}.
|
| +Enabled by default with @option{-funroll-loops} and @option{-fpeel-loops}.
|
|
|
| @item -ftracer
|
| @opindex ftracer
|
| @@ -7200,29 +7901,16 @@ In each case, the @var{value} is an integer. The allowable choices for
|
| @var{name} are given in the following table:
|
|
|
| @table @gcctabopt
|
| -@item sra-max-structure-size
|
| -The maximum structure size, in bytes, at which the scalar replacement
|
| -of aggregates (SRA) optimization will perform block copies. The
|
| -default value, 0, implies that GCC will select the most appropriate
|
| -size itself.
|
| -
|
| -@item sra-field-structure-ratio
|
| -The threshold ratio (as a percentage) between instantiated fields and
|
| -the complete structure size. We say that if the ratio of the number
|
| -of bytes in instantiated fields to the number of bytes in the complete
|
| -structure exceeds this parameter, then block copies are not used. The
|
| -default is 75.
|
| -
|
| @item struct-reorg-cold-struct-ratio
|
| The threshold ratio (as a percentage) between a structure frequency
|
| and the frequency of the hottest structure in the program. This parameter
|
| is used by struct-reorg optimization enabled by @option{-fipa-struct-reorg}.
|
| -We say that if the ratio of a structure frequency, calculated by profiling,
|
| -to the hottest structure frequency in the program is less than this
|
| +We say that if the ratio of a structure frequency, calculated by profiling,
|
| +to the hottest structure frequency in the program is less than this
|
| parameter, then structure reorganization is not applied to this structure.
|
| The default is 10.
|
|
|
| -@item predictable-branch-cost-outcome
|
| +@item predictable-branch-outcome
|
| When branch is predicted to be taken with probability lower than this threshold
|
| (in percent), then it is considered well predictable. The default is 10.
|
|
|
| @@ -7274,9 +7962,6 @@ order to perform the global common subexpression elimination
|
| optimization. If more memory than specified is required, the
|
| optimization will not be done.
|
|
|
| -@item max-gcse-passes
|
| -The maximum number of passes of GCSE to run. The default is 1.
|
| -
|
| @item max-pending-list-length
|
| The maximum number of pending dependencies scheduling will allow
|
| before flushing the current state and starting over. Large functions
|
| @@ -7289,7 +7974,7 @@ This number sets the maximum number of instructions (counted in GCC's
|
| internal representation) in a single function that the tree inliner
|
| will consider for inlining. This only affects functions declared
|
| inline and methods implemented in a class declaration (C++).
|
| -The default value is 450.
|
| +The default value is 300.
|
|
|
| @item max-inline-insns-auto
|
| When you use @option{-finline-functions} (included in @option{-O3}),
|
| @@ -7297,7 +7982,7 @@ a lot of functions that would otherwise not be considered for inlining
|
| by the compiler will be investigated. To those functions, a different
|
| (more restrictive) limit compared to functions declared inline can
|
| be applied.
|
| -The default value is 90.
|
| +The default value is 50.
|
|
|
| @item large-function-insns
|
| The limit specifying really large functions. For functions larger than this
|
| @@ -7375,14 +8060,15 @@ 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
|
| -functions and at the same time increases size of leaf function that is believed to
|
| -reduce function size by being inlined. In effect it increases amount of
|
| -inlining for code having large abstraction penalty (many functions that just
|
| -pass the arguments to other functions) and decrease inlining for code with low
|
| -abstraction penalty. The default value is 12.
|
| +@item early-inlining-insns
|
| +Specify growth that early inliner can make. In effect it increases amount of
|
| +inlining for code having large abstraction penalty. The default value is 8.
|
| +
|
| +@item max-early-inliner-iterations
|
| +@itemx max-early-inliner-iterations
|
| +Limit of iterations of early inliner. This basically bounds number of nested
|
| +indirect calls early inliner can resolve. Deeper chains are still handled by
|
| +late inlining.
|
|
|
| @item min-vect-loop-bound
|
| The minimum number of iterations under which a loop will not get vectorized
|
| @@ -7417,6 +8103,9 @@ The maximum number of insns of a completely peeled loop.
|
| @item max-completely-peel-times
|
| The maximum number of iterations of a loop to be suitable for complete peeling.
|
|
|
| +@item max-completely-peel-loop-nest-depth
|
| +The maximum depth of a loop nest suitable for complete peeling.
|
| +
|
| @item max-unswitch-insns
|
| The maximum number of insns of an unswitched loop.
|
|
|
| @@ -7553,32 +8242,6 @@ 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 max-aliased-vops
|
| -
|
| -Maximum number of virtual operands per function allowed to represent
|
| -aliases before triggering the alias partitioning heuristic. Alias
|
| -partitioning reduces compile times and memory consumption needed for
|
| -aliasing at the expense of precision loss in alias information. The
|
| -default value for this parameter is 100 for -O1, 500 for -O2 and 1000
|
| -for -O3.
|
| -
|
| -Notice that if a function contains more memory statements than the
|
| -value of this parameter, it is not really possible to achieve this
|
| -reduction. In this case, the compiler will use the number of memory
|
| -statements as the value for @option{max-aliased-vops}.
|
| -
|
| -@item avg-aliased-vops
|
| -
|
| -Average number of virtual operands per statement allowed to represent
|
| -aliases before triggering the alias partitioning heuristic. This
|
| -works in conjunction with @option{max-aliased-vops}. If a function
|
| -contains more than @option{max-aliased-vops} virtual operators, then
|
| -memory symbols will be grouped into memory partitions until either the
|
| -total number of virtual operators is below @option{max-aliased-vops}
|
| -or the average number of virtual operators per memory statement is
|
| -below @option{avg-aliased-vops}. The default value for this parameter
|
| -is 1 for -O1 and -O2, and 3 for -O3.
|
| -
|
| @item ggc-min-expand
|
|
|
| GCC uses a garbage collector to manage its own memory allocation. This
|
| @@ -7688,8 +8351,8 @@ depth of search for available instructions.
|
| The default value is 50.
|
|
|
| @item selsched-max-sched-times
|
| -The maximum number of times that an instruction will be scheduled during
|
| -selective scheduling. This is the limit on the number of iterations
|
| +The maximum number of times that an instruction will be scheduled during
|
| +selective scheduling. This is the limit on the number of iterations
|
| through which the instruction may be pipelined. The default value is 2.
|
|
|
| @item selsched-max-insns-to-rename
|
| @@ -7749,6 +8412,15 @@ The size of L1 cache, in kilobytes.
|
| @item l2-cache-size
|
| The size of L2 cache, in kilobytes.
|
|
|
| +@item min-insn-to-prefetch-ratio
|
| +The minimum ratio between the number of instructions and the
|
| +number of prefetches to enable prefetching in a loop with an
|
| +unknown trip count.
|
| +
|
| +@item prefetch-min-insn-to-mem-ratio
|
| +The minimum ratio between the number of instructions and the
|
| +number of memory references to enable prefetching in a loop.
|
| +
|
| @item use-canonical-types
|
| Whether the compiler should use the ``canonical'' type system. By
|
| default, this should always be 1, which uses a more efficient internal
|
| @@ -7793,6 +8465,14 @@ lower quality register allocation algorithm will be used. The
|
| algorithm do not use pseudo-register conflicts. The default value of
|
| the parameter is 2000.
|
|
|
| +@item ira-loop-reserved-regs
|
| +IRA can be used to evaluate more accurate register pressure in loops
|
| +for decision to move loop invariants (see @option{-O3}). The number
|
| +of available registers reserved for some other purposes is described
|
| +by this parameter. The default value of the parameter is 2 which is
|
| +minimal number of registers needed for execution of typical
|
| +instruction. This value is the best found from numerous experiments.
|
| +
|
| @item loop-invariant-max-bbs-in-loop
|
| Loop invariant motion can be very expensive, both in compile time and
|
| in amount of needed compile time memory, with very large loops. Loops
|
| @@ -7800,6 +8480,45 @@ with more basic blocks than this parameter won't have loop invariant
|
| motion optimization performed on them. The default value of the
|
| parameter is 1000 for -O1 and 10000 for -O2 and above.
|
|
|
| +@item max-vartrack-size
|
| +Sets a maximum number of hash table slots to use during variable
|
| +tracking dataflow analysis of any function. If this limit is exceeded
|
| +with variable tracking at assignments enabled, analysis for that
|
| +function is retried without it, after removing all debug insns from
|
| +the function. If the limit is exceeded even without debug insns, var
|
| +tracking analysis is completely disabled for the function. Setting
|
| +the parameter to zero makes it unlimited.
|
| +
|
| +@item min-nondebug-insn-uid
|
| +Use uids starting at this parameter for nondebug insns. The range below
|
| +the parameter is reserved exclusively for debug insns created by
|
| +@option{-fvar-tracking-assignments}, but debug insns may get
|
| +(non-overlapping) uids above it if the reserved range is exhausted.
|
| +
|
| +@item ipa-sra-ptr-growth-factor
|
| +IPA-SRA will replace a pointer to an aggregate with one or more new
|
| +parameters only when their cumulative size is less or equal to
|
| +@option{ipa-sra-ptr-growth-factor} times the size of the original
|
| +pointer parameter.
|
| +
|
| +@item graphite-max-nb-scop-params
|
| +To avoid exponential effects in the Graphite loop transforms, the
|
| +number of parameters in a Static Control Part (SCoP) is bounded. The
|
| +default value is 10 parameters. A variable whose value is unknown at
|
| +compile time and defined outside a SCoP is a parameter of the SCoP.
|
| +
|
| +@item graphite-max-bbs-per-function
|
| +To avoid exponential effects in the detection of SCoPs, the size of
|
| +the functions analyzed by Graphite is bounded. The default value is
|
| +100 basic blocks.
|
| +
|
| +@item loop-block-tile-size
|
| +Loop blocking or strip mining transforms, enabled with
|
| +@option{-floop-block} or @option{-floop-strip-mine}, strip mine each
|
| +loop in the loop nest by a given number of iterations. The strip
|
| +length can be changed using the @option{loop-block-tile-size}
|
| +parameter. The default value is 51 iterations.
|
| +
|
| @end table
|
| @end table
|
|
|
| @@ -7936,7 +8655,9 @@ or @option{-nodefaultlibs} is used.
|
| @item -nodefaultlibs
|
| @opindex nodefaultlibs
|
| Do not use the standard system libraries when linking.
|
| -Only the libraries you specify will be passed to the linker.
|
| +Only the libraries you specify will be passed to the linker, options
|
| +specifying linkage of the system libraries, such as @code{-static-libgcc}
|
| +or @code{-shared-libgcc}, will be ignored.
|
| The standard startup files are used normally, unless @option{-nostartfiles}
|
| is used. The compiler may generate calls to @code{memcmp},
|
| @code{memset}, @code{memcpy} and @code{memmove}.
|
| @@ -7948,7 +8669,9 @@ mechanism when this option is specified.
|
| @opindex nostdlib
|
| Do not use the standard system startup files or libraries when linking.
|
| No startup files and only the libraries you specify will be passed to
|
| -the linker. The compiler may generate calls to @code{memcmp}, @code{memset},
|
| +the linker, options specifying linkage of the system libraries, such as
|
| +@code{-static-libgcc} or @code{-shared-libgcc}, will be ignored.
|
| +The compiler may generate calls to @code{memcmp}, @code{memset},
|
| @code{memcpy} and @code{memmove}.
|
| These entries are usually resolved by entries in
|
| libc. These entry points should be supplied through some other
|
| @@ -8049,6 +8772,18 @@ for the languages used in the program, or using the option
|
| @option{-shared-libgcc}, such that it is linked with the shared
|
| @file{libgcc}.
|
|
|
| +@item -static-libstdc++
|
| +When the @command{g++} program is used to link a C++ program, it will
|
| +normally automatically link against @option{libstdc++}. If
|
| +@file{libstdc++} is available as a shared library, and the
|
| +@option{-static} option is not used, then this will link against the
|
| +shared version of @file{libstdc++}. That is normally fine. However, it
|
| +is sometimes useful to freeze the version of @file{libstdc++} used by
|
| +the program without going all the way to a fully static link. The
|
| +@option{-static-libstdc++} option directs the @command{g++} driver to
|
| +link @file{libstdc++} statically, without necessarily linking other
|
| +libraries statically.
|
| +
|
| @item -symbolic
|
| @opindex symbolic
|
| Bind references to global symbols when building a shared object. Warn
|
| @@ -8061,7 +8796,7 @@ this option.
|
| @cindex linker script
|
| Use @var{script} as the linker script. This option is supported by most
|
| systems using the GNU linker. On some targets, such as bare-board
|
| -targets without an operating system, the @option{-T} option may be required
|
| +targets without an operating system, the @option{-T} option may be required
|
| when linking to avoid references to undefined symbols.
|
|
|
| @item -Xlinker @var{option}
|
| @@ -8077,7 +8812,7 @@ For example, to pass @option{-assert definitions}, you must write
|
| @option{-Xlinker "-assert definitions"}, because this passes the entire
|
| string as a single argument, which is not what the linker expects.
|
|
|
| -When using the GNU linker, it is usually more convenient to pass
|
| +When using the GNU linker, it is usually more convenient to pass
|
| arguments to linker options using the @option{@var{option}=@var{value}}
|
| syntax than as separate arguments. For example, you can specify
|
| @samp{-Xlinker -Map=output.map} rather than
|
| @@ -8088,7 +8823,7 @@ this syntax for command-line options.
|
| @opindex Wl
|
| Pass @var{option} as an option to the linker. If @var{option} contains
|
| commas, it is split into multiple options at the commas. You can use this
|
| -syntax to pass an argument to the option.
|
| +syntax to pass an argument to the option.
|
| For example, @samp{-Wl,-Map,output.map} passes @samp{-Map output.map} to the
|
| linker. When using the GNU linker, you can also get the same effect with
|
| @samp{-Wl,-Map=output.map}.
|
| @@ -8497,7 +9232,16 @@ and @option{-imultilib} as necessary.
|
| @item %s
|
| Current argument is the name of a library or startup file of some sort.
|
| Search for that file in a standard list of directories and substitute
|
| -the full name found.
|
| +the full name found. The current working directory is included in the
|
| +list of directories scanned.
|
| +
|
| +@item %T
|
| +Current argument is the name of a linker script. Search for that file
|
| +in the current list of directories to scan for libraries. If the file
|
| +is located insert a @option{--script} option into the command line
|
| +followed by the full path name found. If the file is not found then
|
| +generate an error message. Note: the current working directory is not
|
| +searched.
|
|
|
| @item %e@var{str}
|
| Print @var{str} as an error message. @var{str} is terminated by a newline.
|
| @@ -8854,11 +9598,14 @@ platform.
|
| * i386 and x86-64 Options::
|
| * i386 and x86-64 Windows Options::
|
| * IA-64 Options::
|
| +* IA-64/VMS Options::
|
| +* LM32 Options::
|
| * M32C Options::
|
| * M32R/D Options::
|
| * M680x0 Options::
|
| * M68hc1x Options::
|
| * MCore Options::
|
| +* MeP Options::
|
| * MIPS Options::
|
| * MMIX Options::
|
| * MN10300 Options::
|
| @@ -8866,6 +9613,7 @@ platform.
|
| * picoChip Options::
|
| * PowerPC Options::
|
| * RS/6000 and PowerPC Options::
|
| +* RX Options::
|
| * S/390 and zSeries Options::
|
| * Score Options::
|
| * SH Options::
|
| @@ -9008,18 +9756,13 @@ default is @option{-msched-prolog}.
|
| Specifies which floating-point ABI to use. Permissible values
|
| are: @samp{soft}, @samp{softfp} and @samp{hard}.
|
|
|
| -Specifying @samp{soft} causes GCC to generate output containing
|
| +Specifying @samp{soft} causes GCC to generate output containing
|
| library calls for floating-point operations.
|
| -@samp{softfp} allows the generation of code using hardware floating-point
|
| -instructions, but still uses the soft-float calling conventions.
|
| -@samp{hard} allows generation of floating-point instructions
|
| +@samp{softfp} allows the generation of code using hardware floating-point
|
| +instructions, but still uses the soft-float calling conventions.
|
| +@samp{hard} allows generation of floating-point instructions
|
| and uses FPU-specific calling conventions.
|
|
|
| -Using @option{-mfloat-abi=hard} with VFP coprocessors is not supported.
|
| -Use @option{-mfloat-abi=softfp} with the appropriate @option{-mfpu} option
|
| -to allow the compiler to generate code that makes use of the hardware
|
| -floating-point capabilities for these CPUs.
|
| -
|
| The default depends on the specific target configuration. Note that
|
| the hard-float and soft-float ABIs are not link-compatible; you must
|
| compile your entire program with the same ABI, and link with a
|
| @@ -9072,10 +9815,11 @@ assembly code. Permissible names are: @samp{arm2}, @samp{arm250},
|
| @samp{arm10tdmi}, @samp{arm1020t}, @samp{arm1026ej-s},
|
| @samp{arm10e}, @samp{arm1020e}, @samp{arm1022e},
|
| @samp{arm1136j-s}, @samp{arm1136jf-s}, @samp{mpcore}, @samp{mpcorenovfp},
|
| -@samp{arm1156t2-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s},
|
| -@samp{cortex-a8}, @samp{cortex-a9},
|
| +@samp{arm1156t2-s}, @samp{arm1156t2f-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s},
|
| +@samp{cortex-a5}, @samp{cortex-a8}, @samp{cortex-a9},
|
| @samp{cortex-r4}, @samp{cortex-r4f}, @samp{cortex-m3},
|
| @samp{cortex-m1},
|
| +@samp{cortex-m0},
|
| @samp{xscale}, @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}.
|
|
|
| @item -mtune=@var{name}
|
| @@ -9110,14 +9854,24 @@ of the @option{-mcpu=} option. Permissible names are: @samp{armv2},
|
| @opindex mfp
|
| This specifies what floating point hardware (or hardware emulation) is
|
| available on the target. Permissible names are: @samp{fpa}, @samp{fpe2},
|
| -@samp{fpe3}, @samp{maverick}, @samp{vfp}, @samp{vfpv3}, @samp{vfpv3-d16} and
|
| -@samp{neon}. @option{-mfp} and @option{-mfpe}
|
| -are synonyms for @option{-mfpu}=@samp{fpe}@var{number}, for compatibility
|
| -with older versions of GCC@.
|
| +@samp{fpe3}, @samp{maverick}, @samp{vfp}, @samp{vfpv3}, @samp{vfpv3-fp16},
|
| +@samp{vfpv3-d16}, @samp{vfpv3-d16-fp16}, @samp{vfpv3xd}, @samp{vfpv3xd-fp16},
|
| +@samp{neon}, @samp{neon-fp16}, @samp{vfpv4}, @samp{vfpv4-d16},
|
| +@samp{fpv4-sp-d16} and @samp{neon-vfpv4}.
|
| +@option{-mfp} and @option{-mfpe} are synonyms for
|
| +@option{-mfpu}=@samp{fpe}@var{number}, for compatibility with older versions
|
| +of GCC@.
|
|
|
| If @option{-msoft-float} is specified this specifies the format of
|
| floating point values.
|
|
|
| +@item -mfp16-format=@var{name}
|
| +@opindex mfp16-format
|
| +Specify the format of the @code{__fp16} half-precision floating-point type.
|
| +Permissible names are @samp{none}, @samp{ieee}, and @samp{alternative};
|
| +the default is @samp{none}, in which case the @code{__fp16} type is not
|
| +defined. @xref{Half-Precision}, for more information.
|
| +
|
| @item -mstructure-size-boundary=@var{n}
|
| @opindex mstructure-size-boundary
|
| The size of all structures and unions will be rounded up to a multiple
|
| @@ -9219,7 +9973,10 @@ Generate code for the Thumb instruction set. The default is to
|
| use the 32-bit ARM instruction set.
|
| This option automatically enables either 16-bit Thumb-1 or
|
| mixed 16/32-bit Thumb-2 instructions based on the @option{-mcpu=@var{name}}
|
| -and @option{-march=@var{name}} options.
|
| +and @option{-march=@var{name}} options. This option is not passed to the
|
| +assembler. If you want to force assembler files to be interpreted as Thumb code,
|
| +either add a @samp{.thumb} directive to the source or pass the @option{-mthumb}
|
| +option directly to the assembler by prefixing it with @option{-Wa}.
|
|
|
| @item -mtpcs-frame
|
| @opindex mtpcs-frame
|
| @@ -9238,14 +9995,17 @@ not call any other functions.) The default is @option{-mno-apcs-leaf-frame}.
|
| Gives all externally visible functions in the file being compiled an ARM
|
| instruction set header which switches to Thumb mode before executing the
|
| rest of the function. This allows these functions to be called from
|
| -non-interworking code.
|
| +non-interworking code. This option is not valid in AAPCS configurations
|
| +because interworking is enabled by default.
|
|
|
| @item -mcaller-super-interworking
|
| @opindex mcaller-super-interworking
|
| Allows calls via function pointers (including virtual functions) to
|
| execute correctly regardless of whether the target code has been
|
| compiled for interworking or not. There is a small overhead in the cost
|
| -of executing a function pointer if this option is enabled.
|
| +of executing a function pointer if this option is enabled. This option
|
| +is not valid in AAPCS configurations because interworking is enabled
|
| +by default.
|
|
|
| @item -mtp=@var{name}
|
| @opindex mtp
|
| @@ -9295,10 +10055,6 @@ Instruction set avr5 is for the enhanced AVR core with up to 128K program
|
| memory space (MCU types: atmega16, atmega161, atmega163, atmega32, atmega323,
|
| atmega64, atmega128, at43usb355, at94k).
|
|
|
| -@item -msize
|
| -@opindex msize
|
| -Output instruction sizes to the asm file.
|
| -
|
| @item -mno-interrupts
|
| @opindex mno-interrupts
|
| Generated code is not compatible with hardware interrupts.
|
| @@ -9309,12 +10065,6 @@ Code size will be smaller.
|
| Functions prologues/epilogues expanded as call to appropriate
|
| subroutines. Code size will be smaller.
|
|
|
| -@item -mno-tablejump
|
| -@opindex mno-tablejump
|
| -Do not generate tablejump insns which sometimes increase code size.
|
| -The option is now deprecated in favor of the equivalent
|
| -@option{-fno-jump-tables}
|
| -
|
| @item -mtiny-stack
|
| @opindex mtiny-stack
|
| Change only the low 8 bits of the stack pointer.
|
| @@ -9322,7 +10072,7 @@ Change only the low 8 bits of the stack pointer.
|
| @item -mint8
|
| @opindex mint8
|
| Assume int to be 8 bit integer. This affects the sizes of all types: A
|
| -char will be 1 byte, an int will be 1 byte, an long will be 2 bytes
|
| +char will be 1 byte, an int will be 1 byte, a long will be 2 bytes
|
| and long long will be 4 bytes. Please note that this option does not
|
| comply to the C standards, but it will provide you with smaller code
|
| size.
|
| @@ -9341,6 +10091,7 @@ can be one of @samp{bf512}, @samp{bf514}, @samp{bf516}, @samp{bf518},
|
| @samp{bf527}, @samp{bf531}, @samp{bf532}, @samp{bf533},
|
| @samp{bf534}, @samp{bf536}, @samp{bf537}, @samp{bf538}, @samp{bf539},
|
| @samp{bf542}, @samp{bf544}, @samp{bf547}, @samp{bf548}, @samp{bf549},
|
| +@samp{bf542m}, @samp{bf544m}, @samp{bf547m}, @samp{bf548m}, @samp{bf549m},
|
| @samp{bf561}.
|
| The optional @var{sirevision} specifies the silicon revision of the target
|
| Blackfin processor. Any workarounds available for the targeted silicon revision
|
| @@ -9509,7 +10260,7 @@ one application per core programming model. Proper start files
|
| and link scripts will be used to support Core B. This option
|
| defines @code{__BFIN_COREB}. When this option is used, coreb_main
|
| should be used instead of main. It must be used with
|
| -@option{-mmulticore}.
|
| +@option{-mmulticore}.
|
|
|
| @item -msdram
|
| @opindex msdram
|
| @@ -9693,7 +10444,7 @@ that GCC is targetting, like @option{-mcpu} or @option{-march}. The
|
| The Darwin tools vary in their behavior when presented with an ISA
|
| mismatch. The assembler, @file{as}, will only permit instructions to
|
| be used that are valid for the subtype of the file it is generating,
|
| -so you cannot put 64-bit instructions in an @samp{ppc750} object file.
|
| +so you cannot put 64-bit instructions in a @samp{ppc750} object file.
|
| The linker for shared libraries, @file{/usr/bin/libtool}, will fail
|
| and print an error if asked to create a shared library with a less
|
| restrictive subtype than its input files (for instance, trying to put
|
| @@ -10281,6 +11032,15 @@ These @samp{-m} options are defined for the DEC Alpha/VMS implementations:
|
| @opindex mvms-return-codes
|
| Return VMS condition codes from main. The default is to return POSIX
|
| style condition (e.g.@: error) codes.
|
| +
|
| +@item -mdebug-main=@var{prefix}
|
| +@opindex mdebug-main=@var{prefix}
|
| +Flag the first routine whose name starts with @var{prefix} as the main
|
| +routine for the debugger.
|
| +
|
| +@item -mmalloc64
|
| +@opindex mmalloc64
|
| +Default to 64bit memory allocation routines.
|
| @end table
|
|
|
| @node FR30 Options
|
| @@ -10413,12 +11173,12 @@ optimization option such as @option{-O3} or above is present in the
|
| command line.
|
|
|
| @item -mTLS
|
| -@opindex TLS
|
| +@opindex mTLS
|
|
|
| Assume a large TLS segment when generating thread-local code.
|
|
|
| @item -mtls
|
| -@opindex tls
|
| +@opindex mtls
|
|
|
| Do not assume a large TLS segment when generating thread-local code.
|
|
|
| @@ -10800,7 +11560,7 @@ Generate the predefine, @code{_SIO}, for server IO@. The default is
|
| options are available under HP-UX and HI-UX@.
|
|
|
| @item -mgnu-ld
|
| -@opindex gnu-ld
|
| +@opindex mgnu-ld
|
| Use GNU ld specific options. This passes @option{-shared} to ld when
|
| building a shared library. It is the default when GCC is configured,
|
| explicitly or implicitly, with the GNU linker. This option does not
|
| @@ -10812,7 +11572,7 @@ 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
|
| +@opindex mhp-ld
|
| Use HP ld specific options. This passes @option{-b} to ld when building
|
| a shared library and passes @option{+Accept TypeMismatch} to ld on all
|
| links. It is the default when GCC is configured, explicitly or
|
| @@ -10976,39 +11736,42 @@ SSE2 and SSE3 instruction set support.
|
| @item core2
|
| Intel Core2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3
|
| instruction set support.
|
| +@item atom
|
| +Intel Atom CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3
|
| +instruction set support.
|
| @item k6
|
| AMD K6 CPU with MMX instruction set support.
|
| @item k6-2, k6-3
|
| -Improved versions of AMD K6 CPU with MMX and 3dNOW!@: instruction set support.
|
| +Improved versions of AMD K6 CPU with MMX and 3DNow!@: instruction set support.
|
| @item athlon, athlon-tbird
|
| -AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW!@: and SSE prefetch instructions
|
| +AMD Athlon CPU with MMX, 3dNOW!, enhanced 3DNow!@: and SSE prefetch instructions
|
| support.
|
| @item athlon-4, athlon-xp, athlon-mp
|
| -Improved AMD Athlon CPU with MMX, 3dNOW!, enhanced 3dNOW!@: and full SSE
|
| +Improved AMD Athlon CPU with MMX, 3DNow!, enhanced 3DNow!@: and full SSE
|
| instruction set support.
|
| @item k8, opteron, athlon64, athlon-fx
|
| AMD K8 core based CPUs with x86-64 instruction set support. (This supersets
|
| -MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW!@: and 64-bit instruction set extensions.)
|
| +MMX, SSE, SSE2, 3DNow!, enhanced 3DNow!@: and 64-bit instruction set extensions.)
|
| @item k8-sse3, opteron-sse3, athlon64-sse3
|
| Improved versions of k8, opteron and athlon64 with SSE3 instruction set support.
|
| @item amdfam10, barcelona
|
| AMD Family 10h core based CPUs with x86-64 instruction set support. (This
|
| -supersets MMX, SSE, SSE2, SSE3, SSE4A, 3dNOW!, enhanced 3dNOW!, ABM and 64-bit
|
| +supersets MMX, SSE, SSE2, SSE3, SSE4A, 3DNow!, enhanced 3DNow!, ABM and 64-bit
|
| instruction set extensions.)
|
| @item winchip-c6
|
| IDT Winchip C6 CPU, dealt in same way as i486 with additional MMX instruction
|
| set support.
|
| @item winchip2
|
| -IDT Winchip2 CPU, dealt in same way as i486 with additional MMX and 3dNOW!@:
|
| +IDT Winchip2 CPU, dealt in same way as i486 with additional MMX and 3DNow!@:
|
| instruction set support.
|
| @item c3
|
| -Via C3 CPU with MMX and 3dNOW!@: instruction set support. (No scheduling is
|
| +Via C3 CPU with MMX and 3DNow!@: instruction set support. (No scheduling is
|
| implemented for this chip.)
|
| @item c3-2
|
| Via C3-2 CPU with MMX and SSE instruction set support. (No scheduling is
|
| implemented for this chip.)
|
| @item geode
|
| -Embedded AMD CPU with MMX and 3dNOW! instruction set support.
|
| +Embedded AMD CPU with MMX and 3DNow!@: instruction set support.
|
| @end table
|
|
|
| While picking a specific @var{cpu-type} will schedule things appropriately
|
| @@ -11027,7 +11790,7 @@ specifying @option{-march=@var{cpu-type}} implies @option{-mtune=@var{cpu-type}}
|
| A deprecated synonym for @option{-mtune}.
|
|
|
| @item -mfpmath=@var{unit}
|
| -@opindex march
|
| +@opindex mfpmath
|
| Generate floating point arithmetics for selected unit @var{unit}. The choices
|
| for @var{unit} are:
|
|
|
| @@ -11243,7 +12006,7 @@ Setting the rounding of floating-point operations to less than the default
|
| libraries assume that extended precision (80 bit) floating-point operations
|
| are enabled by default; routines in such libraries could suffer significant
|
| loss of accuracy, typically through so-called "catastrophic cancellation",
|
| -when this option is used to set the precision to less than extended precision.
|
| +when this option is used to set the precision to less than extended precision.
|
|
|
| @item -mstackrealign
|
| @opindex mstackrealign
|
| @@ -11309,8 +12072,12 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}.
|
| @itemx -mno-pclmul
|
| @itemx -msse4a
|
| @itemx -mno-sse4a
|
| -@itemx -msse5
|
| -@itemx -mno-sse5
|
| +@itemx -mfma4
|
| +@itemx -mno-fma4
|
| +@itemx -mxop
|
| +@itemx -mno-xop
|
| +@itemx -mlwp
|
| +@itemx -mno-lwp
|
| @itemx -m3dnow
|
| @itemx -mno-3dnow
|
| @itemx -mpopcnt
|
| @@ -11324,8 +12091,8 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}.
|
| @opindex m3dnow
|
| @opindex mno-3dnow
|
| These switches enable or disable the use of instructions in the MMX,
|
| -SSE, SSE2, SSE3, SSSE3, SSE4.1, AVX, AES, PCLMUL, SSE4A, SSE5, ABM or
|
| -3DNow!@: extended instruction sets.
|
| +SSE, SSE2, SSE3, SSSE3, SSE4.1, AVX, AES, PCLMUL, SSE4A, FMA4, XOP,
|
| +LWP, ABM 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.
|
| @@ -11344,6 +12111,13 @@ supported architecture, using the appropriate flags. In particular,
|
| the file containing the CPU detection code should be compiled without
|
| these options.
|
|
|
| +@item -mfused-madd
|
| +@itemx -mno-fused-madd
|
| +@opindex mfused-madd
|
| +@opindex mno-fused-madd
|
| +Do (don't) generate code that uses the fused multiply/add or multiply/subtract
|
| +instructions. The default is to use these instructions.
|
| +
|
| @item -mcld
|
| @opindex mcld
|
| This option instructs GCC to emit a @code{cld} instruction in the prologue
|
| @@ -11375,6 +12149,17 @@ SAHF are load and store instructions, respectively, for certain status flags.
|
| In 64-bit mode, SAHF instruction is used to optimize @code{fmod}, @code{drem}
|
| or @code{remainder} built-in functions: see @ref{Other Builtins} for details.
|
|
|
| +@item -mmovbe
|
| +@opindex mmovbe
|
| +This option will enable GCC to use movbe instruction to implement
|
| +@code{__builtin_bswap32} and @code{__builtin_bswap64}.
|
| +
|
| +@item -mcrc32
|
| +@opindex mcrc32
|
| +This option will enable built-in functions, @code{__builtin_ia32_crc32qi},
|
| +@code{__builtin_ia32_crc32hi}. @code{__builtin_ia32_crc32si} and
|
| +@code{__builtin_ia32_crc32di} to generate the crc32 machine instruction.
|
| +
|
| @item -mrecip
|
| @opindex mrecip
|
| This option will enable GCC to use RCPSS and RSQRTSS instructions (and their
|
| @@ -11387,6 +12172,10 @@ Note that while the throughput of the sequence is higher than the throughput
|
| of the non-reciprocal instruction, the precision of the sequence can be
|
| decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994).
|
|
|
| +Note that GCC implements 1.0f/sqrtf(x) in terms of RSQRTSS (or RSQRTPS)
|
| +already with @option{-ffast-math} (or the above option combination), and
|
| +doesn't need @option{-mrecip}.
|
| +
|
| @item -mveclibabi=@var{type}
|
| @opindex mveclibabi
|
| Specifies the ABI type to use for vectorizing intrinsics using an
|
| @@ -11411,6 +12200,16 @@ when @option{-mveclibabi=acml} is used. Both @option{-ftree-vectorize} and
|
| @option{-funsafe-math-optimizations} have to be enabled. A SVML or ACML ABI
|
| compatible library will have to be specified at link time.
|
|
|
| +@item -mabi=@var{name}
|
| +@opindex mabi
|
| +Generate code for the specified calling convention. Permissible values
|
| +are: @samp{sysv} for the ABI used on GNU/Linux and other systems and
|
| +@samp{ms} for the Microsoft ABI. The default is to use the Microsoft
|
| +ABI when targeting Windows. On all other systems, the default is the
|
| +SYSV ABI. You can control this behavior for a specific function by
|
| +using the function attribute @samp{ms_abi}/@samp{sysv_abi}.
|
| +@xref{Function Attributes}.
|
| +
|
| @item -mpush-args
|
| @itemx -mno-push-args
|
| @opindex mpush-args
|
| @@ -11481,14 +12280,6 @@ segment to cover the entire TLS area.
|
|
|
| For systems that use GNU libc, the default is on.
|
|
|
| -@item -mfused-madd
|
| -@itemx -mno-fused-madd
|
| -@opindex mfused-madd
|
| -Enable automatic generation of fused floating point multiply-add instructions
|
| -if the ISA supports such instructions. The -mfused-madd option is on by
|
| -default. The fused multiply-add instructions have a different
|
| -rounding behavior compared to executing a multiply followed by an add.
|
| -
|
| @item -msse2avx
|
| @itemx -mno-sse2avx
|
| @opindex msse2avx
|
| @@ -11513,7 +12304,7 @@ darwin only the -m64 option turns off the @option{-fno-pic} and
|
| @option{-mdynamic-no-pic} options.
|
|
|
| @item -mno-red-zone
|
| -@opindex no-red-zone
|
| +@opindex mno-red-zone
|
| Do not use a so called red zone for x86-64 code. The red zone is mandated
|
| by the x86-64 ABI, it is a 128-byte area beyond the location of the
|
| stack pointer that will not be modified by signal or interrupt handlers
|
| @@ -11625,6 +12416,10 @@ using the minimum latency algorithm.
|
| Generate code for inline divides of floating point values
|
| using the maximum throughput algorithm.
|
|
|
| +@item -mno-inline-float-divide
|
| +@opindex mno-inline-float-divide
|
| +Do not generate inline code for divides of floating point values.
|
| +
|
| @item -minline-int-divide-min-latency
|
| @opindex minline-int-divide-min-latency
|
| Generate code for inline divides of integer values
|
| @@ -11635,6 +12430,10 @@ using the minimum latency algorithm.
|
| Generate code for inline divides of integer values
|
| using the maximum throughput algorithm.
|
|
|
| +@item -mno-inline-int-divide
|
| +@opindex mno-inline-int-divide
|
| +Do not generate inline code for divides of integer values.
|
| +
|
| @item -minline-sqrt-min-latency
|
| @opindex minline-sqrt-min-latency
|
| Generate code for inline square roots
|
| @@ -11645,6 +12444,17 @@ using the minimum latency algorithm.
|
| Generate code for inline square roots
|
| using the maximum throughput algorithm.
|
|
|
| +@item -mno-inline-sqrt
|
| +@opindex mno-inline-sqrt
|
| +Do not generate inline code for sqrt.
|
| +
|
| +@item -mfused-madd
|
| +@itemx -mno-fused-madd
|
| +@opindex mfused-madd
|
| +@opindex mno-fused-madd
|
| +Do (don't) generate code that uses the fused multiply/add or multiply/subtract
|
| +instructions. The default is to use these instructions.
|
| +
|
| @item -mno-dwarf2-asm
|
| @itemx -mdwarf2-asm
|
| @opindex mno-dwarf2-asm
|
| @@ -11678,15 +12488,6 @@ Specify bit size of immediate TLS offsets. Valid values are 14, 22, and
|
| Tune the instruction scheduling for a particular CPU, Valid values are
|
| itanium, itanium1, merced, itanium2, and mckinley.
|
|
|
| -@item -mt
|
| -@itemx -pthread
|
| -@opindex mt
|
| -@opindex pthread
|
| -Add support for multithreading using the POSIX threads library. This
|
| -option sets flags for both the preprocessor and linker. It does
|
| -not affect the thread safety of object code produced by the compiler or
|
| -that of libraries supplied with it. These are HP-UX specific flags.
|
| -
|
| @item -milp32
|
| @itemx -mlp64
|
| @opindex milp32
|
| @@ -11751,31 +12552,6 @@ are dependent on the control speculative loads.
|
| This is effective only with @option{-msched-control-spec} enabled.
|
| The default is 'enable'.
|
|
|
| -@item -msched-ldc
|
| -@itemx -mno-sched-ldc
|
| -@opindex msched-ldc
|
| -@opindex mno-sched-ldc
|
| -(En/Dis)able use of simple data speculation checks ld.c .
|
| -If disabled, only chk.a instructions will be emitted to check
|
| -data speculative loads.
|
| -The default is 'enable'.
|
| -
|
| -@item -mno-sched-control-ldc
|
| -@itemx -msched-control-ldc
|
| -@opindex mno-sched-control-ldc
|
| -@opindex msched-control-ldc
|
| -(Dis/En)able use of ld.c instructions to check control speculative loads.
|
| -If enabled, in case of control speculative load with no speculatively
|
| -scheduled dependent instructions this load will be emitted as ld.sa and
|
| -ld.c will be used to check it.
|
| -The default is 'disable'.
|
| -
|
| -@item -mno-sched-spec-verbose
|
| -@itemx -msched-spec-verbose
|
| -@opindex mno-sched-spec-verbose
|
| -@opindex msched-spec-verbose
|
| -(Dis/En)able printing of the information about speculative motions.
|
| -
|
| @item -mno-sched-prefer-non-data-spec-insns
|
| @itemx -msched-prefer-non-data-spec-insns
|
| @opindex mno-sched-prefer-non-data-spec-insns
|
| @@ -11803,6 +12579,93 @@ computation of the instructions priorities. This will make the use of the
|
| speculation a bit more conservative.
|
| The default is 'disable'.
|
|
|
| +@item -msched-spec-ldc
|
| +@opindex msched-spec-ldc
|
| +Use a simple data speculation check. This option is on by default.
|
| +
|
| +@item -msched-control-spec-ldc
|
| +@opindex msched-spec-ldc
|
| +Use a simple check for control speculation. This option is on by default.
|
| +
|
| +@item -msched-stop-bits-after-every-cycle
|
| +@opindex msched-stop-bits-after-every-cycle
|
| +Place a stop bit after every cycle when scheduling. This option is on
|
| +by default.
|
| +
|
| +@item -msched-fp-mem-deps-zero-cost
|
| +@opindex msched-fp-mem-deps-zero-cost
|
| +Assume that floating-point stores and loads are not likely to cause a conflict
|
| +when placed into the same instruction group. This option is disabled by
|
| +default.
|
| +
|
| +@item -msel-sched-dont-check-control-spec
|
| +@opindex msel-sched-dont-check-control-spec
|
| +Generate checks for control speculation in selective scheduling.
|
| +This flag is disabled by default.
|
| +
|
| +@item -msched-max-memory-insns=@var{max-insns}
|
| +@opindex msched-max-memory-insns
|
| +Limit on the number of memory insns per instruction group, giving lower
|
| +priority to subsequent memory insns attempting to schedule in the same
|
| +instruction group. Frequently useful to prevent cache bank conflicts.
|
| +The default value is 1.
|
| +
|
| +@item -msched-max-memory-insns-hard-limit
|
| +@opindex msched-max-memory-insns-hard-limit
|
| +Disallow more than `msched-max-memory-insns' in instruction group.
|
| +Otherwise, limit is `soft' meaning that we would prefer non-memory operations
|
| +when limit is reached but may still schedule memory operations.
|
| +
|
| +@end table
|
| +
|
| +@node IA-64/VMS Options
|
| +@subsection IA-64/VMS Options
|
| +
|
| +These @samp{-m} options are defined for the IA-64/VMS implementations:
|
| +
|
| +@table @gcctabopt
|
| +@item -mvms-return-codes
|
| +@opindex mvms-return-codes
|
| +Return VMS condition codes from main. The default is to return POSIX
|
| +style condition (e.g.@ error) codes.
|
| +
|
| +@item -mdebug-main=@var{prefix}
|
| +@opindex mdebug-main=@var{prefix}
|
| +Flag the first routine whose name starts with @var{prefix} as the main
|
| +routine for the debugger.
|
| +
|
| +@item -mmalloc64
|
| +@opindex mmalloc64
|
| +Default to 64bit memory allocation routines.
|
| +@end table
|
| +
|
| +@node LM32 Options
|
| +@subsection LM32 Options
|
| +@cindex LM32 options
|
| +
|
| +These @option{-m} options are defined for the Lattice Mico32 architecture:
|
| +
|
| +@table @gcctabopt
|
| +@item -mbarrel-shift-enabled
|
| +@opindex mbarrel-shift-enabled
|
| +Enable barrel-shift instructions.
|
| +
|
| +@item -mdivide-enabled
|
| +@opindex mdivide-enabled
|
| +Enable divide and modulus instructions.
|
| +
|
| +@item -mmultiply-enabled
|
| +@opindex multiply-enabled
|
| +Enable multiply instructions.
|
| +
|
| +@item -msign-extend-enabled
|
| +@opindex msign-extend-enabled
|
| +Enable sign extend instructions.
|
| +
|
| +@item -muser-enabled
|
| +@opindex muser-enabled
|
| +Enable user-defined instructions.
|
| +
|
| @end table
|
|
|
| @node M32C Options
|
| @@ -11999,7 +12862,7 @@ below, which also classifies the CPUs into families:
|
|
|
| @multitable @columnfractions 0.20 0.80
|
| @item @strong{Family} @tab @strong{@samp{-mcpu} arguments}
|
| -@item @samp{51qe} @tab @samp{51qe}
|
| +@item @samp{51} @tab @samp{51} @samp{51ac} @samp{51cn} @samp{51em} @samp{51qe}
|
| @item @samp{5206} @tab @samp{5202} @samp{5204} @samp{5206}
|
| @item @samp{5206e} @tab @samp{5206e}
|
| @item @samp{5208} @tab @samp{5207} @samp{5208}
|
| @@ -12008,6 +12871,7 @@ below, which also classifies the CPUs into families:
|
| @item @samp{5216} @tab @samp{5214} @samp{5216}
|
| @item @samp{52235} @tab @samp{52230} @samp{52231} @samp{52232} @samp{52233} @samp{52234} @samp{52235}
|
| @item @samp{5225} @tab @samp{5224} @samp{5225}
|
| +@item @samp{52259} @tab @samp{52252} @samp{52254} @samp{52255} @samp{52256} @samp{52258} @samp{52259}
|
| @item @samp{5235} @tab @samp{5232} @samp{5233} @samp{5234} @samp{5235} @samp{523x}
|
| @item @samp{5249} @tab @samp{5249}
|
| @item @samp{5250} @tab @samp{5250}
|
| @@ -12015,6 +12879,7 @@ below, which also classifies the CPUs into families:
|
| @item @samp{5272} @tab @samp{5272}
|
| @item @samp{5275} @tab @samp{5274} @samp{5275}
|
| @item @samp{5282} @tab @samp{5280} @samp{5281} @samp{5282} @samp{528x}
|
| +@item @samp{53017} @tab @samp{53011} @samp{53012} @samp{53013} @samp{53014} @samp{53015} @samp{53016} @samp{53017}
|
| @item @samp{5307} @tab @samp{5307}
|
| @item @samp{5329} @tab @samp{5327} @samp{5328} @samp{5329} @samp{532x}
|
| @item @samp{5373} @tab @samp{5372} @samp{5373} @samp{537x}
|
| @@ -12378,7 +13243,7 @@ Enable the use of 68HC12 pre and post auto-increment and auto-decrement
|
| addressing modes.
|
|
|
| @item -minmax
|
| -@itemx -nominmax
|
| +@itemx -mnominmax
|
| @opindex minmax
|
| @opindex mnominmax
|
| Enable the use of 68HC12 min and max instructions.
|
| @@ -12469,7 +13334,7 @@ Generate code for a little endian target.
|
| Generate code for the 210 processor.
|
|
|
| @item -mno-lsim
|
| -@opindex no-lsim
|
| +@opindex mno-lsim
|
| Assume that run-time support has been provided and so omit the
|
| simulator library (@file{libsim.a)} from the linker command line.
|
|
|
| @@ -12483,6 +13348,169 @@ value is 0x1000.
|
|
|
| @end table
|
|
|
| +@node MeP Options
|
| +@subsection MeP Options
|
| +@cindex MeP options
|
| +
|
| +@table @gcctabopt
|
| +
|
| +@item -mabsdiff
|
| +@opindex mabsdiff
|
| +Enables the @code{abs} instruction, which is the absolute difference
|
| +between two registers.
|
| +
|
| +@item -mall-opts
|
| +@opindex mall-opts
|
| +Enables all the optional instructions - average, multiply, divide, bit
|
| +operations, leading zero, absolute difference, min/max, clip, and
|
| +saturation.
|
| +
|
| +
|
| +@item -maverage
|
| +@opindex maverage
|
| +Enables the @code{ave} instruction, which computes the average of two
|
| +registers.
|
| +
|
| +@item -mbased=@var{n}
|
| +@opindex mbased=
|
| +Variables of size @var{n} bytes or smaller will be placed in the
|
| +@code{.based} section by default. Based variables use the @code{$tp}
|
| +register as a base register, and there is a 128 byte limit to the
|
| +@code{.based} section.
|
| +
|
| +@item -mbitops
|
| +@opindex mbitops
|
| +Enables the bit operation instructions - bit test (@code{btstm}), set
|
| +(@code{bsetm}), clear (@code{bclrm}), invert (@code{bnotm}), and
|
| +test-and-set (@code{tas}).
|
| +
|
| +@item -mc=@var{name}
|
| +@opindex mc=
|
| +Selects which section constant data will be placed in. @var{name} may
|
| +be @code{tiny}, @code{near}, or @code{far}.
|
| +
|
| +@item -mclip
|
| +@opindex mclip
|
| +Enables the @code{clip} instruction. Note that @code{-mclip} is not
|
| +useful unless you also provide @code{-mminmax}.
|
| +
|
| +@item -mconfig=@var{name}
|
| +@opindex mconfig=
|
| +Selects one of the build-in core configurations. Each MeP chip has
|
| +one or more modules in it; each module has a core CPU and a variety of
|
| +coprocessors, optional instructions, and peripherals. The
|
| +@code{MeP-Integrator} tool, not part of GCC, provides these
|
| +configurations through this option; using this option is the same as
|
| +using all the corresponding command line options. The default
|
| +configuration is @code{default}.
|
| +
|
| +@item -mcop
|
| +@opindex mcop
|
| +Enables the coprocessor instructions. By default, this is a 32-bit
|
| +coprocessor. Note that the coprocessor is normally enabled via the
|
| +@code{-mconfig=} option.
|
| +
|
| +@item -mcop32
|
| +@opindex mcop32
|
| +Enables the 32-bit coprocessor's instructions.
|
| +
|
| +@item -mcop64
|
| +@opindex mcop64
|
| +Enables the 64-bit coprocessor's instructions.
|
| +
|
| +@item -mivc2
|
| +@opindex mivc2
|
| +Enables IVC2 scheduling. IVC2 is a 64-bit VLIW coprocessor.
|
| +
|
| +@item -mdc
|
| +@opindex mdc
|
| +Causes constant variables to be placed in the @code{.near} section.
|
| +
|
| +@item -mdiv
|
| +@opindex mdiv
|
| +Enables the @code{div} and @code{divu} instructions.
|
| +
|
| +@item -meb
|
| +@opindex meb
|
| +Generate big-endian code.
|
| +
|
| +@item -mel
|
| +@opindex mel
|
| +Generate little-endian code.
|
| +
|
| +@item -mio-volatile
|
| +@opindex mio-volatile
|
| +Tells the compiler that any variable marked with the @code{io}
|
| +attribute is to be considered volatile.
|
| +
|
| +@item -ml
|
| +@opindex ml
|
| +Causes variables to be assigned to the @code{.far} section by default.
|
| +
|
| +@item -mleadz
|
| +@opindex mleadz
|
| +Enables the @code{leadz} (leading zero) instruction.
|
| +
|
| +@item -mm
|
| +@opindex mm
|
| +Causes variables to be assigned to the @code{.near} section by default.
|
| +
|
| +@item -mminmax
|
| +@opindex mminmax
|
| +Enables the @code{min} and @code{max} instructions.
|
| +
|
| +@item -mmult
|
| +@opindex mmult
|
| +Enables the multiplication and multiply-accumulate instructions.
|
| +
|
| +@item -mno-opts
|
| +@opindex mno-opts
|
| +Disables all the optional instructions enabled by @code{-mall-opts}.
|
| +
|
| +@item -mrepeat
|
| +@opindex mrepeat
|
| +Enables the @code{repeat} and @code{erepeat} instructions, used for
|
| +low-overhead looping.
|
| +
|
| +@item -ms
|
| +@opindex ms
|
| +Causes all variables to default to the @code{.tiny} section. Note
|
| +that there is a 65536 byte limit to this section. Accesses to these
|
| +variables use the @code{%gp} base register.
|
| +
|
| +@item -msatur
|
| +@opindex msatur
|
| +Enables the saturation instructions. Note that the compiler does not
|
| +currently generate these itself, but this option is included for
|
| +compatibility with other tools, like @code{as}.
|
| +
|
| +@item -msdram
|
| +@opindex msdram
|
| +Link the SDRAM-based runtime instead of the default ROM-based runtime.
|
| +
|
| +@item -msim
|
| +@opindex msim
|
| +Link the simulator runtime libraries.
|
| +
|
| +@item -msimnovec
|
| +@opindex msimnovec
|
| +Link the simulator runtime libraries, excluding built-in support
|
| +for reset and exception vectors and tables.
|
| +
|
| +@item -mtf
|
| +@opindex mtf
|
| +Causes all functions to default to the @code{.far} section. Without
|
| +this option, functions default to the @code{.near} section.
|
| +
|
| +@item -mtiny=@var{n}
|
| +@opindex mtiny=
|
| +Variables that are @var{n} bytes or smaller will be allocated to the
|
| +@code{.tiny} section. These variables use the @code{$gp} base
|
| +register. The default for this option is 4, but note that there's a
|
| +65536 byte limit to the @code{.tiny} section.
|
| +
|
| +@end table
|
| +
|
| @node MIPS Options
|
| @subsection MIPS Options
|
| @cindex MIPS options
|
| @@ -12514,6 +13542,7 @@ The processor names are:
|
| @samp{24kec}, @samp{24kef2_1}, @samp{24kef1_1},
|
| @samp{34kc}, @samp{34kf2_1}, @samp{34kf1_1},
|
| @samp{74kc}, @samp{74kf2_1}, @samp{74kf1_1}, @samp{74kf3_2},
|
| +@samp{1004kc}, @samp{1004kf2_1}, @samp{1004kf1_1},
|
| @samp{loongson2e}, @samp{loongson2f},
|
| @samp{m4k},
|
| @samp{octeon},
|
| @@ -12620,7 +13649,7 @@ Generate (do not generate) MIPS16 code. If GCC is targetting a
|
| MIPS32 or MIPS64 architecture, it will make use of the MIPS16e ASE@.
|
|
|
| MIPS16 code generation can also be controlled on a per-function basis
|
| -by means of @code{mips16} and @code{nomips16} attributes.
|
| +by means of @code{mips16} and @code{nomips16} attributes.
|
| @xref{Function Attributes}, for more information.
|
|
|
| @item -mflip-mips16
|
| @@ -13264,6 +14293,57 @@ thinks should execute in parallel.
|
| This option only has an effect when optimizing for the VR4130.
|
| It normally makes code faster, but at the expense of making it bigger.
|
| It is enabled by default at optimization level @option{-O3}.
|
| +
|
| +@item -msynci
|
| +@itemx -mno-synci
|
| +@opindex msynci
|
| +Enable (disable) generation of @code{synci} instructions on
|
| +architectures that support it. The @code{synci} instructions (if
|
| +enabled) will be generated when @code{__builtin___clear_cache()} is
|
| +compiled.
|
| +
|
| +This option defaults to @code{-mno-synci}, but the default can be
|
| +overridden by configuring with @code{--with-synci}.
|
| +
|
| +When compiling code for single processor systems, it is generally safe
|
| +to use @code{synci}. However, on many multi-core (SMP) systems, it
|
| +will not invalidate the instruction caches on all cores and may lead
|
| +to undefined behavior.
|
| +
|
| +@item -mrelax-pic-calls
|
| +@itemx -mno-relax-pic-calls
|
| +@opindex mrelax-pic-calls
|
| +Try to turn PIC calls that are normally dispatched via register
|
| +@code{$25} into direct calls. This is only possible if the linker can
|
| +resolve the destination at link-time and if the destination is within
|
| +range for a direct call.
|
| +
|
| +@option{-mrelax-pic-calls} is the default if GCC was configured to use
|
| +an assembler and a linker that supports the @code{.reloc} assembly
|
| +directive and @code{-mexplicit-relocs} is in effect. With
|
| +@code{-mno-explicit-relocs}, this optimization can be performed by the
|
| +assembler and the linker alone without help from the compiler.
|
| +
|
| +@item -mmcount-ra-address
|
| +@itemx -mno-mcount-ra-address
|
| +@opindex mmcount-ra-address
|
| +@opindex mno-mcount-ra-address
|
| +Emit (do not emit) code that allows @code{_mcount} to modify the
|
| +calling function's return address. When enabled, this option extends
|
| +the usual @code{_mcount} interface with a new @var{ra-address}
|
| +parameter, which has type @code{intptr_t *} and is passed in register
|
| +@code{$12}. @code{_mcount} can then modify the return address by
|
| +doing both of the following:
|
| +@itemize
|
| +@item
|
| +Returning the new address in register @code{$31}.
|
| +@item
|
| +Storing the new address in @code{*@var{ra-address}},
|
| +if @var{ra-address} is nonnull.
|
| +@end itemize
|
| +
|
| +The default is @option{-mno-mcount-ra-address}.
|
| +
|
| @end table
|
|
|
| @node MMIX Options
|
| @@ -13289,7 +14369,7 @@ to the @code{rE} epsilon register.
|
|
|
| @item -mabi=mmixware
|
| @itemx -mabi=gnu
|
| -@opindex mabi-mmixware
|
| +@opindex mabi=mmixware
|
| @opindex mabi=gnu
|
| Generate code that passes function parameters and return values that (in
|
| the called function) are seen as registers @code{$0} and up, as opposed to
|
| @@ -13436,7 +14516,7 @@ Generate code for a PDP-11/45. This is the default.
|
| Generate code for a PDP-11/10.
|
|
|
| @item -mbcopy-builtin
|
| -@opindex bcopy-builtin
|
| +@opindex mbcopy-builtin
|
| Use inline @code{movmemhi} patterns for copying memory. This is the
|
| default.
|
|
|
| @@ -13581,6 +14661,8 @@ These @samp{-m} options are defined for the IBM RS/6000 and PowerPC:
|
| @itemx -mno-mfcrf
|
| @itemx -mpopcntb
|
| @itemx -mno-popcntb
|
| +@itemx -mpopcntd
|
| +@itemx -mno-popcntd
|
| @itemx -mfprnd
|
| @itemx -mno-fprnd
|
| @itemx -mcmpb
|
| @@ -13605,6 +14687,8 @@ These @samp{-m} options are defined for the IBM RS/6000 and PowerPC:
|
| @opindex mno-mfcrf
|
| @opindex mpopcntb
|
| @opindex mno-popcntb
|
| +@opindex mpopcntd
|
| +@opindex mno-popcntd
|
| @opindex mfprnd
|
| @opindex mno-fprnd
|
| @opindex mcmpb
|
| @@ -13654,6 +14738,9 @@ The @option{-mpopcntb} option allows GCC to generate the popcount and
|
| double precision FP reciprocal estimate instruction implemented on the
|
| POWER5 processor and other processors that support the PowerPC V2.02
|
| architecture.
|
| +The @option{-mpopcntd} option allows GCC to generate the popcount
|
| +instruction implemented on the POWER7 processor and other processors
|
| +that support the PowerPC V2.06 architecture.
|
| The @option{-mfprnd} option allows GCC to generate the FP round to
|
| integer instructions implemented on the POWER5+ processor and other
|
| processors that support the PowerPC V2.03 architecture.
|
| @@ -13702,14 +14789,14 @@ Set architecture type, register usage, choice of mnemonics, and
|
| instruction scheduling parameters for machine type @var{cpu_type}.
|
| Supported values for @var{cpu_type} are @samp{401}, @samp{403},
|
| @samp{405}, @samp{405fp}, @samp{440}, @samp{440fp}, @samp{464}, @samp{464fp},
|
| -@samp{505}, @samp{601}, @samp{602}, @samp{603}, @samp{603e}, @samp{604},
|
| -@samp{604e}, @samp{620}, @samp{630}, @samp{740}, @samp{7400},
|
| -@samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823},
|
| -@samp{860}, @samp{970}, @samp{8540}, @samp{e300c2}, @samp{e300c3},
|
| -@samp{e500mc}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5},
|
| -@samp{power}, @samp{power2}, @samp{power3}, @samp{power4},
|
| -@samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x}, @samp{power7}
|
| -@samp{common}, @samp{powerpc}, @samp{powerpc64}, @samp{rios},
|
| +@samp{476}, @samp{476fp}, @samp{505}, @samp{601}, @samp{602}, @samp{603},
|
| +@samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740},
|
| +@samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823},
|
| +@samp{860}, @samp{970}, @samp{8540}, @samp{a2}, @samp{e300c2},
|
| +@samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{ec603e}, @samp{G3},
|
| +@samp{G4}, @samp{G5}, @samp{power}, @samp{power2}, @samp{power3},
|
| +@samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6}, @samp{power6x},
|
| +@samp{power7}, @samp{common}, @samp{powerpc}, @samp{powerpc64}, @samp{rios},
|
| @samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64}.
|
|
|
| @option{-mcpu=common} selects a completely generic processor. Code
|
| @@ -13732,9 +14819,9 @@ The @option{-mcpu} options automatically enable or disable the
|
| following options:
|
|
|
| @gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol
|
| --mnew-mnemonics -mpopcntb -mpower -mpower2 -mpowerpc64 @gol
|
| +-mnew-mnemonics -mpopcntb -mpopcntd -mpower -mpower2 -mpowerpc64 @gol
|
| -mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol
|
| --msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr}
|
| +-msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr -mvsx}
|
|
|
| The particular options set for any particular CPU will vary between
|
| compiler versions, depending on what setting seems to produce optimal
|
| @@ -13835,6 +14922,14 @@ instructions.
|
| This option has been deprecated. Use @option{-mspe} and
|
| @option{-mno-spe} instead.
|
|
|
| +@item -mvsx
|
| +@itemx -mno-vsx
|
| +@opindex mvsx
|
| +@opindex mno-vsx
|
| +Generate code that uses (does not use) vector/scalar (VSX)
|
| +instructions, and also enable the use of built-in functions that allow
|
| +more direct access to the VSX instruction set.
|
| +
|
| @item -mfloat-gprs=@var{yes/single/double/no}
|
| @itemx -mfloat-gprs
|
| @opindex mfloat-gprs
|
| @@ -13964,8 +15059,8 @@ Software floating point emulation is provided if you use the
|
| @itemx -mdouble-float
|
| @opindex msingle-float
|
| @opindex mdouble-float
|
| -Generate code for single or double-precision floating point operations.
|
| -@option{-mdouble-float} implies @option{-msingle-float}.
|
| +Generate code for single or double-precision floating point operations.
|
| +@option{-mdouble-float} implies @option{-msingle-float}.
|
|
|
| @item -msimple-fpu
|
| @opindex msimple-fpu
|
| @@ -13973,7 +15068,7 @@ Do not generate sqrt and div instructions for hardware floating point unit.
|
|
|
| @item -mfpu
|
| @opindex mfpu
|
| -Specify type of floating point unit. Valid values are @var{sp_lite}
|
| +Specify type of floating point unit. Valid values are @var{sp_lite}
|
| (equivalent to -msingle-float -msimple-fpu), @var{dp_lite} (equivalent
|
| to -mdouble-float -msimple-fpu), @var{sp_full} (equivalent to -msingle-float),
|
| and @var{dp_full} (equivalent to -mdouble-float).
|
| @@ -14020,7 +15115,7 @@ stored, which means code that walks the stack frame across interrupts or
|
| signals may get corrupted data.
|
|
|
| @item -mavoid-indexed-addresses
|
| -@item -mno-avoid-indexed-addresses
|
| +@itemx -mno-avoid-indexed-addresses
|
| @opindex mavoid-indexed-addresses
|
| @opindex mno-avoid-indexed-addresses
|
| Generate code that tries to avoid (not avoid) the use of indexed load
|
| @@ -14042,7 +15137,7 @@ hardware floating is used.
|
| @opindex mmulhw
|
| @opindex mno-mulhw
|
| Generate code that uses (does not use) the half-word multiply and
|
| -multiply-accumulate instructions on the IBM 405, 440 and 464 processors.
|
| +multiply-accumulate instructions on the IBM 405, 440, 464 and 476 processors.
|
| These instructions are generated by default when targetting those
|
| processors.
|
|
|
| @@ -14051,7 +15146,7 @@ processors.
|
| @opindex mdlmzb
|
| @opindex mno-dlmzb
|
| Generate code that uses (does not use) the string-search @samp{dlmzb}
|
| -instruction on the IBM 405, 440 and 464 processors. This instruction is
|
| +instruction on the IBM 405, 440, 464 and 476 processors. This instruction is
|
| generated by default when targetting those processors.
|
|
|
| @item -mno-bit-align
|
| @@ -14166,16 +15261,18 @@ Application Binary Interface, PowerPC processor supplement. This is the
|
| default unless you configured GCC using @samp{powerpc-*-eabiaix}.
|
|
|
| @item -mcall-sysv-eabi
|
| +@itemx -mcall-eabi
|
| @opindex mcall-sysv-eabi
|
| +@opindex mcall-eabi
|
| Specify both @option{-mcall-sysv} and @option{-meabi} options.
|
|
|
| @item -mcall-sysv-noeabi
|
| @opindex mcall-sysv-noeabi
|
| Specify both @option{-mcall-sysv} and @option{-mno-eabi} options.
|
|
|
| -@item -mcall-solaris
|
| -@opindex mcall-solaris
|
| -On System V.4 and embedded PowerPC systems compile code for the Solaris
|
| +@item -mcall-aixdesc
|
| +@opindex m
|
| +On System V.4 and embedded PowerPC systems compile code for the AIX
|
| operating system.
|
|
|
| @item -mcall-linux
|
| @@ -14188,11 +15285,21 @@ Linux-based GNU system.
|
| On System V.4 and embedded PowerPC systems compile code for the
|
| Hurd-based GNU system.
|
|
|
| +@item -mcall-freebsd
|
| +@opindex mcall-freebsd
|
| +On System V.4 and embedded PowerPC systems compile code for the
|
| +FreeBSD operating system.
|
| +
|
| @item -mcall-netbsd
|
| @opindex mcall-netbsd
|
| On System V.4 and embedded PowerPC systems compile code for the
|
| NetBSD operating system.
|
|
|
| +@item -mcall-openbsd
|
| +@opindex mcall-netbsd
|
| +On System V.4 and embedded PowerPC systems compile code for the
|
| +OpenBSD operating system.
|
| +
|
| @item -maix-struct-return
|
| @opindex maix-struct-return
|
| Return all structures in memory (as specified by the AIX ABI)@.
|
| @@ -14390,6 +15497,16 @@ to use or discard it.
|
| In the future, we may cause GCC to ignore all longcall specifications
|
| when the linker is known to generate glue.
|
|
|
| +@item -mtls-markers
|
| +@itemx -mno-tls-markers
|
| +@opindex mtls-markers
|
| +@opindex mno-tls-markers
|
| +Mark (do not mark) calls to @code{__tls_get_addr} with a relocation
|
| +specifying the function argument. The relocation allows ld to
|
| +reliably associate function call with argument setup instructions for
|
| +TLS optimization, which in turn allows gcc to better schedule the
|
| +sequence.
|
| +
|
| @item -pthread
|
| @opindex pthread
|
| Adds support for multithreading with the @dfn{pthreads} library.
|
| @@ -14397,6 +15514,150 @@ This option sets flags for both the preprocessor and linker.
|
|
|
| @end table
|
|
|
| +@node RX Options
|
| +@subsection RX Options
|
| +@cindex RX Options
|
| +
|
| +These command line options are defined for RX targets:
|
| +
|
| +@table @gcctabopt
|
| +@item -m64bit-doubles
|
| +@itemx -m32bit-doubles
|
| +@opindex m64bit-doubles
|
| +@opindex m32bit-doubles
|
| +Make the @code{double} data type be 64-bits (@option{-m64bit-doubles})
|
| +or 32-bits (@option{-m32bit-doubles}) in size. The default is
|
| +@option{-m32bit-doubles}. @emph{Note} RX floating point hardware only
|
| +works on 32-bit values, which is why the default is
|
| +@option{-m32bit-doubles}.
|
| +
|
| +@item -fpu
|
| +@itemx -nofpu
|
| +@opindex fpu
|
| +@opindex nofpu
|
| +Enables (@option{-fpu}) or disables (@option{-nofpu}) the use of RX
|
| +floating point hardware. The default is enabled for the @var{RX600}
|
| +series and disabled for the @var{RX200} series.
|
| +
|
| +Floating point instructions will only be generated for 32-bit floating
|
| +point values however, so if the @option{-m64bit-doubles} option is in
|
| +use then the FPU hardware will not be used for doubles.
|
| +
|
| +@emph{Note} If the @option{-fpu} option is enabled then
|
| +@option{-funsafe-math-optimizations} is also enabled automatically.
|
| +This is because the RX FPU instructions are themselves unsafe.
|
| +
|
| +@item -mcpu=@var{name}
|
| +@itemx -patch=@var{name}
|
| +@opindex -mcpu
|
| +@opindex -patch
|
| +Selects the type of RX CPU to be targeted. Currently three types are
|
| +supported, the generic @var{RX600} and @var{RX200} series hardware and
|
| +the specific @var{RX610} cpu. The default is @var{RX600}.
|
| +
|
| +The only difference between @var{RX600} and @var{RX610} is that the
|
| +@var{RX610} does not support the @code{MVTIPL} instruction.
|
| +
|
| +The @var{RX200} series does not have a hardware floating point unit
|
| +and so @option{-nofpu} is enabled by default when this type is
|
| +selected.
|
| +
|
| +@item -mbig-endian-data
|
| +@itemx -mlittle-endian-data
|
| +@opindex mbig-endian-data
|
| +@opindex mlittle-endian-data
|
| +Store data (but not code) in the big-endian format. The default is
|
| +@option{-mlittle-endian-data}, ie to store data in the little endian
|
| +format.
|
| +
|
| +@item -msmall-data-limit=@var{N}
|
| +@opindex msmall-data-limit
|
| +Specifies the maximum size in bytes of global and static variables
|
| +which can be placed into the small data area. Using the small data
|
| +area can lead to smaller and faster code, but the size of area is
|
| +limited and it is up to the programmer to ensure that the area does
|
| +not overflow. Also when the small data area is used one of the RX's
|
| +registers (@code{r13}) is reserved for use pointing to this area, so
|
| +it is no longer available for use by the compiler. This could result
|
| +in slower and/or larger code if variables which once could have been
|
| +held in @code{r13} are now pushed onto the stack.
|
| +
|
| +Note, common variables (variables which have not been initialised) and
|
| +constants are not placed into the small data area as they are assigned
|
| +to other sections in the output executable.
|
| +
|
| +The default value is zero, which disables this feature. Note, this
|
| +feature is not enabled by default with higher optimization levels
|
| +(@option{-O2} etc) because of the potentially detrimental effects of
|
| +reserving register @code{r13}. It is up to the programmer to
|
| +experiment and discover whether this feature is of benefit to their
|
| +program.
|
| +
|
| +@item -msim
|
| +@itemx -mno-sim
|
| +@opindex msim
|
| +@opindex mno-sim
|
| +Use the simulator runtime. The default is to use the libgloss board
|
| +specific runtime.
|
| +
|
| +@item -mas100-syntax
|
| +@itemx -mno-as100-syntax
|
| +@opindex mas100-syntax
|
| +@opindex mno-as100-syntax
|
| +When generating assembler output use a syntax that is compatible with
|
| +Renesas's AS100 assembler. This syntax can also be handled by the GAS
|
| +assembler but it has some restrictions so generating it is not the
|
| +default option.
|
| +
|
| +@item -mmax-constant-size=@var{N}
|
| +@opindex mmax-constant-size
|
| +Specifies the maximum size, in bytes, of a constant that can be used as
|
| +an operand in a RX instruction. Although the RX instruction set does
|
| +allow constants of up to 4 bytes in length to be used in instructions,
|
| +a longer value equates to a longer instruction. Thus in some
|
| +circumstances it can be beneficial to restrict the size of constants
|
| +that are used in instructions. Constants that are too big are instead
|
| +placed into a constant pool and referenced via register indirection.
|
| +
|
| +The value @var{N} can be between 0 and 4. A value of 0 (the default)
|
| +or 4 means that constants of any size are allowed.
|
| +
|
| +@item -mrelax
|
| +@opindex mrelax
|
| +Enable linker relaxation. Linker relaxation is a process whereby the
|
| +linker will attempt to reduce the size of a program by finding shorter
|
| +versions of various instructions. Disabled by default.
|
| +
|
| +@item -mint-register=@var{N}
|
| +@opindex mint-register
|
| +Specify the number of registers to reserve for fast interrupt handler
|
| +functions. The value @var{N} can be between 0 and 4. A value of 1
|
| +means that register @code{r13} will be reserved for the exclusive use
|
| +of fast interrupt handlers. A value of 2 reserves @code{r13} and
|
| +@code{r12}. A value of 3 reserves @code{r13}, @code{r12} and
|
| +@code{r11}, and a value of 4 reserves @code{r13} through @code{r10}.
|
| +A value of 0, the default, does not reserve any registers.
|
| +
|
| +@item -msave-acc-in-interrupts
|
| +@opindex msave-acc-in-interrupts
|
| +Specifies that interrupt handler functions should preserve the
|
| +accumulator register. This is only necessary if normal code might use
|
| +the accumulator register, for example because it performs 64-bit
|
| +multiplications. The default is to ignore the accumulator as this
|
| +makes the interrupt handlers faster.
|
| +
|
| +@end table
|
| +
|
| +@emph{Note:} The generic GCC command line @option{-ffixed-@var{reg}}
|
| +has special significance to the RX port when used with the
|
| +@code{interrupt} function attribute. This attribute indicates a
|
| +function intended to process fast interrupts. GCC will will ensure
|
| +that it only uses the registers @code{r10}, @code{r11}, @code{r12}
|
| +and/or @code{r13} and only provided that the normal use of the
|
| +corresponding registers have been restricted via the
|
| +@option{-ffixed-@var{reg}} or @option{-mint-register} command line
|
| +options.
|
| +
|
| @node S/390 and zSeries Options
|
| @subsection S/390 and zSeries Options
|
| @cindex S/390 and zSeries Options
|
| @@ -14609,7 +15870,7 @@ Compile code for big endian mode. This is the default.
|
|
|
| @item -mel
|
| @opindex mel
|
| -Compile code for little endian mode.
|
| +Compile code for little endian mode.
|
|
|
| @item -mnhwloop
|
| @opindex mnhwloop
|
| @@ -14621,7 +15882,7 @@ Enable generate unaligned load and store instruction.
|
|
|
| @item -mmac
|
| @opindex mmac
|
| -Enable the use of multiply-accumulate instructions. Disabled by default.
|
| +Enable the use of multiply-accumulate instructions. Disabled by default.
|
|
|
| @item -mscore5
|
| @opindex mscore5
|
| @@ -14657,6 +15918,26 @@ Generate code for the SH2.
|
| @item -m2e
|
| Generate code for the SH2e.
|
|
|
| +@item -m2a-nofpu
|
| +@opindex m2a-nofpu
|
| +Generate code for the SH2a without FPU, or for a SH2a-FPU in such a way
|
| +that the floating-point unit is not used.
|
| +
|
| +@item -m2a-single-only
|
| +@opindex m2a-single-only
|
| +Generate code for the SH2a-FPU, in such a way that no double-precision
|
| +floating point operations are used.
|
| +
|
| +@item -m2a-single
|
| +@opindex m2a-single
|
| +Generate code for the SH2a-FPU assuming the floating-point unit is in
|
| +single-precision mode by default.
|
| +
|
| +@item -m2a
|
| +@opindex m2a
|
| +Generate code for the SH2a-FPU assuming the floating-point unit is in
|
| +double-precision mode by default.
|
| +
|
| @item -m3
|
| @opindex m3
|
| Generate code for the SH3.
|
| @@ -14738,7 +16019,8 @@ Enable the use of bit manipulation instructions on SH2A.
|
|
|
| @item -mfmovd
|
| @opindex mfmovd
|
| -Enable the use of the instruction @code{fmovd}.
|
| +Enable the use of the instruction @code{fmovd}. Check @option{-mdalign} for
|
| +alignment constraints.
|
|
|
| @item -mhitachi
|
| @opindex mhitachi
|
| @@ -15255,6 +16537,46 @@ useful when compiling kernel code. A register range is specified as
|
| two registers separated by a dash. Multiple register ranges can be
|
| specified separated by a comma.
|
|
|
| +@item -mea32
|
| +@itemx -mea64
|
| +@opindex mea32
|
| +@opindex mea64
|
| +Compile code assuming that pointers to the PPU address space accessed
|
| +via the @code{__ea} named address space qualifier are either 32 or 64
|
| +bits wide. The default is 32 bits. As this is an ABI changing option,
|
| +all object code in an executable must be compiled with the same setting.
|
| +
|
| +@item -maddress-space-conversion
|
| +@itemx -mno-address-space-conversion
|
| +@opindex maddress-space-conversion
|
| +@opindex mno-address-space-conversion
|
| +Allow/disallow treating the @code{__ea} address space as superset
|
| +of the generic address space. This enables explicit type casts
|
| +between @code{__ea} and generic pointer as well as implicit
|
| +conversions of generic pointers to @code{__ea} pointers. The
|
| +default is to allow address space pointer conversions.
|
| +
|
| +@item -mcache-size=@var{cache-size}
|
| +@opindex mcache-size
|
| +This option controls the version of libgcc that the compiler links to an
|
| +executable and selects a software-managed cache for accessing variables
|
| +in the @code{__ea} address space with a particular cache size. Possible
|
| +options for @var{cache-size} are @samp{8}, @samp{16}, @samp{32}, @samp{64}
|
| +and @samp{128}. The default cache size is 64KB.
|
| +
|
| +@item -matomic-updates
|
| +@itemx -mno-atomic-updates
|
| +@opindex matomic-updates
|
| +@opindex mno-atomic-updates
|
| +This option controls the version of libgcc that the compiler links to an
|
| +executable and selects whether atomic updates to the software-managed
|
| +cache of PPU-side variables are used. If you use atomic updates, changes
|
| +to a PPU variable from SPU code using the @code{__ea} named address space
|
| +qualifier will not interfere with changes to other PPU variables residing
|
| +in the same cache line from PPU code. If you do not use atomic updates,
|
| +such interference may occur; however, writing back cache lines will be
|
| +more efficient. The default behavior is to use atomic updates.
|
| +
|
| @item -mdual-nops
|
| @itemx -mdual-nops=@var{n}
|
| @opindex mdual-nops
|
| @@ -15274,7 +16596,7 @@ generate the branch hint.
|
| @opindex mhint-max-distance
|
| The encoding of the branch hint instruction limits the hint to be within
|
| 256 instructions of the branch it is effecting. By default, GCC makes
|
| -sure it is within 125.
|
| +sure it is within 125.
|
|
|
| @item -msafe-hints
|
| @opindex msafe-hints
|
| @@ -15502,14 +16824,14 @@ This option is available for Cygwin and MinGW targets. It
|
| specifies that a console application is to be generated, by
|
| instructing the linker to set the PE header subsystem type
|
| required for console applications.
|
| -This is the default behaviour for Cygwin and MinGW targets.
|
| +This is the default behavior for Cygwin and MinGW targets.
|
|
|
| @item -mcygwin
|
| @opindex mcygwin
|
| This option is available for Cygwin targets. It specifies that
|
| the Cygwin internal interface is to be used for predefined
|
| preprocessor macros, C runtime libraries and related linker
|
| -paths and options. For Cygwin targets this is the default behaviour.
|
| +paths and options. For Cygwin targets this is the default behavior.
|
| This option is deprecated and will be removed in a future release.
|
|
|
| @item -mno-cygwin
|
| @@ -15537,6 +16859,12 @@ specifies that the dllimport attribute should be ignored.
|
| This option is available for MinGW targets. It specifies
|
| that MinGW-specific thread support is to be used.
|
|
|
| +@item -municode
|
| +@opindex municode
|
| +This option is available for mingw-w64 targets. It specifies
|
| +that the UNICODE macro is getting pre-defined and that the
|
| +unicode capable runtime startup code is chosen.
|
| +
|
| @item -mwin32
|
| @opindex mwin32
|
| This option is available for Cygwin and MinGW targets. It
|
| @@ -15550,6 +16878,23 @@ This option is available for Cygwin and MinGW targets. It
|
| specifies that a GUI application is to be generated by
|
| instructing the linker to set the PE header subsystem type
|
| appropriately.
|
| +
|
| +@item -fno-set-stack-executable
|
| +@opindex fno-set-stack-executable
|
| +This option is available for MinGW targets. It specifies that
|
| +the executable flag for stack used by nested functions isn't
|
| +set. This is necessary for binaries running in kernel mode of
|
| +Windows, as there the user32 API, which is used to set executable
|
| +privileges, isn't available.
|
| +
|
| +@item -mpe-aligned-commons
|
| +@opindex mpe-aligned-commons
|
| +This option is available for Cygwin and MinGW targets. It
|
| +specifies that the GNU extension to the PE file format that
|
| +permits the correct alignment of COMMON variables should be
|
| +used when generating code. It will be enabled by default if
|
| +GCC detects that the target assembler found during configuration
|
| +supports the feature.
|
| @end table
|
|
|
| See also under @ref{i386 and x86-64 Options} for standard options.
|
| @@ -15806,19 +17151,19 @@ Use it to conform to a non-default application binary interface.
|
| In C code, controls the placement of uninitialized global variables.
|
| Unix C compilers have traditionally permitted multiple definitions of
|
| such variables in different compilation units by placing the variables
|
| -in a common block.
|
| -This is the behavior specified by @option{-fcommon}, and is the default
|
| -for GCC on most targets.
|
| +in a common block.
|
| +This is the behavior specified by @option{-fcommon}, and is the default
|
| +for GCC on most targets.
|
| On the other hand, this behavior is not required by ISO C, and on some
|
| targets may carry a speed or code size penalty on variable references.
|
| -The @option{-fno-common} option specifies that the compiler should place
|
| +The @option{-fno-common} option specifies that the compiler should place
|
| uninitialized global variables in the data section of the object file,
|
| rather than generating them as common blocks.
|
| -This has the effect that if the same variable is declared
|
| +This has the effect that if the same variable is declared
|
| (without @code{extern}) in two different compilations,
|
| you will get a multiple-definition error when you link them.
|
| -In this case, you must compile with @option{-fcommon} instead.
|
| -Compiling with @option{-fno-common} is useful on targets for which
|
| +In this case, you must compile with @option{-fcommon} instead.
|
| +Compiling with @option{-fno-common} is useful on targets for which
|
| it provides better performance, or if you wish to verify that the
|
| program will work on other systems which always treat uninitialized
|
| variable declarations this way.
|
| @@ -16039,7 +17384,9 @@ instrumentation. The function name to be matched is its user-visible
|
| name, such as @code{vector<int> blah(const vector<int> &)}, not the
|
| internal mangled name (e.g., @code{_Z4blahRSt6vectorIiSaIiEE}). The
|
| match is done on substrings: if the @var{sym} parameter is a substring
|
| -of the function name, it is considered to be a match.
|
| +of the function name, it is considered to be a match. For C99 and C++
|
| +extended identifiers, the function name must be given in UTF-8, not
|
| +using universal character names.
|
|
|
| @item -fstack-check
|
| @opindex fstack-check
|
| @@ -16495,156 +17842,3 @@ precompiled header, the actual behavior will be a mixture of the
|
| behavior for the options. For instance, if you use @option{-g} to
|
| generate the precompiled header but not when using it, you may or may
|
| not get debugging information for routines in the precompiled header.
|
| -
|
| -@node Running Protoize
|
| -@section Running Protoize
|
| -
|
| -The program @code{protoize} is an optional part of GCC@. You can use
|
| -it to add prototypes to a program, thus converting the program to ISO
|
| -C in one respect. The companion program @code{unprotoize} does the
|
| -reverse: it removes argument types from any prototypes that are found.
|
| -
|
| -When you run these programs, you must specify a set of source files as
|
| -command line arguments. The conversion programs start out by compiling
|
| -these files to see what functions they define. The information gathered
|
| -about a file @var{foo} is saved in a file named @file{@var{foo}.X}.
|
| -
|
| -After scanning comes actual conversion. The specified files are all
|
| -eligible to be converted; any files they include (whether sources or
|
| -just headers) are eligible as well.
|
| -
|
| -But not all the eligible files are converted. By default,
|
| -@code{protoize} and @code{unprotoize} convert only source and header
|
| -files in the current directory. You can specify additional directories
|
| -whose files should be converted with the @option{-d @var{directory}}
|
| -option. You can also specify particular files to exclude with the
|
| -@option{-x @var{file}} option. A file is converted if it is eligible, its
|
| -directory name matches one of the specified directory names, and its
|
| -name within the directory has not been excluded.
|
| -
|
| -Basic conversion with @code{protoize} consists of rewriting most
|
| -function definitions and function declarations to specify the types of
|
| -the arguments. The only ones not rewritten are those for varargs
|
| -functions.
|
| -
|
| -@code{protoize} optionally inserts prototype declarations at the
|
| -beginning of the source file, to make them available for any calls that
|
| -precede the function's definition. Or it can insert prototype
|
| -declarations with block scope in the blocks where undeclared functions
|
| -are called.
|
| -
|
| -Basic conversion with @code{unprotoize} consists of rewriting most
|
| -function declarations to remove any argument types, and rewriting
|
| -function definitions to the old-style pre-ISO form.
|
| -
|
| -Both conversion programs print a warning for any function declaration or
|
| -definition that they can't convert. You can suppress these warnings
|
| -with @option{-q}.
|
| -
|
| -The output from @code{protoize} or @code{unprotoize} replaces the
|
| -original source file. The original file is renamed to a name ending
|
| -with @samp{.save} (for DOS, the saved filename ends in @samp{.sav}
|
| -without the original @samp{.c} suffix). If the @samp{.save} (@samp{.sav}
|
| -for DOS) file already exists, then the source file is simply discarded.
|
| -
|
| -@code{protoize} and @code{unprotoize} both depend on GCC itself to
|
| -scan the program and collect information about the functions it uses.
|
| -So neither of these programs will work until GCC is installed.
|
| -
|
| -Here is a table of the options you can use with @code{protoize} and
|
| -@code{unprotoize}. Each option works with both programs unless
|
| -otherwise stated.
|
| -
|
| -@table @code
|
| -@item -B @var{directory}
|
| -Look for the file @file{SYSCALLS.c.X} in @var{directory}, instead of the
|
| -usual directory (normally @file{/usr/local/lib}). This file contains
|
| -prototype information about standard system functions. This option
|
| -applies only to @code{protoize}.
|
| -
|
| -@item -c @var{compilation-options}
|
| -Use @var{compilation-options} as the options when running @command{gcc} to
|
| -produce the @samp{.X} files. The special option @option{-aux-info} is
|
| -always passed in addition, to tell @command{gcc} to write a @samp{.X} file.
|
| -
|
| -Note that the compilation options must be given as a single argument to
|
| -@code{protoize} or @code{unprotoize}. If you want to specify several
|
| -@command{gcc} options, you must quote the entire set of compilation options
|
| -to make them a single word in the shell.
|
| -
|
| -There are certain @command{gcc} arguments that you cannot use, because they
|
| -would produce the wrong kind of output. These include @option{-g},
|
| -@option{-O}, @option{-c}, @option{-S}, and @option{-o} If you include these in
|
| -the @var{compilation-options}, they are ignored.
|
| -
|
| -@item -C
|
| -Rename files to end in @samp{.C} (@samp{.cc} for DOS-based file
|
| -systems) instead of @samp{.c}. This is convenient if you are converting
|
| -a C program to C++. This option applies only to @code{protoize}.
|
| -
|
| -@item -g
|
| -Add explicit global declarations. This means inserting explicit
|
| -declarations at the beginning of each source file for each function
|
| -that is called in the file and was not declared. These declarations
|
| -precede the first function definition that contains a call to an
|
| -undeclared function. This option applies only to @code{protoize}.
|
| -
|
| -@item -i @var{string}
|
| -Indent old-style parameter declarations with the string @var{string}.
|
| -This option applies only to @code{protoize}.
|
| -
|
| -@code{unprotoize} converts prototyped function definitions to old-style
|
| -function definitions, where the arguments are declared between the
|
| -argument list and the initial @samp{@{}. By default, @code{unprotoize}
|
| -uses five spaces as the indentation. If you want to indent with just
|
| -one space instead, use @option{-i " "}.
|
| -
|
| -@item -k
|
| -Keep the @samp{.X} files. Normally, they are deleted after conversion
|
| -is finished.
|
| -
|
| -@item -l
|
| -Add explicit local declarations. @code{protoize} with @option{-l} inserts
|
| -a prototype declaration for each function in each block which calls the
|
| -function without any declaration. This option applies only to
|
| -@code{protoize}.
|
| -
|
| -@item -n
|
| -Make no real changes. This mode just prints information about the conversions
|
| -that would have been done without @option{-n}.
|
| -
|
| -@item -N
|
| -Make no @samp{.save} files. The original files are simply deleted.
|
| -Use this option with caution.
|
| -
|
| -@item -p @var{program}
|
| -Use the program @var{program} as the compiler. Normally, the name
|
| -@file{gcc} is used.
|
| -
|
| -@item -q
|
| -Work quietly. Most warnings are suppressed.
|
| -
|
| -@item -v
|
| -Print the version number, just like @option{-v} for @command{gcc}.
|
| -@end table
|
| -
|
| -If you need special compiler options to compile one of your program's
|
| -source files, then you should generate that file's @samp{.X} file
|
| -specially, by running @command{gcc} on that source file with the
|
| -appropriate options and the option @option{-aux-info}. Then run
|
| -@code{protoize} on the entire set of files. @code{protoize} will use
|
| -the existing @samp{.X} file because it is newer than the source file.
|
| -For example:
|
| -
|
| -@smallexample
|
| -gcc -Dfoo=bar file1.c -aux-info file1.X
|
| -protoize *.c
|
| -@end smallexample
|
| -
|
| -@noindent
|
| -You need to include the special files along with the rest in the
|
| -@code{protoize} command, even though their @samp{.X} files already
|
| -exist, because otherwise they won't get converted.
|
| -
|
| -@xref{Protoize Caveats}, for more information on how to use
|
| -@code{protoize} successfully.
|
|
|