1GCC(1) GNU GCC(1)
2
3
4
6 gcc - GNU project C and C++ compiler
7
9 gcc [--cc⎪--SS⎪--EE] [--ssttdd==standard]
10 [--gg] [--ppgg] [--OOlevel]
11 [--WWwarn...] [--ppeeddaannttiicc]
12 [--IIdir...] [--LLdir...]
13 [--DDmacro[=defn]...] [--UUmacro]
14 [--ffoption...] [--mmmachine-option...]
15 [--oo outfile] infile...
16
17 Only the most useful options are listed here; see below for the remain‐
18 der. gg++++ accepts mostly the same options as ggcccc.
19
21 When you invoke GCC, it normally does preprocessing, compilation,
22 assembly and linking. The ``overall options'' allow you to stop this
23 process at an intermediate stage. For example, the --cc option says not
24 to run the linker. Then the output consists of object files output by
25 the assembler.
26
27 Other options are passed on to one stage of processing. Some options
28 control the preprocessor and others the compiler itself. Yet other
29 options control the assembler and linker; most of these are not docu‐
30 mented here, since you rarely need to use any of them.
31
32 Most of the command line options that you can use with GCC are useful
33 for C programs; when an option is only useful with another language
34 (usually C++), the explanation says so explicitly. If the description
35 for a particular option does not mention a source language, you can use
36 that option with all supported languages.
37
38 The ggcccc program accepts options and file names as operands. Many
39 options have multi-letter names; therefore multiple single-letter
40 options may not be grouped: --ddrr is very different from --dd --rr.
41
42 You can mix options and other arguments. For the most part, the order
43 you use doesn't matter. Order does matter when you use several options
44 of the same kind; for example, if you specify --LL more than once, the
45 directories are searched in the order specified.
46
47 Many options have long names starting with --ff or with --WW---for example,
48 --ffffoorrccee--mmeemm, --ffssttrreennggtthh--rreedduuccee, --WWffoorrmmaatt and so on. Most of these have
49 both positive and negative forms; the negative form of --ffffoooo would be
50 --ffnnoo--ffoooo. This manual documents only one of these two forms, whichever
51 one is not the default.
52
54 OOppttiioonn SSuummmmaarryy
55
56 Here is a summary of all the options, grouped by type. Explanations
57 are in the following sections.
58
59 Overall Options
60 --cc --SS --EE --oo file --ppiippee --ppaassss--eexxiitt--ccooddeess --xx language --vv --######
61 ----hheellpp ----ttaarrggeett--hheellpp ----vveerrssiioonn
62
63 C Language Options
64 --aannssii --ssttdd==standard --aauuxx--iinnffoo filename --ffnnoo--aassmm --ffnnoo--bbuuiillttiinn
65 --ffnnoo--bbuuiillttiinn--function --ffhhoosstteedd --ffffrreeeessttaannddiinngg --ttrriiggrraapphhss --nnoo--
66 iinntteeggrraatteedd--ccpppp --ttrraaddiittiioonnaall --ttrraaddiittiioonnaall--ccpppp --ffaallllooww--ssiinnggllee--pprree‐‐
67 cciissiioonn --ffccoonndd--mmiissmmaattcchh --ffssiiggnneedd--bbiittffiieellddss --ffssiiggnneedd--cchhaarr --ffuunn‐‐
68 ssiiggnneedd--bbiittffiieellddss --ffuunnssiiggnneedd--cchhaarr --ffwwrriittaabbllee--ssttrriinnggss
69
70 C++ Language Options
71 --ffnnoo--aacccceessss--ccoonnttrrooll --ffcchheecckk--nneeww --ffccoonnsseerrvvee--ssppaaccee --ffnnoo--ccoonnsstt--
72 ssttrriinnggss --ffddoollllaarrss--iinn--iiddeennttiiffiieerrss --ffnnoo--eelliiddee--ccoonnssttrruuccttoorrss --ffnnoo--
73 eennffoorrccee--eehh--ssppeeccss --ffeexxtteerrnnaall--tteemmppllaatteess --ffaalltt--eexxtteerrnnaall--tteemmppllaatteess
74 --ffffoorr--ssccooppee --ffnnoo--ffoorr--ssccooppee --ffnnoo--ggnnuu--kkeeyywwoorrddss --ffnnoo--iimmpplliicciitt--tteemm‐‐
75 ppllaatteess --ffnnoo--iimmpplliicciitt--iinnlliinnee--tteemmppllaatteess --ffnnoo--iimmpplleemmeenntt--iinnlliinneess --ffmmss--
76 eexxtteennssiioonnss --ffnnoo--nnoonnaannssii--bbuuiillttiinnss --ffnnoo--ooppeerraattoorr--nnaammeess --ffnnoo--
77 ooppttiioonnaall--ddiiaaggss --ffppeerrmmiissssiivvee --ffrreeppoo --ffnnoo--rrttttii --ffssttaattss --fftteemm‐‐
78 ppllaattee--ddeepptthh--n --ffuussee--ccxxaa--aatteexxiitt --ffvvttaabbllee--ggcc --ffnnoo--wweeaakk --nnoossttddiinncc++++
79 --ffnnoo--ddeeffaauulltt--iinnlliinnee --WWaabbii --WWccttoorr--ddttoorr--pprriivvaaccyy --WWnnoonn--vviirrttuuaall--ddttoorr
80 --WWrreeoorrddeerr --WWeeffffcc++++ --WWnnoo--ddeepprreeccaatteedd --WWnnoo--nnoonn--tteemmppllaattee--ffrriieenndd
81 --WWoolldd--ssttyyllee--ccaasstt --WWoovveerrllooaaddeedd--vviirrttuuaall --WWnnoo--ppmmff--ccoonnvveerrssiioonnss --WWssiiggnn--
82 pprroommoo --WWssyynntthh
83
84 Objective-C Language Options
85 --ffccoonnssttaanntt--ssttrriinngg--ccllaassss==class-name --ffggnnuu--rruunnttiimmee --ffnneexxtt--rruunnttiimmee
86 --ggeenn--ddeeccllss --WWnnoo--pprroottooccooll --WWsseelleeccttoorr
87
88 Language Independent Options
89 --ffmmeessssaaggee--lleennggtthh==n --ffddiiaaggnnoossttiiccss--sshhooww--llooccaattiioonn==[oonnccee⎪eevveerryy--lliinnee]
90
91 Warning Options
92 --ffssyynnttaaxx--oonnllyy --ppeeddaannttiicc --ppeeddaannttiicc--eerrrroorrss --ww --WW --WWaallll --WWaaggggrree‐‐
93 ggaattee--rreettuurrnn --WWccaasstt--aalliiggnn --WWccaasstt--qquuaall --WWcchhaarr--ssuubbssccrriippttss --WWccoommmmeenntt
94 --WWccoonnvveerrssiioonn --WWnnoo--ddeepprreeccaatteedd--ddeeccllaarraattiioonnss --WWddiissaabblleedd--ooppttiimmiizzaattiioonn
95 --WWddiivv--bbyy--zzeerroo --WWeerrrroorr --WWffllooaatt--eeqquuaall --WWffoorrmmaatt --WWffoorrmmaatt==22 --WWffoorr‐‐
96 mmaatt--nnoonnlliitteerraall --WWffoorrmmaatt--sseeccuurriittyy --WWiimmpplliicciitt --WWiimmpplliicciitt--iinntt --WWiimm‐‐
97 pplliicciitt--ffuunnccttiioonn--ddeeccllaarraattiioonn --WWeerrrroorr--iimmpplliicciitt--ffuunnccttiioonn--ddeeccllaarraattiioonn
98 --WWiimmppoorrtt --WWiinnlliinnee --WWllaarrggeerr--tthhaann--len --WWlloonngg--lloonngg --WWmmaaiinn --WWmmiissss‐‐
99 iinngg--bbrraacceess --WWmmiissssiinngg--ffoorrmmaatt--aattttrriibbuuttee --WWmmiissssiinngg--nnoorreettuurrnn --WWmmuullttii‐‐
100 cchhaarr --WWnnoo--ffoorrmmaatt--eexxttrraa--aarrggss --WWnnoo--ffoorrmmaatt--yy22kk --WWnnoo--iimmppoorrtt --WWppaacckkeedd
101 --WWppaaddddeedd --WWppaarreenntthheesseess --WWppooiinntteerr--aarriitthh --WWrreedduunnddaanntt--ddeeccllss --WWrree‐‐
102 ttuurrnn--ttyyppee --WWsseeqquueennccee--ppooiinntt --WWsshhaaddooww --WWssiiggnn--ccoommppaarree --WWsswwiittcchh
103 --WWssyysstteemm--hheeaaddeerrss --WWttrriiggrraapphhss --WWuunnddeeff --WWuunniinniittiiaalliizzeedd --WWuunnkknnoowwnn--
104 pprraaggmmaass --WWuunnrreeaacchhaabbllee--ccooddee --WWuunnuusseedd --WWuunnuusseedd--ffuunnccttiioonn --WWuunnuusseedd--
105 llaabbeell --WWuunnuusseedd--ppaarraammeetteerr --WWuunnuusseedd--vvaalluuee --WWuunnuusseedd--vvaarriiaabbllee
106 --WWwwrriittee--ssttrriinnggss
107
108 C-only Warning Options
109 --WWbbaadd--ffuunnccttiioonn--ccaasstt --WWmmiissssiinngg--ddeeccllaarraattiioonnss --WWmmiissssiinngg--pprroottoottyyppeess
110 --WWnneesstteedd--eexxtteerrnnss --WWssttrriicctt--pprroottoottyyppeess --WWttrraaddiittiioonnaall
111
112 Debugging Options
113 --ddletters --dduummppssppeeccss --dduummppmmaacchhiinnee --dduummppvveerrssiioonn --ffdduummpp--uunnnnuummbbeerreedd
114 --ffdduummpp--ttrraannssllaattiioonn--uunniitt[--n] --ffdduummpp--ccllaassss--hhiieerraarrcchhyy[--n] --ffdduummpp--ttrreeee--
115 oorriiggiinnaall[--n] --ffdduummpp--ttrreeee--ooppttiimmiizzeedd[--n] --ffdduummpp--ttrreeee--iinnlliinneedd[--n]
116 --ffmmeemm--rreeppoorrtt --ffpprreetteenndd--ffllooaatt --ffpprrooffiillee--aarrccss --ffsscchheedd--vveerrbboossee==n
117 --fftteesstt--ccoovveerraaggee --ffttiimmee--rreeppoorrtt --gg --gglevel --ggccooffff --ggddwwaarrff
118 --ggddwwaarrff--11 --ggddwwaarrff--11++ --ggddwwaarrff--22 --ggggddbb --ggssttaabbss --ggssttaabbss++ --ggvvmmss
119 --ggxxccooffff --ggxxccooffff++ --pp --ppgg --pprriinntt--ffiillee--nnaammee==library --pprriinntt--lliibbggcccc--
120 ffiillee--nnaammee --pprriinntt--mmuullttii--ddiirreeccttoorryy --pprriinntt--mmuullttii--lliibb --pprriinntt--pprroogg--
121 nnaammee==program --pprriinntt--sseeaarrcchh--ddiirrss --QQ --ssaavvee--tteemmppss --ttiimmee
122
123 Optimization Options
124 --ffaalliiggnn--ffuunnccttiioonnss==n --ffaalliiggnn--jjuummppss==n --ffaalliiggnn--llaabbeellss==n --ffaalliiggnn--
125 llooooppss==n --ffbboouunnddss--cchheecckk --ffbbrraanncchh--pprroobbaabbiilliittiieess --ffccaalllleerr--ssaavveess
126 --ffccpprroopp--rreeggiisstteerrss --ffccssee--ffoollllooww--jjuummppss --ffccssee--sskkiipp--bblloocckkss --ffddaattaa--
127 sseeccttiioonnss --ffddeellaayyeedd--bbrraanncchh --ffddeelleettee--nnuullll--ppooiinntteerr--cchheecckkss --ffeexxppeenn‐‐
128 ssiivvee--ooppttiimmiizzaattiioonnss --ffffaasstt--mmaatthh --ffffllooaatt--ssttoorree --ffffoorrccee--aaddddrr
129 --ffffoorrccee--mmeemm --ffffuunnccttiioonn--sseeccttiioonnss --ffggccssee --ffggccssee--llmm --ffggccssee--ssmm --ffiinn‐‐
130 lliinnee--ffuunnccttiioonnss --ffiinnlliinnee--lliimmiitt==n --ffkkeeeepp--iinnlliinnee--ffuunnccttiioonnss --ffkkeeeepp--
131 ssttaattiicc--ccoonnssttss --ffmmeerrggee--ccoonnssttaannttss --ffmmeerrggee--aallll--ccoonnssttaannttss --ffmmoovvee--aallll--
132 mmoovvaabblleess --ffnnoo--bbrraanncchh--ccoouunntt--rreegg --ffnnoo--ddeeffaauulltt--iinnlliinnee --ffnnoo--ddeeffeerr--ppoopp
133 --ffnnoo--ffuunnccttiioonn--ccssee --ffnnoo--gguueessss--bbrraanncchh--pprroobbaabbiilliittyy --ffnnoo--iinnlliinnee --ffnnoo--
134 mmaatthh--eerrrrnnoo --ffnnoo--ppeeeepphhoollee --ffnnoo--ppeeeepphhoollee22 --ffuunnssaaffee--mmaatthh--ooppttiimmiizzaa‐‐
135 ttiioonnss --ffnnoo--ttrraappppiinngg--mmaatthh --ffoommiitt--ffrraammee--ppooiinntteerr --ffooppttiimmiizzee--rreeggiisstteerr--
136 mmoovvee --ffooppttiimmiizzee--ssiibblliinngg--ccaallllss --ffpprreeffeettcchh--lloooopp--aarrrraayyss --ffrreedduuccee--aallll--
137 ggiivvss --ffrreeggmmoovvee --ffrreennaammee--rreeggiisstteerrss --ffrreerruunn--ccssee--aafftteerr--lloooopp --ffrreerruunn--
138 lloooopp--oopptt --ffsscchheedduullee--iinnssnnss --ffsscchheedduullee--iinnssnnss22 --ffnnoo--sscchheedd--iinntteerrbblloocckk
139 --ffnnoo--sscchheedd--ssppeecc --ffsscchheedd--ssppeecc--llooaadd --ffsscchheedd--ssppeecc--llooaadd--ddaannggeerroouuss
140 --ffssiinnggllee--pprreecciissiioonn--ccoonnssttaanntt --ffssssaa --ffssssaa--ccccpp --ffssssaa--ddccee --ffssttrreennggtthh--
141 rreedduuccee --ffssttrriicctt--aalliiaassiinngg --fftthhrreeaadd--jjuummppss --ffttrraappvv --ffuunnrroollll--aallll--
142 llooooppss --ffuunnrroollll--llooooppss ----ppaarraamm name==value --OO --OO00 --OO11 --OO22 --OO33
143 --OOss
144
145 Preprocessor Options
146 --$$ --AAquestion==answer --AA--question[==answer] --CC --ddDD --ddII --ddMM --ddNN
147 --DDmacro[==defn] --EE --HH --iiddiirraafftteerr dir --iinncclluuddee file --iimmaaccrrooss file
148 --iipprreeffiixx file --iiwwiitthhpprreeffiixx dir --iiwwiitthhpprreeffiixxbbeeffoorree dir --iissyysstteemm
149 dir --MM --MMMM --MMFF --MMGG --MMPP --MMQQ --MMTT --nnoossttddiinncc --PP --rreemmaapp --ttrrii‐‐
150 ggrraapphhss --uunnddeeff --UUmacro --WWpp,,option
151
152 Assembler Option
153 --WWaa,,option
154
155 Linker Options
156 object-file-name --lllibrary --nnoossttaarrttffiilleess --nnooddeeffaauullttlliibbss --nnoosstt‐‐
157 ddlliibb --ss --ssttaattiicc --ssttaattiicc--lliibbggcccc --sshhaarreedd --sshhaarreedd--lliibbggcccc --ssyymm‐‐
158 bboolliicc --WWll,,option --XXlliinnkkeerr option --uu symbol
159
160 Directory Options
161 --BBprefix --IIdir --II-- --LLdir --ssppeeccss==file
162
163 Target Options
164 --bb machine --VV version
165
166 Machine Dependent Options
167 M680x0 Options
168
169 --mm6688000000 --mm6688002200 --mm6688002200--4400 --mm6688002200--6600 --mm6688003300 --mm6688004400 --mm6688006600
170 --mmccppuu3322 --mm55220000 --mm6688888811 --mmbbiittffiieelldd --mmcc6688000000 --mmcc6688002200 --mmffppaa
171 --mmnnoobbiittffiieelldd --mmrrttdd --mmsshhoorrtt --mmssoofftt--ffllooaatt --mmppccrreell --mmaalliiggnn--iinntt
172 --mmssttrriicctt--aalliiggnn
173
174 M68hc1x Options
175
176 --mm66881111 --mm66881122 --mm6688hhcc1111 --mm6688hhcc1122 --mmaauuttoo--iinnccddeecc --mmsshhoorrtt --mmssoofftt--
177 rreegg--ccoouunntt==count
178
179 VAX Options
180
181 --mmgg --mmggnnuu --mmuunniixx
182
183 SPARC Options
184
185 --mmccppuu==cpu-type --mmttuunnee==cpu-type --mmccmmooddeell==code-model --mm3322 --mm6644
186 --mmaapppp--rreeggss --mmbbrrookkeenn--ssaavveerreessttoorree --mmccyypprreessss --mmffaasstteerr--ssttrruuccttss
187 --mmffllaatt --mmffppuu --mmhhaarrdd--ffllooaatt --mmhhaarrdd--qquuaadd--ffllooaatt --mmiimmppuurree--tteexxtt
188 --mmlliivvee--gg00 --mmnnoo--aapppp--rreeggss --mmnnoo--ffaasstteerr--ssttrruuccttss --mmnnoo--ffllaatt --mmnnoo--ffppuu
189 --mmnnoo--iimmppuurree--tteexxtt --mmnnoo--ssttaacckk--bbiiaass --mmnnoo--uunnaalliiggnneedd--ddoouubblleess --mmssoofftt--
190 ffllooaatt --mmssoofftt--qquuaadd--ffllooaatt --mmssppaarrcclliittee --mmssttaacckk--bbiiaass --mmssuuppeerrssppaarrcc
191 --mmuunnaalliiggnneedd--ddoouubblleess --mmvv88
192
193 Convex Options
194
195 --mmcc11 --mmcc22 --mmcc3322 --mmcc3344 --mmcc3388 --mmaarrggccoouunntt --mmnnooaarrggccoouunntt --mmlloonngg3322
196 --mmlloonngg6644 --mmvvoollaattiillee--ccaacchhee --mmvvoollaattiillee--nnooccaacchhee
197
198 AMD29K Options
199
200 --mm2299000000 --mm2299005500 --mmbbww --mmnnbbww --mmddww --mmnnddww --mmllaarrggee --mmnnoorrmmaall
201 --mmssmmaallll --mmkkeerrnneell--rreeggiisstteerrss --mmnnoo--rreeuussee--aarrgg--rreeggss --mmnnoo--ssttaacckk--cchheecckk
202 --mmnnoo--ssttoorreemm--bbuugg --mmrreeuussee--aarrgg--rreeggss --mmssoofftt--ffllooaatt --mmssttaacckk--cchheecckk
203 --mmssttoorreemm--bbuugg --mmuusseerr--rreeggiisstteerrss
204
205 ARM Options
206
207 --mmaappccss--ffrraammee --mmnnoo--aappccss--ffrraammee --mmaappccss--2266 --mmaappccss--3322 --mmaappccss--ssttaacckk--
208 cchheecckk --mmnnoo--aappccss--ssttaacckk--cchheecckk --mmaappccss--ffllooaatt --mmnnoo--aappccss--ffllooaatt --mmaappccss--
209 rreeeennttrraanntt --mmnnoo--aappccss--rreeeennttrraanntt --mmsscchheedd--pprroolloogg --mmnnoo--sscchheedd--pprroolloogg
210 --mmlliittttllee--eennddiiaann --mmbbiigg--eennddiiaann --mmwwoorrddss--lliittttllee--eennddiiaann --mmaalliiggnnmmeenntt--
211 ttrraappss --mmnnoo--aalliiggnnmmeenntt--ttrraappss --mmssoofftt--ffllooaatt --mmhhaarrdd--ffllooaatt --mmffppee
212 --mmtthhuummbb--iinntteerrwwoorrkk --mmnnoo--tthhuummbb--iinntteerrwwoorrkk --mmccppuu==name --mmaarrcchh==name
213 --mmffppee==name --mmssttrruuccttuurree--ssiizzee--bboouunnddaarryy==n --mmbbssdd --mmxxooppeenn --mmnnoo--ssyymmrree‐‐
214 nnaammee --mmaabboorrtt--oonn--nnoorreettuurrnn --mmlloonngg--ccaallllss --mmnnoo--lloonngg--ccaallllss --mmssiinnggllee--
215 ppiicc--bbaassee --mmnnoo--ssiinnggllee--ppiicc--bbaassee --mmppiicc--rreeggiisstteerr==reg --mmnnoopp--ffuunn--
216 ddlllliimmppoorrtt --mmppookkee--ffuunnccttiioonn--nnaammee --mmtthhuummbb --mmaarrmm --mmttppccss--ffrraammee --mmttppccss--
217 lleeaaff--ffrraammee --mmccaalllleerr--ssuuppeerr--iinntteerrwwoorrkkiinngg --mmccaalllleeee--ssuuppeerr--iinntteerrwwoorrkkiinngg
218
219 MN10200 Options
220
221 --mmrreellaaxx
222
223 MN10300 Options
224
225 --mmmmuulltt--bbuugg --mmnnoo--mmuulltt--bbuugg --mmaamm3333 --mmnnoo--aamm3333 --mmnnoo--ccrrtt00 --mmrreellaaxx
226
227 M32R/D Options
228
229 --mm3322rrxx --mm3322rr --mmccooddee--mmooddeell==model-type --mmssddaattaa==sdata-type --GG num
230
231 M88K Options
232
233 --mm8888000000 --mm8888110000 --mm8888111100 --mmbbiigg--ppiicc --mmcchheecckk--zzeerroo--ddiivviissiioonn --mmhhaann‐‐
234 ddllee--llaarrggee--sshhiifftt --mmiiddeennttiiffyy--rreevviissiioonn --mmnnoo--cchheecckk--zzeerroo--ddiivviissiioonn --mmnnoo--
235 ooccss--ddeebbuugg--iinnffoo --mmnnoo--ooccss--ffrraammee--ppoossiittiioonn --mmnnoo--ooppttiimmiizzee--aarrgg--aarreeaa
236 --mmnnoo--sseerriiaalliizzee--vvoollaattiillee --mmnnoo--uunnddeerrssccoorreess --mmooccss--ddeebbuugg--iinnffoo --mmooccss--
237 ffrraammee--ppoossiittiioonn --mmooppttiimmiizzee--aarrgg--aarreeaa --mmsseerriiaalliizzee--vvoollaattiillee --mmsshhoorrtt--
238 ddaattaa--num --mmssvvrr33 --mmssvvrr44 --mmttrraapp--llaarrggee--sshhiifftt --mmuussee--ddiivv--iinnssttrruuccttiioonn
239 --mmvveerrssiioonn--0033..0000 --mmwwaarrnn--ppaasssseedd--ssttrruuccttss
240
241 RS/6000 and PowerPC Options
242
243 --mmccppuu==cpu-type --mmttuunnee==cpu-type --mmppoowweerr --mmnnoo--ppoowweerr --mmppoowweerr22 --mmnnoo--
244 ppoowweerr22 --mmppoowweerrppcc --mmppoowweerrppcc6644 --mmnnoo--ppoowweerrppcc --mmaallttiivveecc --mmnnoo--aallttiivveecc
245 --mmppoowweerrppcc--ggppoopptt --mmnnoo--ppoowweerrppcc--ggppoopptt --mmppoowweerrppcc--ggffxxoopptt --mmnnoo--ppoowweerrppcc--
246 ggffxxoopptt --mmnneeww--mmnneemmoonniiccss --mmoolldd--mmnneemmoonniiccss --mmffuullll--ttoocc --mmmmiinniimmaall--ttoocc
247 --mmnnoo--ffpp--iinn--ttoocc --mmnnoo--ssuumm--iinn--ttoocc --mm6644 --mm3322 --mmxxll--ccaallll --mmnnoo--xxll--ccaallll
248 --mmppee --mmssoofftt--ffllooaatt --mmhhaarrdd--ffllooaatt --mmmmuullttiippllee --mmnnoo--mmuullttiippllee --mmssttrriinngg
249 --mmnnoo--ssttrriinngg --mmuuppddaattee --mmnnoo--uuppddaattee --mmffuusseedd--mmaadddd --mmnnoo--ffuusseedd--mmaadddd
250 --mmbbiitt--aalliiggnn --mmnnoo--bbiitt--aalliiggnn --mmssttrriicctt--aalliiggnn --mmnnoo--ssttrriicctt--aalliiggnn
251 --mmrreellooccaattaabbllee --mmnnoo--rreellooccaattaabbllee --mmrreellooccaattaabbllee--lliibb --mmnnoo--rreellooccaatt‐‐
252 aabbllee--lliibb --mmttoocc --mmnnoo--ttoocc --mmlliittttllee --mmlliittttllee--eennddiiaann --mmbbiigg --mmbbiigg--
253 eennddiiaann --mmccaallll--aaiixx --mmccaallll--ssyyssvv --mmccaallll--nneettbbssdd --mmaaiixx--ssttrruucctt--rreettuurrnn
254 --mmssvvrr44--ssttrruucctt--rreettuurrnn --mmaabbii==aallttiivveecc --mmaabbii==nnoo--aallttiivveecc --mmpprroottoottyyppee
255 --mmnnoo--pprroottoottyyppee --mmssiimm --mmmmvvmmee --mmaaddss --mmyyeelllloowwkknniiffee --mmeemmbb --mmssddaattaa
256 --mmssddaattaa==opt --mmvvxxwwoorrkkss --GG num --pptthhrreeaadd
257
258 RT Options
259
260 --mmccaallll--lliibb--mmuull --mmffpp--aarrgg--iinn--ffpprreeggss --mmffpp--aarrgg--iinn--ggrreeggss --mmffuullll--ffpp--
261 bblloocckkss --mmhhcc--ssttrruucctt--rreettuurrnn --mmiinn--lliinnee--mmuull --mmmmiinniimmuumm--ffpp--bblloocckkss
262 --mmnnoohhcc--ssttrruucctt--rreettuurrnn
263
264 MIPS Options
265
266 --mmaabbiiccaallllss --mmaarrcchh==cpu-type --mmttuunnee==cpu=type --mmccppuu==cpu-type --mmeemmbbeedd‐‐
267 ddeedd--ddaattaa --mmuunniinniitt--ccoonnsstt--iinn--rrooddaattaa --mmeemmbbeeddddeedd--ppiicc --mmffpp3322 --mmffpp6644
268 --mmffuusseedd--mmaadddd --mmnnoo--ffuusseedd--mmaadddd --mmggaass --mmggpp3322 --mmggpp6644 --mmggppoopptt
269 --mmhhaallff--ppiicc --mmhhaarrdd--ffllooaatt --mmiinntt6644 --mmiippss11 --mmiippss22 --mmiippss33 --mmiippss44
270 --mmlloonngg6644 --mmlloonngg3322 --mmlloonngg--ccaallllss --mmmmeemmccppyy --mmmmiippss--aass --mmmmiippss--ttffiillee
271 --mmnnoo--aabbiiccaallllss --mmnnoo--eemmbbeeddddeedd--ddaattaa --mmnnoo--uunniinniitt--ccoonnsstt--iinn--rrooddaattaa --mmnnoo--
272 eemmbbeeddddeedd--ppiicc --mmnnoo--ggppoopptt --mmnnoo--lloonngg--ccaallllss --mmnnoo--mmeemmccppyy --mmnnoo--mmiippss--
273 ttffiillee --mmnnoo--rrnnaammeess --mmnnoo--ssttaattss --mmrrnnaammeess --mmssoofftt--ffllooaatt --mm44665500
274 --mmssiinnggllee--ffllooaatt --mmmmaadd --mmssttaattss --EELL --EEBB --GG num --nnooccpppp --mmaabbii==3322
275 --mmaabbii==nn3322 --mmaabbii==6644 --mmaabbii==eeaabbii --mmffiixx77000000 --mmnnoo--ccrrtt00 --mmfflluusshh--
276 ffuunncc==func --mmnnoo--fflluusshh--ffuunncc
277
278 i386 and x86-64 Options
279
280 --mmccppuu==cpu-type --mmaarrcchh==cpu-type --mmffppmmaatthh==unit --mmaassmm==dialect --mmnnoo--
281 ffaannccyy--mmaatthh--338877 --mmnnoo--ffpp--rreett--iinn--338877 --mmssoofftt--ffllooaatt --mmssvvrr33--sshhlliibb --mmnnoo--
282 wwiiddee--mmuullttiippllyy --mmrrttdd --mmaalliiggnn--ddoouubbllee --mmpprreeffeerrrreedd--ssttaacckk--bboouunnddaarryy==num
283 --mmmmmmxx --mmssssee --mmssssee22 --mm33ddnnooww --mmtthhrreeaaddss --mmnnoo--aalliiggnn--ssttrriinnggooppss --mmiinn‐‐
284 lliinnee--aallll--ssttrriinnggooppss --mmppuusshh--aarrggss --mmaaccccuummuullaattee--oouuttggooiinngg--aarrggss
285 --mm112288bbiitt--lloonngg--ddoouubbllee --mm9966bbiitt--lloonngg--ddoouubbllee --mmrreeggppaarrmm==num --mmoommiitt--
286 lleeaaff--ffrraammee--ppooiinntteerr --mmnnoo--rreedd--zzoonnee --mmccmmooddeell==code-model --mm3322 --mm6644
287
288 HPPA Options
289
290 --mmaarrcchh==architecture-type --mmbbiigg--sswwiittcchh --mmddiissaabbllee--ffpprreeggss --mmddiissaabbllee--
291 iinnddeexxiinngg --mmffaasstt--iinnddiirreecctt--ccaallllss --mmggaass --mmjjuummpp--iinn--ddeellaayy --mmlloonngg--llooaadd--
292 ssttoorree --mmnnoo--bbiigg--sswwiittcchh --mmnnoo--ddiissaabbllee--ffpprreeggss --mmnnoo--ddiissaabbllee--iinnddeexxiinngg
293 --mmnnoo--ffaasstt--iinnddiirreecctt--ccaallllss --mmnnoo--ggaass --mmnnoo--jjuummpp--iinn--ddeellaayy --mmnnoo--lloonngg--
294 llooaadd--ssttoorree --mmnnoo--ppoorrttaabbllee--rruunnttiimmee --mmnnoo--ssoofftt--ffllooaatt --mmnnoo--ssppaaccee--rreeggss
295 --mmssoofftt--ffllooaatt --mmppaa--rriisscc--11--00 --mmppaa--rriisscc--11--11 --mmppaa--rriisscc--22--00
296 --mmppoorrttaabbllee--rruunnttiimmee --mmsscchheedduullee==cpu-type --mmssppaaccee--rreeggss
297
298 Intel 960 Options
299
300 --mmcpu-type --mmaassmm--ccoommppaatt --mmcclleeaann--lliinnkkaaggee --mmccooddee--aalliiggnn --mmccoommpplleexx--
301 aaddddrr --mmlleeaaff--pprroocceedduurreess --mmiicc--ccoommppaatt --mmiicc22..00--ccoommppaatt --mmiicc33..00--ccoommppaatt
302 --mmiinntteell--aassmm --mmnnoo--cclleeaann--lliinnkkaaggee --mmnnoo--ccooddee--aalliiggnn --mmnnoo--ccoommpplleexx--aaddddrr
303 --mmnnoo--lleeaaff--pprroocceedduurreess --mmnnoo--oolldd--aalliiggnn --mmnnoo--ssttrriicctt--aalliiggnn --mmnnoo--ttaaiill--
304 ccaallll --mmnnuummeerriiccss --mmoolldd--aalliiggnn --mmssoofftt--ffllooaatt --mmssttrriicctt--aalliiggnn --mmttaaiill--
305 ccaallll
306
307 DEC Alpha Options
308
309 --mmnnoo--ffpp--rreeggss --mmssoofftt--ffllooaatt --mmaallpphhaa--aass --mmggaass --mmiieeeeee --mmiieeeeee--wwiitthh--
310 iinneexxaacctt --mmiieeeeee--ccoonnffoorrmmaanntt --mmffpp--ttrraapp--mmooddee==mode --mmffpp--rroouunnddiinngg--
311 mmooddee==mode --mmttrraapp--pprreecciissiioonn==mode --mmbbuuiilldd--ccoonnssttaannttss --mmccppuu==cpu-type
312 --mmttuunnee==cpu-type --mmbbwwxx --mmmmaaxx --mmffiixx --mmcciixx --mmffllooaatt--vvaaxx --mmffllooaatt--
313 iieeeeee --mmeexxpplliicciitt--rreellooccss --mmssmmaallll--ddaattaa --mmllaarrggee--ddaattaa --mmmmeemmoorryy--
314 llaatteennccyy==time
315
316 DEC Alpha/VMS Options
317
318 --mmvvmmss--rreettuurrnn--ccooddeess
319
320 Clipper Options
321
322 --mmcc330000 --mmcc440000
323
324 H8/300 Options
325
326 --mmrreellaaxx --mmhh --mmss --mmiinntt3322 --mmaalliiggnn--330000
327
328 SH Options
329
330 --mm11 --mm22 --mm33 --mm33ee --mm44--nnooffppuu --mm44--ssiinnggllee--oonnllyy --mm44--ssiinnggllee --mm44
331 --mm55--6644mmeeddiiaa --mm55--6644mmeeddiiaa--nnooffppuu --mm55--3322mmeeddiiaa --mm55--3322mmeeddiiaa--nnooffppuu
332 --mm55--ccoommppaacctt --mm55--ccoommppaacctt--nnooffppuu --mmbb --mmll --mmddaalliiggnn --mmrreellaaxx
333 --mmbbiiggttaabbllee --mmffmmoovvdd --mmhhiittaacchhii --mmnnoommaaccssaavvee --mmiieeeeee --mmiissiizzee --mmppaadd‐‐
334 ssttrruucctt --mmssppaaccee --mmpprreeffeerrggoott --mmuusseerrmmooddee
335
336 System V Options
337
338 --QQyy --QQnn --YYPP,,paths --YYmm,,dir
339
340 ARC Options
341
342 --EEBB --EELL --mmmmaannggllee--ccppuu --mmccppuu==cpu --mmtteexxtt==text-section --mmddaattaa==data-
343 section --mmrrooddaattaa==readonly-data-section
344
345 TMS320C3x/C4x Options
346
347 --mmccppuu==cpu --mmbbiigg --mmssmmaallll --mmrreeggppaarrmm --mmmmeemmppaarrmm --mmffaasstt--ffiixx --mmmmppyyii
348 --mmbbkk --mmttii --mmddpp--iissrr--rreellooaadd --mmrrppttss==count --mmrrppttbb --mmddbb --mmlloooopp--
349 uunnssiiggnneedd --mmppaarraalllleell--iinnssnnss --mmppaarraalllleell--mmppyy --mmpprreesseerrvvee--ffllooaatt
350
351 V850 Options
352
353 --mmlloonngg--ccaallllss --mmnnoo--lloonngg--ccaallllss --mmeepp --mmnnoo--eepp --mmpprroolloogg--ffuunnccttiioonn
354 --mmnnoo--pprroolloogg--ffuunnccttiioonn --mmssppaaccee --mmttddaa==n --mmssddaa==n --mmzzddaa==n --mmvv885500
355 --mmbbiigg--sswwiittcchh
356
357 NS32K Options
358
359 --mm3322003322 --mm3322333322 --mm3322553322 --mm3322008811 --mm3322338811 --mmmmuulltt--aadddd --mmnnoommuulltt--
360 aadddd --mmssoofftt--ffllooaatt --mmrrttdd --mmnnoorrttdd --mmrreeggppaarraamm --mmnnoorreeggppaarraamm --mmssbb
361 --mmnnoossbb --mmbbiittffiieelldd --mmnnoobbiittffiieelldd --mmhhiimmeemm --mmnnoohhiimmeemm
362
363 AVR Options
364
365 --mmmmccuu==mcu --mmssiizzee --mmiinniitt--ssttaacckk==n --mmnnoo--iinntteerrrruuppttss --mmccaallll--pprroolloogguueess
366 --mmnnoo--ttaabblleejjuummpp --mmttiinnyy--ssttaacckk
367
368 MCore Options
369
370 --mmhhaarrddlliitt --mmnnoo--hhaarrddlliitt --mmddiivv --mmnnoo--ddiivv --mmrreellaaxx--iimmmmeeddiiaatteess --mmnnoo--
371 rreellaaxx--iimmmmeeddiiaatteess --mmwwiiddee--bbiittffiieellddss --mmnnoo--wwiiddee--bbiittffiieellddss --mm44bbyyttee--
372 ffuunnccttiioonnss --mmnnoo--44bbyyttee--ffuunnccttiioonnss --mmccaallllggrraapphh--ddaattaa --mmnnoo--ccaallllggrraapphh--
373 ddaattaa --mmssllooww--bbyytteess --mmnnoo--ssllooww--bbyytteess --mmnnoo--llssiimm --mmlliittttllee--eennddiiaann
374 --mmbbiigg--eennddiiaann --mm221100 --mm334400 --mmssttaacckk--iinnccrreemmeenntt
375
376 MMIX Options
377
378 --mmlliibbffuunnccss --mmnnoo--lliibbffuunnccss --mmeeppssiilloonn --mmnnoo--eeppssiilloonn --mmaabbii==ggnnuu
379 --mmaabbii==mmmmiixxwwaarree --mmzzeerroo--eexxtteenndd --mmkknnuutthhddiivv --mmttoopplleevveell--ssyymmbboollss --mmeellff
380 --mmbbrraanncchh--pprreeddiicctt --mmnnoo--bbrraanncchh--pprreeddiicctt --mmbbaassee--aaddddrreesssseess --mmnnoo--bbaassee--
381 aaddddrreesssseess
382
383 IA-64 Options
384
385 --mmbbiigg--eennddiiaann --mmlliittttllee--eennddiiaann --mmggnnuu--aass --mmggnnuu--lldd --mmnnoo--ppiicc
386 --mmvvoollaattiillee--aassmm--ssttoopp --mmbb--sstteepp --mmrreeggiisstteerr--nnaammeess --mmnnoo--ssddaattaa --mmccoonn‐‐
387 ssttaanntt--ggpp --mmaauuttoo--ppiicc --mmiinnlliinnee--ddiivviiddee--mmiinn--llaatteennccyy --mmiinnlliinnee--ddiivviiddee--
388 mmaaxx--tthhrroouugghhppuutt --mmnnoo--ddwwaarrff22--aassmm --mmffiixxeedd--rraannggee==register-range
389
390 D30V Options
391
392 --mmeexxttmmeemm --mmeexxttmmeemmoorryy --mmoonncchhiipp --mmnnoo--aassmm--ooppttiimmiizzee --mmaassmm--ooppttiimmiizzee
393 --mmbbrraanncchh--ccoosstt==n --mmccoonndd--eexxeecc==n
394
395 S/390 and zSeries Options
396
397 --mmhhaarrdd--ffllooaatt --mmssoofftt--ffllooaatt --mmbbaacckkcchhaaiinn --mmnnoo--bbaacckkcchhaaiinn --mmssmmaallll--
398 eexxeecc --mmnnoo--ssmmaallll--eexxeecc --mmmmvvccllee --mmnnoo--mmvvccllee --mm6644 --mm3311 --mmddeebbuugg --mmnnoo--
399 ddeebbuugg
400
401 CRIS Options
402
403 --mmccppuu==cpu --mmaarrcchh==cpu --mmttuunnee==cpu --mmmmaaxx--ssttaacckk--ffrraammee==n --mmeelliinnuuxx--ssttaacckk‐‐
404 ssiizzee==n --mmeettrraaxx44 --mmeettrraaxx110000 --mmppddeebbuugg --mmcccc--iinniitt --mmnnoo--ssiiddee--eeffffeeccttss
405 --mmssttaacckk--aalliiggnn --mmddaattaa--aalliiggnn --mmccoonnsstt--aalliiggnn --mm3322--bbiitt --mm1166--bbiitt --mm88--bbiitt
406 --mmnnoo--pprroolloogguuee--eeppiilloogguuee --mmnnoo--ggoottpplltt --mmeellff --mmaaoouutt --mmeelliinnuuxx --mmlliinnuuxx
407 --ssiimm --ssiimm22
408
409 PDP-11 Options
410
411 --mmffppuu --mmssoofftt--ffllooaatt --mmaacc00 --mmnnoo--aacc00 --mm4400 --mm4455 --mm1100 --mmbbccooppyy
412 --mmbbccooppyy--bbuuiillttiinn --mmiinntt3322 --mmnnoo--iinntt1166 --mmiinntt1166 --mmnnoo--iinntt3322 --mmffllooaatt3322
413 --mmnnoo--ffllooaatt6644 --mmffllooaatt6644 --mmnnoo--ffllooaatt3322 --mmaabbsshhii --mmnnoo--aabbsshhii --mmbbrraanncchh--
414 eexxppeennssiivvee --mmbbrraanncchh--cchheeaapp --mmsspplliitt --mmnnoo--sspplliitt --mmuunniixx--aassmm --mmddeecc--
415 aassmm
416
417 Xstormy16 Options
418
419 --mmssiimm
420
421 Xtensa Options
422
423 --mmbbiigg--eennddiiaann --mmlliittttllee--eennddiiaann --mmddeennssiittyy --mmnnoo--ddeennssiittyy --mmmmaacc1166 --mmnnoo--
424 mmaacc1166 --mmmmuull1166 --mmnnoo--mmuull1166 --mmmmuull3322 --mmnnoo--mmuull3322 --mmnnssaa --mmnnoo--nnssaa --mmmmiinnmmaaxx
425 --mmnnoo--mmiinnmmaaxx --mmsseexxtt --mmnnoo--sseexxtt --mmbboooolleeaannss --mmnnoo--bboooolleeaannss --mmhhaarrdd--ffllooaatt
426 --mmssoofftt--ffllooaatt --mmffuusseedd--mmaadddd --mmnnoo--ffuusseedd--mmaadddd --mmsseerriiaalliizzee--vvoollaattiillee
427 --mmnnoo--sseerriiaalliizzee--vvoollaattiillee --mmtteexxtt--sseeccttiioonn--lliitteerraallss --mmnnoo--tteexxtt--sseeccttiioonn--
428 lliitteerraallss --mmttaarrggeett--aalliiggnn --mmnnoo--ttaarrggeett--aalliiggnn --mmlloonnggccaallllss --mmnnoo--lloonngg‐‐
429 ccaallllss
430
431 Code Generation Options
432 --ffccaallll--ssaavveedd--reg --ffccaallll--uusseedd--reg --ffffiixxeedd--reg --ffeexxcceeppttiioonnss --ffnnoonn--
433 ccaallll--eexxcceeppttiioonnss --ffuunnwwiinndd--ttaabblleess --ffaassyynncchhrroonnoouuss--uunnwwiinndd--ttaabblleess --ffiinn‐‐
434 hhiibbiitt--ssiizzee--ddiirreeccttiivvee --ffiinnssttrruummeenntt--ffuunnccttiioonnss --ffnnoo--ccoommmmoonn --ffnnoo--
435 iiddeenntt --ffnnoo--ggnnuu--lliinnkkeerr --ffppcccc--ssttrruucctt--rreettuurrnn --ffppiicc --ffPPIICC --ffrreegg--
436 ssttrruucctt--rreettuurrnn --ffsshhaarreedd--ddaattaa --ffsshhoorrtt--eennuummss --ffsshhoorrtt--ddoouubbllee
437 --ffsshhoorrtt--wwcchhaarr --ffvvoollaattiillee --ffvvoollaattiillee--gglloobbaall --ffvvoollaattiillee--ssttaattiicc
438 --ffvveerrbboossee--aassmm --ffppaacckk--ssttrruucctt --ffssttaacckk--cchheecckk --ffssttaacckk--lliimmiitt--rreeggiiss‐‐
439 tteerr==reg --ffssttaacckk--lliimmiitt--ssyymmbbooll==sym --ffaarrgguummeenntt--aalliiaass --ffaarrgguummeenntt--
440 nnooaalliiaass --ffaarrgguummeenntt--nnooaalliiaass--gglloobbaall --fflleeaaddiinngg--uunnddeerrssccoorree
441
442 OOppttiioonnss CCoonnttrroolllliinngg tthhee KKiinndd ooff OOuuttppuutt
443
444 Compilation can involve up to four stages: preprocessing, compilation
445 proper, assembly and linking, always in that order. The first three
446 stages apply to an individual source file, and end by producing an
447 object file; linking combines all the object files (those newly com‐
448 piled, and those specified as input) into an executable file.
449
450 For any given input file, the file name suffix determines what kind of
451 compilation is done:
452
453 file..cc
454 C source code which must be preprocessed.
455
456 file..ii
457 C source code which should not be preprocessed.
458
459 file..iiii
460 C++ source code which should not be preprocessed.
461
462 file..mm
463 Objective-C source code. Note that you must link with the library
464 libobjc.a to make an Objective-C program work.
465
466 file..mmii
467 Objective-C source code which should not be preprocessed.
468
469 file..hh
470 C header file (not to be compiled or linked).
471
472 file..cccc
473 file..ccpp
474 file..ccxxxx
475 file..ccpppp
476 file..cc++++
477 file..CC
478 C++ source code which must be preprocessed. Note that in ..ccxxxx, the
479 last two letters must both be literally xx. Likewise, ..CC refers to
480 a literal capital C.
481
482 file..ff
483 file..ffoorr
484 file..FFOORR
485 Fortran source code which should not be preprocessed.
486
487 file..FF
488 file..ffpppp
489 file..FFPPPP
490 Fortran source code which must be preprocessed (with the tradi‐
491 tional preprocessor).
492
493 file..rr
494 Fortran source code which must be preprocessed with a RATFOR pre‐
495 processor (not included with GCC).
496
497 file..aaddss
498 Ada source code file which contains a library unit declaration (a
499 declaration of a package, subprogram, or generic, or a generic
500 instantiation), or a library unit renaming declaration (a package,
501 generic, or subprogram renaming declaration). Such files are also
502 called specs.
503
504 file..aaddbb
505 Ada source code file containing a library unit body (a subprogram
506 or package body). Such files are also called bodies.
507
508 file..ss
509 Assembler code.
510
511 file..SS
512 Assembler code which must be preprocessed.
513
514 other
515 An object file to be fed straight into linking. Any file name with
516 no recognized suffix is treated this way.
517
518 You can specify the input language explicitly with the --xx option:
519
520 --xx language
521 Specify explicitly the language for the following input files
522 (rather than letting the compiler choose a default based on the
523 file name suffix). This option applies to all following input
524 files until the next --xx option. Possible values for language are:
525
526 c c-header cpp-output
527 c++ c++-cpp-output
528 objective-c objc-cpp-output
529 assembler assembler-with-cpp
530 ada
531 f77 f77-cpp-input ratfor
532 java
533
534
535 --xx nnoonnee
536 Turn off any specification of a language, so that subsequent files
537 are handled according to their file name suffixes (as they are if
538 --xx has not been used at all).
539
540 --ppaassss--eexxiitt--ccooddeess
541 Normally the ggcccc program will exit with the code of 1 if any phase
542 of the compiler returns a non-success return code. If you specify
543 --ppaassss--eexxiitt--ccooddeess, the ggcccc program will instead return with numeri‐
544 cally highest error produced by any phase that returned an error
545 indication.
546
547 If you only want some of the stages of compilation, you can use --xx (or
548 filename suffixes) to tell ggcccc where to start, and one of the options
549 --cc, --SS, or --EE to say where ggcccc is to stop. Note that some combinations
550 (for example, --xx ccpppp--oouuttppuutt --EE) instruct ggcccc to do nothing at all.
551
552 --cc Compile or assemble the source files, but do not link. The linking
553 stage simply is not done. The ultimate output is in the form of an
554 object file for each source file.
555
556 By default, the object file name for a source file is made by
557 replacing the suffix ..cc, ..ii, ..ss, etc., with ..oo.
558
559 Unrecognized input files, not requiring compilation or assembly,
560 are ignored.
561
562 --SS Stop after the stage of compilation proper; do not assemble. The
563 output is in the form of an assembler code file for each non-assem‐
564 bler input file specified.
565
566 By default, the assembler file name for a source file is made by
567 replacing the suffix ..cc, ..ii, etc., with ..ss.
568
569 Input files that don't require compilation are ignored.
570
571 --EE Stop after the preprocessing stage; do not run the compiler proper.
572 The output is in the form of preprocessed source code, which is
573 sent to the standard output.
574
575 Input files which don't require preprocessing are ignored.
576
577 --oo file
578 Place output in file file. This applies regardless to whatever
579 sort of output is being produced, whether it be an executable file,
580 an object file, an assembler file or preprocessed C code.
581
582 Since only one output file can be specified, it does not make sense
583 to use --oo when compiling more than one input file, unless you are
584 producing an executable file as output.
585
586 If --oo is not specified, the default is to put an executable file in
587 a.out, the object file for source.suffix in source.o, its assembler
588 file in source.s, and all preprocessed C source on standard output.
589
590 --vv Print (on standard error output) the commands executed to run the
591 stages of compilation. Also print the version number of the com‐
592 piler driver program and of the preprocessor and the compiler
593 proper.
594
595 --######
596 Like --vv except the commands are not executed and all command argu‐
597 ments are quoted. This is useful for shell scripts to capture the
598 driver-generated command lines.
599
600 --ppiippee
601 Use pipes rather than temporary files for communication between the
602 various stages of compilation. This fails to work on some systems
603 where the assembler is unable to read from a pipe; but the GNU
604 assembler has no trouble.
605
606 ----hheellpp
607 Print (on the standard output) a description of the command line
608 options understood by ggcccc. If the --vv option is also specified then
609 ----hheellpp will also be passed on to the various processes invoked by
610 ggcccc, so that they can display the command line options they accept.
611 If the --WW option is also specified then command line options which
612 have no documentation associated with them will also be displayed.
613
614 ----ttaarrggeett--hheellpp
615 Print (on the standard output) a description of target specific
616 command line options for each tool.
617
618 ----vveerrssiioonn
619 Display the version number and copyrights of the invoked GCC.
620
621 CCoommppiilliinngg CC++++ PPrrooggrraammss
622
623 C++ source files conventionally use one of the suffixes ..CC, ..cccc, ..ccpppp,
624 ..cc++++, ..ccpp, or ..ccxxxx; preprocessed C++ files use the suffix ..iiii. GCC
625 recognizes files with these names and compiles them as C++ programs
626 even if you call the compiler the same way as for compiling C programs
627 (usually with the name ggcccc).
628
629 However, C++ programs often require class libraries as well as a com‐
630 piler that understands the C++ language---and under some circumstances,
631 you might want to compile programs from standard input, or otherwise
632 without a suffix that flags them as C++ programs. gg++++ is a program
633 that calls GCC with the default language set to C++, and automatically
634 specifies linking against the C++ library. On many systems, gg++++ is
635 also installed with the name cc++++.
636
637 When you compile C++ programs, you may specify many of the same com‐
638 mand-line options that you use for compiling programs in any language;
639 or command-line options meaningful for C and related languages; or
640 options that are meaningful only for C++ programs.
641
642 OOppttiioonnss CCoonnttrroolllliinngg CC DDiiaalleecctt
643
644 The following options control the dialect of C (or languages derived
645 from C, such as C++ and Objective-C) that the compiler accepts:
646
647 --aannssii
648 In C mode, support all ISO C89 programs. In C++ mode, remove GNU
649 extensions that conflict with ISO C++.
650
651 This turns off certain features of GCC that are incompatible with
652 ISO C89 (when compiling C code), or of standard C++ (when compiling
653 C++ code), such as the "asm" and "typeof" keywords, and predefined
654 macros such as "unix" and "vax" that identify the type of system
655 you are using. It also enables the undesirable and rarely used ISO
656 trigraph feature. For the C compiler, it disables recognition of
657 C++ style //// comments as well as the "inline" keyword.
658
659 The alternate keywords "__asm__", "__extension__", "__inline__" and
660 "__typeof__" continue to work despite --aannssii. You would not want to
661 use them in an ISO C program, of course, but it is useful to put
662 them in header files that might be included in compilations done
663 with --aannssii. Alternate predefined macros such as "__unix__" and
664 "__vax__" are also available, with or without --aannssii.
665
666 The --aannssii option does not cause non-ISO programs to be rejected
667 gratuitously. For that, --ppeeddaannttiicc is required in addition to
668 --aannssii.
669
670 The macro "__STRICT_ANSI__" is predefined when the --aannssii option is
671 used. Some header files may notice this macro and refrain from
672 declaring certain functions or defining certain macros that the ISO
673 standard doesn't call for; this is to avoid interfering with any
674 programs that might use these names for other things.
675
676 Functions which would normally be built in but do not have seman‐
677 tics defined by ISO C (such as "alloca" and "ffs") are not built-in
678 functions with --aannssii is used.
679
680 --ssttdd==
681 Determine the language standard. This option is currently only
682 supported when compiling C. A value for this option must be pro‐
683 vided; possible values are
684
685 cc8899
686 iissoo99889999::11999900
687 ISO C89 (same as --aannssii).
688
689 iissoo99889999::119999440099
690 ISO C89 as modified in amendment 1.
691
692 cc9999
693 cc99xx
694 iissoo99889999::11999999
695 iissoo99889999::119999xx
696 ISO C99. Note that this standard is not yet fully supported;
697 see <hhttttpp::////ggcccc..ggnnuu..oorrgg//ggcccc--33..11//cc9999ssttaattuuss..hhttmmll> for more infor‐
698 mation. The names cc99xx and iissoo99889999::119999xx are deprecated.
699
700 ggnnuu8899
701 Default, ISO C89 plus GNU extensions (including some C99 fea‐
702 tures).
703
704 ggnnuu9999
705 ggnnuu99xx
706 ISO C99 plus GNU extensions. When ISO C99 is fully implemented
707 in GCC, this will become the default. The name ggnnuu99xx is depre‐
708 cated.
709
710 Even when this option is not specified, you can still use some of
711 the features of newer standards in so far as they do not conflict
712 with previous C standards. For example, you may use "__restrict__"
713 even when --ssttdd==cc9999 is not specified.
714
715 The --ssttdd options specifying some version of ISO C have the same
716 effects as --aannssii, except that features that were not in ISO C89 but
717 are in the specified version (for example, //// comments and the
718 "inline" keyword in ISO C99) are not disabled.
719
720 --aauuxx--iinnffoo filename
721 Output to the given filename prototyped declarations for all func‐
722 tions declared and/or defined in a translation unit, including
723 those in header files. This option is silently ignored in any lan‐
724 guage other than C.
725
726 Besides declarations, the file indicates, in comments, the origin
727 of each declaration (source file and line), whether the declaration
728 was implicit, prototyped or unprototyped (II, NN for new or OO for
729 old, respectively, in the first character after the line number and
730 the colon), and whether it came from a declaration or a definition
731 (CC or FF, respectively, in the following character). In the case of
732 function definitions, a K&R-style list of arguments followed by
733 their declarations is also provided, inside comments, after the
734 declaration.
735
736 --ffnnoo--aassmm
737 Do not recognize "asm", "inline" or "typeof" as a keyword, so that
738 code can use these words as identifiers. You can use the keywords
739 "__asm__", "__inline__" and "__typeof__" instead. --aannssii implies
740 --ffnnoo--aassmm.
741
742 In C++, this switch only affects the "typeof" keyword, since "asm"
743 and "inline" are standard keywords. You may want to use the --ffnnoo--
744 ggnnuu--kkeeyywwoorrddss flag instead, which has the same effect. In C99 mode
745 (--ssttdd==cc9999 or --ssttdd==ggnnuu9999), this switch only affects the "asm" and
746 "typeof" keywords, since "inline" is a standard keyword in ISO C99.
747
748 --ffnnoo--bbuuiillttiinn
749 --ffnnoo--bbuuiillttiinn--function (C and Objective-C only)
750 Don't recognize built-in functions that do not begin with
751 ____bbuuiillttiinn__ as prefix.
752
753 GCC normally generates special code to handle certain built-in
754 functions more efficiently; for instance, calls to "alloca" may
755 become single instructions that adjust the stack directly, and
756 calls to "memcpy" may become inline copy loops. The resulting code
757 is often both smaller and faster, but since the function calls no
758 longer appear as such, you cannot set a breakpoint on those calls,
759 nor can you change the behavior of the functions by linking with a
760 different library.
761
762 In C++, --ffnnoo--bbuuiillttiinn is always in effect. The --ffbbuuiillttiinn option has
763 no effect. Therefore, in C++, the only way to get the optimization
764 benefits of built-in functions is to call the function using the
765 ____bbuuiillttiinn__ prefix. The GNU C++ Standard Library uses built-in
766 functions to implement many functions (like "std::strchr"), so that
767 you automatically get efficient code.
768
769 With the --ffnnoo--bbuuiillttiinn--function option, not available when compiling
770 C++, only the built-in function function is disabled. function
771 must not begin with ____bbuuiillttiinn__. If a function is named this is not
772 built-in in this version of GCC, this option is ignored. There is
773 no corresponding --ffbbuuiillttiinn--function option; if you wish to enable
774 built-in functions selectively when using --ffnnoo--bbuuiillttiinn or --ffffrreeee‐‐
775 ssttaannddiinngg, you may define macros such as:
776
777 #define abs(n) __builtin_abs ((n))
778 #define strcpy(d, s) __builtin_strcpy ((d), (s))
779
780
781 --ffhhoosstteedd
782 Assert that compilation takes place in a hosted environment. This
783 implies --ffbbuuiillttiinn. A hosted environment is one in which the entire
784 standard library is available, and in which "main" has a return
785 type of "int". Examples are nearly everything except a kernel.
786 This is equivalent to --ffnnoo--ffrreeeessttaannddiinngg.
787
788 --ffffrreeeessttaannddiinngg
789 Assert that compilation takes place in a freestanding environment.
790 This implies --ffnnoo--bbuuiillttiinn. A freestanding environment is one in
791 which the standard library may not exist, and program startup may
792 not necessarily be at "main". The most obvious example is an OS
793 kernel. This is equivalent to --ffnnoo--hhoosstteedd.
794
795 --ttrriiggrraapphhss
796 Support ISO C trigraphs. The --aannssii option (and --ssttdd options for
797 strict ISO C conformance) implies --ttrriiggrraapphhss.
798
799 --nnoo--iinntteeggrraatteedd--ccpppp
800 Invoke the external cpp during compilation. The default is to use
801 the integrated cpp (internal cpp). This option also allows a user-
802 supplied cpp via the --BB option. This flag is applicable in both C
803 and C++ modes.
804
805 We do not guarantee to retain this option in future, and we may
806 change its semantics.
807
808 --ttrraaddiittiioonnaall
809 Attempt to support some aspects of traditional C compilers.
810 Specifically:
811
812 · All "extern" declarations take effect globally even if they are
813 written inside of a function definition. This includes
814 implicit declarations of functions.
815
816 · The newer keywords "typeof", "inline", "signed", "const" and
817 "volatile" are not recognized. (You can still use the alterna‐
818 tive keywords such as "__typeof__", "__inline__", and so on.)
819
820 · Comparisons between pointers and integers are always allowed.
821
822 · Integer types "unsigned short" and "unsigned char" promote to
823 "unsigned int".
824
825 · Out-of-range floating point literals are not an error.
826
827 · Certain constructs which ISO regards as a single invalid pre‐
828 processing number, such as 00xxee--00xxdd, are treated as expressions
829 instead.
830
831 · String ``constants'' are not necessarily constant; they are
832 stored in writable space, and identical looking constants are
833 allocated separately. (This is the same as the effect of
834 --ffwwrriittaabbllee--ssttrriinnggss.)
835
836 · All automatic variables not declared "register" are preserved
837 by "longjmp". Ordinarily, GNU C follows ISO C: automatic vari‐
838 ables not declared "volatile" may be clobbered.
839
840 · The character escape sequences \\xx and \\aa evaluate as the lit‐
841 eral characters xx and aa respectively. Without --ttrraaddiittiioonnaall, \\xx
842 is a prefix for the hexadecimal representation of a character,
843 and \\aa produces a bell.
844
845 This option is deprecated and may be removed.
846
847 You may wish to use --ffnnoo--bbuuiillttiinn as well as --ttrraaddiittiioonnaall if your
848 program uses names that are normally GNU C built-in functions for
849 other purposes of its own.
850
851 You cannot use --ttrraaddiittiioonnaall if you include any header files that
852 rely on ISO C features. Some vendors are starting to ship systems
853 with ISO C header files and you cannot use --ttrraaddiittiioonnaall on such
854 systems to compile files that include any system headers.
855
856 The --ttrraaddiittiioonnaall option also enables --ttrraaddiittiioonnaall--ccpppp.
857
858 --ttrraaddiittiioonnaall--ccpppp
859 Attempt to support some aspects of traditional C preprocessors.
860 See the GNU CPP manual for details.
861
862 --ffccoonndd--mmiissmmaattcchh
863 Allow conditional expressions with mismatched types in the second
864 and third arguments. The value of such an expression is void.
865 This option is not supported for C++.
866
867 --ffuunnssiiggnneedd--cchhaarr
868 Let the type "char" be unsigned, like "unsigned char".
869
870 Each kind of machine has a default for what "char" should be. It
871 is either like "unsigned char" by default or like "signed char" by
872 default.
873
874 Ideally, a portable program should always use "signed char" or
875 "unsigned char" when it depends on the signedness of an object.
876 But many programs have been written to use plain "char" and expect
877 it to be signed, or expect it to be unsigned, depending on the
878 machines they were written for. This option, and its inverse, let
879 you make such a program work with the opposite default.
880
881 The type "char" is always a distinct type from each of "signed
882 char" or "unsigned char", even though its behavior is always just
883 like one of those two.
884
885 --ffssiiggnneedd--cchhaarr
886 Let the type "char" be signed, like "signed char".
887
888 Note that this is equivalent to --ffnnoo--uunnssiiggnneedd--cchhaarr, which is the
889 negative form of --ffuunnssiiggnneedd--cchhaarr. Likewise, the option --ffnnoo--
890 ssiiggnneedd--cchhaarr is equivalent to --ffuunnssiiggnneedd--cchhaarr.
891
892 --ffssiiggnneedd--bbiittffiieellddss
893 --ffuunnssiiggnneedd--bbiittffiieellddss
894 --ffnnoo--ssiiggnneedd--bbiittffiieellddss
895 --ffnnoo--uunnssiiggnneedd--bbiittffiieellddss
896 These options control whether a bit-field is signed or unsigned,
897 when the declaration does not use either "signed" or "unsigned".
898 By default, such a bit-field is signed, because this is consistent:
899 the basic integer types such as "int" are signed types.
900
901 However, when --ttrraaddiittiioonnaall is used, bit-fields are all unsigned no
902 matter what.
903
904 --ffwwrriittaabbllee--ssttrriinnggss
905 Store string constants in the writable data segment and don't
906 uniquize them. This is for compatibility with old programs which
907 assume they can write into string constants. The option --ttrraaddii‐‐
908 ttiioonnaall also has this effect.
909
910 Writing into string constants is a very bad idea; ``constants''
911 should be constant.
912
913 --ffaallllooww--ssiinnggllee--pprreecciissiioonn
914 Do not promote single precision math operations to double preci‐
915 sion, even when compiling with --ttrraaddiittiioonnaall.
916
917 Traditional K&R C promotes all floating point operations to double
918 precision, regardless of the sizes of the operands. On the archi‐
919 tecture for which you are compiling, single precision may be faster
920 than double precision. If you must use --ttrraaddiittiioonnaall, but want to
921 use single precision operations when the operands are single preci‐
922 sion, use this option. This option has no effect when compiling
923 with ISO or GNU C conventions (the default).
924
925 OOppttiioonnss CCoonnttrroolllliinngg CC++++ DDiiaalleecctt
926
927 This section describes the command-line options that are only meaning‐
928 ful for C++ programs; but you can also use most of the GNU compiler
929 options regardless of what language your program is in. For example,
930 you might compile a file "firstClass.C" like this:
931
932 g++ -g -frepo -O -c firstClass.C
933
934 In this example, only --ffrreeppoo is an option meant only for C++ programs;
935 you can use the other options with any language supported by GCC.
936
937 Here is a list of options that are only for compiling C++ programs:
938
939 --ffnnoo--aacccceessss--ccoonnttrrooll
940 Turn off all access checking. This switch is mainly useful for
941 working around bugs in the access control code.
942
943 --ffcchheecckk--nneeww
944 Check that the pointer returned by "operator new" is non-null
945 before attempting to modify the storage allocated. The current
946 Working Paper requires that "operator new" never return a null
947 pointer, so this check is normally unnecessary.
948
949 An alternative to using this option is to specify that your "opera‐
950 tor new" does not throw any exceptions; if you declare it throw(),
951 G++ will check the return value. See also nneeww ((nnootthhrrooww)).
952
953 --ffccoonnsseerrvvee--ssppaaccee
954 Put uninitialized or runtime-initialized global variables into the
955 common segment, as C does. This saves space in the executable at
956 the cost of not diagnosing duplicate definitions. If you compile
957 with this flag and your program mysteriously crashes after "main()"
958 has completed, you may have an object that is being destroyed twice
959 because two definitions were merged.
960
961 This option is no longer useful on most targets, now that support
962 has been added for putting variables into BSS without making them
963 common.
964
965 --ffnnoo--ccoonnsstt--ssttrriinnggss
966 Give string constants type "char *" instead of type "const char *".
967 By default, G++ uses type "const char *" as required by the stan‐
968 dard. Even if you use --ffnnoo--ccoonnsstt--ssttrriinnggss, you cannot actually mod‐
969 ify the value of a string constant, unless you also use --ffwwrriittaabbllee--
970 ssttrriinnggss.
971
972 This option might be removed in a future release of G++. For maxi‐
973 mum portability, you should structure your code so that it works
974 with string constants that have type "const char *".
975
976 --ffddoollllaarrss--iinn--iiddeennttiiffiieerrss
977 Accept $$ in identifiers. You can also explicitly prohibit use of $$
978 with the option --ffnnoo--ddoollllaarrss--iinn--iiddeennttiiffiieerrss. (GNU C allows $$ by
979 default on most target systems, but there are a few exceptions.)
980 Traditional C allowed the character $$ to form part of identifiers.
981 However, ISO C and C++ forbid $$ in identifiers.
982
983 --ffnnoo--eelliiddee--ccoonnssttrruuccttoorrss
984 The C++ standard allows an implementation to omit creating a tempo‐
985 rary which is only used to initialize another object of the same
986 type. Specifying this option disables that optimization, and
987 forces G++ to call the copy constructor in all cases.
988
989 --ffnnoo--eennffoorrccee--eehh--ssppeeccss
990 Don't check for violation of exception specifications at runtime.
991 This option violates the C++ standard, but may be useful for reduc‐
992 ing code size in production builds, much like defining NNDDEEBBUUGG. The
993 compiler will still optimize based on the exception specifications.
994
995 --ffeexxtteerrnnaall--tteemmppllaatteess
996 Cause ##pprraaggmmaa iinntteerrffaaccee and iimmpplleemmeennttaattiioonn to apply to template
997 instantiation; template instances are emitted or not according to
998 the location of the template definition.
999
1000 This option is deprecated.
1001
1002 --ffaalltt--eexxtteerrnnaall--tteemmppllaatteess
1003 Similar to --ffeexxtteerrnnaall--tteemmppllaatteess, but template instances are emitted
1004 or not according to the place where they are first instantiated.
1005
1006 This option is deprecated.
1007
1008 --ffffoorr--ssccooppee
1009 --ffnnoo--ffoorr--ssccooppee
1010 If --ffffoorr--ssccooppee is specified, the scope of variables declared in a
1011 for-init-statement is limited to the ffoorr loop itself, as specified
1012 by the C++ standard. If --ffnnoo--ffoorr--ssccooppee is specified, the scope of
1013 variables declared in a for-init-statement extends to the end of
1014 the enclosing scope, as was the case in old versions of G++, and
1015 other (traditional) implementations of C++.
1016
1017 The default if neither flag is given to follow the standard, but to
1018 allow and give a warning for old-style code that would otherwise be
1019 invalid, or have different behavior.
1020
1021 --ffnnoo--ggnnuu--kkeeyywwoorrddss
1022 Do not recognize "typeof" as a keyword, so that code can use this
1023 word as an identifier. You can use the keyword "__typeof__"
1024 instead. --aannssii implies --ffnnoo--ggnnuu--kkeeyywwoorrddss.
1025
1026 --ffnnoo--iimmpplliicciitt--tteemmppllaatteess
1027 Never emit code for non-inline templates which are instantiated
1028 implicitly (i.e. by use); only emit code for explicit instantia‐
1029 tions.
1030
1031 --ffnnoo--iimmpplliicciitt--iinnlliinnee--tteemmppllaatteess
1032 Don't emit code for implicit instantiations of inline templates,
1033 either. The default is to handle inlines differently so that com‐
1034 piles with and without optimization will need the same set of
1035 explicit instantiations.
1036
1037 --ffnnoo--iimmpplleemmeenntt--iinnlliinneess
1038 To save space, do not emit out-of-line copies of inline functions
1039 controlled by ##pprraaggmmaa iimmpplleemmeennttaattiioonn. This will cause linker
1040 errors if these functions are not inlined everywhere they are
1041 called.
1042
1043 --ffmmss--eexxtteennssiioonnss
1044 Disable pedantic warnings about constructs used in MFC, such as
1045 implicit int and getting a pointer to member function via non-stan‐
1046 dard syntax.
1047
1048 --ffnnoo--nnoonnaannssii--bbuuiillttiinnss
1049 Disable built-in declarations of functions that are not mandated by
1050 ANSI/ISO C. These include "ffs", "alloca", "_exit", "index",
1051 "bzero", "conjf", and other related functions.
1052
1053 --ffnnoo--ooppeerraattoorr--nnaammeess
1054 Do not treat the operator name keywords "and", "bitand", "bitor",
1055 "compl", "not", "or" and "xor" as synonyms as keywords.
1056
1057 --ffnnoo--ooppttiioonnaall--ddiiaaggss
1058 Disable diagnostics that the standard says a compiler does not need
1059 to issue. Currently, the only such diagnostic issued by G++ is the
1060 one for a name having multiple meanings within a class.
1061
1062 --ffppeerrmmiissssiivvee
1063 Downgrade messages about nonconformant code from errors to warn‐
1064 ings. By default, G++ effectively sets --ppeeddaannttiicc--eerrrroorrss without
1065 --ppeeddaannttiicc; this option reverses that. This behavior and this
1066 option are superseded by --ppeeddaannttiicc, which works as it does for GNU
1067 C.
1068
1069 --ffrreeppoo
1070 Enable automatic template instantiation at link time. This option
1071 also implies --ffnnoo--iimmpplliicciitt--tteemmppllaatteess.
1072
1073 --ffnnoo--rrttttii
1074 Disable generation of information about every class with virtual
1075 functions for use by the C++ runtime type identification features
1076 (ddyynnaammiicc__ccaasstt and ttyyppeeiidd). If you don't use those parts of the
1077 language, you can save some space by using this flag. Note that
1078 exception handling uses the same information, but it will generate
1079 it as needed.
1080
1081 --ffssttaattss
1082 Emit statistics about front-end processing at the end of the compi‐
1083 lation. This information is generally only useful to the G++
1084 development team.
1085
1086 --fftteemmppllaattee--ddeepptthh--n
1087 Set the maximum instantiation depth for template classes to n. A
1088 limit on the template instantiation depth is needed to detect end‐
1089 less recursions during template class instantiation. ANSI/ISO C++
1090 conforming programs must not rely on a maximum depth greater than
1091 17.
1092
1093 --ffuussee--ccxxaa--aatteexxiitt
1094 Register destructors for objects with static storage duration with
1095 the "__cxa_atexit" function rather than the "atexit" function.
1096 This option is required for fully standards-compliant handling of
1097 static destructors, but will only work if your C library supports
1098 "__cxa_atexit".
1099
1100 --ffvvttaabbllee--ggcc
1101 Emit special relocations for vtables and virtual function refer‐
1102 ences so that the linker can identify unused virtual functions and
1103 zero out vtable slots that refer to them. This is most useful with
1104 --ffffuunnccttiioonn--sseeccttiioonnss and --WWll,,----ggcc--sseeccttiioonnss, in order to also discard
1105 the functions themselves.
1106
1107 This optimization requires GNU as and GNU ld. Not all systems sup‐
1108 port this option. --WWll,,----ggcc--sseeccttiioonnss is ignored without --ssttaattiicc.
1109
1110 --ffnnoo--wweeaakk
1111 Do not use weak symbol support, even if it is provided by the
1112 linker. By default, G++ will use weak symbols if they are avail‐
1113 able. This option exists only for testing, and should not be used
1114 by end-users; it will result in inferior code and has no benefits.
1115 This option may be removed in a future release of G++.
1116
1117 --nnoossttddiinncc++++
1118 Do not search for header files in the standard directories specific
1119 to C++, but do still search the other standard directories. (This
1120 option is used when building the C++ library.)
1121
1122 In addition, these optimization, warning, and code generation options
1123 have meanings only for C++ programs:
1124
1125 --ffnnoo--ddeeffaauulltt--iinnlliinnee
1126 Do not assume iinnlliinnee for functions defined inside a class scope.
1127 Note that these functions will have linkage like inline func‐
1128 tions; they just won't be inlined by default.
1129
1130 --WWaabbii (C++ only)
1131 Warn when G++ generates code that is probably not compatible with
1132 the vendor-neutral C++ ABI. Although an effort has been made to
1133 warn about all such cases, there are probably some cases that are
1134 not warned about, even though G++ is generating incompatible code.
1135 There may also be cases where warnings are emitted even though the
1136 code that is generated will be compatible.
1137
1138 You should rewrite your code to avoid these warnings if you are
1139 concerned about the fact that code generated by G++ may not be
1140 binary compatible with code generated by other compilers.
1141
1142 The known incompatibilites at this point include:
1143
1144 · Incorrect handling of tail-padding for bit-fields. G++ may
1145 attempt to pack data into the same byte as a base class. For
1146 example:
1147
1148 struct A { virtual void f(); int f1 : 1; };
1149 struct B : public A { int f2 : 1; };
1150
1151 In this case, G++ will place "B::f2" into the same byte
1152 as"A::f1"; other compilers will not. You can avoid this prob‐
1153 lem by explicitly padding "A" so that its size is a multiple of
1154 the byte size on your platform; that will cause G++ and other
1155 compilers to layout "B" identically.
1156
1157 · Incorrect handling of tail-padding for virtual bases. G++ does
1158 not use tail padding when laying out virtual bases. For exam‐
1159 ple:
1160
1161 struct A { virtual void f(); char c1; };
1162 struct B { B(); char c2; };
1163 struct C : public A, public virtual B {};
1164
1165 In this case, G++ will not place "B" into the tail-padding for
1166 "A"; other compilers will. You can avoid this problem by
1167 explicitly padding "A" so that its size is a multiple of its
1168 alignment (ignoring virtual base classes); that will cause G++
1169 and other compilers to layout "C" identically.
1170
1171 --WWccttoorr--ddttoorr--pprriivvaaccyy (C++ only)
1172 Warn when a class seems unusable, because all the constructors or
1173 destructors in a class are private and the class has no friends or
1174 public static member functions.
1175
1176 --WWnnoonn--vviirrttuuaall--ddttoorr (C++ only)
1177 Warn when a class declares a non-virtual destructor that should
1178 probably be virtual, because it looks like the class will be used
1179 polymorphically.
1180
1181 --WWrreeoorrddeerr (C++ only)
1182 Warn when the order of member initializers given in the code does
1183 not match the order in which they must be executed. For instance:
1184
1185 struct A {
1186 int i;
1187 int j;
1188 A(): j (0), i (1) { }
1189 };
1190
1191 Here the compiler will warn that the member initializers for ii and
1192 jj will be rearranged to match the declaration order of the members.
1193
1194 The following --WW...... options are not affected by --WWaallll.
1195
1196 --WWeeffffcc++++ (C++ only)
1197 Warn about violations of the following style guidelines from Scott
1198 Meyers' Effective C++ book:
1199
1200 · Item 11: Define a copy constructor and an assignment operator
1201 for classes with dynamically allocated memory.
1202
1203 · Item 12: Prefer initialization to assignment in constructors.
1204
1205 · Item 14: Make destructors virtual in base classes.
1206
1207 · Item 15: Have "operator=" return a reference to "*this".
1208
1209 · Item 23: Don't try to return a reference when you must return
1210 an object.
1211
1212 and about violations of the following style guidelines from Scott
1213 Meyers' More Effective C++ book:
1214
1215 · Item 6: Distinguish between prefix and postfix forms of incre‐
1216 ment and decrement operators.
1217
1218 · Item 7: Never overload "&&", "⎪⎪", or ",".
1219
1220 If you use this option, you should be aware that the standard
1221 library headers do not obey all of these guidelines; you can use
1222 ggrreepp --vv to filter out those warnings.
1223
1224 --WWnnoo--ddeepprreeccaatteedd (C++ only)
1225 Do not warn about usage of deprecated features.
1226
1227 --WWnnoo--nnoonn--tteemmppllaattee--ffrriieenndd (C++ only)
1228 Disable warnings when non-templatized friend functions are declared
1229 within a template. With the advent of explicit template specifica‐
1230 tion support in G++, if the name of the friend is an unqualified-id
1231 (i.e., ffrriieenndd ffoooo((iinntt))), the C++ language specification demands
1232 that the friend declare or define an ordinary, nontemplate func‐
1233 tion. (Section 14.5.3). Before G++ implemented explicit specifi‐
1234 cation, unqualified-ids could be interpreted as a particular spe‐
1235 cialization of a templatized function. Because this non-conforming
1236 behavior is no longer the default behavior for G++, --WWnnoonn--tteemmppllaattee--
1237 ffrriieenndd allows the compiler to check existing code for potential
1238 trouble spots, and is on by default. This new compiler behavior
1239 can be turned off with --WWnnoo--nnoonn--tteemmppllaattee--ffrriieenndd which keeps the
1240 conformant compiler code but disables the helpful warning.
1241
1242 --WWoolldd--ssttyyllee--ccaasstt (C++ only)
1243 Warn if an old-style (C-style) cast to a non-void type is used
1244 within a C++ program. The new-style casts (ssttaattiicc__ccaasstt, rreeiinntteerr‐‐
1245 pprreett__ccaasstt, and ccoonnsstt__ccaasstt) are less vulnerable to unintended
1246 effects, and much easier to grep for.
1247
1248 --WWoovveerrllooaaddeedd--vviirrttuuaall (C++ only)
1249 Warn when a function declaration hides virtual functions from a
1250 base class. For example, in:
1251
1252 struct A {
1253 virtual void f();
1254 };
1255
1256 struct B: public A {
1257 void f(int);
1258 };
1259
1260 the "A" class version of "f" is hidden in "B", and code like this:
1261
1262 B* b;
1263 b->f();
1264
1265 will fail to compile.
1266
1267 --WWnnoo--ppmmff--ccoonnvveerrssiioonnss (C++ only)
1268 Disable the diagnostic for converting a bound pointer to member
1269 function to a plain pointer.
1270
1271 --WWssiiggnn--pprroommoo (C++ only)
1272 Warn when overload resolution chooses a promotion from unsigned or
1273 enumeral type to a signed type over a conversion to an unsigned
1274 type of the same size. Previous versions of G++ would try to pre‐
1275 serve unsignedness, but the standard mandates the current behavior.
1276
1277 --WWssyynntthh (C++ only)
1278 Warn when G++'s synthesis behavior does not match that of cfront.
1279 For instance:
1280
1281 struct A {
1282 operator int ();
1283 A& operator = (int);
1284 };
1285
1286 main ()
1287 {
1288 A a,b;
1289 a = b;
1290 }
1291
1292 In this example, G++ will synthesize a default AA&& ooppeerraattoorr == ((ccoonnsstt
1293 AA&&));;, while cfront will use the user-defined ooppeerraattoorr ==.
1294
1295 OOppttiioonnss CCoonnttrroolllliinngg OObbjjeeccttiivvee--CC DDiiaalleecctt
1296
1297 This section describes the command-line options that are only meaning‐
1298 ful for Objective-C programs; but you can also use most of the GNU com‐
1299 piler options regardless of what language your program is in. For
1300 example, you might compile a file "some_class.m" like this:
1301
1302 gcc -g -fgnu-runtime -O -c some_class.m
1303
1304 In this example, only --ffggnnuu--rruunnttiimmee is an option meant only for Objec‐
1305 tive-C programs; you can use the other options with any language sup‐
1306 ported by GCC.
1307
1308 Here is a list of options that are only for compiling Objective-C pro‐
1309 grams:
1310
1311 --ffccoonnssttaanntt--ssttrriinngg--ccllaassss==class-name
1312 Use class-name as the name of the class to instantiate for each
1313 literal string specified with the syntax "@"..."". The default
1314 class name is "NXConstantString".
1315
1316 --ffggnnuu--rruunnttiimmee
1317 Generate object code compatible with the standard GNU Objective-C
1318 runtime. This is the default for most types of systems.
1319
1320 --ffnneexxtt--rruunnttiimmee
1321 Generate output compatible with the NeXT runtime. This is the
1322 default for NeXT-based systems, including Darwin and Mac OS X.
1323
1324 --ggeenn--ddeeccllss
1325 Dump interface declarations for all classes seen in the source file
1326 to a file named sourcename.decl.
1327
1328 --WWnnoo--pprroottooccooll
1329 Do not warn if methods required by a protocol are not implemented
1330 in the class adopting it.
1331
1332 --WWsseelleeccttoorr
1333 Warn if a selector has multiple methods of different types defined.
1334
1335 OOppttiioonnss ttoo CCoonnttrrooll DDiiaaggnnoossttiicc MMeessssaaggeess FFoorrmmaattttiinngg
1336
1337 Traditionally, diagnostic messages have been formatted irrespective of
1338 the output device's aspect (e.g. its width, ...). The options
1339 described below can be used to control the diagnostic messages format‐
1340 ting algorithm, e.g. how many characters per line, how often source
1341 location information should be reported. Right now, only the C++ front
1342 end can honor these options. However it is expected, in the near
1343 future, that the remaining front ends would be able to digest them cor‐
1344 rectly.
1345
1346 --ffmmeessssaaggee--lleennggtthh==n
1347 Try to format error messages so that they fit on lines of about n
1348 characters. The default is 72 characters for gg++++ and 0 for the
1349 rest of the front ends supported by GCC. If n is zero, then no
1350 line-wrapping will be done; each error message will appear on a
1351 single line.
1352
1353 --ffddiiaaggnnoossttiiccss--sshhooww--llooccaattiioonn==oonnccee
1354 Only meaningful in line-wrapping mode. Instructs the diagnostic
1355 messages reporter to emit once source location information; that
1356 is, in case the message is too long to fit on a single physical
1357 line and has to be wrapped, the source location won't be emitted
1358 (as prefix) again, over and over, in subsequent continuation lines.
1359 This is the default behavior.
1360
1361 --ffddiiaaggnnoossttiiccss--sshhooww--llooccaattiioonn==eevveerryy--lliinnee
1362 Only meaningful in line-wrapping mode. Instructs the diagnostic
1363 messages reporter to emit the same source location information (as
1364 prefix) for physical lines that result from the process of breaking
1365 a message which is too long to fit on a single line.
1366
1367 OOppttiioonnss ttoo RReeqquueesstt oorr SSuupppprreessss WWaarrnniinnggss
1368
1369 Warnings are diagnostic messages that report constructions which are
1370 not inherently erroneous but which are risky or suggest there may have
1371 been an error.
1372
1373 You can request many specific warnings with options beginning --WW, for
1374 example --WWiimmpplliicciitt to request warnings on implicit declarations. Each
1375 of these specific warning options also has a negative form beginning
1376 --WWnnoo-- to turn off warnings; for example, --WWnnoo--iimmpplliicciitt. This manual
1377 lists only one of the two forms, whichever is not the default.
1378
1379 The following options control the amount and kinds of warnings produced
1380 by GCC; for further, language-specific options also refer to @ref{C++
1381 Dialect Options} and @ref{Objective-C Dialect Options}.
1382
1383 --ffssyynnttaaxx--oonnllyy
1384 Check the code for syntax errors, but don't do anything beyond
1385 that.
1386
1387 --ppeeddaannttiicc
1388 Issue all the warnings demanded by strict ISO C and ISO C++; reject
1389 all programs that use forbidden extensions, and some other programs
1390 that do not follow ISO C and ISO C++. For ISO C, follows the ver‐
1391 sion of the ISO C standard specified by any --ssttdd option used.
1392
1393 Valid ISO C and ISO C++ programs should compile properly with or
1394 without this option (though a rare few will require --aannssii or a --ssttdd
1395 option specifying the required version of ISO C). However, without
1396 this option, certain GNU extensions and traditional C and C++ fea‐
1397 tures are supported as well. With this option, they are rejected.
1398
1399 --ppeeddaannttiicc does not cause warning messages for use of the alternate
1400 keywords whose names begin and end with ____. Pedantic warnings are
1401 also disabled in the expression that follows "__extension__". How‐
1402 ever, only system header files should use these escape routes;
1403 application programs should avoid them.
1404
1405 Some users try to use --ppeeddaannttiicc to check programs for strict ISO C
1406 conformance. They soon find that it does not do quite what they
1407 want: it finds some non-ISO practices, but not all---only those for
1408 which ISO C requires a diagnostic, and some others for which diag‐
1409 nostics have been added.
1410
1411 A feature to report any failure to conform to ISO C might be useful
1412 in some instances, but would require considerable additional work
1413 and would be quite different from --ppeeddaannttiicc. We don't have plans
1414 to support such a feature in the near future.
1415
1416 Where the standard specified with --ssttdd represents a GNU extended
1417 dialect of C, such as ggnnuu8899 or ggnnuu9999, there is a corresponding base
1418 standard, the version of ISO C on which the GNU extended dialect is
1419 based. Warnings from --ppeeddaannttiicc are given where they are required
1420 by the base standard. (It would not make sense for such warnings
1421 to be given only for features not in the specified GNU C dialect,
1422 since by definition the GNU dialects of C include all features the
1423 compiler supports with the given option, and there would be nothing
1424 to warn about.)
1425
1426 --ppeeddaannttiicc--eerrrroorrss
1427 Like --ppeeddaannttiicc, except that errors are produced rather than warn‐
1428 ings.
1429
1430 --ww Inhibit all warning messages.
1431
1432 --WWnnoo--iimmppoorrtt
1433 Inhibit warning messages about the use of ##iimmppoorrtt.
1434
1435 --WWcchhaarr--ssuubbssccrriippttss
1436 Warn if an array subscript has type "char". This is a common cause
1437 of error, as programmers often forget that this type is signed on
1438 some machines.
1439
1440 --WWccoommmmeenntt
1441 Warn whenever a comment-start sequence //** appears in a //** comment,
1442 or whenever a Backslash-Newline appears in a //// comment.
1443
1444 --WWffoorrmmaatt
1445 Check calls to "printf" and "scanf", etc., to make sure that the
1446 arguments supplied have types appropriate to the format string
1447 specified, and that the conversions specified in the format string
1448 make sense. This includes standard functions, and others specified
1449 by format attributes, in the "printf", "scanf", "strftime" and
1450 "strfmon" (an X/Open extension, not in the C standard) families.
1451
1452 The formats are checked against the format features supported by
1453 GNU libc version 2.2. These include all ISO C89 and C99 features,
1454 as well as features from the Single Unix Specification and some BSD
1455 and GNU extensions. Other library implementations may not support
1456 all these features; GCC does not support warning about features
1457 that go beyond a particular library's limitations. However, if
1458 --ppeeddaannttiicc is used with --WWffoorrmmaatt, warnings will be given about for‐
1459 mat features not in the selected standard version (but not for
1460 "strfmon" formats, since those are not in any version of the C
1461 standard).
1462
1463 --WWffoorrmmaatt is included in --WWaallll. For more control over some aspects
1464 of format checking, the options --WWnnoo--ffoorrmmaatt--yy22kk, --WWnnoo--ffoorrmmaatt--eexxttrraa--
1465 aarrggss, --WWffoorrmmaatt--nnoonnlliitteerraall, --WWffoorrmmaatt--sseeccuurriittyy and --WWffoorrmmaatt==22 are
1466 available, but are not included in --WWaallll.
1467
1468 --WWnnoo--ffoorrmmaatt--yy22kk
1469 If --WWffoorrmmaatt is specified, do not warn about "strftime" formats
1470 which may yield only a two-digit year.
1471
1472 --WWnnoo--ffoorrmmaatt--eexxttrraa--aarrggss
1473 If --WWffoorrmmaatt is specified, do not warn about excess arguments to a
1474 "printf" or "scanf" format function. The C standard specifies that
1475 such arguments are ignored.
1476
1477 Where the unused arguments lie between used arguments that are
1478 specified with $$ operand number specifications, normally warnings
1479 are still given, since the implementation could not know what type
1480 to pass to "va_arg" to skip the unused arguments. However, in the
1481 case of "scanf" formats, this option will suppress the warning if
1482 the unused arguments are all pointers, since the Single Unix Speci‐
1483 fication says that such unused arguments are allowed.
1484
1485 --WWffoorrmmaatt--nnoonnlliitteerraall
1486 If --WWffoorrmmaatt is specified, also warn if the format string is not a
1487 string literal and so cannot be checked, unless the format function
1488 takes its format arguments as a "va_list".
1489
1490 --WWffoorrmmaatt--sseeccuurriittyy
1491 If --WWffoorrmmaatt is specified, also warn about uses of format functions
1492 that represent possible security problems. At present, this warns
1493 about calls to "printf" and "scanf" functions where the format
1494 string is not a string literal and there are no format arguments,
1495 as in "printf (foo);". This may be a security hole if the format
1496 string came from untrusted input and contains %%nn. (This is cur‐
1497 rently a subset of what --WWffoorrmmaatt--nnoonnlliitteerraall warns about, but in
1498 future warnings may be added to --WWffoorrmmaatt--sseeccuurriittyy that are not
1499 included in --WWffoorrmmaatt--nnoonnlliitteerraall.)
1500
1501 --WWffoorrmmaatt==22
1502 Enable --WWffoorrmmaatt plus format checks not included in --WWffoorrmmaatt. Cur‐
1503 rently equivalent to --WWffoorrmmaatt --WWffoorrmmaatt--nnoonnlliitteerraall --WWffoorrmmaatt--sseeccuu‐‐
1504 rriittyy.
1505
1506 --WWiimmpplliicciitt--iinntt
1507 Warn when a declaration does not specify a type.
1508
1509 --WWiimmpplliicciitt--ffuunnccttiioonn--ddeeccllaarraattiioonn
1510 --WWeerrrroorr--iimmpplliicciitt--ffuunnccttiioonn--ddeeccllaarraattiioonn
1511 Give a warning (or error) whenever a function is used before being
1512 declared.
1513
1514 --WWiimmpplliicciitt
1515 Same as --WWiimmpplliicciitt--iinntt and --WWiimmpplliicciitt--ffuunnccttiioonn--ddeeccllaarraattiioonn.
1516
1517 --WWmmaaiinn
1518 Warn if the type of mmaaiinn is suspicious. mmaaiinn should be a function
1519 with external linkage, returning int, taking either zero arguments,
1520 two, or three arguments of appropriate types.
1521
1522 --WWmmiissssiinngg--bbrraacceess
1523 Warn if an aggregate or union initializer is not fully bracketed.
1524 In the following example, the initializer for aa is not fully brack‐
1525 eted, but that for bb is fully bracketed.
1526
1527 int a[2][2] = { 0, 1, 2, 3 };
1528 int b[2][2] = { { 0, 1 }, { 2, 3 } };
1529
1530
1531 --WWppaarreenntthheesseess
1532 Warn if parentheses are omitted in certain contexts, such as when
1533 there is an assignment in a context where a truth value is
1534 expected, or when operators are nested whose precedence people
1535 often get confused about.
1536
1537 Also warn about constructions where there may be confusion to which
1538 "if" statement an "else" branch belongs. Here is an example of
1539 such a case:
1540
1541 {
1542 if (a)
1543 if (b)
1544 foo ();
1545 else
1546 bar ();
1547 }
1548
1549 In C, every "else" branch belongs to the innermost possible "if"
1550 statement, which in this example is "if (b)". This is often not
1551 what the programmer expected, as illustrated in the above example
1552 by indentation the programmer chose. When there is the potential
1553 for this confusion, GCC will issue a warning when this flag is
1554 specified. To eliminate the warning, add explicit braces around
1555 the innermost "if" statement so there is no way the "else" could
1556 belong to the enclosing "if". The resulting code would look like
1557 this:
1558
1559 {
1560 if (a)
1561 {
1562 if (b)
1563 foo ();
1564 else
1565 bar ();
1566 }
1567 }
1568
1569
1570 --WWsseeqquueennccee--ppooiinntt
1571 Warn about code that may have undefined semantics because of viola‐
1572 tions of sequence point rules in the C standard.
1573
1574 The C standard defines the order in which expressions in a C pro‐
1575 gram are evaluated in terms of sequence points, which represent a
1576 partial ordering between the execution of parts of the program:
1577 those executed before the sequence point, and those executed after
1578 it. These occur after the evaluation of a full expression (one
1579 which is not part of a larger expression), after the evaluation of
1580 the first operand of a "&&", "⎪⎪", "? :" or "," (comma) operator,
1581 before a function is called (but after the evaluation of its argu‐
1582 ments and the expression denoting the called function), and in cer‐
1583 tain other places. Other than as expressed by the sequence point
1584 rules, the order of evaluation of subexpressions of an expression
1585 is not specified. All these rules describe only a partial order
1586 rather than a total order, since, for example, if two functions are
1587 called within one expression with no sequence point between them,
1588 the order in which the functions are called is not specified. How‐
1589 ever, the standards committee have ruled that function calls do not
1590 overlap.
1591
1592 It is not specified when between sequence points modifications to
1593 the values of objects take effect. Programs whose behavior depends
1594 on this have undefined behavior; the C standard specifies that
1595 ``Between the previous and next sequence point an object shall have
1596 its stored value modified at most once by the evaluation of an
1597 expression. Furthermore, the prior value shall be read only to
1598 determine the value to be stored.''. If a program breaks these
1599 rules, the results on any particular implementation are entirely
1600 unpredictable.
1601
1602 Examples of code with undefined behavior are "a = a++;", "a[n] =
1603 b[n++]" and "a[i++] = i;". Some more complicated cases are not
1604 diagnosed by this option, and it may give an occasional false posi‐
1605 tive result, but in general it has been found fairly effective at
1606 detecting this sort of problem in programs.
1607
1608 The present implementation of this option only works for C pro‐
1609 grams. A future implementation may also work for C++ programs.
1610
1611 The C standard is worded confusingly, therefore there is some
1612 debate over the precise meaning of the sequence point rules in sub‐
1613 tle cases. Links to discussions of the problem, including proposed
1614 formal definitions, may be found on our readings page, at
1615 <hhttttpp::////ggcccc..ggnnuu..oorrgg//rreeaaddiinnggss..hhttmmll>.
1616
1617 --WWrreettuurrnn--ttyyppee
1618 Warn whenever a function is defined with a return-type that
1619 defaults to "int". Also warn about any "return" statement with no
1620 return-value in a function whose return-type is not "void".
1621
1622 For C++, a function without return type always produces a diagnos‐
1623 tic message, even when --WWnnoo--rreettuurrnn--ttyyppee is specified. The only
1624 exceptions are mmaaiinn and functions defined in system headers.
1625
1626 --WWsswwiittcchh
1627 Warn whenever a "switch" statement has an index of enumeral type
1628 and lacks a "case" for one or more of the named codes of that enu‐
1629 meration. (The presence of a "default" label prevents this warn‐
1630 ing.) "case" labels outside the enumeration range also provoke
1631 warnings when this option is used.
1632
1633 --WWttrriiggrraapphhss
1634 Warn if any trigraphs are encountered that might change the meaning
1635 of the program (trigraphs within comments are not warned about).
1636
1637 --WWuunnuusseedd--ffuunnccttiioonn
1638 Warn whenever a static function is declared but not defined or a
1639 non\-inline static function is unused.
1640
1641 --WWuunnuusseedd--llaabbeell
1642 Warn whenever a label is declared but not used.
1643
1644 To suppress this warning use the uunnuusseedd attribute.
1645
1646 --WWuunnuusseedd--ppaarraammeetteerr
1647 Warn whenever a function parameter is unused aside from its decla‐
1648 ration.
1649
1650 To suppress this warning use the uunnuusseedd attribute.
1651
1652 --WWuunnuusseedd--vvaarriiaabbllee
1653 Warn whenever a local variable or non-constant static variable is
1654 unused aside from its declaration
1655
1656 To suppress this warning use the uunnuusseedd attribute.
1657
1658 --WWuunnuusseedd--vvaalluuee
1659 Warn whenever a statement computes a result that is explicitly not
1660 used.
1661
1662 To suppress this warning cast the expression to vvooiidd.
1663
1664 --WWuunnuusseedd
1665 All all the above --WWuunnuusseedd options combined.
1666
1667 In order to get a warning about an unused function parameter, you
1668 must either specify --WW --WWuunnuusseedd or separately specify --WWuunnuusseedd--
1669 ppaarraammeetteerr.
1670
1671 --WWuunniinniittiiaalliizzeedd
1672 Warn if an automatic variable is used without first being initial‐
1673 ized or if a variable may be clobbered by a "setjmp" call.
1674
1675 These warnings are possible only in optimizing compilation, because
1676 they require data flow information that is computed only when opti‐
1677 mizing. If you don't specify --OO, you simply won't get these warn‐
1678 ings.
1679
1680 These warnings occur only for variables that are candidates for
1681 register allocation. Therefore, they do not occur for a variable
1682 that is declared "volatile", or whose address is taken, or whose
1683 size is other than 1, 2, 4 or 8 bytes. Also, they do not occur for
1684 structures, unions or arrays, even when they are in registers.
1685
1686 Note that there may be no warning about a variable that is used
1687 only to compute a value that itself is never used, because such
1688 computations may be deleted by data flow analysis before the warn‐
1689 ings are printed.
1690
1691 These warnings are made optional because GCC is not smart enough to
1692 see all the reasons why the code might be correct despite appearing
1693 to have an error. Here is one example of how this can happen:
1694
1695 {
1696 int x;
1697 switch (y)
1698 {
1699 case 1: x = 1;
1700 break;
1701 case 2: x = 4;
1702 break;
1703 case 3: x = 5;
1704 }
1705 foo (x);
1706 }
1707
1708 If the value of "y" is always 1, 2 or 3, then "x" is always ini‐
1709 tialized, but GCC doesn't know this. Here is another common case:
1710
1711 {
1712 int save_y;
1713 if (change_y) save_y = y, y = new_y;
1714 ...
1715 if (change_y) y = save_y;
1716 }
1717
1718 This has no bug because "save_y" is used only if it is set.
1719
1720 This option also warns when a non-volatile automatic variable might
1721 be changed by a call to "longjmp". These warnings as well are pos‐
1722 sible only in optimizing compilation.
1723
1724 The compiler sees only the calls to "setjmp". It cannot know where
1725 "longjmp" will be called; in fact, a signal handler could call it
1726 at any point in the code. As a result, you may get a warning even
1727 when there is in fact no problem because "longjmp" cannot in fact
1728 be called at the place which would cause a problem.
1729
1730 Some spurious warnings can be avoided if you declare all the func‐
1731 tions you use that never return as "noreturn".
1732
1733 --WWrreeoorrddeerr (C++ only)
1734 Warn when the order of member initializers given in the code does
1735 not match the order in which they must be executed. For instance:
1736
1737 --WWuunnkknnoowwnn--pprraaggmmaass
1738 Warn when a #pragma directive is encountered which is not under‐
1739 stood by GCC. If this command line option is used, warnings will
1740 even be issued for unknown pragmas in system header files. This is
1741 not the case if the warnings were only enabled by the --WWaallll command
1742 line option.
1743
1744 --WWaallll
1745 All of the above --WW options combined. This enables all the warn‐
1746 ings about constructions that some users consider questionable, and
1747 that are easy to avoid (or modify to prevent the warning), even in
1748 conjunction with macros.
1749
1750 --WWddiivv--bbyy--zzeerroo
1751 Warn about compile-time integer division by zero. This is default.
1752 To inhibit the warning messages, use --WWnnoo--ddiivv--bbyy--zzeerroo. Floating
1753 point division by zero is not warned about, as it can be a legiti‐
1754 mate way of obtaining infinities and NaNs.
1755
1756 --WWmmuullttiicchhaarr
1757 Warn if a multicharacter constant (''FFOOOOFF'') is used. This is
1758 default. To inhibit the warning messages, use --WWnnoo--mmuullttiicchhaarr.
1759 Usually they indicate a typo in the user's code, as they have
1760 implementation-defined values, and should not be used in portable
1761 code.
1762
1763 --WWssyysstteemm--hheeaaddeerrss
1764 Print warning messages for constructs found in system header files.
1765 Warnings from system headers are normally suppressed, on the
1766 assumption that they usually do not indicate real problems and
1767 would only make the compiler output harder to read. Using this
1768 command line option tells GCC to emit warnings from system headers
1769 as if they occurred in user code. However, note that using --WWaallll
1770 in conjunction with this option will not warn about unknown pragmas
1771 in system headers---for that, --WWuunnkknnoowwnn--pprraaggmmaass must also be used.
1772
1773 The following --WW...... options are not implied by --WWaallll. Some of them
1774 warn about constructions that users generally do not consider question‐
1775 able, but which occasionally you might wish to check for; others warn
1776 about constructions that are necessary or hard to avoid in some cases,
1777 and there is no simple way to modify the code to suppress the warning.
1778
1779 --WW Print extra warning messages for these events:
1780
1781 · A function can return either with or without a value. (Falling
1782 off the end of the function body is considered returning with‐
1783 out a value.) For example, this function would evoke such a
1784 warning:
1785
1786 foo (a)
1787 {
1788 if (a > 0)
1789 return a;
1790 }
1791
1792
1793 · An expression-statement or the left-hand side of a comma
1794 expression contains no side effects. To suppress the warning,
1795 cast the unused expression to void. For example, an expression
1796 such as xx[[ii,,jj]] will cause a warning, but xx[[((vvooiidd))ii,,jj]] will not.
1797
1798 · An unsigned value is compared against zero with << or <<==.
1799
1800 · A comparison like xx<<==yy<<==zz appears; this is equivalent to ((xx<<==yy
1801 ?? 11 :: 00)) <<== zz, which is a different interpretation from that of
1802 ordinary mathematical notation.
1803
1804 · Storage-class specifiers like "static" are not the first things
1805 in a declaration. According to the C Standard, this usage is
1806 obsolescent.
1807
1808 · The return type of a function has a type qualifier such as
1809 "const". Such a type qualifier has no effect, since the value
1810 returned by a function is not an lvalue. (But don't warn about
1811 the GNU extension of "volatile void" return types. That exten‐
1812 sion will be warned about if --ppeeddaannttiicc is specified.)
1813
1814 · If --WWaallll or --WWuunnuusseedd is also specified, warn about unused argu‐
1815 ments.
1816
1817 · A comparison between signed and unsigned values could produce
1818 an incorrect result when the signed value is converted to
1819 unsigned. (But don't warn if --WWnnoo--ssiiggnn--ccoommppaarree is also speci‐
1820 fied.)
1821
1822 · An aggregate has a partly bracketed initializer. For example,
1823 the following code would evoke such a warning, because braces
1824 are missing around the initializer for "x.h":
1825
1826 struct s { int f, g; };
1827 struct t { struct s h; int i; };
1828 struct t x = { 1, 2, 3 };
1829
1830
1831 · An aggregate has an initializer which does not initialize all
1832 members. For example, the following code would cause such a
1833 warning, because "x.h" would be implicitly initialized to zero:
1834
1835 struct s { int f, g, h; };
1836 struct s x = { 3, 4 };
1837
1838
1839 --WWffllooaatt--eeqquuaall
1840 Warn if floating point values are used in equality comparisons.
1841
1842 The idea behind this is that sometimes it is convenient (for the
1843 programmer) to consider floating-point values as approximations to
1844 infinitely precise real numbers. If you are doing this, then you
1845 need to compute (by analysing the code, or in some other way) the
1846 maximum or likely maximum error that the computation introduces,
1847 and allow for it when performing comparisons (and when producing
1848 output, but that's a different problem). In particular, instead of
1849 testing for equality, you would check to see whether the two values
1850 have ranges that overlap; and this is done with the relational
1851 operators, so equality comparisons are probably mistaken.
1852
1853 --WWttrraaddiittiioonnaall (C only)
1854 Warn about certain constructs that behave differently in tradi‐
1855 tional and ISO C. Also warn about ISO C constructs that have no
1856 traditional C equivalent, and/or problematic constructs which
1857 should be avoided.
1858
1859 · Macro parameters that appear within string literals in the
1860 macro body. In traditional C macro replacement takes place
1861 within string literals, but does not in ISO C.
1862
1863 · In traditional C, some preprocessor directives did not exist.
1864 Traditional preprocessors would only consider a line to be a
1865 directive if the ## appeared in column 1 on the line. Therefore
1866 --WWttrraaddiittiioonnaall warns about directives that traditional C under‐
1867 stands but would ignore because the ## does not appear as the
1868 first character on the line. It also suggests you hide direc‐
1869 tives like ##pprraaggmmaa not understood by traditional C by indenting
1870 them. Some traditional implementations would not recognize
1871 ##eelliiff, so it suggests avoiding it altogether.
1872
1873 · A function-like macro that appears without arguments.
1874
1875 · The unary plus operator.
1876
1877 · The UU integer constant suffix, or the FF or LL floating point
1878 constant suffixes. (Traditional C does support the LL suffix on
1879 integer constants.) Note, these suffixes appear in macros
1880 defined in the system headers of most modern systems, e.g. the
1881 __MMIINN/__MMAAXX macros in "<limits.h>". Use of these macros in user
1882 code might normally lead to spurious warnings, however gcc's
1883 integrated preprocessor has enough context to avoid warning in
1884 these cases.
1885
1886 · A function declared external in one block and then used after
1887 the end of the block.
1888
1889 · A "switch" statement has an operand of type "long".
1890
1891 · A non-"static" function declaration follows a "static" one.
1892 This construct is not accepted by some traditional C compilers.
1893
1894 · The ISO type of an integer constant has a different width or
1895 signedness from its traditional type. This warning is only
1896 issued if the base of the constant is ten. I.e. hexadecimal or
1897 octal values, which typically represent bit patterns, are not
1898 warned about.
1899
1900 · Usage of ISO string concatenation is detected.
1901
1902 · Initialization of automatic aggregates.
1903
1904 · Identifier conflicts with labels. Traditional C lacks a sepa‐
1905 rate namespace for labels.
1906
1907 · Initialization of unions. If the initializer is zero, the
1908 warning is omitted. This is done under the assumption that the
1909 zero initializer in user code appears conditioned on e.g.
1910 "__STDC__" to avoid missing initializer warnings and relies on
1911 default initialization to zero in the traditional C case.
1912
1913 · Conversions by prototypes between fixed/floating point values
1914 and vice versa. The absence of these prototypes when compiling
1915 with traditional C would cause serious problems. This is a
1916 subset of the possible conversion warnings, for the full set
1917 use --WWccoonnvveerrssiioonn.
1918
1919 --WWuunnddeeff
1920 Warn if an undefined identifier is evaluated in an ##iiff directive.
1921
1922 --WWsshhaaddooww
1923 Warn whenever a local variable shadows another local variable,
1924 parameter or global variable or whenever a built-in function is
1925 shadowed.
1926
1927 --WWllaarrggeerr--tthhaann--len
1928 Warn whenever an object of larger than len bytes is defined.
1929
1930 --WWppooiinntteerr--aarriitthh
1931 Warn about anything that depends on the ``size of'' a function type
1932 or of "void". GNU C assigns these types a size of 1, for conve‐
1933 nience in calculations with "void *" pointers and pointers to func‐
1934 tions.
1935
1936 --WWbbaadd--ffuunnccttiioonn--ccaasstt (C only)
1937 Warn whenever a function call is cast to a non-matching type. For
1938 example, warn if "int malloc()" is cast to "anything *".
1939
1940 --WWccaasstt--qquuaall
1941 Warn whenever a pointer is cast so as to remove a type qualifier
1942 from the target type. For example, warn if a "const char *" is
1943 cast to an ordinary "char *".
1944
1945 --WWccaasstt--aalliiggnn
1946 Warn whenever a pointer is cast such that the required alignment of
1947 the target is increased. For example, warn if a "char *" is cast
1948 to an "int *" on machines where integers can only be accessed at
1949 two- or four-byte boundaries.
1950
1951 --WWwwrriittee--ssttrriinnggss
1952 When compiling C, give string constants the type "const
1953 char[length]" so that copying the address of one into a non-"const"
1954 "char *" pointer will get a warning; when compiling C++, warn about
1955 the deprecated conversion from string constants to "char *". These
1956 warnings will help you find at compile time code that can try to
1957 write into a string constant, but only if you have been very care‐
1958 ful about using "const" in declarations and prototypes. Otherwise,
1959 it will just be a nuisance; this is why we did not make --WWaallll
1960 request these warnings.
1961
1962 --WWccoonnvveerrssiioonn
1963 Warn if a prototype causes a type conversion that is different from
1964 what would happen to the same argument in the absence of a proto‐
1965 type. This includes conversions of fixed point to floating and
1966 vice versa, and conversions changing the width or signedness of a
1967 fixed point argument except when the same as the default promotion.
1968
1969 Also, warn if a negative integer constant expression is implicitly
1970 converted to an unsigned type. For example, warn about the assign‐
1971 ment "x = -1" if "x" is unsigned. But do not warn about explicit
1972 casts like "(unsigned) -1".
1973
1974 --WWssiiggnn--ccoommppaarree
1975 Warn when a comparison between signed and unsigned values could
1976 produce an incorrect result when the signed value is converted to
1977 unsigned. This warning is also enabled by --WW; to get the other
1978 warnings of --WW without this warning, use --WW --WWnnoo--ssiiggnn--ccoommppaarree.
1979
1980 --WWaaggggrreeggaattee--rreettuurrnn
1981 Warn if any functions that return structures or unions are defined
1982 or called. (In languages where you can return an array, this also
1983 elicits a warning.)
1984
1985 --WWssttrriicctt--pprroottoottyyppeess (C only)
1986 Warn if a function is declared or defined without specifying the
1987 argument types. (An old-style function definition is permitted
1988 without a warning if preceded by a declaration which specifies the
1989 argument types.)
1990
1991 --WWmmiissssiinngg--pprroottoottyyppeess (C only)
1992 Warn if a global function is defined without a previous prototype
1993 declaration. This warning is issued even if the definition itself
1994 provides a prototype. The aim is to detect global functions that
1995 fail to be declared in header files.
1996
1997 --WWmmiissssiinngg--ddeeccllaarraattiioonnss
1998 Warn if a global function is defined without a previous declara‐
1999 tion. Do so even if the definition itself provides a prototype.
2000 Use this option to detect global functions that are not declared in
2001 header files.
2002
2003 --WWmmiissssiinngg--nnoorreettuurrnn
2004 Warn about functions which might be candidates for attribute "nore‐
2005 turn". Note these are only possible candidates, not absolute ones.
2006 Care should be taken to manually verify functions actually do not
2007 ever return before adding the "noreturn" attribute, otherwise sub‐
2008 tle code generation bugs could be introduced. You will not get a
2009 warning for "main" in hosted C environments.
2010
2011 --WWmmiissssiinngg--ffoorrmmaatt--aattttrriibbuuttee
2012 If --WWffoorrmmaatt is enabled, also warn about functions which might be
2013 candidates for "format" attributes. Note these are only possible
2014 candidates, not absolute ones. GCC will guess that "format"
2015 attributes might be appropriate for any function that calls a func‐
2016 tion like "vprintf" or "vscanf", but this might not always be the
2017 case, and some functions for which "format" attributes are appro‐
2018 priate may not be detected. This option has no effect unless
2019 --WWffoorrmmaatt is enabled (possibly by --WWaallll).
2020
2021 --WWnnoo--ddeepprreeccaatteedd--ddeeccllaarraattiioonnss
2022 Do not warn about uses of functions, variables, and types marked as
2023 deprecated by using the "deprecated" attribute. (@pxref{Function
2024 Attributes}, @pxref{Variable Attributes}, @pxref{Type Attributes}.)
2025
2026 --WWppaacckkeedd
2027 Warn if a structure is given the packed attribute, but the packed
2028 attribute has no effect on the layout or size of the structure.
2029 Such structures may be mis-aligned for little benefit. For
2030 instance, in this code, the variable "f.x" in "struct bar" will be
2031 misaligned even though "struct bar" does not itself have the packed
2032 attribute:
2033
2034 struct foo {
2035 int x;
2036 char a, b, c, d;
2037 } __attribute__((packed));
2038 struct bar {
2039 char z;
2040 struct foo f;
2041 };
2042
2043
2044 --WWppaaddddeedd
2045 Warn if padding is included in a structure, either to align an ele‐
2046 ment of the structure or to align the whole structure. Sometimes
2047 when this happens it is possible to rearrange the fields of the
2048 structure to reduce the padding and so make the structure smaller.
2049
2050 --WWrreedduunnddaanntt--ddeeccllss
2051 Warn if anything is declared more than once in the same scope, even
2052 in cases where multiple declaration is valid and changes nothing.
2053
2054 --WWnneesstteedd--eexxtteerrnnss (C only)
2055 Warn if an "extern" declaration is encountered within a function.
2056
2057 --WWuunnrreeaacchhaabbllee--ccooddee
2058 Warn if the compiler detects that code will never be executed.
2059
2060 This option is intended to warn when the compiler detects that at
2061 least a whole line of source code will never be executed, because
2062 some condition is never satisfied or because it is after a proce‐
2063 dure that never returns.
2064
2065 It is possible for this option to produce a warning even though
2066 there are circumstances under which part of the affected line can
2067 be executed, so care should be taken when removing apparently-
2068 unreachable code.
2069
2070 For instance, when a function is inlined, a warning may mean that
2071 the line is unreachable in only one inlined copy of the function.
2072
2073 This option is not made part of --WWaallll because in a debugging ver‐
2074 sion of a program there is often substantial code which checks cor‐
2075 rect functioning of the program and is, hopefully, unreachable
2076 because the program does work. Another common use of unreachable
2077 code is to provide behavior which is selectable at compile-time.
2078
2079 --WWiinnlliinnee
2080 Warn if a function can not be inlined and it was declared as
2081 inline.
2082
2083 --WWlloonngg--lloonngg
2084 Warn if lloonngg lloonngg type is used. This is default. To inhibit the
2085 warning messages, use --WWnnoo--lloonngg--lloonngg. Flags --WWlloonngg--lloonngg and --WWnnoo--
2086 lloonngg--lloonngg are taken into account only when --ppeeddaannttiicc flag is used.
2087
2088 --WWddiissaabblleedd--ooppttiimmiizzaattiioonn
2089 Warn if a requested optimization pass is disabled. This warning
2090 does not generally indicate that there is anything wrong with your
2091 code; it merely indicates that GCC's optimizers were unable to han‐
2092 dle the code effectively. Often, the problem is that your code is
2093 too big or too complex; GCC will refuse to optimize programs when
2094 the optimization itself is likely to take inordinate amounts of
2095 time.
2096
2097 --WWeerrrroorr
2098 Make all warnings into errors.
2099
2100 OOppttiioonnss ffoorr DDeebbuuggggiinngg YYoouurr PPrrooggrraamm oorr GGCCCC
2101
2102 GCC has various special options that are used for debugging either your
2103 program or GCC:
2104
2105 --gg Produce debugging information in the operating system's native for‐
2106 mat (stabs, COFF, XCOFF, or DWARF). GDB can work with this debug‐
2107 ging information.
2108
2109 On most systems that use stabs format, --gg enables use of extra
2110 debugging information that only GDB can use; this extra information
2111 makes debugging work better in GDB but will probably make other
2112 debuggers crash or refuse to read the program. If you want to con‐
2113 trol for certain whether to generate the extra information, use
2114 --ggssttaabbss++, --ggssttaabbss, --ggxxccooffff++, --ggxxccooffff, --ggddwwaarrff--11++, --ggddwwaarrff--11, or
2115 --ggvvmmss (see below).
2116
2117 Unlike most other C compilers, GCC allows you to use --gg with --OO.
2118 The shortcuts taken by optimized code may occasionally produce sur‐
2119 prising results: some variables you declared may not exist at all;
2120 flow of control may briefly move where you did not expect it; some
2121 statements may not be executed because they compute constant
2122 results or their values were already at hand; some statements may
2123 execute in different places because they were moved out of loops.
2124
2125 Nevertheless it proves possible to debug optimized output. This
2126 makes it reasonable to use the optimizer for programs that might
2127 have bugs.
2128
2129 The following options are useful when GCC is generated with the
2130 capability for more than one debugging format.
2131
2132 --ggggddbb
2133 Produce debugging information for use by GDB. This means to use
2134 the most expressive format available (DWARF 2, stabs, or the native
2135 format if neither of those are supported), including GDB extensions
2136 if at all possible.
2137
2138 --ggssttaabbss
2139 Produce debugging information in stabs format (if that is sup‐
2140 ported), without GDB extensions. This is the format used by DBX on
2141 most BSD systems. On MIPS, Alpha and System V Release 4 systems
2142 this option produces stabs debugging output which is not understood
2143 by DBX or SDB. On System V Release 4 systems this option requires
2144 the GNU assembler.
2145
2146 --ggssttaabbss++
2147 Produce debugging information in stabs format (if that is sup‐
2148 ported), using GNU extensions understood only by the GNU debugger
2149 (GDB). The use of these extensions is likely to make other debug‐
2150 gers crash or refuse to read the program.
2151
2152 --ggccooffff
2153 Produce debugging information in COFF format (if that is sup‐
2154 ported). This is the format used by SDB on most System V systems
2155 prior to System V Release 4.
2156
2157 --ggxxccooffff
2158 Produce debugging information in XCOFF format (if that is sup‐
2159 ported). This is the format used by the DBX debugger on IBM
2160 RS/6000 systems.
2161
2162 --ggxxccooffff++
2163 Produce debugging information in XCOFF format (if that is sup‐
2164 ported), using GNU extensions understood only by the GNU debugger
2165 (GDB). The use of these extensions is likely to make other debug‐
2166 gers crash or refuse to read the program, and may cause assemblers
2167 other than the GNU assembler (GAS) to fail with an error.
2168
2169 --ggddwwaarrff
2170 Produce debugging information in DWARF version 1 format (if that is
2171 supported). This is the format used by SDB on most System V
2172 Release 4 systems.
2173
2174 --ggddwwaarrff++
2175 Produce debugging information in DWARF version 1 format (if that is
2176 supported), using GNU extensions understood only by the GNU debug‐
2177 ger (GDB). The use of these extensions is likely to make other
2178 debuggers crash or refuse to read the program.
2179
2180 --ggddwwaarrff--22
2181 Produce debugging information in DWARF version 2 format (if that is
2182 supported). This is the format used by DBX on IRIX 6.
2183
2184 --ggvvmmss
2185 Produce debugging information in VMS debug format (if that is sup‐
2186 ported). This is the format used by DEBUG on VMS systems.
2187
2188 --gglevel
2189 --ggggddbblevel
2190 --ggssttaabbsslevel
2191 --ggccoofffflevel
2192 --ggxxccoofffflevel
2193 --ggvvmmsslevel
2194 Request debugging information and also use level to specify how
2195 much information. The default level is 2.
2196
2197 Level 1 produces minimal information, enough for making backtraces
2198 in parts of the program that you don't plan to debug. This
2199 includes descriptions of functions and external variables, but no
2200 information about local variables and no line numbers.
2201
2202 Level 3 includes extra information, such as all the macro defini‐
2203 tions present in the program. Some debuggers support macro expan‐
2204 sion when you use --gg33.
2205
2206 Note that in order to avoid confusion between DWARF1 debug level 2,
2207 and DWARF2, neither --ggddwwaarrff nor --ggddwwaarrff--22 accept a concatenated
2208 debug level. Instead use an additional --gglevel option to change
2209 the debug level for DWARF1 or DWARF2.
2210
2211 --pp Generate extra code to write profile information suitable for the
2212 analysis program "prof". You must use this option when compiling
2213 the source files you want data about, and you must also use it when
2214 linking.
2215
2216 --ppgg Generate extra code to write profile information suitable for the
2217 analysis program "gprof". You must use this option when compiling
2218 the source files you want data about, and you must also use it when
2219 linking.
2220
2221 --QQ Makes the compiler print out each function name as it is compiled,
2222 and print some statistics about each pass when it finishes.
2223
2224 --ffttiimmee--rreeppoorrtt
2225 Makes the compiler print some statistics about the time consumed by
2226 each pass when it finishes.
2227
2228 --ffmmeemm--rreeppoorrtt
2229 Makes the compiler print some statistics about permanent memory
2230 allocation when it finishes.
2231
2232 --ffpprrooffiillee--aarrccss
2233 Instrument arcs during compilation to generate coverage data or for
2234 profile-directed block ordering. During execution the program
2235 records how many times each branch is executed and how many times
2236 it is taken. When the compiled program exits it saves this data to
2237 a file called sourcename.da for each source file.
2238
2239 For profile-directed block ordering, compile the program with
2240 --ffpprrooffiillee--aarrccss plus optimization and code generation options, gen‐
2241 erate the arc profile information by running the program on a
2242 selected workload, and then compile the program again with the same
2243 optimization and code generation options plus --ffbbrraanncchh--pprroobbaabbiillii‐‐
2244 ttiieess.
2245
2246 The other use of --ffpprrooffiillee--aarrccss is for use with "gcov", when it is
2247 used with the --fftteesstt--ccoovveerraaggee option.
2248
2249 With --ffpprrooffiillee--aarrccss, for each function of your program GCC creates
2250 a program flow graph, then finds a spanning tree for the graph.
2251 Only arcs that are not on the spanning tree have to be instru‐
2252 mented: the compiler adds code to count the number of times that
2253 these arcs are executed. When an arc is the only exit or only
2254 entrance to a block, the instrumentation code can be added to the
2255 block; otherwise, a new basic block must be created to hold the
2256 instrumentation code.
2257
2258 --fftteesstt--ccoovveerraaggee
2259 Create data files for the ggccoovv code-coverage utility. The data
2260 file names begin with the name of your source file:
2261
2262 sourcename..bbbb
2263 A mapping from basic blocks to line numbers, which "gcov" uses
2264 to associate basic block execution counts with line numbers.
2265
2266 sourcename..bbbbgg
2267 A list of all arcs in the program flow graph. This allows
2268 "gcov" to reconstruct the program flow graph, so that it can
2269 compute all basic block and arc execution counts from the
2270 information in the "sourcename.da" file.
2271
2272 Use --fftteesstt--ccoovveerraaggee with --ffpprrooffiillee--aarrccss; the latter option adds
2273 instrumentation to the program, which then writes execution counts
2274 to another data file:
2275
2276 sourcename..ddaa
2277 Runtime arc execution counts, used in conjunction with the arc
2278 information in the file "sourcename.bbg".
2279
2280 Coverage data will map better to the source files if --fftteesstt--ccoovveerr‐‐
2281 aaggee is used without optimization.
2282
2283 --ddletters
2284 Says to make debugging dumps during compilation at times specified
2285 by letters. This is used for debugging the compiler. The file
2286 names for most of the dumps are made by appending a pass number and
2287 a word to the source file name (e.g. foo.c.00.rtl or foo.c.01.sib‐
2288 ling). Here are the possible letters for use in letters, and their
2289 meanings:
2290
2291 AA Annotate the assembler output with miscellaneous debugging
2292 information.
2293
2294 bb Dump after computing branch probabilities, to file.14.bp.
2295
2296 BB Dump after block reordering, to file.29.bbro.
2297
2298 cc Dump after instruction combination, to the file file.16.com‐
2299 bine.
2300
2301 CC Dump after the first if conversion, to the file file.17.ce.
2302
2303 dd Dump after delayed branch scheduling, to file.31.dbr.
2304
2305 DD Dump all macro definitions, at the end of preprocessing, in
2306 addition to normal output.
2307
2308 ee Dump after SSA optimizations, to file.04.ssa and file.07.ussa.
2309
2310 EE Dump after the second if conversion, to file.26.ce2.
2311
2312 ff Dump after life analysis, to file.15.life.
2313
2314 FF Dump after purging "ADDRESSOF" codes, to file.09.addressof.
2315
2316 gg Dump after global register allocation, to file.21.greg.
2317
2318 hh Dump after finalization of EH handling code, to file.02.eh.
2319
2320 kk Dump after reg-to-stack conversion, to file.28.stack.
2321
2322 oo Dump after post-reload optimizations, to file.22.postreload.
2323
2324 GG Dump after GCSE, to file.10.gcse.
2325
2326 ii Dump after sibling call optimizations, to file.01.sibling.
2327
2328 jj Dump after the first jump optimization, to file.03.jump.
2329
2330 kk Dump after conversion from registers to stack, to
2331 file.32.stack.
2332
2333 ll Dump after local register allocation, to file.20.lreg.
2334
2335 LL Dump after loop optimization, to file.11.loop.
2336
2337 MM Dump after performing the machine dependent reorganisation
2338 pass, to file.30.mach.
2339
2340 nn Dump after register renumbering, to file.25.rnreg.
2341
2342 NN Dump after the register move pass, to file.18.regmove.
2343
2344 rr Dump after RTL generation, to file.00.rtl.
2345
2346 RR Dump after the second scheduling pass, to file.27.sched2.
2347
2348 ss Dump after CSE (including the jump optimization that sometimes
2349 follows CSE), to file.08.cse.
2350
2351 SS Dump after the first scheduling pass, to file.19.sched.
2352
2353 tt Dump after the second CSE pass (including the jump optimization
2354 that sometimes follows CSE), to file.12.cse2.
2355
2356 ww Dump after the second flow pass, to file.23.flow2.
2357
2358 XX Dump after SSA dead code elimination, to file.06.ssadce.
2359
2360 zz Dump after the peephole pass, to file.24.peephole2.
2361
2362 aa Produce all the dumps listed above.
2363
2364 mm Print statistics on memory usage, at the end of the run, to
2365 standard error.
2366
2367 pp Annotate the assembler output with a comment indicating which
2368 pattern and alternative was used. The length of each instruc‐
2369 tion is also printed.
2370
2371 PP Dump the RTL in the assembler output as a comment before each
2372 instruction. Also turns on --ddpp annotation.
2373
2374 vv For each of the other indicated dump files (except for
2375 file.00.rtl), dump a representation of the control flow graph
2376 suitable for viewing with VCG to file.pass.vcg.
2377
2378 xx Just generate RTL for a function instead of compiling it. Usu‐
2379 ally used with rr.
2380
2381 yy Dump debugging information during parsing, to standard error.
2382
2383 --ffdduummpp--uunnnnuummbbeerreedd
2384 When doing debugging dumps (see --dd option above), suppress instruc‐
2385 tion numbers and line number note output. This makes it more fea‐
2386 sible to use diff on debugging dumps for compiler invocations with
2387 different options, in particular with and without --gg.
2388
2389 --ffdduummpp--ttrraannssllaattiioonn--uunniitt (C and C++ only)
2390 --ffdduummpp--ttrraannssllaattiioonn--uunniitt--options (C and C++ only)
2391 Dump a representation of the tree structure for the entire transla‐
2392 tion unit to a file. The file name is made by appending .tu to the
2393 source file name. If the --options form is used, options controls
2394 the details of the dump as described for the --ffdduummpp--ttrreeee options.
2395
2396 --ffdduummpp--ccllaassss--hhiieerraarrcchhyy (C++ only)
2397 --ffdduummpp--ccllaassss--hhiieerraarrcchhyy--options (C++ only)
2398 Dump a representation of each class's hierarchy and virtual func‐
2399 tion table layout to a file. The file name is made by appending
2400 .class to the source file name. If the --options form is used,
2401 options controls the details of the dump as described for the
2402 --ffdduummpp--ttrreeee options.
2403
2404 --ffdduummpp--ttrreeee--switch (C++ only)
2405 --ffdduummpp--ttrreeee--switch--options (C++ only)
2406 Control the dumping at various stages of processing the intermedi‐
2407 ate language tree to a file. The file name is generated by append‐
2408 ing a switch specific suffix to the source file name. If the
2409 --options form is used, options is a list of -- separated options
2410 that control the details of the dump. Not all options are applica‐
2411 ble to all dumps, those which are not meaningful will be ignored.
2412 The following options are available
2413
2414 aaddddrreessss
2415 Print the address of each node. Usually this is not meaningful
2416 as it changes according to the environment and source file. Its
2417 primary use is for tying up a dump file with a debug environ‐
2418 ment.
2419
2420 sslliimm
2421 Inhibit dumping of members of a scope or body of a function
2422 merely because that scope has been reached. Only dump such
2423 items when they are directly reachable by some other path.
2424
2425 aallll Turn on all options.
2426
2427 The following tree dumps are possible:
2428
2429 oorriiggiinnaall
2430 Dump before any tree based optimization, to file.original.
2431
2432 ooppttiimmiizzeedd
2433 Dump after all tree based optimization, to file.optimized.
2434
2435 iinnlliinneedd
2436 Dump after function inlining, to file.inlined.
2437
2438 --ffsscchheedd--vveerrbboossee==n
2439 On targets that use instruction scheduling, this option controls
2440 the amount of debugging output the scheduler prints. This informa‐
2441 tion is written to standard error, unless --ddSS or --ddRR is specified,
2442 in which case it is output to the usual dump listing file, .sched
2443 or .sched2 respectively. However for n greater than nine, the out‐
2444 put is always printed to standard error.
2445
2446 For n greater than zero, --ffsscchheedd--vveerrbboossee outputs the same informa‐
2447 tion as --ddRRSS. For n greater than one, it also output basic block
2448 probabilities, detailed ready list information and unit/insn info.
2449 For n greater than two, it includes RTL at abort point, control-
2450 flow and regions info. And for n over four, --ffsscchheedd--vveerrbboossee also
2451 includes dependence info.
2452
2453 --ffpprreetteenndd--ffllooaatt
2454 When running a cross-compiler, pretend that the target machine uses
2455 the same floating point format as the host machine. This causes
2456 incorrect output of the actual floating constants, but the actual
2457 instruction sequence will probably be the same as GCC would make
2458 when running on the target machine.
2459
2460 --ssaavvee--tteemmppss
2461 Store the usual ``temporary'' intermediate files permanently; place
2462 them in the current directory and name them based on the source
2463 file. Thus, compiling foo.c with --cc --ssaavvee--tteemmppss would produce
2464 files foo.i and foo.s, as well as foo.o. This creates a prepro‐
2465 cessed foo.i output file even though the compiler now normally uses
2466 an integrated preprocessor.
2467
2468 --ttiimmee
2469 Report the CPU time taken by each subprocess in the compilation
2470 sequence. For C source files, this is the compiler proper and
2471 assembler (plus the linker if linking is done). The output looks
2472 like this:
2473
2474 # cc1 0.12 0.01
2475 # as 0.00 0.01
2476
2477 The first number on each line is the ``user time,'' that is time
2478 spent executing the program itself. The second number is ``system
2479 time,'' time spent executing operating system routines on behalf of
2480 the program. Both numbers are in seconds.
2481
2482 --pprriinntt--ffiillee--nnaammee==library
2483 Print the full absolute name of the library file library that would
2484 be used when linking---and don't do anything else. With this
2485 option, GCC does not compile or link anything; it just prints the
2486 file name.
2487
2488 --pprriinntt--mmuullttii--ddiirreeccttoorryy
2489 Print the directory name corresponding to the multilib selected by
2490 any other switches present in the command line. This directory is
2491 supposed to exist in GGCCCC__EEXXEECC__PPRREEFFIIXX.
2492
2493 --pprriinntt--mmuullttii--lliibb
2494 Print the mapping from multilib directory names to compiler
2495 switches that enable them. The directory name is separated from
2496 the switches by ;;, and each switch starts with an @@}} iinnsstteeaadd ooff tthhee
2497 @@ssaammpp{{--, without spaces between multiple switches. This is sup‐
2498 posed to ease shell-processing.
2499
2500 --pprriinntt--pprroogg--nnaammee==program
2501 Like --pprriinntt--ffiillee--nnaammee, but searches for a program such as ccpppp.
2502
2503 --pprriinntt--lliibbggcccc--ffiillee--nnaammee
2504 Same as --pprriinntt--ffiillee--nnaammee==lliibbggcccc..aa.
2505
2506 This is useful when you use --nnoossttddlliibb or --nnooddeeffaauullttlliibbss but you do
2507 want to link with libgcc.a. You can do
2508
2509 gcc -nostdlib <files>... `gcc -print-libgcc-file-name`
2510
2511
2512 --pprriinntt--sseeaarrcchh--ddiirrss
2513 Print the name of the configured installation directory and a list
2514 of program and library directories gcc will search---and don't do
2515 anything else.
2516
2517 This is useful when gcc prints the error message iinnssttaallllaattiioonn pprroobb‐‐
2518 lleemm,, ccaannnnoott eexxeecc ccpppp00:: NNoo ssuucchh ffiillee oorr ddiirreeccttoorryy. To resolve this
2519 you either need to put cpp0 and the other compiler components where
2520 gcc expects to find them, or you can set the environment variable
2521 GGCCCC__EEXXEECC__PPRREEFFIIXX to the directory where you installed them. Don't
2522 forget the trailing '/'.
2523
2524 --dduummppmmaacchhiinnee
2525 Print the compiler's target machine (for example, ii668866--ppcc--lliinnuuxx--
2526 ggnnuu)---and don't do anything else.
2527
2528 --dduummppvveerrssiioonn
2529 Print the compiler version (for example, 33..00)---and don't do any‐
2530 thing else.
2531
2532 --dduummppssppeeccss
2533 Print the compiler's built-in specs---and don't do anything else.
2534 (This is used when GCC itself is being built.)
2535
2536 OOppttiioonnss TThhaatt CCoonnttrrooll OOppttiimmiizzaattiioonn
2537
2538 These options control various sorts of optimizations:
2539
2540 --OO
2541 --OO11 Optimize. Optimizing compilation takes somewhat more time, and a
2542 lot more memory for a large function.
2543
2544 Without --OO, the compiler's goal is to reduce the cost of compila‐
2545 tion and to make debugging produce the expected results. State‐
2546 ments are independent: if you stop the program with a breakpoint
2547 between statements, you can then assign a new value to any variable
2548 or change the program counter to any other statement in the func‐
2549 tion and get exactly the results you would expect from the source
2550 code.
2551
2552 With --OO, the compiler tries to reduce code size and execution time,
2553 without performing any optimizations that take a great deal of com‐
2554 pilation time.
2555
2556 --OO22 Optimize even more. GCC performs nearly all supported optimiza‐
2557 tions that do not involve a space-speed tradeoff. The compiler
2558 does not perform loop unrolling or function inlining when you spec‐
2559 ify --OO22. As compared to --OO, this option increases both compilation
2560 time and the performance of the generated code.
2561
2562 --OO22 turns on all optional optimizations except for loop unrolling,
2563 function inlining, and register renaming. It also turns on the
2564 --ffffoorrccee--mmeemm option on all machines and frame pointer elimination on
2565 machines where doing so does not interfere with debugging.
2566
2567 Please note the warning under --ffggccssee about invoking --OO22 on programs
2568 that use computed gotos.
2569
2570 --OO33 Optimize yet more. --OO33 turns on all optimizations specified by --OO22
2571 and also turns on the --ffiinnlliinnee--ffuunnccttiioonnss and --ffrreennaammee--rreeggiisstteerrss
2572 options.
2573
2574 --OO00 Do not optimize.
2575
2576 --OOss Optimize for size. --OOss enables all --OO22 optimizations that do not
2577 typically increase code size. It also performs further optimiza‐
2578 tions designed to reduce code size.
2579
2580 If you use multiple --OO options, with or without level numbers, the
2581 last such option is the one that is effective.
2582
2583 Options of the form --ffflag specify machine-independent flags. Most
2584 flags have both positive and negative forms; the negative form of --ffffoooo
2585 would be --ffnnoo--ffoooo. In the table below, only one of the forms is
2586 listed---the one which is not the default. You can figure out the
2587 other form by either removing nnoo-- or adding it.
2588
2589 --ffffllooaatt--ssttoorree
2590 Do not store floating point variables in registers, and inhibit
2591 other options that might change whether a floating point value is
2592 taken from a register or memory.
2593
2594 This option prevents undesirable excess precision on machines such
2595 as the 68000 where the floating registers (of the 68881) keep more
2596 precision than a "double" is supposed to have. Similarly for the
2597 x86 architecture. For most programs, the excess precision does
2598 only good, but a few programs rely on the precise definition of
2599 IEEE floating point. Use --ffffllooaatt--ssttoorree for such programs, after
2600 modifying them to store all pertinent intermediate computations
2601 into variables.
2602
2603 --ffnnoo--ddeeffaauulltt--iinnlliinnee
2604 Do not make member functions inline by default merely because they
2605 are defined inside the class scope (C++ only). Otherwise, when you
2606 specify --OO, member functions defined inside class scope are com‐
2607 piled inline by default; i.e., you don't need to add iinnlliinnee in
2608 front of the member function name.
2609
2610 --ffnnoo--ddeeffeerr--ppoopp
2611 Always pop the arguments to each function call as soon as that
2612 function returns. For machines which must pop arguments after a
2613 function call, the compiler normally lets arguments accumulate on
2614 the stack for several function calls and pops them all at once.
2615
2616 --ffffoorrccee--mmeemm
2617 Force memory operands to be copied into registers before doing
2618 arithmetic on them. This produces better code by making all memory
2619 references potential common subexpressions. When they are not com‐
2620 mon subexpressions, instruction combination should eliminate the
2621 separate register-load. The --OO22 option turns on this option.
2622
2623 --ffffoorrccee--aaddddrr
2624 Force memory address constants to be copied into registers before
2625 doing arithmetic on them. This may produce better code just as
2626 --ffffoorrccee--mmeemm may.
2627
2628 --ffoommiitt--ffrraammee--ppooiinntteerr
2629 Don't keep the frame pointer in a register for functions that don't
2630 need one. This avoids the instructions to save, set up and restore
2631 frame pointers; it also makes an extra register available in many
2632 functions. IItt aallssoo mmaakkeess ddeebbuuggggiinngg iimmppoossssiibbllee oonn ssoommee mmaacchhiinneess..
2633
2634 On some machines, such as the VAX, this flag has no effect, because
2635 the standard calling sequence automatically handles the frame
2636 pointer and nothing is saved by pretending it doesn't exist. The
2637 machine-description macro "FRAME_POINTER_REQUIRED" controls whether
2638 a target machine supports this flag.
2639
2640 --ffooppttiimmiizzee--ssiibblliinngg--ccaallllss
2641 Optimize sibling and tail recursive calls.
2642
2643 --ffttrraappvv
2644 This option generates traps for signed overflow on addition, sub‐
2645 traction, multiplication operations.
2646
2647 --ffnnoo--iinnlliinnee
2648 Don't pay attention to the "inline" keyword. Normally this option
2649 is used to keep the compiler from expanding any functions inline.
2650 Note that if you are not optimizing, no functions can be expanded
2651 inline.
2652
2653 --ffiinnlliinnee--ffuunnccttiioonnss
2654 Integrate all simple functions into their callers. The compiler
2655 heuristically decides which functions are simple enough to be worth
2656 integrating in this way.
2657
2658 If all calls to a given function are integrated, and the function
2659 is declared "static", then the function is normally not output as
2660 assembler code in its own right.
2661
2662 --ffiinnlliinnee--lliimmiitt==n
2663 By default, gcc limits the size of functions that can be inlined.
2664 This flag allows the control of this limit for functions that are
2665 explicitly marked as inline (ie marked with the inline keyword or
2666 defined within the class definition in c++). n is the size of
2667 functions that can be inlined in number of pseudo instructions (not
2668 counting parameter handling). The default value of n is 600.
2669 Increasing this value can result in more inlined code at the cost
2670 of compilation time and memory consumption. Decreasing usually
2671 makes the compilation faster and less code will be inlined (which
2672 presumably means slower programs). This option is particularly
2673 useful for programs that use inlining heavily such as those based
2674 on recursive templates with C++.
2675
2676 Note: pseudo instruction represents, in this particular context, an
2677 abstract measurement of function's size. In no way, it represents
2678 a count of assembly instructions and as such its exact meaning
2679 might change from one release to an another.
2680
2681 --ffkkeeeepp--iinnlliinnee--ffuunnccttiioonnss
2682 Even if all calls to a given function are integrated, and the func‐
2683 tion is declared "static", nevertheless output a separate run-time
2684 callable version of the function. This switch does not affect
2685 "extern inline" functions.
2686
2687 --ffkkeeeepp--ssttaattiicc--ccoonnssttss
2688 Emit variables declared "static const" when optimization isn't
2689 turned on, even if the variables aren't referenced.
2690
2691 GCC enables this option by default. If you want to force the com‐
2692 piler to check if the variable was referenced, regardless of
2693 whether or not optimization is turned on, use the --ffnnoo--kkeeeepp--ssttaattiicc--
2694 ccoonnssttss option.
2695
2696 --ffmmeerrggee--ccoonnssttaannttss
2697 Attempt to merge identical constants (string constants and floating
2698 point constants) accross compilation units.
2699
2700 This option is default for optimized compilation if assembler and
2701 linker support it. Use --ffnnoo--mmeerrggee--ccoonnssttaannttss to inhibit this behav‐
2702 ior.
2703
2704 --ffmmeerrggee--aallll--ccoonnssttaannttss
2705 Attempt to merge identical constants and identical variables.
2706
2707 This option implies --ffmmeerrggee--ccoonnssttaannttss. In addition to --ffmmeerrggee--ccoonn‐‐
2708 ssttaannttss this considers e.g. even constant initialized arrays or ini‐
2709 tialized constant variables with integral or floating point types.
2710 Languages like C or C++ require each non-automatic variable to have
2711 distinct location, so using this option will result in non-conform‐
2712 ing behavior.
2713
2714 --ffnnoo--bbrraanncchh--ccoouunntt--rreegg
2715 Do not use ``decrement and branch'' instructions on a count regis‐
2716 ter, but instead generate a sequence of instructions that decrement
2717 a register, compare it against zero, then branch based upon the
2718 result. This option is only meaningful on architectures that sup‐
2719 port such instructions, which include x86, PowerPC, IA-64 and
2720 S/390.
2721
2722 --ffnnoo--ffuunnccttiioonn--ccssee
2723 Do not put function addresses in registers; make each instruction
2724 that calls a constant function contain the function's address
2725 explicitly.
2726
2727 This option results in less efficient code, but some strange hacks
2728 that alter the assembler output may be confused by the optimiza‐
2729 tions performed when this option is not used.
2730
2731 --ffffaasstt--mmaatthh
2732 Sets --ffnnoo--mmaatthh--eerrrrnnoo, --ffuunnssaaffee--mmaatthh--ooppttiimmiizzaattiioonnss, and --ffnnoo--ttrraapp‐‐
2733 ppiinngg--mmaatthh.
2734
2735 This option causes the preprocessor macro "__FAST_MATH__" to be
2736 defined.
2737
2738 This option should never be turned on by any --OO option since it can
2739 result in incorrect output for programs which depend on an exact
2740 implementation of IEEE or ISO rules/specifications for math func‐
2741 tions.
2742
2743 --ffnnoo--mmaatthh--eerrrrnnoo
2744 Do not set ERRNO after calling math functions that are executed
2745 with a single instruction, e.g., sqrt. A program that relies on
2746 IEEE exceptions for math error handling may want to use this flag
2747 for speed while maintaining IEEE arithmetic compatibility.
2748
2749 This option should never be turned on by any --OO option since it can
2750 result in incorrect output for programs which depend on an exact
2751 implementation of IEEE or ISO rules/specifications for math func‐
2752 tions.
2753
2754 The default is --ffmmaatthh--eerrrrnnoo.
2755
2756 --ffuunnssaaffee--mmaatthh--ooppttiimmiizzaattiioonnss
2757 Allow optimizations for floating-point arithmetic that (a) assume
2758 that arguments and results are valid and (b) may violate IEEE or
2759 ANSI standards. When used at link-time, it may include libraries
2760 or startup files that change the default FPU control word or other
2761 similar optimizations.
2762
2763 This option should never be turned on by any --OO option since it can
2764 result in incorrect output for programs which depend on an exact
2765 implementation of IEEE or ISO rules/specifications for math func‐
2766 tions.
2767
2768 The default is --ffnnoo--uunnssaaffee--mmaatthh--ooppttiimmiizzaattiioonnss.
2769
2770 --ffnnoo--ttrraappppiinngg--mmaatthh
2771 Compile code assuming that floating-point operations cannot gener‐
2772 ate user-visible traps. Setting this option may allow faster code
2773 if one relies on ``non-stop'' IEEE arithmetic, for example.
2774
2775 This option should never be turned on by any --OO option since it can
2776 result in incorrect output for programs which depend on an exact
2777 implementation of IEEE or ISO rules/specifications for math func‐
2778 tions.
2779
2780 The default is --ffttrraappppiinngg--mmaatthh.
2781
2782 --ffbboouunnddss--cchheecckk
2783 For front-ends that support it, generate additional code to check
2784 that indices used to access arrays are within the declared range.
2785 This is currenly only supported by the Java and Fortran 77 front-
2786 ends, where this option defaults to true and false respectively.
2787
2788 The following options control specific optimizations. The --OO22 option
2789 turns on all of these optimizations except --ffuunnrroollll--llooooppss and --ffuunnrroollll--
2790 aallll--llooooppss. On most machines, the --OO option turns on the --fftthhrreeaadd--jjuummppss
2791 and --ffddeellaayyeedd--bbrraanncchh options, but specific machines may handle it dif‐
2792 ferently.
2793
2794 You can use the following flags in the rare cases when ``fine-tuning''
2795 of optimizations to be performed is desired.
2796
2797 Not all of the optimizations performed by GCC have --ff options to con‐
2798 trol them.
2799
2800 --ffssttrreennggtthh--rreedduuccee
2801 Perform the optimizations of loop strength reduction and elimina‐
2802 tion of iteration variables.
2803
2804 --fftthhrreeaadd--jjuummppss
2805 Perform optimizations where we check to see if a jump branches to a
2806 location where another comparison subsumed by the first is found.
2807 If so, the first branch is redirected to either the destination of
2808 the second branch or a point immediately following it, depending on
2809 whether the condition is known to be true or false.
2810
2811 --ffccssee--ffoollllooww--jjuummppss
2812 In common subexpression elimination, scan through jump instructions
2813 when the target of the jump is not reached by any other path. For
2814 example, when CSE encounters an "if" statement with an "else"
2815 clause, CSE will follow the jump when the condition tested is
2816 false.
2817
2818 --ffccssee--sskkiipp--bblloocckkss
2819 This is similar to --ffccssee--ffoollllooww--jjuummppss, but causes CSE to follow
2820 jumps which conditionally skip over blocks. When CSE encounters a
2821 simple "if" statement with no else clause, --ffccssee--sskkiipp--bblloocckkss causes
2822 CSE to follow the jump around the body of the "if".
2823
2824 --ffrreerruunn--ccssee--aafftteerr--lloooopp
2825 Re-run common subexpression elimination after loop optimizations
2826 has been performed.
2827
2828 --ffrreerruunn--lloooopp--oopptt
2829 Run the loop optimizer twice.
2830
2831 --ffggccssee
2832 Perform a global common subexpression elimination pass. This pass
2833 also performs global constant and copy propagation.
2834
2835 Note: When compiling a program using computed gotos, a GCC exten‐
2836 sion, you may get better runtime performance if you disable the
2837 global common subexpression elmination pass by adding --ffnnoo--ggccssee to
2838 the command line.
2839
2840 --ffggccssee--llmm
2841 When --ffggccssee--llmm is enabled, global common subexpression elimination
2842 will attempt to move loads which are only killed by stores into
2843 themselves. This allows a loop containing a load/store sequence to
2844 be changed to a load outside the loop, and a copy/store within the
2845 loop.
2846
2847 --ffggccssee--ssmm
2848 When --ffggccssee--ssmm is enabled, A store motion pass is run after global
2849 common subexpression elimination. This pass will attempt to move
2850 stores out of loops. When used in conjunction with --ffggccssee--llmm,
2851 loops containing a load/store sequence can be changed to a load
2852 before the loop and a store after the loop.
2853
2854 --ffddeelleettee--nnuullll--ppooiinntteerr--cchheecckkss
2855 Use global dataflow analysis to identify and eliminate useless
2856 checks for null pointers. The compiler assumes that dereferencing
2857 a null pointer would have halted the program. If a pointer is
2858 checked after it has already been dereferenced, it cannot be null.
2859
2860 In some environments, this assumption is not true, and programs can
2861 safely dereference null pointers. Use --ffnnoo--ddeelleettee--nnuullll--ppooiinntteerr--
2862 cchheecckkss to disable this optimization for programs which depend on
2863 that behavior.
2864
2865 --ffeexxppeennssiivvee--ooppttiimmiizzaattiioonnss
2866 Perform a number of minor optimizations that are relatively expen‐
2867 sive.
2868
2869 --ffooppttiimmiizzee--rreeggiisstteerr--mmoovvee
2870 --ffrreeggmmoovvee
2871 Attempt to reassign register numbers in move instructions and as
2872 operands of other simple instructions in order to maximize the
2873 amount of register tying. This is especially helpful on machines
2874 with two-operand instructions. GCC enables this optimization by
2875 default with --OO22 or higher.
2876
2877 Note --ffrreeggmmoovvee and --ffooppttiimmiizzee--rreeggiisstteerr--mmoovvee are the same optimiza‐
2878 tion.
2879
2880 --ffddeellaayyeedd--bbrraanncchh
2881 If supported for the target machine, attempt to reorder instruc‐
2882 tions to exploit instruction slots available after delayed branch
2883 instructions.
2884
2885 --ffsscchheedduullee--iinnssnnss
2886 If supported for the target machine, attempt to reorder instruc‐
2887 tions to eliminate execution stalls due to required data being
2888 unavailable. This helps machines that have slow floating point or
2889 memory load instructions by allowing other instructions to be
2890 issued until the result of the load or floating point instruction
2891 is required.
2892
2893 --ffsscchheedduullee--iinnssnnss22
2894 Similar to --ffsscchheedduullee--iinnssnnss, but requests an additional pass of
2895 instruction scheduling after register allocation has been done.
2896 This is especially useful on machines with a relatively small num‐
2897 ber of registers and where memory load instructions take more than
2898 one cycle.
2899
2900 --ffnnoo--sscchheedd--iinntteerrbblloocckk
2901 Don't schedule instructions across basic blocks. This is normally
2902 enabled by default when scheduling before register allocation, i.e.
2903 with --ffsscchheedduullee--iinnssnnss or at --OO22 or higher.
2904
2905 --ffnnoo--sscchheedd--ssppeecc
2906 Don't allow speculative motion of non-load instructions. This is
2907 normally enabled by default when scheduling before register alloca‐
2908 tion, i.e. with --ffsscchheedduullee--iinnssnnss or at --OO22 or higher.
2909
2910 --ffsscchheedd--ssppeecc--llooaadd
2911 Allow speculative motion of some load instructions. This only
2912 makes sense when scheduling before register allocation, i.e. with
2913 --ffsscchheedduullee--iinnssnnss or at --OO22 or higher.
2914
2915 --ffsscchheedd--ssppeecc--llooaadd--ddaannggeerroouuss
2916 Allow speculative motion of more load instructions. This only
2917 makes sense when scheduling before register allocation, i.e. with
2918 --ffsscchheedduullee--iinnssnnss or at --OO22 or higher.
2919
2920 --ffffuunnccttiioonn--sseeccttiioonnss
2921 --ffddaattaa--sseeccttiioonnss
2922 Place each function or data item into its own section in the output
2923 file if the target supports arbitrary sections. The name of the
2924 function or the name of the data item determines the section's name
2925 in the output file.
2926
2927 Use these options on systems where the linker can perform optimiza‐
2928 tions to improve locality of reference in the instruction space.
2929 HPPA processors running HP-UX and Sparc processors running Solaris
2930 2 have linkers with such optimizations. Other systems using the
2931 ELF object format as well as AIX may have these optimizations in
2932 the future.
2933
2934 Only use these options when there are significant benefits from
2935 doing so. When you specify these options, the assembler and linker
2936 will create larger object and executable files and will also be
2937 slower. You will not be able to use "gprof" on all systems if you
2938 specify this option and you may have problems with debugging if you
2939 specify both this option and --gg.
2940
2941 --ffccaalllleerr--ssaavveess
2942 Enable values to be allocated in registers that will be clobbered
2943 by function calls, by emitting extra instructions to save and
2944 restore the registers around such calls. Such allocation is done
2945 only when it seems to result in better code than would otherwise be
2946 produced.
2947
2948 This option is always enabled by default on certain machines, usu‐
2949 ally those which have no call-preserved registers to use instead.
2950
2951 For all machines, optimization level 2 and higher enables this flag
2952 by default.
2953
2954 --ffuunnrroollll--llooooppss
2955 Unroll loops whose number of iterations can be determined at com‐
2956 pile time or upon entry to the loop. --ffuunnrroollll--llooooppss implies both
2957 --ffssttrreennggtthh--rreedduuccee and --ffrreerruunn--ccssee--aafftteerr--lloooopp. This option makes
2958 code larger, and may or may not make it run faster.
2959
2960 --ffuunnrroollll--aallll--llooooppss
2961 Unroll all loops, even if their number of iterations is uncertain
2962 when the loop is entered. This usually makes programs run more
2963 slowly. --ffuunnrroollll--aallll--llooooppss implies the same options as --ffuunnrroollll--
2964 llooooppss,
2965
2966 --ffpprreeffeettcchh--lloooopp--aarrrraayyss
2967 If supported by the target machine, generate instructions to
2968 prefetch memory to improve the performance of loops that access
2969 large arrays.
2970
2971 --ffmmoovvee--aallll--mmoovvaabblleess
2972 Forces all invariant computations in loops to be moved outside the
2973 loop.
2974
2975 --ffrreedduuccee--aallll--ggiivvss
2976 Forces all general-induction variables in loops to be strength-
2977 reduced.
2978
2979 Note: When compiling programs written in Fortran, --ffmmoovvee--aallll--mmoovv‐‐
2980 aabblleess and --ffrreedduuccee--aallll--ggiivvss are enabled by default when you use the
2981 optimizer.
2982
2983 These options may generate better or worse code; results are highly
2984 dependent on the structure of loops within the source code.
2985
2986 These two options are intended to be removed someday, once they
2987 have helped determine the efficacy of various approaches to improv‐
2988 ing loop optimizations.
2989
2990 Please let us (<ggcccc@@ggcccc..ggnnuu..oorrgg> and <ffoorrttrraann@@ggnnuu..oorrgg>) know how
2991 use of these options affects the performance of your production
2992 code. We're very interested in code that runs slower when these
2993 options are enabled.
2994
2995 --ffnnoo--ppeeeepphhoollee
2996 --ffnnoo--ppeeeepphhoollee22
2997 Disable any machine-specific peephole optimizations. The differ‐
2998 ence between --ffnnoo--ppeeeepphhoollee and --ffnnoo--ppeeeepphhoollee22 is in how they are
2999 implemented in the compiler; some targets use one, some use the
3000 other, a few use both.
3001
3002 --ffbbrraanncchh--pprroobbaabbiilliittiieess
3003 After running a program compiled with --ffpprrooffiillee--aarrccss, you can com‐
3004 pile it a second time using --ffbbrraanncchh--pprroobbaabbiilliittiieess, to improve
3005 optimizations based on the number of times each branch was taken.
3006 When the program compiled with --ffpprrooffiillee--aarrccss exits it saves arc
3007 execution counts to a file called sourcename.da for each source
3008 file The information in this data file is very dependent on the
3009 structure of the generated code, so you must use the same source
3010 code and the same optimization options for both compilations.
3011
3012 With --ffbbrraanncchh--pprroobbaabbiilliittiieess, GCC puts a RREEGG__EEXXEECC__CCOOUUNNTT note on the
3013 first instruction of each basic block, and a RREEGG__BBRR__PPRROOBB note on
3014 each JJUUMMPP__IINNSSNN and CCAALLLL__IINNSSNN. These can be used to improve opti‐
3015 mization. Currently, they are only used in one place: in reorg.c,
3016 instead of guessing which path a branch is mostly to take, the
3017 RREEGG__BBRR__PPRROOBB values are used to exactly determine which path is
3018 taken more often.
3019
3020 --ffnnoo--gguueessss--bbrraanncchh--pprroobbaabbiilliittyy
3021 Do not guess branch probabilities using a randomized model.
3022
3023 Sometimes gcc will opt to use a randomized model to guess branch
3024 probabilities, when none are available from either profiling feed‐
3025 back (--ffpprrooffiillee--aarrccss) or ____bbuuiillttiinn__eexxppeecctt. This means that differ‐
3026 ent runs of the compiler on the same program may produce different
3027 object code.
3028
3029 In a hard real-time system, people don't want different runs of the
3030 compiler to produce code that has different behavior; minimizing
3031 non-determinism is of paramount import. This switch allows users
3032 to reduce non-determinism, possibly at the expense of inferior
3033 optimization.
3034
3035 --ffssttrriicctt--aalliiaassiinngg
3036 Allows the compiler to assume the strictest aliasing rules applica‐
3037 ble to the language being compiled. For C (and C++), this acti‐
3038 vates optimizations based on the type of expressions. In particu‐
3039 lar, an object of one type is assumed never to reside at the same
3040 address as an object of a different type, unless the types are
3041 almost the same. For example, an "unsigned int" can alias an
3042 "int", but not a "void*" or a "double". A character type may alias
3043 any other type.
3044
3045 Pay special attention to code like this:
3046
3047 union a_union {
3048 int i;
3049 double d;
3050 };
3051
3052 int f() {
3053 a_union t;
3054 t.d = 3.0;
3055 return t.i;
3056 }
3057
3058 The practice of reading from a different union member than the one
3059 most recently written to (called ``type-punning'') is common. Even
3060 with --ffssttrriicctt--aalliiaassiinngg, type-punning is allowed, provided the mem‐
3061 ory is accessed through the union type. So, the code above will
3062 work as expected. However, this code might not:
3063
3064 int f() {
3065 a_union t;
3066 int* ip;
3067 t.d = 3.0;
3068 ip = &t.i;
3069 return *ip;
3070 }
3071
3072 Every language that wishes to perform language-specific alias anal‐
3073 ysis should define a function that computes, given an "tree" node,
3074 an alias set for the node. Nodes in different alias sets are not
3075 allowed to alias. For an example, see the C front-end function
3076 "c_get_alias_set".
3077
3078 --ffaalliiggnn--ffuunnccttiioonnss
3079 --ffaalliiggnn--ffuunnccttiioonnss==n
3080 Align the start of functions to the next power-of-two greater than
3081 n, skipping up to n bytes. For instance, --ffaalliiggnn--ffuunnccttiioonnss==3322
3082 aligns functions to the next 32-byte boundary, but --ffaalliiggnn--ffuunncc‐‐
3083 ttiioonnss==2244 would align to the next 32-byte boundary only if this can
3084 be done by skipping 23 bytes or less.
3085
3086 --ffnnoo--aalliiggnn--ffuunnccttiioonnss and --ffaalliiggnn--ffuunnccttiioonnss==11 are equivalent and
3087 mean that functions will not be aligned.
3088
3089 Some assemblers only support this flag when n is a power of two; in
3090 that case, it is rounded up.
3091
3092 If n is not specified, use a machine-dependent default.
3093
3094 --ffaalliiggnn--llaabbeellss
3095 --ffaalliiggnn--llaabbeellss==n
3096 Align all branch targets to a power-of-two boundary, skipping up to
3097 n bytes like --ffaalliiggnn--ffuunnccttiioonnss. This option can easily make code
3098 slower, because it must insert dummy operations for when the branch
3099 target is reached in the usual flow of the code.
3100
3101 If --ffaalliiggnn--llooooppss or --ffaalliiggnn--jjuummppss are applicable and are greater
3102 than this value, then their values are used instead.
3103
3104 If n is not specified, use a machine-dependent default which is
3105 very likely to be 11, meaning no alignment.
3106
3107 --ffaalliiggnn--llooooppss
3108 --ffaalliiggnn--llooooppss==n
3109 Align loops to a power-of-two boundary, skipping up to n bytes like
3110 --ffaalliiggnn--ffuunnccttiioonnss. The hope is that the loop will be executed many
3111 times, which will make up for any execution of the dummy opera‐
3112 tions.
3113
3114 If n is not specified, use a machine-dependent default.
3115
3116 --ffaalliiggnn--jjuummppss
3117 --ffaalliiggnn--jjuummppss==n
3118 Align branch targets to a power-of-two boundary, for branch targets
3119 where the targets can only be reached by jumping, skipping up to n
3120 bytes like --ffaalliiggnn--ffuunnccttiioonnss. In this case, no dummy operations
3121 need be executed.
3122
3123 If n is not specified, use a machine-dependent default.
3124
3125 --ffssssaa
3126 Perform optimizations in static single assignment form. Each func‐
3127 tion's flow graph is translated into SSA form, optimizations are
3128 performed, and the flow graph is translated back from SSA form.
3129 Users should not specify this option, since it is not yet ready for
3130 production use.
3131
3132 --ffssssaa--ccccpp
3133 Perform Sparse Conditional Constant Propagation in SSA form.
3134 Requires --ffssssaa. Like --ffssssaa, this is an experimental feature.
3135
3136 --ffssssaa--ddccee
3137 Perform aggressive dead-code elimination in SSA form. Requires
3138 --ffssssaa. Like --ffssssaa, this is an experimental feature.
3139
3140 --ffssiinnggllee--pprreecciissiioonn--ccoonnssttaanntt
3141 Treat floating point constant as single precision constant instead
3142 of implicitly converting it to double precision constant.
3143
3144 --ffrreennaammee--rreeggiisstteerrss
3145 Attempt to avoid false dependencies in scheduled code by making use
3146 of registers left over after register allocation. This optimiza‐
3147 tion will most benefit processors with lots of registers. It can,
3148 however, make debugging impossible, since variables will no longer
3149 stay in a ``home register''.
3150
3151 --ffnnoo--ccpprroopp--rreeggiisstteerrss
3152 After register allocation and post-register allocation instruction
3153 splitting, we perform a copy-propagation pass to try to reduce
3154 scheduling dependencies and occasionally eliminate the copy.
3155
3156 ----ppaarraamm name==value
3157 In some places, GCC uses various constants to control the amount of
3158 optimization that is done. For example, GCC will not inline func‐
3159 tions that contain more that a certain number of instructions. You
3160 can control some of these constants on the command-line using the
3161 ----ppaarraamm option.
3162
3163 In each case, the value is an integer. The allowable choices for
3164 name are given in the following table:
3165
3166 mmaaxx--ddeellaayy--sslloott--iinnssnn--sseeaarrcchh
3167 The maximum number of instructions to consider when looking for
3168 an instruction to fill a delay slot. If more than this arbi‐
3169 trary number of instructions is searched, the time savings from
3170 filling the delay slot will be minimal so stop searching.
3171 Increasing values mean more aggressive optimization, making the
3172 compile time increase with probably small improvement in exe‐
3173 cutable run time.
3174
3175 mmaaxx--ddeellaayy--sslloott--lliivvee--sseeaarrcchh
3176 When trying to fill delay slots, the maximum number of instruc‐
3177 tions to consider when searching for a block with valid live
3178 register information. Increasing this arbitrarily chosen value
3179 means more aggressive optimization, increasing the compile
3180 time. This parameter should be removed when the delay slot
3181 code is rewritten to maintain the control-flow graph.
3182
3183 mmaaxx--ggccssee--mmeemmoorryy
3184 The approximate maximum amount of memory that will be allocated
3185 in order to perform the global common subexpression elimination
3186 optimization. If more memory than specified is required, the
3187 optimization will not be done.
3188
3189 mmaaxx--ggccssee--ppaasssseess
3190 The maximum number of passes of GCSE to run.
3191
3192 mmaaxx--ppeennddiinngg--lliisstt--lleennggtthh
3193 The maximum number of pending dependencies scheduling will
3194 allow before flushing the current state and starting over.
3195 Large functions with few branches or calls can create exces‐
3196 sively large lists which needlessly consume memory and
3197 resources.
3198
3199 mmaaxx--iinnlliinnee--iinnssnnss
3200 If an function contains more than this many instructions, it
3201 will not be inlined. This option is precisely equivalent to
3202 --ffiinnlliinnee--lliimmiitt.
3203
3204 OOppttiioonnss CCoonnttrroolllliinngg tthhee PPrreepprroocceessssoorr
3205
3206 These options control the C preprocessor, which is run on each C source
3207 file before actual compilation.
3208
3209 If you use the --EE option, nothing is done except preprocessing. Some
3210 of these options make sense only together with --EE because they cause
3211 the preprocessor output to be unsuitable for actual compilation.
3212
3213 You can use --WWpp,,option to bypass the compiler driver and pass option
3214 directly through to the preprocessor. If option contains commas, it is
3215 split into multiple options at the commas. However, many options are
3216 modified, translated or interpreted by the compiler driver before being
3217 passed to the preprocessor, and --WWpp forcibly bypasses this phase. The
3218 preprocessor's direct interface is undocumented and subject to change,
3219 so whenever possible you should avoid using --WWpp and let the driver han‐
3220 dle the options instead.
3221
3222 --DD name
3223 Predefine name as a macro, with definition "1".
3224
3225 --DD name==definition
3226 Predefine name as a macro, with definition definition. There are
3227 no restrictions on the contents of definition, but if you are
3228 invoking the preprocessor from a shell or shell-like program you
3229 may need to use the shell's quoting syntax to protect characters
3230 such as spaces that have a meaning in the shell syntax.
3231
3232 If you wish to define a function-like macro on the command line,
3233 write its argument list with surrounding parentheses before the
3234 equals sign (if any). Parentheses are meaningful to most shells,
3235 so you will need to quote the option. With sshh and ccsshh,
3236 --DD''name((args...))==definition'' works.
3237
3238 --DD and --UU options are processed in the order they are given on the
3239 command line. All --iimmaaccrrooss file and --iinncclluuddee file options are pro‐
3240 cessed after all --DD and --UU options.
3241
3242 --UU name
3243 Cancel any previous definition of name, either built in or provided
3244 with a --DD option.
3245
3246 --uunnddeeff
3247 Do not predefine any system-specific macros. The common predefined
3248 macros remain defined.
3249
3250 --II dir
3251 Add the directory dir to the list of directories to be searched for
3252 header files. Directories named by --II are searched before the
3253 standard system include directories.
3254
3255 It is dangerous to specify a standard system include directory in
3256 an --II option. This defeats the special treatment of system headers
3257 . It can also defeat the repairs to buggy system headers which GCC
3258 makes when it is installed.
3259
3260 --oo file
3261 Write output to file. This is the same as specifying file as the
3262 second non-option argument to ccpppp. ggcccc has a different interpreta‐
3263 tion of a second non-option argument, so you must use --oo to specify
3264 the output file.
3265
3266 --WWaallll
3267 Turns on all optional warnings which are desirable for normal code.
3268 At present this is --WWccoommmmeenntt and --WWttrriiggrraapphhss. Note that many of
3269 the preprocessor's warnings are on by default and have no options
3270 to control them.
3271
3272 --WWccoommmmeenntt
3273 --WWccoommmmeennttss
3274 Warn whenever a comment-start sequence //** appears in a //** comment,
3275 or whenever a backslash-newline appears in a //// comment. (Both
3276 forms have the same effect.)
3277
3278 --WWttrriiggrraapphhss
3279 Warn if any trigraphs are encountered. This option used to take
3280 effect only if --ttrriiggrraapphhss was also specified, but now works inde‐
3281 pendently. Warnings are not given for trigraphs within comments,
3282 as they do not affect the meaning of the program.
3283
3284 --WWttrraaddiittiioonnaall
3285 Warn about certain constructs that behave differently in tradi‐
3286 tional and ISO C. Also warn about ISO C constructs that have no
3287 traditional C equivalent, and problematic constructs which should
3288 be avoided.
3289
3290 --WWiimmppoorrtt
3291 Warn the first time ##iimmppoorrtt is used.
3292
3293 --WWuunnddeeff
3294 Warn whenever an identifier which is not a macro is encountered in
3295 an ##iiff directive, outside of ddeeffiinneedd. Such identifiers are
3296 replaced with zero.
3297
3298 --WWeerrrroorr
3299 Make all warnings into hard errors. Source code which triggers
3300 warnings will be rejected.
3301
3302 --WWssyysstteemm--hheeaaddeerrss
3303 Issue warnings for code in system headers. These are normally
3304 unhelpful in finding bugs in your own code, therefore suppressed.
3305 If you are responsible for the system library, you may want to see
3306 them.
3307
3308 --ww Suppress all warnings, including those which GNU CPP issues by
3309 default.
3310
3311 --ppeeddaannttiicc
3312 Issue all the mandatory diagnostics listed in the C standard. Some
3313 of them are left out by default, since they trigger frequently on
3314 harmless code.
3315
3316 --ppeeddaannttiicc--eerrrroorrss
3317 Issue all the mandatory diagnostics, and make all mandatory diag‐
3318 nostics into errors. This includes mandatory diagnostics that GCC
3319 issues without --ppeeddaannttiicc but treats as warnings.
3320
3321 --MM Instead of outputting the result of preprocessing, output a rule
3322 suitable for mmaakkee describing the dependencies of the main source
3323 file. The preprocessor outputs one mmaakkee rule containing the object
3324 file name for that source file, a colon, and the names of all the
3325 included files, including those coming from --iinncclluuddee or --iimmaaccrrooss
3326 command line options.
3327
3328 Unless specified explicitly (with --MMTT or --MMQQ), the object file name
3329 consists of the basename of the source file with any suffix
3330 replaced with object file suffix. If there are many included files
3331 then the rule is split into several lines using \\-newline. The
3332 rule has no commands.
3333
3334 This option does not suppress the preprocessor's debug output, such
3335 as --ddMM. To avoid mixing such debug output with the dependency
3336 rules you should explicitly specify the dependency output file with
3337 --MMFF, or use an environment variable like DDEEPPEENNDDEENNCCIIEESS__OOUUTTPPUUTT.
3338 Debug output will still be sent to the regular output stream as
3339 normal.
3340
3341 Passing --MM to the driver implies --EE.
3342
3343 --MMMM Like --MM but do not mention header files that are found in system
3344 header directories, nor header files that are included, directly or
3345 indirectly, from such a header.
3346
3347 This implies that the choice of angle brackets or double quotes in
3348 an ##iinncclluuddee directive does not in itself determine whether that
3349 header will appear in --MMMM dependency output. This is a slight
3350 change in semantics from GCC versions 3.0 and earlier.
3351
3352 --MMFF file
3353 @anchor{-MF} When used with --MM or --MMMM, specifies a file to write
3354 the dependencies to. If no --MMFF switch is given the preprocessor
3355 sends the rules to the same place it would have sent preprocessed
3356 output.
3357
3358 When used with the driver options --MMDD or --MMMMDD, --MMFF overrides the
3359 default dependency output file.
3360
3361 --MMGG When used with --MM or --MMMM, --MMGG says to treat missing header files as
3362 generated files and assume they live in the same directory as the
3363 source file. It suppresses preprocessed output, as a missing
3364 header file is ordinarily an error.
3365
3366 This feature is used in automatic updating of makefiles.
3367
3368 --MMPP This option instructs CPP to add a phony target for each dependency
3369 other than the main file, causing each to depend on nothing. These
3370 dummy rules work around errors mmaakkee gives if you remove header
3371 files without updating the Makefile to match.
3372
3373 This is typical output:
3374
3375 test.o: test.c test.h
3376
3377 test.h:
3378
3379
3380 --MMTT target
3381 Change the target of the rule emitted by dependency generation. By
3382 default CPP takes the name of the main input file, including any
3383 path, deletes any file suffix such as ..cc, and appends the plat‐
3384 form's usual object suffix. The result is the target.
3385
3386 An --MMTT option will set the target to be exactly the string you
3387 specify. If you want multiple targets, you can specify them as a
3388 single argument to --MMTT, or use multiple --MMTT options.
3389
3390 For example, --MMTT ''$$((oobbjjppffxx))ffoooo..oo'' might give
3391
3392 $(objpfx)foo.o: foo.c
3393
3394
3395 --MMQQ target
3396 Same as --MMTT, but it quotes any characters which are special to
3397 Make. --MMQQ ''$$((oobbjjppffxx))ffoooo..oo'' gives
3398
3399 $$(objpfx)foo.o: foo.c
3400
3401 The default target is automatically quoted, as if it were given
3402 with --MMQQ.
3403
3404 --MMDD --MMDD is equivalent to --MM --MMFF file, except that --EE is not implied.
3405 The driver determines file based on whether an --oo option is given.
3406 If it is, the driver uses its argument but with a suffix of .d,
3407 otherwise it take the basename of the input file and applies a .d
3408 suffix.
3409
3410 If --MMDD is used in conjunction with --EE, any --oo switch is understood
3411 to specify the dependency output file (but @pxref{-MF}), but if
3412 used without --EE, each --oo is understood to specify a target object
3413 file.
3414
3415 Since --EE is not implied, --MMDD can be used to generate a dependency
3416 output file as a side-effect of the compilation process.
3417
3418 --MMMMDD
3419 Like --MMDD except mention only user header files, not system -header
3420 files.
3421
3422 --xx cc
3423 --xx cc++++
3424 --xx oobbjjeeccttiivvee--cc
3425 --xx aasssseemmbblleerr--wwiitthh--ccpppp
3426 Specify the source language: C, C++, Objective-C, or assembly.
3427 This has nothing to do with standards conformance or extensions; it
3428 merely selects which base syntax to expect. If you give none of
3429 these options, cpp will deduce the language from the extension of
3430 the source file: ..cc, ..cccc, ..mm, or ..SS. Some other common extensions
3431 for C++ and assembly are also recognized. If cpp does not recog‐
3432 nize the extension, it will treat the file as C; this is the most
3433 generic mode.
3434
3435 NNoottee:: Previous versions of cpp accepted a --llaanngg option which
3436 selected both the language and the standards conformance level.
3437 This option has been removed, because it conflicts with the --ll
3438 option.
3439
3440 --ssttdd==standard
3441 --aannssii
3442 Specify the standard to which the code should conform. Currently
3443 cpp only knows about the standards for C; other language standards
3444 will be added in the future.
3445
3446 standard may be one of:
3447
3448 ""iso9899:1990""
3449 ""c89""
3450 The ISO C standard from 1990. cc8899 is the customary shorthand
3451 for this version of the standard.
3452
3453 The --aannssii option is equivalent to --ssttdd==cc8899.
3454
3455 ""iso9899:199409""
3456 The 1990 C standard, as amended in 1994.
3457
3458 ""iso9899:1999""
3459 ""c99""
3460 ""iso9899:199x""
3461 ""c9x""
3462 The revised ISO C standard, published in December 1999. Before
3463 publication, this was known as C9X.
3464
3465 ""gnu89""
3466 The 1990 C standard plus GNU extensions. This is the default.
3467
3468 ""gnu99""
3469 ""gnu9x""
3470 The 1999 C standard plus GNU extensions.
3471
3472 --II-- Split the include path. Any directories specified with --II options
3473 before --II-- are searched only for headers requested with
3474 "#include "file""; they are not searched for "#include <file>". If
3475 additional directories are specified with --II options after the --II--,
3476 those directories are searched for all ##iinncclluuddee directives.
3477
3478 In addition, --II-- inhibits the use of the directory of the current
3479 file directory as the first search directory for "#include "file"".
3480
3481 --nnoossttddiinncc
3482 Do not search the standard system directories for header files.
3483 Only the directories you have specified with --II options (and the
3484 directory of the current file, if appropriate) are searched.
3485
3486 --nnoossttddiinncc++++
3487 Do not search for header files in the C++-specific standard direc‐
3488 tories, but do still search the other standard directories. (This
3489 option is used when building the C++ library.)
3490
3491 --iinncclluuddee file
3492 Process file as if "#include "file"" appeared as the first line of
3493 the primary source file. However, the first directory searched for
3494 file is the preprocessor's working directory instead of the direc‐
3495 tory containing the main source file. If not found there, it is
3496 searched for in the remainder of the "#include "..."" search chain
3497 as normal.
3498
3499 If multiple --iinncclluuddee options are given, the files are included in
3500 the order they appear on the command line.
3501
3502 --iimmaaccrrooss file
3503 Exactly like --iinncclluuddee, except that any output produced by scanning
3504 file is thrown away. Macros it defines remain defined. This
3505 allows you to acquire all the macros from a header without also
3506 processing its declarations.
3507
3508 All files specified by --iimmaaccrrooss are processed before all files
3509 specified by --iinncclluuddee.
3510
3511 --iiddiirraafftteerr dir
3512 Search dir for header files, but do it after all directories speci‐
3513 fied with --II and the standard system directories have been
3514 exhausted. dir is treated as a system include directory.
3515
3516 --iipprreeffiixx prefix
3517 Specify prefix as the prefix for subsequent --iiwwiitthhpprreeffiixx options.
3518 If the prefix represents a directory, you should include the final
3519 //.
3520
3521 --iiwwiitthhpprreeffiixx dir
3522 --iiwwiitthhpprreeffiixxbbeeffoorree dir
3523 Append dir to the prefix specified previously with --iipprreeffiixx, and
3524 add the resulting directory to the include search path. --iiwwiitthhpprree‐‐
3525 ffiixxbbeeffoorree puts it in the same place --II would; --iiwwiitthhpprreeffiixx puts it
3526 where --iiddiirraafftteerr would.
3527
3528 Use of these options is discouraged.
3529
3530 --iissyysstteemm dir
3531 Search dir for header files, after all directories specified by --II
3532 but before the standard system directories. Mark it as a system
3533 directory, so that it gets the same special treatment as is applied
3534 to the standard system directories.
3535
3536 --ffpprreepprroocceesssseedd
3537 Indicate to the preprocessor that the input file has already been
3538 preprocessed. This suppresses things like macro expansion, tri‐
3539 graph conversion, escaped newline splicing, and processing of most
3540 directives. The preprocessor still recognizes and removes com‐
3541 ments, so that you can pass a file preprocessed with --CC to the com‐
3542 piler without problems. In this mode the integrated preprocessor
3543 is little more than a tokenizer for the front ends.
3544
3545 --ffpprreepprroocceesssseedd is implicit if the input file has one of the exten‐
3546 sions ..ii, ..iiii or ..mmii. These are the extensions that GCC uses for
3547 preprocessed files created by --ssaavvee--tteemmppss.
3548
3549 --ffttaabbssttoopp==width
3550 Set the distance between tab stops. This helps the preprocessor
3551 report correct column numbers in warnings or errors, even if tabs
3552 appear on the line. If the value is less than 1 or greater than
3553 100, the option is ignored. The default is 8.
3554
3555 --ffnnoo--sshhooww--ccoolluummnn
3556 Do not print column numbers in diagnostics. This may be necessary
3557 if diagnostics are being scanned by a program that does not under‐
3558 stand the column numbers, such as ddeejjaaggnnuu.
3559
3560 --AA predicate==answer
3561 Make an assertion with the predicate predicate and answer answer.
3562 This form is preferred to the older form --AA predicate((answer)),
3563 which is still supported, because it does not use shell special
3564 characters.
3565
3566 --AA --predicate==answer
3567 Cancel an assertion with the predicate predicate and answer answer.
3568
3569 --AA-- Cancel all predefined assertions and all assertions preceding it on
3570 the command line. Also, undefine all predefined macros and all
3571 macros preceding it on the command line. (This is a historical
3572 wart and may change in the future.)
3573
3574 --ddCCHHAARRSS
3575 CHARS is a sequence of one or more of the following characters, and
3576 must not be preceded by a space. Other characters are interpreted
3577 by the compiler proper, or reserved for future versions of GCC, and
3578 so are silently ignored. If you specify characters whose behavior
3579 conflicts, the result is undefined.
3580
3581 MM Instead of the normal output, generate a list of ##ddeeffiinnee direc‐
3582 tives for all the macros defined during the execution of the
3583 preprocessor, including predefined macros. This gives you a
3584 way of finding out what is predefined in your version of the
3585 preprocessor. Assuming you have no file foo.h, the command
3586
3587 touch foo.h; cpp -dM foo.h
3588
3589 will show all the predefined macros.
3590
3591 DD Like MM except in two respects: it does not include the prede‐
3592 fined macros, and it outputs both the ##ddeeffiinnee directives and
3593 the result of preprocessing. Both kinds of output go to the
3594 standard output file.
3595
3596 NN Like DD, but emit only the macro names, not their expansions.
3597
3598 II Output ##iinncclluuddee directives in addition to the result of prepro‐
3599 cessing.
3600
3601 --PP Inhibit generation of linemarkers in the output from the preproces‐
3602 sor. This might be useful when running the preprocessor on some‐
3603 thing that is not C code, and will be sent to a program which might
3604 be confused by the linemarkers.
3605
3606 --CC Do not discard comments. All comments are passed through to the
3607 output file, except for comments in processed directives, which are
3608 deleted along with the directive.
3609
3610 You should be prepared for side effects when using --CC; it causes
3611 the preprocessor to treat comments as tokens in their own right.
3612 For example, comments appearing at the start of what would be a
3613 directive line have the effect of turning that line into an ordi‐
3614 nary source line, since the first token on the line is no longer a
3615 ##.
3616
3617 --ggcccc
3618 Define the macros __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__.
3619 These are defined automatically when you use ggcccc --EE; you can turn
3620 them off in that case with --nnoo--ggcccc.
3621
3622 --ttrraaddiittiioonnaall
3623 Try to imitate the behavior of old-fashioned C, as opposed to ISO
3624 C.
3625
3626 --ttrriiggrraapphhss
3627 Process trigraph sequences. These are three-character sequences,
3628 all starting with ????, that are defined by ISO C to stand for single
3629 characters. For example, ????// stands for \\, so ''????//nn'' is a charac‐
3630 ter constant for a newline. By default, GCC ignores trigraphs, but
3631 in standard-conforming modes it converts them. See the --ssttdd and
3632 --aannssii options.
3633
3634 The nine trigraphs and their replacements are
3635
3636 Trigraph: ??( ??) ??< ??> ??= ??/ ??' ??! ??-
3637 Replacement: [ ] { } # \ ^ ⎪ ~
3638
3639
3640 --rreemmaapp
3641 Enable special code to work around file systems which only permit
3642 very short file names, such as MS-DOS.
3643
3644 --$$ Forbid the use of $$ in identifiers. The C standard allows imple‐
3645 mentations to define extra characters that can appear in identi‐
3646 fiers. By default GNU CPP permits $$, a common extension.
3647
3648 --hh
3649 ----hheellpp
3650 ----ttaarrggeett--hheellpp
3651 Print text describing all the command line options instead of pre‐
3652 processing anything.
3653
3654 --vv Verbose mode. Print out GNU CPP's version number at the beginning
3655 of execution, and report the final form of the include path.
3656
3657 --HH Print the name of each header file used, in addition to other nor‐
3658 mal activities. Each name is indented to show how deep in the
3659 ##iinncclluuddee stack it is.
3660
3661 --vveerrssiioonn
3662 ----vveerrssiioonn
3663 Print out GNU CPP's version number. With one dash, proceed to pre‐
3664 process as normal. With two dashes, exit immediately.
3665
3666 PPaassssiinngg OOppttiioonnss ttoo tthhee AAsssseemmbblleerr
3667
3668 You can pass options to the assembler.
3669
3670 --WWaa,,option
3671 Pass option as an option to the assembler. If option contains com‐
3672 mas, it is split into multiple options at the commas.
3673
3674 OOppttiioonnss ffoorr LLiinnkkiinngg
3675
3676 These options come into play when the compiler links object files into
3677 an executable output file. They are meaningless if the compiler is not
3678 doing a link step.
3679
3680 object-file-name
3681 A file name that does not end in a special recognized suffix is
3682 considered to name an object file or library. (Object files are
3683 distinguished from libraries by the linker according to the file
3684 contents.) If linking is done, these object files are used as
3685 input to the linker.
3686
3687 --cc
3688 --SS
3689 --EE If any of these options is used, then the linker is not run, and
3690 object file names should not be used as arguments.
3691
3692 --lllibrary
3693 --ll library
3694 Search the library named library when linking. (The second alter‐
3695 native with the library as a separate argument is only for POSIX
3696 compliance and is not recommended.)
3697
3698 It makes a difference where in the command you write this option;
3699 the linker searches and processes libraries and object files in the
3700 order they are specified. Thus, ffoooo..oo --llzz bbaarr..oo searches library zz
3701 after file foo.o but before bar.o. If bar.o refers to functions in
3702 zz, those functions may not be loaded.
3703
3704 The linker searches a standard list of directories for the library,
3705 which is actually a file named liblibrary.a. The linker then uses
3706 this file as if it had been specified precisely by name.
3707
3708 The directories searched include several standard system directo‐
3709 ries plus any that you specify with --LL.
3710
3711 Normally the files found this way are library files---archive files
3712 whose members are object files. The linker handles an archive file
3713 by scanning through it for members which define symbols that have
3714 so far been referenced but not defined. But if the file that is
3715 found is an ordinary object file, it is linked in the usual fash‐
3716 ion. The only difference between using an --ll option and specifying
3717 a file name is that --ll surrounds library with lliibb and ..aa and
3718 searches several directories.
3719
3720 --lloobbjjcc
3721 You need this special case of the --ll option in order to link an
3722 Objective-C program.
3723
3724 --nnoossttaarrttffiilleess
3725 Do not use the standard system startup files when linking. The
3726 standard system libraries are used normally, unless --nnoossttddlliibb or
3727 --nnooddeeffaauullttlliibbss is used.
3728
3729 --nnooddeeffaauullttlliibbss
3730 Do not use the standard system libraries when linking. Only the
3731 libraries you specify will be passed to the linker. The standard
3732 startup files are used normally, unless --nnoossttaarrttffiilleess is used. The
3733 compiler may generate calls to memcmp, memset, and memcpy for Sys‐
3734 tem V (and ISO C) environments or to bcopy and bzero for BSD envi‐
3735 ronments. These entries are usually resolved by entries in libc.
3736 These entry points should be supplied through some other mechanism
3737 when this option is specified.
3738
3739 --nnoossttddlliibb
3740 Do not use the standard system startup files or libraries when
3741 linking. No startup files and only the libraries you specify will
3742 be passed to the linker. The compiler may generate calls to mem‐
3743 cmp, memset, and memcpy for System V (and ISO C) environments or to
3744 bcopy and bzero for BSD environments. These entries are usually
3745 resolved by entries in libc. These entry points should be supplied
3746 through some other mechanism when this option is specified.
3747
3748 One of the standard libraries bypassed by --nnoossttddlliibb and --nnooddeeffaauulltt‐‐
3749 lliibbss is libgcc.a, a library of internal subroutines that GCC uses
3750 to overcome shortcomings of particular machines, or special needs
3751 for some languages.
3752
3753 In most cases, you need libgcc.a even when you want to avoid other
3754 standard libraries. In other words, when you specify --nnoossttddlliibb or
3755 --nnooddeeffaauullttlliibbss you should usually specify --llggcccc as well. This
3756 ensures that you have no unresolved references to internal GCC
3757 library subroutines. (For example, ____mmaaiinn, used to ensure C++ con‐
3758 structors will be called.)
3759
3760 --ss Remove all symbol table and relocation information from the exe‐
3761 cutable.
3762
3763 --ssttaattiicc
3764 On systems that support dynamic linking, this prevents linking with
3765 the shared libraries. On other systems, this option has no effect.
3766
3767 --sshhaarreedd
3768 Produce a shared object which can then be linked with other objects
3769 to form an executable. Not all systems support this option. For
3770 predictable results, you must also specify the same set of options
3771 that were used to generate code (--ffppiicc, --ffPPIICC, or model suboptions)
3772 when you specify this option.[1]
3773
3774 --sshhaarreedd--lliibbggcccc
3775 --ssttaattiicc--lliibbggcccc
3776 On systems that provide libgcc as a shared library, these options
3777 force the use of either the shared or static version respectively.
3778 If no shared version of libgcc was built when the compiler was con‐
3779 figured, these options have no effect.
3780
3781 There are several situations in which an application should use the
3782 shared libgcc instead of the static version. The most common of
3783 these is when the application wishes to throw and catch exceptions
3784 across different shared libraries. In that case, each of the
3785 libraries as well as the application itself should use the shared
3786 libgcc.
3787
3788 Therefore, the G++ and GCJ drivers automatically add --sshhaarreedd--lliibbggcccc
3789 whenever you build a shared library or a main executable, because
3790 C++ and Java programs typically use exceptions, so this is the
3791 right thing to do.
3792
3793 If, instead, you use the GCC driver to create shared libraries, you
3794 may find that they will not always be linked with the shared
3795 libgcc. If GCC finds, at its configuration time, that you have a
3796 GNU linker that does not support option ----eehh--ffrraammee--hhddrr, it will
3797 link the shared version of libgcc into shared libraries by default.
3798 Otherwise, it will take advantage of the linker and optimize away
3799 the linking with the shared version of libgcc, linking with the
3800 static version of libgcc by default. This allows exceptions to
3801 propagate through such shared libraries, without incurring reloca‐
3802 tion costs at library load time.
3803
3804 However, if a library or main executable is supposed to throw or
3805 catch exceptions, you must link it using the G++ or GCJ driver, as
3806 appropriate for the languages used in the program, or using the
3807 option --sshhaarreedd--lliibbggcccc, such that it is linked with the shared
3808 libgcc.
3809
3810 --ssyymmbboolliicc
3811 Bind references to global symbols when building a shared object.
3812 Warn about any unresolved references (unless overridden by the link
3813 editor option --XXlliinnkkeerr --zz --XXlliinnkkeerr ddeeffss). Only a few systems sup‐
3814 port this option.
3815
3816 --XXlliinnkkeerr option
3817 Pass option as an option to the linker. You can use this to supply
3818 system-specific linker options which GCC does not know how to rec‐
3819 ognize.
3820
3821 If you want to pass an option that takes an argument, you must use
3822 --XXlliinnkkeerr twice, once for the option and once for the argument. For
3823 example, to pass --aasssseerrtt ddeeffiinniittiioonnss, you must write --XXlliinnkkeerr
3824 --aasssseerrtt --XXlliinnkkeerr ddeeffiinniittiioonnss. It does not work to write --XXlliinnkkeerr
3825 ""--aasssseerrtt ddeeffiinniittiioonnss"", because this passes the entire string as a
3826 single argument, which is not what the linker expects.
3827
3828 --WWll,,option
3829 Pass option as an option to the linker. If option contains commas,
3830 it is split into multiple options at the commas.
3831
3832 --uu symbol
3833 Pretend the symbol symbol is undefined, to force linking of library
3834 modules to define it. You can use --uu multiple times with different
3835 symbols to force loading of additional library modules.
3836
3837 OOppttiioonnss ffoorr DDiirreeccttoorryy SSeeaarrcchh
3838
3839 These options specify directories to search for header files, for
3840 libraries and for parts of the compiler:
3841
3842 --IIdir
3843 Add the directory dir to the head of the list of directories to be
3844 searched for header files. This can be used to override a system
3845 header file, substituting your own version, since these directories
3846 are searched before the system header file directories. However,
3847 you should not use this option to add directories that contain ven‐
3848 dor-supplied system header files (use --iissyysstteemm for that). If you
3849 use more than one --II option, the directories are scanned in left-
3850 to-right order; the standard system directories come after.
3851
3852 If a standard system include directory, or a directory specified
3853 with --iissyysstteemm, is also specified with --II, the --II option will be
3854 ignored. The directory will still be searched but as a system
3855 directory at its normal position in the system include chain. This
3856 is to ensure that GCC's procedure to fix buggy system headers and
3857 the ordering for the include_next directive are not inadvertantly
3858 changed. If you really need to change the search order for system
3859 directories, use the --nnoossttddiinncc and/or --iissyysstteemm options.
3860
3861 --II-- Any directories you specify with --II options before the --II-- option
3862 are searched only for the case of ##iinncclluuddee ""file""; they are not
3863 searched for ##iinncclluuddee <<file>>.
3864
3865 If additional directories are specified with --II options after the
3866 --II--, these directories are searched for all ##iinncclluuddee directives.
3867 (Ordinarily all --II directories are used this way.)
3868
3869 In addition, the --II-- option inhibits the use of the current direc‐
3870 tory (where the current input file came from) as the first search
3871 directory for ##iinncclluuddee ""file"". There is no way to override this
3872 effect of --II--. With --II.. you can specify searching the directory
3873 which was current when the compiler was invoked. That is not
3874 exactly the same as what the preprocessor does by default, but it
3875 is often satisfactory.
3876
3877 --II-- does not inhibit the use of the standard system directories for
3878 header files. Thus, --II-- and --nnoossttddiinncc are independent.
3879
3880 --LLdir
3881 Add directory dir to the list of directories to be searched for --ll.
3882
3883 --BBprefix
3884 This option specifies where to find the executables, libraries,
3885 include files, and data files of the compiler itself.
3886
3887 The compiler driver program runs one or more of the subprograms
3888 cpp, cc1, as and ld. It tries prefix as a prefix for each program
3889 it tries to run, both with and without machine//version//.
3890
3891 For each subprogram to be run, the compiler driver first tries the
3892 --BB prefix, if any. If that name is not found, or if --BB was not
3893 specified, the driver tries two standard prefixes, which are
3894 /usr/lib/gcc/ and /usr/local/lib/gcc-lib/. If neither of those
3895 results in a file name that is found, the unmodified program name
3896 is searched for using the directories specified in your PPAATTHH envi‐
3897 ronment variable.
3898
3899 The compiler will check to see if the path provided by the --BB
3900 refers to a directory, and if necessary it will add a directory
3901 separator character at the end of the path.
3902
3903 --BB prefixes that effectively specify directory names also apply to
3904 libraries in the linker, because the compiler translates these
3905 options into --LL options for the linker. They also apply to
3906 includes files in the preprocessor, because the compiler translates
3907 these options into --iissyysstteemm options for the preprocessor. In this
3908 case, the compiler appends iinncclluuddee to the prefix.
3909
3910 The run-time support file libgcc.a can also be searched for using
3911 the --BB prefix, if needed. If it is not found there, the two stan‐
3912 dard prefixes above are tried, and that is all. The file is left
3913 out of the link if it is not found by those means.
3914
3915 Another way to specify a prefix much like the --BB prefix is to use
3916 the environment variable GGCCCC__EEXXEECC__PPRREEFFIIXX.
3917
3918 As a special kludge, if the path provided by --BB is [dir/]stageN/,
3919 where N is a number in the range 0 to 9, then it will be replaced
3920 by [dir/]include. This is to help with boot-strapping the com‐
3921 piler.
3922
3923 --ssppeeccss==file
3924 Process file after the compiler reads in the standard specs file,
3925 in order to override the defaults that the gcc driver program uses
3926 when determining what switches to pass to cc1, cc1plus, as, ld,
3927 etc. More than one --ssppeeccss==file can be specified on the command
3928 line, and they are processed in order, from left to right.
3929
3930 SSppeecciiffyyiinngg TTaarrggeett MMaacchhiinnee aanndd CCoommppiilleerr VVeerrssiioonn
3931
3932 By default, GCC compiles code for the same type of machine that you are
3933 using. However, it can also be installed as a cross-compiler, to com‐
3934 pile for some other type of machine. In fact, several different con‐
3935 figurations of GCC, for different target machines, can be installed
3936 side by side. Then you specify which one to use with the --bb option.
3937
3938 In addition, older and newer versions of GCC can be installed side by
3939 side. One of them (probably the newest) will be the default, but you
3940 may sometimes wish to use another.
3941
3942 --bb machine
3943 The argument machine specifies the target machine for compilation.
3944 This is useful when you have installed GCC as a cross-compiler.
3945
3946 The value to use for machine is the same as was specified as the
3947 machine type when configuring GCC as a cross-compiler. For exam‐
3948 ple, if a cross-compiler was configured with ccoonnffiigguurree ii338866vv, mean‐
3949 ing to compile for an 80386 running System V, then you would spec‐
3950 ify --bb ii338866vv to run that cross compiler.
3951
3952 When you do not specify --bb, it normally means to compile for the
3953 same type of machine that you are using.
3954
3955 --VV version
3956 The argument version specifies which version of GCC to run. This
3957 is useful when multiple versions are installed. For example, ver‐
3958 sion might be 22..00, meaning to run GCC version 2.0.
3959
3960 The default version, when you do not specify --VV, is the last ver‐
3961 sion of GCC that you installed.
3962
3963 The --bb and --VV options actually work by controlling part of the file
3964 name used for the executable files and libraries used for compilation.
3965 A given version of GCC, for a given target machine, is normally kept in
3966 the directory /usr/local/lib/gcc-lib/machine/version.
3967
3968 Thus, sites can customize the effect of --bb or --VV either by changing the
3969 names of these directories or adding alternate names (or symbolic
3970 links). If in directory /usr/local/lib/gcc-lib/ the file 80386 is a
3971 link to the file i386v, then --bb 8800338866 becomes an alias for --bb ii338866vv.
3972
3973 In one respect, the --bb or --VV do not completely change to a different
3974 compiler: the top-level driver program ggcccc that you originally invoked
3975 continues to run and invoke the other executables (preprocessor, com‐
3976 piler per se, assembler and linker) that do the real work. However,
3977 since no real work is done in the driver program, it usually does not
3978 matter that the driver program in use is not the one for the specified
3979 target. It is common for the interface to the other executables to
3980 change incompatibly between compiler versions, so unless the version
3981 specified is very close to that of the driver (for example, --VV 33..00 with
3982 a driver program from GCC version 3.0.1), use of --VV may not work; for
3983 example, using --VV 22..9955..22 will not work with a driver program from GCC
3984 3.0.
3985
3986 The only way that the driver program depends on the target machine is
3987 in the parsing and handling of special machine-specific options. How‐
3988 ever, this is controlled by a file which is found, along with the other
3989 executables, in the directory for the specified version and target
3990 machine. As a result, a single installed driver program adapts to any
3991 specified target machine, and sufficiently similar compiler versions.
3992
3993 The driver program executable does control one significant thing, how‐
3994 ever: the default version and target machine. Therefore, you can
3995 install different instances of the driver program, compiled for differ‐
3996 ent targets or versions, under different names.
3997
3998 For example, if the driver for version 2.0 is installed as ooggcccc and
3999 that for version 2.1 is installed as ggcccc, then the command ggcccc will use
4000 version 2.1 by default, while ooggcccc will use 2.0 by default. However,
4001 you can choose either version with either command with the --VV option.
4002
4003 HHaarrddwwaarree MMooddeellss aanndd CCoonnffiigguurraattiioonnss
4004
4005 Earlier we discussed the standard option --bb which chooses among differ‐
4006 ent installed compilers for completely different target machines, such
4007 as VAX vs. 68000 vs. 80386.
4008
4009 In addition, each of these target machine types can have its own spe‐
4010 cial options, starting with --mm, to choose among various hardware models
4011 or configurations---for example, 68010 vs 68020, floating coprocessor
4012 or none. A single installed version of the compiler can compile for
4013 any model or configuration, according to the options specified.
4014
4015 Some configurations of the compiler also support additional special
4016 options, usually for compatibility with other compilers on the same
4017 platform.
4018
4019 These options are defined by the macro "TARGET_SWITCHES" in the machine
4020 description. The default for the options is also defined by that
4021 macro, which enables you to change the defaults.
4022
4023 M680x0 Options
4024
4025 These are the --mm options defined for the 68000 series. The default
4026 values for these options depends on which style of 68000 was selected
4027 when the compiler was configured; the defaults for the most common
4028 choices are given below.
4029
4030 --mm6688000000
4031 --mmcc6688000000
4032 Generate output for a 68000. This is the default when the compiler
4033 is configured for 68000-based systems.
4034
4035 Use this option for microcontrollers with a 68000 or EC000 core,
4036 including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
4037
4038 --mm6688002200
4039 --mmcc6688002200
4040 Generate output for a 68020. This is the default when the compiler
4041 is configured for 68020-based systems.
4042
4043 --mm6688888811
4044 Generate output containing 68881 instructions for floating point.
4045 This is the default for most 68020 systems unless ----nnffpp was speci‐
4046 fied when the compiler was configured.
4047
4048 --mm6688003300
4049 Generate output for a 68030. This is the default when the compiler
4050 is configured for 68030-based systems.
4051
4052 --mm6688004400
4053 Generate output for a 68040. This is the default when the compiler
4054 is configured for 68040-based systems.
4055
4056 This option inhibits the use of 68881/68882 instructions that have
4057 to be emulated by software on the 68040. Use this option if your
4058 68040 does not have code to emulate those instructions.
4059
4060 --mm6688006600
4061 Generate output for a 68060. This is the default when the compiler
4062 is configured for 68060-based systems.
4063
4064 This option inhibits the use of 68020 and 68881/68882 instructions
4065 that have to be emulated by software on the 68060. Use this option
4066 if your 68060 does not have code to emulate those instructions.
4067
4068 --mmccppuu3322
4069 Generate output for a CPU32. This is the default when the compiler
4070 is configured for CPU32-based systems.
4071
4072 Use this option for microcontrollers with a CPU32 or CPU32+ core,
4073 including the 68330, 68331, 68332, 68333, 68334, 68336, 68340,
4074 68341, 68349 and 68360.
4075
4076 --mm55220000
4077 Generate output for a 520X ``coldfire'' family cpu. This is the
4078 default when the compiler is configured for 520X-based systems.
4079
4080 Use this option for microcontroller with a 5200 core, including the
4081 MCF5202, MCF5203, MCF5204 and MCF5202.
4082
4083 --mm6688002200--4400
4084 Generate output for a 68040, without using any of the new instruc‐
4085 tions. This results in code which can run relatively efficiently
4086 on either a 68020/68881 or a 68030 or a 68040. The generated code
4087 does use the 68881 instructions that are emulated on the 68040.
4088
4089 --mm6688002200--6600
4090 Generate output for a 68060, without using any of the new instruc‐
4091 tions. This results in code which can run relatively efficiently
4092 on either a 68020/68881 or a 68030 or a 68040. The generated code
4093 does use the 68881 instructions that are emulated on the 68060.
4094
4095 --mmffppaa
4096 Generate output containing Sun FPA instructions for floating point.
4097
4098 --mmssoofftt--ffllooaatt
4099 Generate output containing library calls for floating point. WWaarrnn‐‐
4100 iinngg:: the requisite libraries are not available for all m68k tar‐
4101 gets. Normally the facilities of the machine's usual C compiler
4102 are used, but this can't be done directly in cross-compilation.
4103 You must make your own arrangements to provide suitable library
4104 functions for cross-compilation. The embedded targets mm6688kk--**--aaoouutt
4105 and mm6688kk--**--ccooffff do provide software floating point support.
4106
4107 --mmsshhoorrtt
4108 Consider type "int" to be 16 bits wide, like "short int".
4109
4110 --mmnnoobbiittffiieelldd
4111 Do not use the bit-field instructions. The --mm6688000000, --mmccppuu3322 and
4112 --mm55220000 options imply --mmnnoobbiittffiieelldd.
4113
4114 --mmbbiittffiieelldd
4115 Do use the bit-field instructions. The --mm6688002200 option implies
4116 --mmbbiittffiieelldd. This is the default if you use a configuration
4117 designed for a 68020.
4118
4119 --mmrrttdd
4120 Use a different function-calling convention, in which functions
4121 that take a fixed number of arguments return with the "rtd"
4122 instruction, which pops their arguments while returning. This
4123 saves one instruction in the caller since there is no need to pop
4124 the arguments there.
4125
4126 This calling convention is incompatible with the one normally used
4127 on Unix, so you cannot use it if you need to call libraries com‐
4128 piled with the Unix compiler.
4129
4130 Also, you must provide function prototypes for all functions that
4131 take variable numbers of arguments (including "printf"); otherwise
4132 incorrect code will be generated for calls to those functions.
4133
4134 In addition, seriously incorrect code will result if you call a
4135 function with too many arguments. (Normally, extra arguments are
4136 harmlessly ignored.)
4137
4138 The "rtd" instruction is supported by the 68010, 68020, 68030,
4139 68040, 68060 and CPU32 processors, but not by the 68000 or 5200.
4140
4141 --mmaalliiggnn--iinntt
4142 --mmnnoo--aalliiggnn--iinntt
4143 Control whether GCC aligns "int", "long", "long long", "float",
4144 "double", and "long double" variables on a 32-bit boundary
4145 (--mmaalliiggnn--iinntt) or a 16-bit boundary (--mmnnoo--aalliiggnn--iinntt). Aligning
4146 variables on 32-bit boundaries produces code that runs somewhat
4147 faster on processors with 32-bit busses at the expense of more mem‐
4148 ory.
4149
4150 WWaarrnniinngg:: if you use the --mmaalliiggnn--iinntt switch, GCC will align struc‐
4151 tures containing the above types differently than most published
4152 application binary interface specifications for the m68k.
4153
4154 --mmppccrreell
4155 Use the pc-relative addressing mode of the 68000 directly, instead
4156 of using a global offset table. At present, this option implies
4157 --ffppiicc, allowing at most a 16-bit offset for pc-relative addressing.
4158 --ffPPIICC is not presently supported with --mmppccrreell, though this could be
4159 supported for 68020 and higher processors.
4160
4161 --mmnnoo--ssttrriicctt--aalliiggnn
4162 --mmssttrriicctt--aalliiggnn
4163 Do not (do) assume that unaligned memory references will be handled
4164 by the system.
4165
4166 M68hc1x Options
4167
4168 These are the --mm options defined for the 68hc11 and 68hc12 microcon‐
4169 trollers. The default values for these options depends on which style
4170 of microcontroller was selected when the compiler was configured; the
4171 defaults for the most common choices are given below.
4172
4173 --mm66881111
4174 --mm6688hhcc1111
4175 Generate output for a 68HC11. This is the default when the com‐
4176 piler is configured for 68HC11-based systems.
4177
4178 --mm66881122
4179 --mm6688hhcc1122
4180 Generate output for a 68HC12. This is the default when the com‐
4181 piler is configured for 68HC12-based systems.
4182
4183 --mmaauuttoo--iinnccddeecc
4184 Enable the use of 68HC12 pre and post auto-increment and auto-
4185 decrement addressing modes.
4186
4187 --mmsshhoorrtt
4188 Consider type "int" to be 16 bits wide, like "short int".
4189
4190 --mmssoofftt--rreegg--ccoouunntt==count
4191 Specify the number of pseudo-soft registers which are used for the
4192 code generation. The maximum number is 32. Using more pseudo-soft
4193 register may or may not result in better code depending on the pro‐
4194 gram. The default is 4 for 68HC11 and 2 for 68HC12.
4195
4196 VAX Options
4197
4198 These --mm options are defined for the VAX:
4199
4200 --mmuunniixx
4201 Do not output certain jump instructions ("aobleq" and so on) that
4202 the Unix assembler for the VAX cannot handle across long ranges.
4203
4204 --mmggnnuu
4205 Do output those jump instructions, on the assumption that you will
4206 assemble with the GNU assembler.
4207
4208 --mmgg Output code for g-format floating point numbers instead of d-for‐
4209 mat.
4210
4211 SPARC Options
4212
4213 These --mm switches are supported on the SPARC:
4214
4215 --mmnnoo--aapppp--rreeggss
4216 --mmaapppp--rreeggss
4217 Specify --mmaapppp--rreeggss to generate output using the global registers 2
4218 through 4, which the SPARC SVR4 ABI reserves for applications.
4219 This is the default.
4220
4221 To be fully SVR4 ABI compliant at the cost of some performance
4222 loss, specify --mmnnoo--aapppp--rreeggss. You should compile libraries and sys‐
4223 tem software with this option.
4224
4225 --mmffppuu
4226 --mmhhaarrdd--ffllooaatt
4227 Generate output containing floating point instructions. This is
4228 the default.
4229
4230 --mmnnoo--ffppuu
4231 --mmssoofftt--ffllooaatt
4232 Generate output containing library calls for floating point. WWaarrnn‐‐
4233 iinngg:: the requisite libraries are not available for all SPARC tar‐
4234 gets. Normally the facilities of the machine's usual C compiler
4235 are used, but this cannot be done directly in cross-compilation.
4236 You must make your own arrangements to provide suitable library
4237 functions for cross-compilation. The embedded targets ssppaarrcc--**--aaoouutt
4238 and ssppaarrcclliittee--**--** do provide software floating point support.
4239
4240 --mmssoofftt--ffllooaatt changes the calling convention in the output file;
4241 therefore, it is only useful if you compile all of a program with
4242 this option. In particular, you need to compile libgcc.a, the
4243 library that comes with GCC, with --mmssoofftt--ffllooaatt in order for this to
4244 work.
4245
4246 --mmhhaarrdd--qquuaadd--ffllooaatt
4247 Generate output containing quad-word (long double) floating point
4248 instructions.
4249
4250 --mmssoofftt--qquuaadd--ffllooaatt
4251 Generate output containing library calls for quad-word (long dou‐
4252 ble) floating point instructions. The functions called are those
4253 specified in the SPARC ABI. This is the default.
4254
4255 As of this writing, there are no sparc implementations that have
4256 hardware support for the quad-word floating point instructions.
4257 They all invoke a trap handler for one of these instructions, and
4258 then the trap handler emulates the effect of the instruction.
4259 Because of the trap handler overhead, this is much slower than
4260 calling the ABI library routines. Thus the --mmssoofftt--qquuaadd--ffllooaatt
4261 option is the default.
4262
4263 --mmnnoo--ffllaatt
4264 --mmffllaatt
4265 With --mmffllaatt, the compiler does not generate save/restore instruc‐
4266 tions and will use a ``flat'' or single register window calling
4267 convention. This model uses %i7 as the frame pointer and is com‐
4268 patible with the normal register window model. Code from either
4269 may be intermixed. The local registers and the input registers
4270 (0--5) are still treated as ``call saved'' registers and will be
4271 saved on the stack as necessary.
4272
4273 With --mmnnoo--ffllaatt (the default), the compiler emits save/restore
4274 instructions (except for leaf functions) and is the normal mode of
4275 operation.
4276
4277 --mmnnoo--uunnaalliiggnneedd--ddoouubblleess
4278 --mmuunnaalliiggnneedd--ddoouubblleess
4279 Assume that doubles have 8 byte alignment. This is the default.
4280
4281 With --mmuunnaalliiggnneedd--ddoouubblleess, GCC assumes that doubles have 8 byte
4282 alignment only if they are contained in another type, or if they
4283 have an absolute address. Otherwise, it assumes they have 4 byte
4284 alignment. Specifying this option avoids some rare compatibility
4285 problems with code generated by other compilers. It is not the
4286 default because it results in a performance loss, especially for
4287 floating point code.
4288
4289 --mmnnoo--ffaasstteerr--ssttrruuccttss
4290 --mmffaasstteerr--ssttrruuccttss
4291 With --mmffaasstteerr--ssttrruuccttss, the compiler assumes that structures should
4292 have 8 byte alignment. This enables the use of pairs of "ldd" and
4293 "std" instructions for copies in structure assignment, in place of
4294 twice as many "ld" and "st" pairs. However, the use of this
4295 changed alignment directly violates the Sparc ABI. Thus, it's
4296 intended only for use on targets where the developer acknowledges
4297 that their resulting code will not be directly in line with the
4298 rules of the ABI.
4299
4300 --mmvv88
4301 --mmssppaarrcclliittee
4302 These two options select variations on the SPARC architecture.
4303
4304 By default (unless specifically configured for the Fujitsu SPAR‐
4305 Clite), GCC generates code for the v7 variant of the SPARC archi‐
4306 tecture.
4307
4308 --mmvv88 will give you SPARC v8 code. The only difference from v7 code
4309 is that the compiler emits the integer multiply and integer divide
4310 instructions which exist in SPARC v8 but not in SPARC v7.
4311
4312 --mmssppaarrcclliittee will give you SPARClite code. This adds the integer
4313 multiply, integer divide step and scan ("ffs") instructions which
4314 exist in SPARClite but not in SPARC v7.
4315
4316 These options are deprecated and will be deleted in a future GCC
4317 release. They have been replaced with --mmccppuu==xxxxxx.
4318
4319 --mmccyypprreessss
4320 --mmssuuppeerrssppaarrcc
4321 These two options select the processor for which the code is opti‐
4322 mized.
4323
4324 With --mmccyypprreessss (the default), the compiler optimizes code for the
4325 Cypress CY7C602 chip, as used in the SparcStation/SparcServer 3xx
4326 series. This is also appropriate for the older SparcStation 1, 2,
4327 IPX etc.
4328
4329 With --mmssuuppeerrssppaarrcc the compiler optimizes code for the SuperSparc
4330 cpu, as used in the SparcStation 10, 1000 and 2000 series. This
4331 flag also enables use of the full SPARC v8 instruction set.
4332
4333 These options are deprecated and will be deleted in a future GCC
4334 release. They have been replaced with --mmccppuu==xxxxxx.
4335
4336 --mmccppuu==cpu_type
4337 Set the instruction set, register set, and instruction scheduling
4338 parameters for machine type cpu_type. Supported values for
4339 cpu_type are vv77, ccyypprreessss, vv88, ssuuppeerrssppaarrcc, ssppaarrcclliittee, hhyyppeerrssppaarrcc,
4340 ssppaarrcclliittee8866xx, ff993300, ff993344, ssppaarrcclleett, ttsscc770011, vv99, and uullttrraassppaarrcc.
4341
4342 Default instruction scheduling parameters are used for values that
4343 select an architecture and not an implementation. These are vv77,
4344 vv88, ssppaarrcclliittee, ssppaarrcclleett, vv99.
4345
4346 Here is a list of each supported architecture and their supported
4347 implementations.
4348
4349 v7: cypress
4350 v8: supersparc, hypersparc
4351 sparclite: f930, f934, sparclite86x
4352 sparclet: tsc701
4353 v9: ultrasparc
4354
4355
4356 --mmttuunnee==cpu_type
4357 Set the instruction scheduling parameters for machine type
4358 cpu_type, but do not set the instruction set or register set that
4359 the option --mmccppuu==cpu_type would.
4360
4361 The same values for --mmccppuu==cpu_type can be used for --mmttuunnee==cpu_type,
4362 but the only useful values are those that select a particular cpu
4363 implementation. Those are ccyypprreessss, ssuuppeerrssppaarrcc, hhyyppeerrssppaarrcc, ff993300,
4364 ff993344, ssppaarrcclliittee8866xx, ttsscc770011, and uullttrraassppaarrcc.
4365
4366 These --mm switches are supported in addition to the above on the SPAR‐
4367 CLET processor.
4368
4369 --mmlliittttllee--eennddiiaann
4370 Generate code for a processor running in little-endian mode.
4371
4372 --mmlliivvee--gg00
4373 Treat register "%g0" as a normal register. GCC will continue to
4374 clobber it as necessary but will not assume it always reads as 0.
4375
4376 --mmbbrrookkeenn--ssaavveerreessttoorree
4377 Generate code that does not use non-trivial forms of the "save" and
4378 "restore" instructions. Early versions of the SPARCLET processor
4379 do not correctly handle "save" and "restore" instructions used with
4380 arguments. They correctly handle them used without arguments. A
4381 "save" instruction used without arguments increments the current
4382 window pointer but does not allocate a new stack frame. It is
4383 assumed that the window overflow trap handler will properly handle
4384 this case as will interrupt handlers.
4385
4386 These --mm switches are supported in addition to the above on SPARC V9
4387 processors in 64-bit environments.
4388
4389 --mmlliittttllee--eennddiiaann
4390 Generate code for a processor running in little-endian mode.
4391
4392 --mm3322
4393 --mm6644
4394 Generate code for a 32-bit or 64-bit environment. The 32-bit envi‐
4395 ronment sets int, long and pointer to 32 bits. The 64-bit environ‐
4396 ment sets int to 32 bits and long and pointer to 64 bits.
4397
4398 --mmccmmooddeell==mmeeddllooww
4399 Generate code for the Medium/Low code model: the program must be
4400 linked in the low 32 bits of the address space. Pointers are 64
4401 bits. Programs can be statically or dynamically linked.
4402
4403 --mmccmmooddeell==mmeeddmmiidd
4404 Generate code for the Medium/Middle code model: the program must be
4405 linked in the low 44 bits of the address space, the text segment
4406 must be less than 2G bytes, and data segment must be within 2G of
4407 the text segment. Pointers are 64 bits.
4408
4409 --mmccmmooddeell==mmeeddaannyy
4410 Generate code for the Medium/Anywhere code model: the program may
4411 be linked anywhere in the address space, the text segment must be
4412 less than 2G bytes, and data segment must be within 2G of the text
4413 segment. Pointers are 64 bits.
4414
4415 --mmccmmooddeell==eemmbbmmeeddaannyy
4416 Generate code for the Medium/Anywhere code model for embedded sys‐
4417 tems: assume a 32-bit text and a 32-bit data segment, both starting
4418 anywhere (determined at link time). Register %g4 points to the
4419 base of the data segment. Pointers are still 64 bits. Programs
4420 are statically linked, PIC is not supported.
4421
4422 --mmssttaacckk--bbiiaass
4423 --mmnnoo--ssttaacckk--bbiiaass
4424 With --mmssttaacckk--bbiiaass, GCC assumes that the stack pointer, and frame
4425 pointer if present, are offset by -2047 which must be added back
4426 when making stack frame references. Otherwise, assume no such off‐
4427 set is present.
4428
4429 Convex Options
4430
4431 These --mm options are defined for Convex:
4432
4433 --mmcc11
4434 Generate output for C1. The code will run on any Convex machine.
4435 The preprocessor symbol "__convex__c1__" is defined.
4436
4437 --mmcc22
4438 Generate output for C2. Uses instructions not available on C1.
4439 Scheduling and other optimizations are chosen for max performance
4440 on C2. The preprocessor symbol "__convex_c2__" is defined.
4441
4442 --mmcc3322
4443 Generate output for C32xx. Uses instructions not available on C1.
4444 Scheduling and other optimizations are chosen for max performance
4445 on C32. The preprocessor symbol "__convex_c32__" is defined.
4446
4447 --mmcc3344
4448 Generate output for C34xx. Uses instructions not available on C1.
4449 Scheduling and other optimizations are chosen for max performance
4450 on C34. The preprocessor symbol "__convex_c34__" is defined.
4451
4452 --mmcc3388
4453 Generate output for C38xx. Uses instructions not available on C1.
4454 Scheduling and other optimizations are chosen for max performance
4455 on C38. The preprocessor symbol "__convex_c38__" is defined.
4456
4457 --mmaarrggccoouunntt
4458 Generate code which puts an argument count in the word preceding
4459 each argument list. This is compatible with regular CC, and a few
4460 programs may need the argument count word. GDB and other source-
4461 level debuggers do not need it; this info is in the symbol table.
4462
4463 --mmnnooaarrggccoouunntt
4464 Omit the argument count word. This is the default.
4465
4466 --mmvvoollaattiillee--ccaacchhee
4467 Allow volatile references to be cached. This is the default.
4468
4469 --mmvvoollaattiillee--nnooccaacchhee
4470 Volatile references bypass the data cache, going all the way to
4471 memory. This is only needed for multi-processor code that does not
4472 use standard synchronization instructions. Making non-volatile
4473 references to volatile locations will not necessarily work.
4474
4475 --mmlloonngg3322
4476 Type long is 32 bits, the same as type int. This is the default.
4477
4478 --mmlloonngg6644
4479 Type long is 64 bits, the same as type long long. This option is
4480 useless, because no library support exists for it.
4481
4482 AMD29K Options
4483
4484 These --mm options are defined for the AMD Am29000:
4485
4486 --mmddww
4487 Generate code that assumes the "DW" bit is set, i.e., that byte and
4488 halfword operations are directly supported by the hardware. This
4489 is the default.
4490
4491 --mmnnddww
4492 Generate code that assumes the "DW" bit is not set.
4493
4494 --mmbbww
4495 Generate code that assumes the system supports byte and halfword
4496 write operations. This is the default.
4497
4498 --mmnnbbww
4499 Generate code that assumes the systems does not support byte and
4500 halfword write operations. --mmnnbbww implies --mmnnddww.
4501
4502 --mmssmmaallll
4503 Use a small memory model that assumes that all function addresses
4504 are either within a single 256 KB segment or at an absolute address
4505 of less than 256k. This allows the "call" instruction to be used
4506 instead of a "const", "consth", "calli" sequence.
4507
4508 --mmnnoorrmmaall
4509 Use the normal memory model: Generate "call" instructions only when
4510 calling functions in the same file and "calli" instructions other‐
4511 wise. This works if each file occupies less than 256 KB but allows
4512 the entire executable to be larger than 256 KB. This is the
4513 default.
4514
4515 --mmllaarrggee
4516 Always use "calli" instructions. Specify this option if you expect
4517 a single file to compile into more than 256 KB of code.
4518
4519 --mm2299005500
4520 Generate code for the Am29050.
4521
4522 --mm2299000000
4523 Generate code for the Am29000. This is the default.
4524
4525 --mmkkeerrnneell--rreeggiisstteerrss
4526 Generate references to registers "gr64-gr95" instead of to regis‐
4527 ters "gr96-gr127". This option can be used when compiling kernel
4528 code that wants a set of global registers disjoint from that used
4529 by user-mode code.
4530
4531 Note that when this option is used, register names in --ff flags must
4532 use the normal, user-mode, names.
4533
4534 --mmuusseerr--rreeggiisstteerrss
4535 Use the normal set of global registers, "gr96-gr127". This is the
4536 default.
4537
4538 --mmssttaacckk--cchheecckk
4539 --mmnnoo--ssttaacckk--cchheecckk
4540 Insert (or do not insert) a call to "__msp_check" after each stack
4541 adjustment. This is often used for kernel code.
4542
4543 --mmssttoorreemm--bbuugg
4544 --mmnnoo--ssttoorreemm--bbuugg
4545 --mmssttoorreemm--bbuugg handles 29k processors which cannot handle the separa‐
4546 tion of a mtsrim insn and a storem instruction (most 29000 chips to
4547 date, but not the 29050).
4548
4549 --mmnnoo--rreeuussee--aarrgg--rreeggss
4550 --mmrreeuussee--aarrgg--rreeggss
4551 --mmnnoo--rreeuussee--aarrgg--rreeggss tells the compiler to only use incoming argu‐
4552 ment registers for copying out arguments. This helps detect call‐
4553 ing a function with fewer arguments than it was declared with.
4554
4555 --mmnnoo--iimmppuurree--tteexxtt
4556 --mmiimmppuurree--tteexxtt
4557 --mmiimmppuurree--tteexxtt, used in addition to --sshhaarreedd, tells the compiler to
4558 not pass --aasssseerrtt ppuurree--tteexxtt to the linker when linking a shared
4559 object.
4560
4561 --mmssoofftt--ffllooaatt
4562 Generate output containing library calls for floating point. WWaarrnn‐‐
4563 iinngg:: the requisite libraries are not part of GCC. Normally the
4564 facilities of the machine's usual C compiler are used, but this
4565 can't be done directly in cross-compilation. You must make your
4566 own arrangements to provide suitable library functions for cross-
4567 compilation.
4568
4569 --mmnnoo--mmuullttmm
4570 Do not generate multm or multmu instructions. This is useful for
4571 some embedded systems which do not have trap handlers for these
4572 instructions.
4573
4574 ARM Options
4575
4576 These --mm options are defined for Advanced RISC Machines (ARM) architec‐
4577 tures:
4578
4579 --mmaappccss--ffrraammee
4580 Generate a stack frame that is compliant with the ARM Procedure
4581 Call Standard for all functions, even if this is not strictly nec‐
4582 essary for correct execution of the code. Specifying --ffoommiitt--ffrraammee--
4583 ppooiinntteerr with this option will cause the stack frames not to be gen‐
4584 erated for leaf functions. The default is --mmnnoo--aappccss--ffrraammee.
4585
4586 --mmaappccss
4587 This is a synonym for --mmaappccss--ffrraammee.
4588
4589 --mmaappccss--2266
4590 Generate code for a processor running with a 26-bit program
4591 counter, and conforming to the function calling standards for the
4592 APCS 26-bit option. This option replaces the --mm22 and --mm33 options
4593 of previous releases of the compiler.
4594
4595 --mmaappccss--3322
4596 Generate code for a processor running with a 32-bit program
4597 counter, and conforming to the function calling standards for the
4598 APCS 32-bit option. This option replaces the --mm66 option of previ‐
4599 ous releases of the compiler.
4600
4601 --mmtthhuummbb--iinntteerrwwoorrkk
4602 Generate code which supports calling between the ARM and Thumb
4603 instruction sets. Without this option the two instruction sets
4604 cannot be reliably used inside one program. The default is --mmnnoo--
4605 tthhuummbb--iinntteerrwwoorrkk, since slightly larger code is generated when
4606 --mmtthhuummbb--iinntteerrwwoorrkk is specified.
4607
4608 --mmnnoo--sscchheedd--pprroolloogg
4609 Prevent the reordering of instructions in the function prolog, or
4610 the merging of those instruction with the instructions in the func‐
4611 tion's body. This means that all functions will start with a rec‐
4612 ognizable set of instructions (or in fact one of a choice from a
4613 small set of different function prologues), and this information
4614 can be used to locate the start if functions inside an executable
4615 piece of code. The default is --mmsscchheedd--pprroolloogg.
4616
4617 --mmhhaarrdd--ffllooaatt
4618 Generate output containing floating point instructions. This is
4619 the default.
4620
4621 --mmssoofftt--ffllooaatt
4622 Generate output containing library calls for floating point. WWaarrnn‐‐
4623 iinngg:: the requisite libraries are not available for all ARM targets.
4624 Normally the facilities of the machine's usual C compiler are used,
4625 but this cannot be done directly in cross-compilation. You must
4626 make your own arrangements to provide suitable library functions
4627 for cross-compilation.
4628
4629 --mmssoofftt--ffllooaatt changes the calling convention in the output file;
4630 therefore, it is only useful if you compile all of a program with
4631 this option. In particular, you need to compile libgcc.a, the
4632 library that comes with GCC, with --mmssoofftt--ffllooaatt in order for this to
4633 work.
4634
4635 --mmlliittttllee--eennddiiaann
4636 Generate code for a processor running in little-endian mode. This
4637 is the default for all standard configurations.
4638
4639 --mmbbiigg--eennddiiaann
4640 Generate code for a processor running in big-endian mode; the
4641 default is to compile code for a little-endian processor.
4642
4643 --mmwwoorrddss--lliittttllee--eennddiiaann
4644 This option only applies when generating code for big-endian pro‐
4645 cessors. Generate code for a little-endian word order but a big-
4646 endian byte order. That is, a byte order of the form 3322110077665544.
4647 Note: this option should only be used if you require compatibility
4648 with code for big-endian ARM processors generated by versions of
4649 the compiler prior to 2.8.
4650
4651 --mmaalliiggnnmmeenntt--ttrraappss
4652 Generate code that will not trap if the MMU has alignment traps
4653 enabled. On ARM architectures prior to ARMv4, there were no
4654 instructions to access half-word objects stored in memory. How‐
4655 ever, when reading from memory a feature of the ARM architecture
4656 allows a word load to be used, even if the address is unaligned,
4657 and the processor core will rotate the data as it is being loaded.
4658 This option tells the compiler that such misaligned accesses will
4659 cause a MMU trap and that it should instead synthesise the access
4660 as a series of byte accesses. The compiler can still use word
4661 accesses to load half-word data if it knows that the address is
4662 aligned to a word boundary.
4663
4664 This option is ignored when compiling for ARM architecture 4 or
4665 later, since these processors have instructions to directly access
4666 half-word objects in memory.
4667
4668 --mmnnoo--aalliiggnnmmeenntt--ttrraappss
4669 Generate code that assumes that the MMU will not trap unaligned
4670 accesses. This produces better code when the target instruction
4671 set does not have half-word memory operations (i.e. implementations
4672 prior to ARMv4).
4673
4674 Note that you cannot use this option to access unaligned word
4675 objects, since the processor will only fetch one 32-bit aligned
4676 object from memory.
4677
4678 The default setting for most targets is --mmnnoo--aalliiggnnmmeenntt--ttrraappss, since
4679 this produces better code when there are no half-word memory
4680 instructions available.
4681
4682 --mmsshhoorrtt--llooaadd--bbyytteess
4683 --mmnnoo--sshhoorrtt--llooaadd--wwoorrddss
4684 These are deprecated aliases for --mmaalliiggnnmmeenntt--ttrraappss.
4685
4686 --mmnnoo--sshhoorrtt--llooaadd--bbyytteess
4687 --mmsshhoorrtt--llooaadd--wwoorrddss
4688 This are deprecated aliases for --mmnnoo--aalliiggnnmmeenntt--ttrraappss.
4689
4690 --mmbbssdd
4691 This option only applies to RISC iX. Emulate the native BSD-mode
4692 compiler. This is the default if --aannssii is not specified.
4693
4694 --mmxxooppeenn
4695 This option only applies to RISC iX. Emulate the native X/Open-
4696 mode compiler.
4697
4698 --mmnnoo--ssyymmrreennaammee
4699 This option only applies to RISC iX. Do not run the assembler
4700 post-processor, ssyymmrreennaammee, after code has been assembled. Normally
4701 it is necessary to modify some of the standard symbols in prepara‐
4702 tion for linking with the RISC iX C library; this option suppresses
4703 this pass. The post-processor is never run when the compiler is
4704 built for cross-compilation.
4705
4706 --mmccppuu==name
4707 This specifies the name of the target ARM processor. GCC uses this
4708 name to determine what kind of instructions it can emit when gener‐
4709 ating assembly code. Permissible names are: aarrmm22, aarrmm225500, aarrmm33,
4710 aarrmm66, aarrmm6600, aarrmm660000, aarrmm661100, aarrmm662200, aarrmm77, aarrmm77mm, aarrmm77dd, aarrmm77ddmm,
4711 aarrmm77ddii, aarrmm77ddmmii, aarrmm7700, aarrmm770000, aarrmm770000ii, aarrmm771100, aarrmm771100cc, aarrmm77110000,
4712 aarrmm77550000, aarrmm77550000ffee, aarrmm77ttddmmii, aarrmm88, ssttrroonnggaarrmm, ssttrroonnggaarrmm111100, ssttrroonn‐‐
4713 ggaarrmm11110000, aarrmm88, aarrmm881100, aarrmm99, aarrmm99ee, aarrmm992200, aarrmm992200tt, aarrmm994400tt,
4714 aarrmm99ttddmmii, aarrmm1100ttddmmii, aarrmm11002200tt, xxssccaallee.
4715
4716 --mmttuunnee==name
4717 This option is very similar to the --mmccppuu== option, except that
4718 instead of specifying the actual target processor type, and hence
4719 restricting which instructions can be used, it specifies that GCC
4720 should tune the performance of the code as if the target were of
4721 the type specified in this option, but still choosing the instruc‐
4722 tions that it will generate based on the cpu specified by a --mmccppuu==
4723 option. For some ARM implementations better performance can be
4724 obtained by using this option.
4725
4726 --mmaarrcchh==name
4727 This specifies the name of the target ARM architecture. GCC uses
4728 this name to determine what kind of instructions it can emit when
4729 generating assembly code. This option can be used in conjunction
4730 with or instead of the --mmccppuu== option. Permissible names are:
4731 aarrmmvv22, aarrmmvv22aa, aarrmmvv33, aarrmmvv33mm, aarrmmvv44, aarrmmvv44tt, aarrmmvv55, aarrmmvv55tt,
4732 aarrmmvv55ttee.
4733
4734 --mmffppee==number
4735 --mmffpp==number
4736 This specifies the version of the floating point emulation avail‐
4737 able on the target. Permissible values are 2 and 3. --mmffpp== is a
4738 synonym for --mmffppee==, for compatibility with older versions of GCC.
4739
4740 --mmssttrruuccttuurree--ssiizzee--bboouunnddaarryy==n
4741 The size of all structures and unions will be rounded up to a mul‐
4742 tiple of the number of bits set by this option. Permissible values
4743 are 8 and 32. The default value varies for different toolchains.
4744 For the COFF targeted toolchain the default value is 8. Specifying
4745 the larger number can produce faster, more efficient code, but can
4746 also increase the size of the program. The two values are poten‐
4747 tially incompatible. Code compiled with one value cannot necessar‐
4748 ily expect to work with code or libraries compiled with the other
4749 value, if they exchange information using structures or unions.
4750
4751 --mmaabboorrtt--oonn--nnoorreettuurrnn
4752 Generate a call to the function "abort" at the end of a "noreturn"
4753 function. It will be executed if the function tries to return.
4754
4755 --mmlloonngg--ccaallllss
4756 --mmnnoo--lloonngg--ccaallllss
4757 Tells the compiler to perform function calls by first loading the
4758 address of the function into a register and then performing a sub‐
4759 routine call on this register. This switch is needed if the target
4760 function will lie outside of the 64 megabyte addressing range of
4761 the offset based version of subroutine call instruction.
4762
4763 Even if this switch is enabled, not all function calls will be
4764 turned into long calls. The heuristic is that static functions,
4765 functions which have the sshhoorrtt--ccaallll attribute, functions that are
4766 inside the scope of a ##pprraaggmmaa nnoo__lloonngg__ccaallllss directive and functions
4767 whose definitions have already been compiled within the current
4768 compilation unit, will not be turned into long calls. The excep‐
4769 tion to this rule is that weak function definitions, functions with
4770 the lloonngg--ccaallll attribute or the sseeccttiioonn attribute, and functions
4771 that are within the scope of a ##pprraaggmmaa lloonngg__ccaallllss directive, will
4772 always be turned into long calls.
4773
4774 This feature is not enabled by default. Specifying --mmnnoo--lloonngg--ccaallllss
4775 will restore the default behavior, as will placing the function
4776 calls within the scope of a ##pprraaggmmaa lloonngg__ccaallllss__ooffff directive. Note
4777 these switches have no effect on how the compiler generates code to
4778 handle function calls via function pointers.
4779
4780 --mmnnoopp--ffuunn--ddlllliimmppoorrtt
4781 Disable support for the "dllimport" attribute.
4782
4783 --mmssiinnggllee--ppiicc--bbaassee
4784 Treat the register used for PIC addressing as read-only, rather
4785 than loading it in the prologue for each function. The run-time
4786 system is responsible for initializing this register with an appro‐
4787 priate value before execution begins.
4788
4789 --mmppiicc--rreeggiisstteerr==reg
4790 Specify the register to be used for PIC addressing. The default is
4791 R10 unless stack-checking is enabled, when R9 is used.
4792
4793 --mmppookkee--ffuunnccttiioonn--nnaammee
4794 Write the name of each function into the text section, directly
4795 preceding the function prologue. The generated code is similar to
4796 this:
4797
4798 t0
4799 .ascii "arm_poke_function_name", 0
4800 .align
4801 t1
4802 .word 0xff000000 + (t1 - t0)
4803 arm_poke_function_name
4804 mov ip, sp
4805 stmfd sp!, {fp, ip, lr, pc}
4806 sub fp, ip, #4
4807
4808 When performing a stack backtrace, code can inspect the value of
4809 "pc" stored at "fp + 0". If the trace function then looks at loca‐
4810 tion "pc - 12" and the top 8 bits are set, then we know that there
4811 is a function name embedded immediately preceding this location and
4812 has length "((pc[-3]) & 0xff000000)".
4813
4814 --mmtthhuummbb
4815 Generate code for the 16-bit Thumb instruction set. The default is
4816 to use the 32-bit ARM instruction set.
4817
4818 --mmttppccss--ffrraammee
4819 Generate a stack frame that is compliant with the Thumb Procedure
4820 Call Standard for all non-leaf functions. (A leaf function is one
4821 that does not call any other functions.) The default is --mmnnoo--ttppccss--
4822 ffrraammee.
4823
4824 --mmttppccss--lleeaaff--ffrraammee
4825 Generate a stack frame that is compliant with the Thumb Procedure
4826 Call Standard for all leaf functions. (A leaf function is one that
4827 does not call any other functions.) The default is --mmnnoo--aappccss--lleeaaff--
4828 ffrraammee.
4829
4830 --mmccaalllleeee--ssuuppeerr--iinntteerrwwoorrkkiinngg
4831 Gives all externally visible functions in the file being compiled
4832 an ARM instruction set header which switches to Thumb mode before
4833 executing the rest of the function. This allows these functions to
4834 be called from non-interworking code.
4835
4836 --mmccaalllleerr--ssuuppeerr--iinntteerrwwoorrkkiinngg
4837 Allows calls via function pointers (including virtual functions) to
4838 execute correctly regardless of whether the target code has been
4839 compiled for interworking or not. There is a small overhead in the
4840 cost of executing a function pointer if this option is enabled.
4841
4842 MN10200 Options
4843
4844 These --mm options are defined for Matsushita MN10200 architectures:
4845
4846 --mmrreellaaxx
4847 Indicate to the linker that it should perform a relaxation opti‐
4848 mization pass to shorten branches, calls and absolute memory
4849 addresses. This option only has an effect when used on the command
4850 line for the final link step.
4851
4852 This option makes symbolic debugging impossible.
4853
4854 MN10300 Options
4855
4856 These --mm options are defined for Matsushita MN10300 architectures:
4857
4858 --mmmmuulltt--bbuugg
4859 Generate code to avoid bugs in the multiply instructions for the
4860 MN10300 processors. This is the default.
4861
4862 --mmnnoo--mmuulltt--bbuugg
4863 Do not generate code to avoid bugs in the multiply instructions for
4864 the MN10300 processors.
4865
4866 --mmaamm3333
4867 Generate code which uses features specific to the AM33 processor.
4868
4869 --mmnnoo--aamm3333
4870 Do not generate code which uses features specific to the AM33 pro‐
4871 cessor. This is the default.
4872
4873 --mmnnoo--ccrrtt00
4874 Do not link in the C run-time initialization object file.
4875
4876 --mmrreellaaxx
4877 Indicate to the linker that it should perform a relaxation opti‐
4878 mization pass to shorten branches, calls and absolute memory
4879 addresses. This option only has an effect when used on the command
4880 line for the final link step.
4881
4882 This option makes symbolic debugging impossible.
4883
4884 M32R/D Options
4885
4886 These --mm options are defined for Mitsubishi M32R/D architectures:
4887
4888 --mm3322rrxx
4889 Generate code for the M32R/X.
4890
4891 --mm3322rr
4892 Generate code for the M32R. This is the default.
4893
4894 --mmccooddee--mmooddeell==ssmmaallll
4895 Assume all objects live in the lower 16MB of memory (so that their
4896 addresses can be loaded with the "ld24" instruction), and assume
4897 all subroutines are reachable with the "bl" instruction. This is
4898 the default.
4899
4900 The addressability of a particular object can be set with the
4901 "model" attribute.
4902
4903 --mmccooddee--mmooddeell==mmeeddiiuumm
4904 Assume objects may be anywhere in the 32-bit address space (the
4905 compiler will generate "seth/add3" instructions to load their
4906 addresses), and assume all subroutines are reachable with the "bl"
4907 instruction.
4908
4909 --mmccooddee--mmooddeell==llaarrggee
4910 Assume objects may be anywhere in the 32-bit address space (the
4911 compiler will generate "seth/add3" instructions to load their
4912 addresses), and assume subroutines may not be reachable with the
4913 "bl" instruction (the compiler will generate the much slower
4914 "seth/add3/jl" instruction sequence).
4915
4916 --mmssddaattaa==nnoonnee
4917 Disable use of the small data area. Variables will be put into one
4918 of ..ddaattaa, bbssss, or ..rrooddaattaa (unless the "section" attribute has been
4919 specified). This is the default.
4920
4921 The small data area consists of sections ..ssddaattaa and ..ssbbssss. Objects
4922 may be explicitly put in the small data area with the "section"
4923 attribute using one of these sections.
4924
4925 --mmssddaattaa==ssddaattaa
4926 Put small global and static data in the small data area, but do not
4927 generate special code to reference them.
4928
4929 --mmssddaattaa==uussee
4930 Put small global and static data in the small data area, and gener‐
4931 ate special instructions to reference them.
4932
4933 --GG num
4934 Put global and static objects less than or equal to num bytes into
4935 the small data or bss sections instead of the normal data or bss
4936 sections. The default value of num is 8. The --mmssddaattaa option must
4937 be set to one of ssddaattaa or uussee for this option to have any effect.
4938
4939 All modules should be compiled with the same --GG num value. Compil‐
4940 ing with different values of num may or may not work; if it doesn't
4941 the linker will give an error message---incorrect code will not be
4942 generated.
4943
4944 M88K Options
4945
4946 These --mm options are defined for Motorola 88k architectures:
4947
4948 --mm8888000000
4949 Generate code that works well on both the m88100 and the m88110.
4950
4951 --mm8888110000
4952 Generate code that works best for the m88100, but that also runs on
4953 the m88110.
4954
4955 --mm8888111100
4956 Generate code that works best for the m88110, and may not run on
4957 the m88100.
4958
4959 --mmbbiigg--ppiicc
4960 Obsolete option to be removed from the next revision. Use --ffPPIICC.
4961
4962 --mmiiddeennttiiffyy--rreevviissiioonn
4963 Include an "ident" directive in the assembler output recording the
4964 source file name, compiler name and version, timestamp, and compi‐
4965 lation flags used.
4966
4967 --mmnnoo--uunnddeerrssccoorreess
4968 In assembler output, emit symbol names without adding an underscore
4969 character at the beginning of each name. The default is to use an
4970 underscore as prefix on each name.
4971
4972 --mmooccss--ddeebbuugg--iinnffoo
4973 --mmnnoo--ooccss--ddeebbuugg--iinnffoo
4974 Include (or omit) additional debugging information (about registers
4975 used in each stack frame) as specified in the 88open Object Compat‐
4976 ibility Standard, ``OCS''. This extra information allows debugging
4977 of code that has had the frame pointer eliminated. The default for
4978 DG/UX, SVr4, and Delta 88 SVr3.2 is to include this information;
4979 other 88k configurations omit this information by default.
4980
4981 --mmooccss--ffrraammee--ppoossiittiioonn
4982 When emitting COFF debugging information for automatic variables
4983 and parameters stored on the stack, use the offset from the canoni‐
4984 cal frame address, which is the stack pointer (register 31) on
4985 entry to the function. The DG/UX, SVr4, Delta88 SVr3.2, and BCS
4986 configurations use --mmooccss--ffrraammee--ppoossiittiioonn; other 88k configurations
4987 have the default --mmnnoo--ooccss--ffrraammee--ppoossiittiioonn.
4988
4989 --mmnnoo--ooccss--ffrraammee--ppoossiittiioonn
4990 When emitting COFF debugging information for automatic variables
4991 and parameters stored on the stack, use the offset from the frame
4992 pointer register (register 30). When this option is in effect, the
4993 frame pointer is not eliminated when debugging information is
4994 selected by the -g switch.
4995
4996 --mmooppttiimmiizzee--aarrgg--aarreeaa
4997 Save space by reorganizing the stack frame. This option generates
4998 code that does not agree with the 88open specifications, but uses
4999 less memory.
5000
5001 --mmnnoo--ooppttiimmiizzee--aarrgg--aarreeaa
5002 Do not reorganize the stack frame to save space. This is the
5003 default. The generated conforms to the specification, but uses
5004 more memory.
5005
5006 --mmsshhoorrtt--ddaattaa--num
5007 Generate smaller data references by making them relative to "r0",
5008 which allows loading a value using a single instruction (rather
5009 than the usual two). You control which data references are
5010 affected by specifying num with this option. For example, if you
5011 specify --mmsshhoorrtt--ddaattaa--551122, then the data references affected are
5012 those involving displacements of less than 512 bytes. --mmsshhoorrtt--
5013 ddaattaa--num is not effective for num greater than 64k.
5014
5015 --mmsseerriiaalliizzee--vvoollaattiillee
5016 --mmnnoo--sseerriiaalliizzee--vvoollaattiillee
5017 Do, or don't, generate code to guarantee sequential consistency of
5018 volatile memory references. By default, consistency is guaranteed.
5019
5020 The order of memory references made by the MC88110 processor does
5021 not always match the order of the instructions requesting those
5022 references. In particular, a load instruction may execute before a
5023 preceding store instruction. Such reordering violates sequential
5024 consistency of volatile memory references, when there are multiple
5025 processors. When consistency must be guaranteed, GCC generates
5026 special instructions, as needed, to force execution in the proper
5027 order.
5028
5029 The MC88100 processor does not reorder memory references and so
5030 always provides sequential consistency. However, by default, GCC
5031 generates the special instructions to guarantee consistency even
5032 when you use --mm8888110000, so that the code may be run on an MC88110
5033 processor. If you intend to run your code only on the MC88100 pro‐
5034 cessor, you may use --mmnnoo--sseerriiaalliizzee--vvoollaattiillee.
5035
5036 The extra code generated to guarantee consistency may affect the
5037 performance of your application. If you know that you can safely
5038 forgo this guarantee, you may use --mmnnoo--sseerriiaalliizzee--vvoollaattiillee.
5039
5040 --mmssvvrr44
5041 --mmssvvrr33
5042 Turn on (--mmssvvrr44) or off (--mmssvvrr33) compiler extensions related to
5043 System V release 4 (SVr4). This controls the following:
5044
5045 1. Which variant of the assembler syntax to emit.
5046
5047 2. --mmssvvrr44 makes the C preprocessor recognize ##pprraaggmmaa wweeaakk that is
5048 used on System V release 4.
5049
5050 3. --mmssvvrr44 makes GCC issue additional declaration directives used
5051 in SVr4.
5052
5053 --mmssvvrr44 is the default for the m88k-motorola-sysv4 and m88k-dg-dgux
5054 m88k configurations. --mmssvvrr33 is the default for all other m88k con‐
5055 figurations.
5056
5057 --mmvveerrssiioonn--0033..0000
5058 This option is obsolete, and is ignored.
5059
5060 --mmnnoo--cchheecckk--zzeerroo--ddiivviissiioonn
5061 --mmcchheecckk--zzeerroo--ddiivviissiioonn
5062 Do, or don't, generate code to guarantee that integer division by
5063 zero will be detected. By default, detection is guaranteed.
5064
5065 Some models of the MC88100 processor fail to trap upon integer
5066 division by zero under certain conditions. By default, when com‐
5067 piling code that might be run on such a processor, GCC generates
5068 code that explicitly checks for zero-valued divisors and traps with
5069 exception number 503 when one is detected. Use of --mmnnoo--cchheecckk--zzeerroo--
5070 ddiivviissiioonn suppresses such checking for code generated to run on an
5071 MC88100 processor.
5072
5073 GCC assumes that the MC88110 processor correctly detects all
5074 instances of integer division by zero. When --mm8888111100 is specified,
5075 no explicit checks for zero-valued divisors are generated, and both
5076 --mmcchheecckk--zzeerroo--ddiivviissiioonn and --mmnnoo--cchheecckk--zzeerroo--ddiivviissiioonn are ignored.
5077
5078 --mmuussee--ddiivv--iinnssttrruuccttiioonn
5079 Use the div instruction for signed integer division on the MC88100
5080 processor. By default, the div instruction is not used.
5081
5082 On the MC88100 processor the signed integer division instruction
5083 div) traps to the operating system on a negative operand. The
5084 operating system transparently completes the operation, but at a
5085 large cost in execution time. By default, when compiling code that
5086 might be run on an MC88100 processor, GCC emulates signed integer
5087 division using the unsigned integer division instruction divu),
5088 thereby avoiding the large penalty of a trap to the operating sys‐
5089 tem. Such emulation has its own, smaller, execution cost in both
5090 time and space. To the extent that your code's important signed
5091 integer division operations are performed on two nonnegative oper‐
5092 ands, it may be desirable to use the div instruction directly.
5093
5094 On the MC88110 processor the div instruction (also known as the
5095 divs instruction) processes negative operands without trapping to
5096 the operating system. When --mm8888111100 is specified, --mmuussee--ddiivv--
5097 iinnssttrruuccttiioonn is ignored, and the div instruction is used for signed
5098 integer division.
5099
5100 Note that the result of dividing "INT_MIN" by -1 is undefined. In
5101 particular, the behavior of such a division with and without --mmuussee--
5102 ddiivv--iinnssttrruuccttiioonn may differ.
5103
5104 --mmttrraapp--llaarrggee--sshhiifftt
5105 --mmhhaannddllee--llaarrggee--sshhiifftt
5106 Include code to detect bit-shifts of more than 31 bits; respec‐
5107 tively, trap such shifts or emit code to handle them properly. By
5108 default GCC makes no special provision for large bit shifts.
5109
5110 --mmwwaarrnn--ppaasssseedd--ssttrruuccttss
5111 Warn when a function passes a struct as an argument or result.
5112 Structure-passing conventions have changed during the evolution of
5113 the C language, and are often the source of portability problems.
5114 By default, GCC issues no such warning.
5115
5116 IBM RS/6000 and PowerPC Options
5117
5118 These --mm options are defined for the IBM RS/6000 and PowerPC:
5119
5120 --mmppoowweerr
5121 --mmnnoo--ppoowweerr
5122 --mmppoowweerr22
5123 --mmnnoo--ppoowweerr22
5124 --mmppoowweerrppcc
5125 --mmnnoo--ppoowweerrppcc
5126 --mmppoowweerrppcc--ggppoopptt
5127 --mmnnoo--ppoowweerrppcc--ggppoopptt
5128 --mmppoowweerrppcc--ggffxxoopptt
5129 --mmnnoo--ppoowweerrppcc--ggffxxoopptt
5130 --mmppoowweerrppcc6644
5131 --mmnnoo--ppoowweerrppcc6644
5132 GCC supports two related instruction set architectures for the
5133 RS/6000 and PowerPC. The POWER instruction set are those instruc‐
5134 tions supported by the rriiooss chip set used in the original RS/6000
5135 systems and the PowerPC instruction set is the architecture of the
5136 Motorola MPC5xx, MPC6xx, MPC8xx microprocessors, and the IBM 4xx
5137 microprocessors.
5138
5139 Neither architecture is a subset of the other. However there is a
5140 large common subset of instructions supported by both. An MQ reg‐
5141 ister is included in processors supporting the POWER architecture.
5142
5143 You use these options to specify which instructions are available
5144 on the processor you are using. The default value of these options
5145 is determined when configuring GCC. Specifying the --mmccppuu==cpu_type
5146 overrides the specification of these options. We recommend you use
5147 the --mmccppuu==cpu_type option rather than the options listed above.
5148
5149 The --mmppoowweerr option allows GCC to generate instructions that are
5150 found only in the POWER architecture and to use the MQ register.
5151 Specifying --mmppoowweerr22 implies --ppoowweerr and also allows GCC to generate
5152 instructions that are present in the POWER2 architecture but not
5153 the original POWER architecture.
5154
5155 The --mmppoowweerrppcc option allows GCC to generate instructions that are
5156 found only in the 32-bit subset of the PowerPC architecture. Spec‐
5157 ifying --mmppoowweerrppcc--ggppoopptt implies --mmppoowweerrppcc and also allows GCC to use
5158 the optional PowerPC architecture instructions in the General Pur‐
5159 pose group, including floating-point square root. Specifying
5160 --mmppoowweerrppcc--ggffxxoopptt implies --mmppoowweerrppcc and also allows GCC to use the
5161 optional PowerPC architecture instructions in the Graphics group,
5162 including floating-point select.
5163
5164 The --mmppoowweerrppcc6644 option allows GCC to generate the additional 64-bit
5165 instructions that are found in the full PowerPC64 architecture and
5166 to treat GPRs as 64-bit, doubleword quantities. GCC defaults to
5167 --mmnnoo--ppoowweerrppcc6644.
5168
5169 If you specify both --mmnnoo--ppoowweerr and --mmnnoo--ppoowweerrppcc, GCC will use only
5170 the instructions in the common subset of both architectures plus
5171 some special AIX common-mode calls, and will not use the MQ regis‐
5172 ter. Specifying both --mmppoowweerr and --mmppoowweerrppcc permits GCC to use any
5173 instruction from either architecture and to allow use of the MQ
5174 register; specify this for the Motorola MPC601.
5175
5176 --mmnneeww--mmnneemmoonniiccss
5177 --mmoolldd--mmnneemmoonniiccss
5178 Select which mnemonics to use in the generated assembler code.
5179 With --mmnneeww--mmnneemmoonniiccss, GCC uses the assembler mnemonics defined for
5180 the PowerPC architecture. With --mmoolldd--mmnneemmoonniiccss it uses the assem‐
5181 bler mnemonics defined for the POWER architecture. Instructions
5182 defined in only one architecture have only one mnemonic; GCC uses
5183 that mnemonic irrespective of which of these options is specified.
5184
5185 GCC defaults to the mnemonics appropriate for the architecture in
5186 use. Specifying --mmccppuu==cpu_type sometimes overrides the value of
5187 these option. Unless you are building a cross-compiler, you should
5188 normally not specify either --mmnneeww--mmnneemmoonniiccss or --mmoolldd--mmnneemmoonniiccss, but
5189 should instead accept the default.
5190
5191 --mmccppuu==cpu_type
5192 Set architecture type, register usage, choice of mnemonics, and
5193 instruction scheduling parameters for machine type cpu_type. Sup‐
5194 ported values for cpu_type are rriiooss, rriiooss11, rrsscc, rriiooss22, rrss6644aa, 660011,
5195 660022, 660033, 660033ee, 660044, 660044ee, 662200, 663300, 774400, 77440000, 77445500, 775500, ppoowweerr,
5196 ppoowweerr22, ppoowweerrppcc, 440033, 550055, 880011, 882211, 882233, and 886600 and ccoommmmoonn.
5197
5198 --mmccppuu==ccoommmmoonn selects a completely generic processor. Code gener‐
5199 ated under this option will run on any POWER or PowerPC processor.
5200 GCC will use only the instructions in the common subset of both
5201 architectures, and will not use the MQ register. GCC assumes a
5202 generic processor model for scheduling purposes.
5203
5204 --mmccppuu==ppoowweerr, --mmccppuu==ppoowweerr22, --mmccppuu==ppoowweerrppcc, and --mmccppuu==ppoowweerrppcc6644 spec‐
5205 ify generic POWER, POWER2, pure 32-bit PowerPC (i.e., not MPC601),
5206 and 64-bit PowerPC architecture machine types, with an appropriate,
5207 generic processor model assumed for scheduling purposes.
5208
5209 The other options specify a specific processor. Code generated
5210 under those options will run best on that processor, and may not
5211 run at all on others.
5212
5213 The --mmccppuu options automatically enable or disable other --mm options
5214 as follows:
5215
5216 ccoommmmoonn
5217 --mmnnoo--ppoowweerr, --mmnnoo--ppoowweerrcc
5218
5219 ppoowweerr
5220 ppoowweerr22
5221 rriiooss11
5222 rriiooss22
5223 rrsscc --mmppoowweerr, --mmnnoo--ppoowweerrppcc, --mmnnoo--nneeww--mmnneemmoonniiccss
5224
5225 ppoowweerrppcc
5226 rrss6644aa
5227 660022
5228 660033
5229 660033ee
5230 660044
5231 662200
5232 663300
5233 774400
5234 77440000
5235 77445500
5236 775500
5237 550055 --mmnnoo--ppoowweerr, --mmppoowweerrppcc, --mmnneeww--mmnneemmoonniiccss
5238
5239 660011 --mmppoowweerr, --mmppoowweerrppcc, --mmnneeww--mmnneemmoonniiccss
5240
5241 440033
5242 882211
5243 886600 --mmnnoo--ppoowweerr, --mmppoowweerrppcc, --mmnneeww--mmnneemmoonniiccss, --mmssoofftt--ffllooaatt
5244
5245 --mmttuunnee==cpu_type
5246 Set the instruction scheduling parameters for machine type
5247 cpu_type, but do not set the architecture type, register usage, or
5248 choice of mnemonics, as --mmccppuu==cpu_type would. The same values for
5249 cpu_type are used for --mmttuunnee as for --mmccppuu. If both are specified,
5250 the code generated will use the architecture, registers, and
5251 mnemonics set by --mmccppuu, but the scheduling parameters set by
5252 --mmttuunnee.
5253
5254 --mmaallttiivveecc
5255 --mmnnoo--aallttiivveecc
5256 These switches enable or disable the use of built-in functions that
5257 allow access to the AltiVec instruction set. You may also need to
5258 set --mmaabbii==aallttiivveecc to adjust the current ABI with AltiVec ABI
5259 enhancements.
5260
5261 --mmffuullll--ttoocc
5262 --mmnnoo--ffpp--iinn--ttoocc
5263 --mmnnoo--ssuumm--iinn--ttoocc
5264 --mmmmiinniimmaall--ttoocc
5265 Modify generation of the TOC (Table Of Contents), which is created
5266 for every executable file. The --mmffuullll--ttoocc option is selected by
5267 default. In that case, GCC will allocate at least one TOC entry
5268 for each unique non-automatic variable reference in your program.
5269 GCC will also place floating-point constants in the TOC. However,
5270 only 16,384 entries are available in the TOC.
5271
5272 If you receive a linker error message that saying you have over‐
5273 flowed the available TOC space, you can reduce the amount of TOC
5274 space used with the --mmnnoo--ffpp--iinn--ttoocc and --mmnnoo--ssuumm--iinn--ttoocc options.
5275 --mmnnoo--ffpp--iinn--ttoocc prevents GCC from putting floating-point constants
5276 in the TOC and --mmnnoo--ssuumm--iinn--ttoocc forces GCC to generate code to cal‐
5277 culate the sum of an address and a constant at run-time instead of
5278 putting that sum into the TOC. You may specify one or both of
5279 these options. Each causes GCC to produce very slightly slower and
5280 larger code at the expense of conserving TOC space.
5281
5282 If you still run out of space in the TOC even when you specify both
5283 of these options, specify --mmmmiinniimmaall--ttoocc instead. This option
5284 causes GCC to make only one TOC entry for every file. When you
5285 specify this option, GCC will produce code that is slower and
5286 larger but which uses extremely little TOC space. You may wish to
5287 use this option only on files that contain less frequently executed
5288 code.
5289
5290 --mmaaiixx6644
5291 --mmaaiixx3322
5292 Enable 64-bit AIX ABI and calling convention: 64-bit pointers,
5293 64-bit "long" type, and the infrastructure needed to support them.
5294 Specifying --mmaaiixx6644 implies --mmppoowweerrppcc6644 and --mmppoowweerrppcc, while --mmaaiixx3322
5295 disables the 64-bit ABI and implies --mmnnoo--ppoowweerrppcc6644. GCC defaults
5296 to --mmaaiixx3322.
5297
5298 --mmxxll--ccaallll
5299 --mmnnoo--xxll--ccaallll
5300 On AIX, pass floating-point arguments to prototyped functions
5301 beyond the register save area (RSA) on the stack in addition to
5302 argument FPRs. The AIX calling convention was extended but not
5303 initially documented to handle an obscure K&R C case of calling a
5304 function that takes the address of its arguments with fewer argu‐
5305 ments than declared. AIX XL compilers access floating point argu‐
5306 ments which do not fit in the RSA from the stack when a subroutine
5307 is compiled without optimization. Because always storing floating-
5308 point arguments on the stack is inefficient and rarely needed, this
5309 option is not enabled by default and only is necessary when calling
5310 subroutines compiled by AIX XL compilers without optimization.
5311
5312 --mmppee
5313 Support IBM RS/6000 SP Parallel Environment (PE). Link an applica‐
5314 tion written to use message passing with special startup code to
5315 enable the application to run. The system must have PE installed
5316 in the standard location (/usr/lpp/ppe.poe/), or the specs file
5317 must be overridden with the --ssppeeccss== option to specify the appropri‐
5318 ate directory location. The Parallel Environment does not support
5319 threads, so the --mmppee option and the --pptthhrreeaadd option are incompati‐
5320 ble.
5321
5322 --mmssoofftt--ffllooaatt
5323 --mmhhaarrdd--ffllooaatt
5324 Generate code that does not use (uses) the floating-point register
5325 set. Software floating point emulation is provided if you use the
5326 --mmssoofftt--ffllooaatt option, and pass the option to GCC when linking.
5327
5328 --mmmmuullttiippllee
5329 --mmnnoo--mmuullttiippllee
5330 Generate code that uses (does not use) the load multiple word
5331 instructions and the store multiple word instructions. These
5332 instructions are generated by default on POWER systems, and not
5333 generated on PowerPC systems. Do not use --mmmmuullttiippllee on little
5334 endian PowerPC systems, since those instructions do not work when
5335 the processor is in little endian mode. The exceptions are PPC740
5336 and PPC750 which permit the instructions usage in little endian
5337 mode.
5338
5339 --mmssttrriinngg
5340 --mmnnoo--ssttrriinngg
5341 Generate code that uses (does not use) the load string instructions
5342 and the store string word instructions to save multiple registers
5343 and do small block moves. These instructions are generated by
5344 default on POWER systems, and not generated on PowerPC systems. Do
5345 not use --mmssttrriinngg on little endian PowerPC systems, since those
5346 instructions do not work when the processor is in little endian
5347 mode. The exceptions are PPC740 and PPC750 which permit the
5348 instructions usage in little endian mode.
5349
5350 --mmuuppddaattee
5351 --mmnnoo--uuppddaattee
5352 Generate code that uses (does not use) the load or store instruc‐
5353 tions that update the base register to the address of the calcu‐
5354 lated memory location. These instructions are generated by
5355 default. If you use --mmnnoo--uuppddaattee, there is a small window between
5356 the time that the stack pointer is updated and the address of the
5357 previous frame is stored, which means code that walks the stack
5358 frame across interrupts or signals may get corrupted data.
5359
5360 --mmffuusseedd--mmaadddd
5361 --mmnnoo--ffuusseedd--mmaadddd
5362 Generate code that uses (does not use) the floating point multiply
5363 and accumulate instructions. These instructions are generated by
5364 default if hardware floating is used.
5365
5366 --mmnnoo--bbiitt--aalliiggnn
5367 --mmbbiitt--aalliiggnn
5368 On System V.4 and embedded PowerPC systems do not (do) force struc‐
5369 tures and unions that contain bit-fields to be aligned to the base
5370 type of the bit-field.
5371
5372 For example, by default a structure containing nothing but 8
5373 "unsigned" bit-fields of length 1 would be aligned to a 4 byte
5374 boundary and have a size of 4 bytes. By using --mmnnoo--bbiitt--aalliiggnn, the
5375 structure would be aligned to a 1 byte boundary and be one byte in
5376 size.
5377
5378 --mmnnoo--ssttrriicctt--aalliiggnn
5379 --mmssttrriicctt--aalliiggnn
5380 On System V.4 and embedded PowerPC systems do not (do) assume that
5381 unaligned memory references will be handled by the system.
5382
5383 --mmrreellooccaattaabbllee
5384 --mmnnoo--rreellooccaattaabbllee
5385 On embedded PowerPC systems generate code that allows (does not
5386 allow) the program to be relocated to a different address at run‐
5387 time. If you use --mmrreellooccaattaabbllee on any module, all objects linked
5388 together must be compiled with --mmrreellooccaattaabbllee or --mmrreellooccaattaabbllee--lliibb.
5389
5390 --mmrreellooccaattaabbllee--lliibb
5391 --mmnnoo--rreellooccaattaabbllee--lliibb
5392 On embedded PowerPC systems generate code that allows (does not
5393 allow) the program to be relocated to a different address at run‐
5394 time. Modules compiled with --mmrreellooccaattaabbllee--lliibb can be linked with
5395 either modules compiled without --mmrreellooccaattaabbllee and --mmrreellooccaattaabbllee--lliibb
5396 or with modules compiled with the --mmrreellooccaattaabbllee options.
5397
5398 --mmnnoo--ttoocc
5399 --mmttoocc
5400 On System V.4 and embedded PowerPC systems do not (do) assume that
5401 register 2 contains a pointer to a global area pointing to the
5402 addresses used in the program.
5403
5404 --mmlliittttllee
5405 --mmlliittttllee--eennddiiaann
5406 On System V.4 and embedded PowerPC systems compile code for the
5407 processor in little endian mode. The --mmlliittttllee--eennddiiaann option is the
5408 same as --mmlliittttllee.
5409
5410 --mmbbiigg
5411 --mmbbiigg--eennddiiaann
5412 On System V.4 and embedded PowerPC systems compile code for the
5413 processor in big endian mode. The --mmbbiigg--eennddiiaann option is the same
5414 as --mmbbiigg.
5415
5416 --mmccaallll--ssyyssvv
5417 On System V.4 and embedded PowerPC systems compile code using call‐
5418 ing conventions that adheres to the March 1995 draft of the System
5419 V Application Binary Interface, PowerPC processor supplement. This
5420 is the default unless you configured GCC using ppoowweerrppcc--**--eeaabbiiaaiixx.
5421
5422 --mmccaallll--ssyyssvv--eeaabbii
5423 Specify both --mmccaallll--ssyyssvv and --mmeeaabbii options.
5424
5425 --mmccaallll--ssyyssvv--nnooeeaabbii
5426 Specify both --mmccaallll--ssyyssvv and --mmnnoo--eeaabbii options.
5427
5428 --mmccaallll--aaiixx
5429 On System V.4 and embedded PowerPC systems compile code using call‐
5430 ing conventions that are similar to those used on AIX. This is the
5431 default if you configured GCC using ppoowweerrppcc--**--eeaabbiiaaiixx.
5432
5433 --mmccaallll--ssoollaarriiss
5434 On System V.4 and embedded PowerPC systems compile code for the
5435 Solaris operating system.
5436
5437 --mmccaallll--lliinnuuxx
5438 On System V.4 and embedded PowerPC systems compile code for the
5439 Linux-based GNU system.
5440
5441 --mmccaallll--ggnnuu
5442 On System V.4 and embedded PowerPC systems compile code for the
5443 Hurd-based GNU system.
5444
5445 --mmccaallll--nneettbbssdd
5446 On System V.4 and embedded PowerPC systems compile code for the
5447 NetBSD operating system.
5448
5449 --mmaaiixx--ssttrruucctt--rreettuurrnn
5450 Return all structures in memory (as specified by the AIX ABI).
5451
5452 --mmssvvrr44--ssttrruucctt--rreettuurrnn
5453 Return structures smaller than 8 bytes in registers (as specified
5454 by the SVR4 ABI).
5455
5456 --mmaabbii==aallttiivveecc
5457 Extend the current ABI with AltiVec ABI extensions. This does not
5458 change the default ABI, instead it adds the AltiVec ABI extensions
5459 to the current ABI.
5460
5461 --mmaabbii==nnoo--aallttiivveecc
5462 Disable AltiVec ABI extensions for the current ABI.
5463
5464 --mmpprroottoottyyppee
5465 --mmnnoo--pprroottoottyyppee
5466 On System V.4 and embedded PowerPC systems assume that all calls to
5467 variable argument functions are properly prototyped. Otherwise,
5468 the compiler must insert an instruction before every non prototyped
5469 call to set or clear bit 6 of the condition code register (CR) to
5470 indicate whether floating point values were passed in the floating
5471 point registers in case the function takes a variable arguments.
5472 With --mmpprroottoottyyppee, only calls to prototyped variable argument func‐
5473 tions will set or clear the bit.
5474
5475 --mmssiimm
5476 On embedded PowerPC systems, assume that the startup module is
5477 called sim-crt0.o and that the standard C libraries are libsim.a
5478 and libc.a. This is the default for ppoowweerrppcc--**--eeaabbiissiimm. configura‐
5479 tions.
5480
5481 --mmmmvvmmee
5482 On embedded PowerPC systems, assume that the startup module is
5483 called crt0.o and the standard C libraries are libmvme.a and
5484 libc.a.
5485
5486 --mmaaddss
5487 On embedded PowerPC systems, assume that the startup module is
5488 called crt0.o and the standard C libraries are libads.a and libc.a.
5489
5490 --mmyyeelllloowwkknniiffee
5491 On embedded PowerPC systems, assume that the startup module is
5492 called crt0.o and the standard C libraries are libyk.a and libc.a.
5493
5494 --mmvvxxwwoorrkkss
5495 On System V.4 and embedded PowerPC systems, specify that you are
5496 compiling for a VxWorks system.
5497
5498 --mmeemmbb
5499 On embedded PowerPC systems, set the PPC_EMB bit in the ELF flags
5500 header to indicate that eeaabbii extended relocations are used.
5501
5502 --mmeeaabbii
5503 --mmnnoo--eeaabbii
5504 On System V.4 and embedded PowerPC systems do (do not) adhere to
5505 the Embedded Applications Binary Interface (eabi) which is a set of
5506 modifications to the System V.4 specifications. Selecting --mmeeaabbii
5507 means that the stack is aligned to an 8 byte boundary, a function
5508 "__eabi" is called to from "main" to set up the eabi environment,
5509 and the --mmssddaattaa option can use both "r2" and "r13" to point to two
5510 separate small data areas. Selecting --mmnnoo--eeaabbii means that the
5511 stack is aligned to a 16 byte boundary, do not call an initializa‐
5512 tion function from "main", and the --mmssddaattaa option will only use
5513 "r13" to point to a single small data area. The --mmeeaabbii option is
5514 on by default if you configured GCC using one of the ppooww‐‐
5515 eerrppcc**--**--eeaabbii** options.
5516
5517 --mmssddaattaa==eeaabbii
5518 On System V.4 and embedded PowerPC systems, put small initialized
5519 "const" global and static data in the ..ssddaattaa22 section, which is
5520 pointed to by register "r2". Put small initialized non-"const"
5521 global and static data in the ..ssddaattaa section, which is pointed to
5522 by register "r13". Put small uninitialized global and static data
5523 in the ..ssbbssss section, which is adjacent to the ..ssddaattaa section. The
5524 --mmssddaattaa==eeaabbii option is incompatible with the --mmrreellooccaattaabbllee option.
5525 The --mmssddaattaa==eeaabbii option also sets the --mmeemmbb option.
5526
5527 --mmssddaattaa==ssyyssvv
5528 On System V.4 and embedded PowerPC systems, put small global and
5529 static data in the ..ssddaattaa section, which is pointed to by register
5530 "r13". Put small uninitialized global and static data in the ..ssbbssss
5531 section, which is adjacent to the ..ssddaattaa section. The --mmssddaattaa==ssyyssvv
5532 option is incompatible with the --mmrreellooccaattaabbllee option.
5533
5534 --mmssddaattaa==ddeeffaauulltt
5535 --mmssddaattaa
5536 On System V.4 and embedded PowerPC systems, if --mmeeaabbii is used, com‐
5537 pile code the same as --mmssddaattaa==eeaabbii, otherwise compile code the same
5538 as --mmssddaattaa==ssyyssvv.
5539
5540 --mmssddaattaa--ddaattaa
5541 On System V.4 and embedded PowerPC systems, put small global and
5542 static data in the ..ssddaattaa section. Put small uninitialized global
5543 and static data in the ..ssbbssss section. Do not use register "r13" to
5544 address small data however. This is the default behavior unless
5545 other --mmssddaattaa options are used.
5546
5547 --mmssddaattaa==nnoonnee
5548 --mmnnoo--ssddaattaa
5549 On embedded PowerPC systems, put all initialized global and static
5550 data in the ..ddaattaa section, and all uninitialized data in the ..bbssss
5551 section.
5552
5553 --GG num
5554 On embedded PowerPC systems, put global and static items less than
5555 or equal to num bytes into the small data or bss sections instead
5556 of the normal data or bss section. By default, num is 8. The --GG
5557 num switch is also passed to the linker. All modules should be
5558 compiled with the same --GG num value.
5559
5560 --mmrreeggnnaammeess
5561 --mmnnoo--rreeggnnaammeess
5562 On System V.4 and embedded PowerPC systems do (do not) emit regis‐
5563 ter names in the assembly language output using symbolic forms.
5564
5565 --pptthhrreeaadd
5566 Adds support for multithreading with the pthreads library. This
5567 option sets flags for both the preprocessor and linker.
5568
5569 IBM RT Options
5570
5571 These --mm options are defined for the IBM RT PC:
5572
5573 --mmiinn--lliinnee--mmuull
5574 Use an in-line code sequence for integer multiplies. This is the
5575 default.
5576
5577 --mmccaallll--lliibb--mmuull
5578 Call "lmul$$" for integer multiples.
5579
5580 --mmffuullll--ffpp--bblloocckkss
5581 Generate full-size floating point data blocks, including the mini‐
5582 mum amount of scratch space recommended by IBM. This is the
5583 default.
5584
5585 --mmmmiinniimmuumm--ffpp--bblloocckkss
5586 Do not include extra scratch space in floating point data blocks.
5587 This results in smaller code, but slower execution, since scratch
5588 space must be allocated dynamically.
5589
5590 --mmffpp--aarrgg--iinn--ffpprreeggss
5591 Use a calling sequence incompatible with the IBM calling convention
5592 in which floating point arguments are passed in floating point reg‐
5593 isters. Note that "varargs.h" and "stdarg.h" will not work with
5594 floating point operands if this option is specified.
5595
5596 --mmffpp--aarrgg--iinn--ggrreeggss
5597 Use the normal calling convention for floating point arguments.
5598 This is the default.
5599
5600 --mmhhcc--ssttrruucctt--rreettuurrnn
5601 Return structures of more than one word in memory, rather than in a
5602 register. This provides compatibility with the MetaWare HighC (hc)
5603 compiler. Use the option --ffppcccc--ssttrruucctt--rreettuurrnn for compatibility
5604 with the Portable C Compiler (pcc).
5605
5606 --mmnnoohhcc--ssttrruucctt--rreettuurrnn
5607 Return some structures of more than one word in registers, when
5608 convenient. This is the default. For compatibility with the IBM-
5609 supplied compilers, use the option --ffppcccc--ssttrruucctt--rreettuurrnn or the
5610 option --mmhhcc--ssttrruucctt--rreettuurrnn.
5611
5612 MIPS Options
5613
5614 These --mm options are defined for the MIPS family of computers:
5615
5616 --mmaarrcchh==cpu-type
5617 Assume the defaults for the machine type cpu-type when generating
5618 instructions. The choices for cpu-type are rr22000000, rr33000000, rr33990000,
5619 rr44000000, rr44110000, rr44330000, rr44440000, rr44660000, rr44665500, rr55000000, rr66000000, rr88000000, and
5620 oorriioonn. Additionally, the rr22000000, rr33000000, rr44000000, rr55000000, and rr66000000 can
5621 be abbreviated as rr22kk (or rr22KK), rr33kk, etc.
5622
5623 --mmttuunnee==cpu-type
5624 Assume the defaults for the machine type cpu-type when scheduling
5625 instructions. The choices for cpu-type are rr22000000, rr33000000, rr33990000,
5626 rr44000000, rr44110000, rr44330000, rr44440000, rr44660000, rr44665500, rr55000000, rr66000000, rr88000000, and
5627 oorriioonn. Additionally, the rr22000000, rr33000000, rr44000000, rr55000000, and rr66000000 can
5628 be abbreviated as rr22kk (or rr22KK), rr33kk, etc. While picking a specific
5629 cpu-type will schedule things appropriately for that particular
5630 chip, the compiler will not generate any code that does not meet
5631 level 1 of the MIPS ISA (instruction set architecture) without a
5632 --mmiippssXX or --mmaabbii switch being used.
5633
5634 --mmccppuu==cpu-type
5635 This is identical to specifying both --mmaarrcchh and --mmttuunnee.
5636
5637 --mmiippss11
5638 Issue instructions from level 1 of the MIPS ISA. This is the
5639 default. rr33000000 is the default cpu-type at this ISA level.
5640
5641 --mmiippss22
5642 Issue instructions from level 2 of the MIPS ISA (branch likely,
5643 square root instructions). rr66000000 is the default cpu-type at this
5644 ISA level.
5645
5646 --mmiippss33
5647 Issue instructions from level 3 of the MIPS ISA (64-bit instruc‐
5648 tions). rr44000000 is the default cpu-type at this ISA level.
5649
5650 --mmiippss44
5651 Issue instructions from level 4 of the MIPS ISA (conditional move,
5652 prefetch, enhanced FPU instructions). rr88000000 is the default cpu-
5653 type at this ISA level.
5654
5655 --mmffpp3322
5656 Assume that 32 32-bit floating point registers are available. This
5657 is the default.
5658
5659 --mmffpp6644
5660 Assume that 32 64-bit floating point registers are available. This
5661 is the default when the --mmiippss33 option is used.
5662
5663 --mmffuusseedd--mmaadddd
5664 --mmnnoo--ffuusseedd--mmaadddd
5665 Generate code that uses (does not use) the floating point multiply
5666 and accumulate instructions, when they are available. These
5667 instructions are generated by default if they are available, but
5668 this may be undesirable if the extra precision causes problems or
5669 on certain chips in the mode where denormals are rounded to zero
5670 where denormals generated by multiply and accumulate instructions
5671 cause exceptions anyway.
5672
5673 --mmggpp3322
5674 Assume that 32 32-bit general purpose registers are available.
5675 This is the default.
5676
5677 --mmggpp6644
5678 Assume that 32 64-bit general purpose registers are available.
5679 This is the default when the --mmiippss33 option is used.
5680
5681 --mmiinntt6644
5682 Force int and long types to be 64 bits wide. See --mmlloonngg3322 for an
5683 explanation of the default, and the width of pointers.
5684
5685 --mmlloonngg6644
5686 Force long types to be 64 bits wide. See --mmlloonngg3322 for an explana‐
5687 tion of the default, and the width of pointers.
5688
5689 --mmlloonngg3322
5690 Force long, int, and pointer types to be 32 bits wide.
5691
5692 If none of --mmlloonngg3322, --mmlloonngg6644, or --mmiinntt6644 are set, the size of
5693 ints, longs, and pointers depends on the ABI and ISA chosen. For
5694 --mmaabbii==3322, and --mmaabbii==nn3322, ints and longs are 32 bits wide. For
5695 --mmaabbii==6644, ints are 32 bits, and longs are 64 bits wide. For
5696 --mmaabbii==eeaabbii and either --mmiippss11 or --mmiippss22, ints and longs are 32 bits
5697 wide. For --mmaabbii==eeaabbii and higher ISAs, ints are 32 bits, and longs
5698 are 64 bits wide. The width of pointer types is the smaller of the
5699 width of longs or the width of general purpose registers (which in
5700 turn depends on the ISA).
5701
5702 --mmaabbii==3322
5703 --mmaabbii==oo6644
5704 --mmaabbii==nn3322
5705 --mmaabbii==6644
5706 --mmaabbii==eeaabbii
5707 Generate code for the indicated ABI. The default instruction level
5708 is --mmiippss11 for 3322, --mmiippss33 for nn3322, and --mmiippss44 otherwise. Con‐
5709 versely, with --mmiippss11 or --mmiippss22, the default ABI is 3322; otherwise,
5710 the default ABI is 6644.
5711
5712 --mmmmiippss--aass
5713 Generate code for the MIPS assembler, and invoke mips-tfile to add
5714 normal debug information. This is the default for all platforms
5715 except for the OSF/1 reference platform, using the OSF/rose object
5716 format. If the either of the --ggssttaabbss or --ggssttaabbss++ switches are
5717 used, the mips-tfile program will encapsulate the stabs within MIPS
5718 ECOFF.
5719
5720 --mmggaass
5721 Generate code for the GNU assembler. This is the default on the
5722 OSF/1 reference platform, using the OSF/rose object format. Also,
5723 this is the default if the configure option ----wwiitthh--ggnnuu--aass is used.
5724
5725 --mmsspplliitt--aaddddrreesssseess
5726 --mmnnoo--sspplliitt--aaddddrreesssseess
5727 Generate code to load the high and low parts of address constants
5728 separately. This allows GCC to optimize away redundant loads of
5729 the high order bits of addresses. This optimization requires GNU
5730 as and GNU ld. This optimization is enabled by default for some
5731 embedded targets where GNU as and GNU ld are standard.
5732
5733 --mmrrnnaammeess
5734 --mmnnoo--rrnnaammeess
5735 The --mmrrnnaammeess switch says to output code using the MIPS software
5736 names for the registers, instead of the hardware names (ie, a0
5737 instead of $4). The only known assembler that supports this option
5738 is the Algorithmics assembler.
5739
5740 --mmggppoopptt
5741 --mmnnoo--ggppoopptt
5742 The --mmggppoopptt switch says to write all of the data declarations
5743 before the instructions in the text section, this allows the MIPS
5744 assembler to generate one word memory references instead of using
5745 two words for short global or static data items. This is on by
5746 default if optimization is selected.
5747
5748 --mmssttaattss
5749 --mmnnoo--ssttaattss
5750 For each non-inline function processed, the --mmssttaattss switch causes
5751 the compiler to emit one line to the standard error file to print
5752 statistics about the program (number of registers saved, stack
5753 size, etc.).
5754
5755 --mmmmeemmccppyy
5756 --mmnnoo--mmeemmccppyy
5757 The --mmmmeemmccppyy switch makes all block moves call the appropriate
5758 string function (mmeemmccppyy or bbccooppyy) instead of possibly generating
5759 inline code.
5760
5761 --mmmmiippss--ttffiillee
5762 --mmnnoo--mmiippss--ttffiillee
5763 The --mmnnoo--mmiippss--ttffiillee switch causes the compiler not postprocess the
5764 object file with the mips-tfile program, after the MIPS assembler
5765 has generated it to add debug support. If mips-tfile is not run,
5766 then no local variables will be available to the debugger. In
5767 addition, stage2 and stage3 objects will have the temporary file
5768 names passed to the assembler embedded in the object file, which
5769 means the objects will not compare the same. The --mmnnoo--mmiippss--ttffiillee
5770 switch should only be used when there are bugs in the mips-tfile
5771 program that prevents compilation.
5772
5773 --mmssoofftt--ffllooaatt
5774 Generate output containing library calls for floating point. WWaarrnn‐‐
5775 iinngg:: the requisite libraries are not part of GCC. Normally the
5776 facilities of the machine's usual C compiler are used, but this
5777 can't be done directly in cross-compilation. You must make your
5778 own arrangements to provide suitable library functions for cross-
5779 compilation.
5780
5781 --mmhhaarrdd--ffllooaatt
5782 Generate output containing floating point instructions. This is
5783 the default if you use the unmodified sources.
5784
5785 --mmaabbiiccaallllss
5786 --mmnnoo--aabbiiccaallllss
5787 Emit (or do not emit) the pseudo operations ..aabbiiccaallllss, ..ccppllooaadd, and
5788 ..ccpprreessttoorree that some System V.4 ports use for position independent
5789 code.
5790
5791 --mmlloonngg--ccaallllss
5792 --mmnnoo--lloonngg--ccaallllss
5793 Do all calls with the JJAALLRR instruction, which requires loading up a
5794 function's address into a register before the call. You need to
5795 use this switch, if you call outside of the current 512 megabyte
5796 segment to functions that are not through pointers.
5797
5798 --mmhhaallff--ppiicc
5799 --mmnnoo--hhaallff--ppiicc
5800 Put pointers to extern references into the data section and load
5801 them up, rather than put the references in the text section.
5802
5803 --mmeemmbbeeddddeedd--ppiicc
5804 --mmnnoo--eemmbbeeddddeedd--ppiicc
5805 Generate PIC code suitable for some embedded systems. All calls
5806 are made using PC relative address, and all data is addressed using
5807 the $gp register. No more than 65536 bytes of global data may be
5808 used. This requires GNU as and GNU ld which do most of the work.
5809 This currently only works on targets which use ECOFF; it does not
5810 work with ELF.
5811
5812 --mmeemmbbeeddddeedd--ddaattaa
5813 --mmnnoo--eemmbbeeddddeedd--ddaattaa
5814 Allocate variables to the read-only data section first if possible,
5815 then next in the small data section if possible, otherwise in data.
5816 This gives slightly slower code than the default, but reduces the
5817 amount of RAM required when executing, and thus may be preferred
5818 for some embedded systems.
5819
5820 --mmuunniinniitt--ccoonnsstt--iinn--rrooddaattaa
5821 --mmnnoo--uunniinniitt--ccoonnsstt--iinn--rrooddaattaa
5822 When used together with --mmeemmbbeeddddeedd--ddaattaa, it will always store
5823 uninitialized const variables in the read-only data section.
5824
5825 --mmssiinnggllee--ffllooaatt
5826 --mmddoouubbllee--ffllooaatt
5827 The --mmssiinnggllee--ffllooaatt switch tells gcc to assume that the floating
5828 point coprocessor only supports single precision operations, as on
5829 the rr44665500 chip. The --mmddoouubbllee--ffllooaatt switch permits gcc to use dou‐
5830 ble precision operations. This is the default.
5831
5832 --mmmmaadd
5833 --mmnnoo--mmaadd
5834 Permit use of the mmaadd, mmaadduu and mmuull instructions, as on the rr44665500
5835 chip.
5836
5837 --mm44665500
5838 Turns on --mmssiinnggllee--ffllooaatt, --mmmmaadd, and, at least for now, --mmccppuu==rr44665500.
5839
5840 --mmiippss1166
5841 --mmnnoo--mmiippss1166
5842 Enable 16-bit instructions.
5843
5844 --mmeennttrryy
5845 Use the entry and exit pseudo ops. This option can only be used
5846 with --mmiippss1166.
5847
5848 --EELL Compile code for the processor in little endian mode. The requi‐
5849 site libraries are assumed to exist.
5850
5851 --EEBB Compile code for the processor in big endian mode. The requisite
5852 libraries are assumed to exist.
5853
5854 --GG num
5855 Put global and static items less than or equal to num bytes into
5856 the small data or bss sections instead of the normal data or bss
5857 section. This allows the assembler to emit one word memory refer‐
5858 ence instructions based on the global pointer (gp or $28), instead
5859 of the normal two words used. By default, num is 8 when the MIPS
5860 assembler is used, and 0 when the GNU assembler is used. The --GG
5861 num switch is also passed to the assembler and linker. All modules
5862 should be compiled with the same --GG num value.
5863
5864 --nnooccpppp
5865 Tell the MIPS assembler to not run its preprocessor over user
5866 assembler files (with a ..ss suffix) when assembling them.
5867
5868 --mmffiixx77000000
5869 Pass an option to gas which will cause nops to be inserted if the
5870 read of the destination register of an mfhi or mflo instruction
5871 occurs in the following two instructions.
5872
5873 --nnoo--ccrrtt00
5874 Do not include the default crt0.
5875
5876 --mmfflluusshh--ffuunncc==func
5877 --mmnnoo--fflluusshh--ffuunncc
5878 Specifies the function to call to flush the I and D caches, or to
5879 not call any such function. If called, the function must take the
5880 same arguments as the common "_flush_func()", that is, the address
5881 of the memory range for which the cache is being flushed, the size
5882 of the memory range, and the number 3 (to flush both caches). The
5883 default depends on the target gcc was configured for, but commonly
5884 is either __fflluusshh__ffuunncc or ____ccppuu__fflluusshh.
5885
5886 These options are defined by the macro "TARGET_SWITCHES" in the machine
5887 description. The default for the options is also defined by that
5888 macro, which enables you to change the defaults.
5889
5890 Intel 386 and AMD x86-64 Options
5891
5892 These --mm options are defined for the i386 and x86-64 family of comput‐
5893 ers:
5894
5895 --mmccppuu==cpu-type
5896 Tune to cpu-type everything applicable about the generated code,
5897 except for the ABI and the set of available instructions. The
5898 choices for cpu-type are ii338866, ii448866, ii558866, ii668866, ppeennttiiuumm, ppeennttiiuumm--
5899 mmmmxx, ppeennttiiuummpprroo, ppeennttiiuumm22, ppeennttiiuumm33, ppeennttiiuumm44, kk66, kk66--22, kk66--33,
5900 aatthhlloonn, aatthhlloonn--ttbbiirrdd, aatthhlloonn--44, aatthhlloonn--xxpp and aatthhlloonn--mmpp.
5901
5902 While picking a specific cpu-type will schedule things appropri‐
5903 ately for that particular chip, the compiler will not generate any
5904 code that does not run on the i386 without the --mmaarrcchh==cpu-type
5905 option being used. ii558866 is equivalent to ppeennttiiuumm and ii668866 is
5906 equivalent to ppeennttiiuummpprroo. kk66 and aatthhlloonn are the AMD chips as
5907 opposed to the Intel ones.
5908
5909 --mmaarrcchh==cpu-type
5910 Generate instructions for the machine type cpu-type. The choices
5911 for cpu-type are the same as for --mmccppuu. Moreover, specifying
5912 --mmaarrcchh==cpu-type implies --mmccppuu==cpu-type.
5913
5914 --mm338866
5915 --mm448866
5916 --mmppeennttiiuumm
5917 --mmppeennttiiuummpprroo
5918 These options are synonyms for --mmccppuu==ii338866, --mmccppuu==ii448866, --mmccppuu==ppeenn‐‐
5919 ttiiuumm, and --mmccppuu==ppeennttiiuummpprroo respectively. These synonyms are depre‐
5920 cated.
5921
5922 --mmffppmmaatthh==unit
5923 generate floating point arithmetics for selected unit unit. the
5924 choices for unit are:
5925
5926 338877 Use the standard 387 floating point coprocessor present major‐
5927 ity of chips and emulated otherwise. Code compiled with this
5928 option will run almost everywhere. The temporary results are
5929 computed in 80bit precesion instead of precision specified by
5930 the type resulting in slightly different results compared to
5931 most of other chips. See --ffffllooaatt--ssttoorree for more detailed
5932 description.
5933
5934 This is the default choice for i386 compiler.
5935
5936 ssssee Use scalar floating point instructions present in the SSE
5937 instruction set. This instruction set is supported by Pentium3
5938 and newer chips, in the AMD line by Athlon-4, Athlon-xp and
5939 Athlon-mp chips. The earlier version of SSE instruction set
5940 supports only single precision arithmetics, thus the double and
5941 extended precision arithmetics is still done using 387. Later
5942 version, present only in Pentium4 and the future AMD x86-64
5943 chips supports double precision arithmetics too.
5944
5945 For i387 you need to use --mmaarrcchh==cpu-type, --mmssssee or --mmssssee22
5946 switches to enable SSE extensions and make this option effec‐
5947 tive. For x86-64 compiler, these extensions are enabled by
5948 default.
5949
5950 The resulting code should be considerably faster in majority of
5951 cases and avoid the numerical instability problems of 387 code,
5952 but may break some existing code that expects temporaries to be
5953 80bit.
5954
5955 This is the default choice for x86-64 compiler.
5956
5957 ssssee,,338877
5958 Attempt to utilize both instruction sets at once. This effec‐
5959 tivly double the amount of available registers and on chips
5960 with separate execution units for 387 and SSE the execution
5961 resources too. Use this option with care, as it is still
5962 experimental, because gcc register allocator does not model
5963 separate functional units well resulting in instable perfor‐
5964 mance.
5965
5966 --mmaassmm==dialect
5967 Output asm instructions using selected dialect. Supported choices
5968 are iinntteell or aatttt (the default one).
5969
5970 --mmiieeeeee--ffpp
5971 --mmnnoo--iieeeeee--ffpp
5972 Control whether or not the compiler uses IEEE floating point com‐
5973 parisons. These handle correctly the case where the result of a
5974 comparison is unordered.
5975
5976 --mmssoofftt--ffllooaatt
5977 Generate output containing library calls for floating point. WWaarrnn‐‐
5978 iinngg:: the requisite libraries are not part of GCC. Normally the
5979 facilities of the machine's usual C compiler are used, but this
5980 can't be done directly in cross-compilation. You must make your
5981 own arrangements to provide suitable library functions for cross-
5982 compilation.
5983
5984 On machines where a function returns floating point results in the
5985 80387 register stack, some floating point opcodes may be emitted
5986 even if --mmssoofftt--ffllooaatt is used.
5987
5988 --mmnnoo--ffpp--rreett--iinn--338877
5989 Do not use the FPU registers for return values of functions.
5990
5991 The usual calling convention has functions return values of types
5992 "float" and "double" in an FPU register, even if there is no FPU.
5993 The idea is that the operating system should emulate an FPU.
5994
5995 The option --mmnnoo--ffpp--rreett--iinn--338877 causes such values to be returned in
5996 ordinary CPU registers instead.
5997
5998 --mmnnoo--ffaannccyy--mmaatthh--338877
5999 Some 387 emulators do not support the "sin", "cos" and "sqrt"
6000 instructions for the 387. Specify this option to avoid generating
6001 those instructions. This option is the default on FreeBSD, OpenBSD
6002 and NetBSD. This option is overridden when --mmaarrcchh indicates that
6003 the target cpu will always have an FPU and so the instruction will
6004 not need emulation. As of revision 2.6.1, these instructions are
6005 not generated unless you also use the --ffuunnssaaffee--mmaatthh--ooppttiimmiizzaattiioonnss
6006 switch.
6007
6008 --mmaalliiggnn--ddoouubbllee
6009 --mmnnoo--aalliiggnn--ddoouubbllee
6010 Control whether GCC aligns "double", "long double", and "long long"
6011 variables on a two word boundary or a one word boundary. Aligning
6012 "double" variables on a two word boundary will produce code that
6013 runs somewhat faster on a PPeennttiiuumm at the expense of more memory.
6014
6015 WWaarrnniinngg:: if you use the --mmaalliiggnn--ddoouubbllee switch, structures contain‐
6016 ing the above types will be aligned differently than the published
6017 application binary interface specifications for the 386 and will
6018 not be binary compatible with structures in code compiled without
6019 that switch.
6020
6021 --mm112288bbiitt--lloonngg--ddoouubbllee
6022 Control the size of "long double" type. i386 application binary
6023 interface specify the size to be 12 bytes, while modern architec‐
6024 tures (Pentium and newer) prefer "long double" aligned to 8 or 16
6025 byte boundary. This is impossible to reach with 12 byte long dou‐
6026 bles in the array accesses.
6027
6028 WWaarrnniinngg:: if you use the --mm112288bbiitt--lloonngg--ddoouubbllee switch, the structures
6029 and arrays containing "long double" will change their size as well
6030 as function calling convention for function taking "long double"
6031 will be modified.
6032
6033 --mm9966bbiitt--lloonngg--ddoouubbllee
6034 Set the size of "long double" to 96 bits as required by the i386
6035 application binary interface. This is the default.
6036
6037 --mmssvvrr33--sshhlliibb
6038 --mmnnoo--ssvvrr33--sshhlliibb
6039 Control whether GCC places uninitialized local variables into the
6040 "bss" or "data" segments. --mmssvvrr33--sshhlliibb places them into "bss".
6041 These options are meaningful only on System V Release 3.
6042
6043 --mmrrttdd
6044 Use a different function-calling convention, in which functions
6045 that take a fixed number of arguments return with the "ret" num
6046 instruction, which pops their arguments while returning. This
6047 saves one instruction in the caller since there is no need to pop
6048 the arguments there.
6049
6050 You can specify that an individual function is called with this
6051 calling sequence with the function attribute ssttddccaallll. You can also
6052 override the --mmrrttdd option by using the function attribute ccddeeccll.
6053
6054 WWaarrnniinngg:: this calling convention is incompatible with the one nor‐
6055 mally used on Unix, so you cannot use it if you need to call
6056 libraries compiled with the Unix compiler.
6057
6058 Also, you must provide function prototypes for all functions that
6059 take variable numbers of arguments (including "printf"); otherwise
6060 incorrect code will be generated for calls to those functions.
6061
6062 In addition, seriously incorrect code will result if you call a
6063 function with too many arguments. (Normally, extra arguments are
6064 harmlessly ignored.)
6065
6066 --mmrreeggppaarrmm==num
6067 Control how many registers are used to pass integer arguments. By
6068 default, no registers are used to pass arguments, and at most 3
6069 registers can be used. You can control this behavior for a spe‐
6070 cific function by using the function attribute rreeggppaarrmm.
6071
6072 WWaarrnniinngg:: if you use this switch, and num is nonzero, then you must
6073 build all modules with the same value, including any libraries.
6074 This includes the system libraries and startup modules.
6075
6076 --mmpprreeffeerrrreedd--ssttaacckk--bboouunnddaarryy==num
6077 Attempt to keep the stack boundary aligned to a 2 raised to num
6078 byte boundary. If --mmpprreeffeerrrreedd--ssttaacckk--bboouunnddaarryy is not specified, the
6079 default is 4 (16 bytes or 128 bits), except when optimizing for
6080 code size (--OOss), in which case the default is the minimum correct
6081 alignment (4 bytes for x86, and 8 bytes for x86-64).
6082
6083 On Pentium and PentiumPro, "double" and "long double" values should
6084 be aligned to an 8 byte boundary (see --mmaalliiggnn--ddoouubbllee) or suffer
6085 significant run time performance penalties. On Pentium III, the
6086 Streaming SIMD Extension (SSE) data type "__m128" suffers similar
6087 penalties if it is not 16 byte aligned.
6088
6089 To ensure proper alignment of this values on the stack, the stack
6090 boundary must be as aligned as that required by any value stored on
6091 the stack. Further, every function must be generated such that it
6092 keeps the stack aligned. Thus calling a function compiled with a
6093 higher preferred stack boundary from a function compiled with a
6094 lower preferred stack boundary will most likely misalign the stack.
6095 It is recommended that libraries that use callbacks always use the
6096 default setting.
6097
6098 This extra alignment does consume extra stack space, and generally
6099 increases code size. Code that is sensitive to stack space usage,
6100 such as embedded systems and operating system kernels, may want to
6101 reduce the preferred alignment to --mmpprreeffeerrrreedd--ssttaacckk--bboouunnddaarryy==22.
6102
6103 --mmmmmmxx
6104 --mmnnoo--mmmmxx
6105 --mmssssee
6106 --mmnnoo--ssssee
6107 --mmssssee22
6108 --mmnnoo--ssssee22
6109 --mm33ddnnooww
6110 --mmnnoo--33ddnnooww
6111 These switches enable or disable the use of built-in functions that
6112 allow direct access to the MMX, SSE and 3Dnow extensions of the
6113 instruction set.
6114
6115 To have SSE/SSE2 instructions generated automatically from float‐
6116 ing-point code, see --mmffppmmaatthh==ssssee.
6117
6118 --mmppuusshh--aarrggss
6119 --mmnnoo--ppuusshh--aarrggss
6120 Use PUSH operations to store outgoing parameters. This method is
6121 shorter and usually equally fast as method using SUB/MOV operations
6122 and is enabled by default. In some cases disabling it may improve
6123 performance because of improved scheduling and reduced dependen‐
6124 cies.
6125
6126 --mmaaccccuummuullaattee--oouuttggooiinngg--aarrggss
6127 If enabled, the maximum amount of space required for outgoing argu‐
6128 ments will be computed in the function prologue. This is faster on
6129 most modern CPUs because of reduced dependencies, improved schedul‐
6130 ing and reduced stack usage when preferred stack boundary is not
6131 equal to 2. The drawback is a notable increase in code size. This
6132 switch implies --mmnnoo--ppuusshh--aarrggss.
6133
6134 --mmtthhrreeaaddss
6135 Support thread-safe exception handling on MMiinnggww3322. Code that
6136 relies on thread-safe exception handling must compile and link all
6137 code with the --mmtthhrreeaaddss option. When compiling, --mmtthhrreeaaddss defines
6138 --DD__MMTT; when linking, it links in a special thread helper library
6139 --llmmiinnggwwtthhrrdd which cleans up per thread exception handling data.
6140
6141 --mmnnoo--aalliiggnn--ssttrriinnggooppss
6142 Do not align destination of inlined string operations. This switch
6143 reduces code size and improves performance in case the destination
6144 is already aligned, but gcc don't know about it.
6145
6146 --mmiinnlliinnee--aallll--ssttrriinnggooppss
6147 By default GCC inlines string operations only when destination is
6148 known to be aligned at least to 4 byte boundary. This enables more
6149 inlining, increase code size, but may improve performance of code
6150 that depends on fast memcpy, strlen and memset for short lengths.
6151
6152 --mmoommiitt--lleeaaff--ffrraammee--ppooiinntteerr
6153 Don't keep the frame pointer in a register for leaf functions.
6154 This avoids the instructions to save, set up and restore frame
6155 pointers and makes an extra register available in leaf functions.
6156 The option --ffoommiitt--ffrraammee--ppooiinntteerr removes the frame pointer for all
6157 functions which might make debugging harder.
6158
6159 These --mm switches are supported in addition to the above on AMD x86-64
6160 processors in 64-bit environments.
6161
6162 --mm3322
6163 --mm6644
6164 Generate code for a 32-bit or 64-bit environment. The 32-bit envi‐
6165 ronment sets int, long and pointer to 32 bits and generates code
6166 that runs on any i386 system. The 64-bit environment sets int to
6167 32 bits and long and pointer to 64 bits and generates code for
6168 AMD's x86-64 architecture.
6169
6170 --mmnnoo--rreedd--zzoonnee
6171 Do not use a so called red zone for x86-64 code. The red zone is
6172 mandated by the x86-64 ABI, it is a 128-byte area beyond the loca‐
6173 tion of the stack pointer that will not be modified by signal or
6174 interrupt handlers and therefore can be used for temporary data
6175 without adjusting the stack pointer. The flag --mmnnoo--rreedd--zzoonnee dis‐
6176 ables this red zone.
6177
6178 --mmccmmooddeell==ssmmaallll
6179 Generate code for the small code model: the program and its symbols
6180 must be linked in the lower 2 GB of the address space. Pointers
6181 are 64 bits. Programs can be statically or dynamically linked.
6182 This is the default code model.
6183
6184 --mmccmmooddeell==kkeerrnneell
6185 Generate code for the kernel code model. The kernel runs in the
6186 negative 2 GB of the address space. This model has to be used for
6187 Linux kernel code.
6188
6189 --mmccmmooddeell==mmeeddiiuumm
6190 Generate code for the medium model: The program is linked in the
6191 lower 2 GB of the address space but symbols can be located anywhere
6192 in the address space. Programs can be statically or dynamically
6193 linked, but building of shared libraries are not supported with the
6194 medium model.
6195
6196 --mmccmmooddeell==llaarrggee
6197 Generate code for the large model: This model makes no assumptions
6198 about addresses and sizes of sections. Currently GCC does not
6199 implement this model.
6200
6201 HPPA Options
6202
6203 These --mm options are defined for the HPPA family of computers:
6204
6205 --mmaarrcchh==architecture-type
6206 Generate code for the specified architecture. The choices for
6207 architecture-type are 11..00 for PA 1.0, 11..11 for PA 1.1, and 22..00 for
6208 PA 2.0 processors. Refer to /usr/lib/sched.models on an HP-UX sys‐
6209 tem to determine the proper architecture option for your machine.
6210 Code compiled for lower numbered architectures will run on higher
6211 numbered architectures, but not the other way around.
6212
6213 PA 2.0 support currently requires gas snapshot 19990413 or later.
6214 The next release of binutils (current is 2.9.1) will probably con‐
6215 tain PA 2.0 support.
6216
6217 --mmppaa--rriisscc--11--00
6218 --mmppaa--rriisscc--11--11
6219 --mmppaa--rriisscc--22--00
6220 Synonyms for --mmaarrcchh==11..00, --mmaarrcchh==11..11, and --mmaarrcchh==22..00 respectively.
6221
6222 --mmbbiigg--sswwiittcchh
6223 Generate code suitable for big switch tables. Use this option only
6224 if the assembler/linker complain about out of range branches within
6225 a switch table.
6226
6227 --mmjjuummpp--iinn--ddeellaayy
6228 Fill delay slots of function calls with unconditional jump instruc‐
6229 tions by modifying the return pointer for the function call to be
6230 the target of the conditional jump.
6231
6232 --mmddiissaabbllee--ffpprreeggss
6233 Prevent floating point registers from being used in any manner.
6234 This is necessary for compiling kernels which perform lazy context
6235 switching of floating point registers. If you use this option and
6236 attempt to perform floating point operations, the compiler will
6237 abort.
6238
6239 --mmddiissaabbllee--iinnddeexxiinngg
6240 Prevent the compiler from using indexing address modes. This
6241 avoids some rather obscure problems when compiling MIG generated
6242 code under MACH.
6243
6244 --mmnnoo--ssppaaccee--rreeggss
6245 Generate code that assumes the target has no space registers. This
6246 allows GCC to generate faster indirect calls and use unscaled index
6247 address modes.
6248
6249 Such code is suitable for level 0 PA systems and kernels.
6250
6251 --mmffaasstt--iinnddiirreecctt--ccaallllss
6252 Generate code that assumes calls never cross space boundaries.
6253 This allows GCC to emit code which performs faster indirect calls.
6254
6255 This option will not work in the presence of shared libraries or
6256 nested functions.
6257
6258 --mmlloonngg--llooaadd--ssttoorree
6259 Generate 3-instruction load and store sequences as sometimes
6260 required by the HP-UX 10 linker. This is equivalent to the ++kk
6261 option to the HP compilers.
6262
6263 --mmppoorrttaabbllee--rruunnttiimmee
6264 Use the portable calling conventions proposed by HP for ELF sys‐
6265 tems.
6266
6267 --mmggaass
6268 Enable the use of assembler directives only GAS understands.
6269
6270 --mmsscchheedduullee==cpu-type
6271 Schedule code according to the constraints for the machine type
6272 cpu-type. The choices for cpu-type are 770000 77110000, 77110000LLCC, 77220000, and
6273 88000000. Refer to /usr/lib/sched.models on an HP-UX system to deter‐
6274 mine the proper scheduling option for your machine.
6275
6276 --mmlliinnkkeerr--oopptt
6277 Enable the optimization pass in the HPUX linker. Note this makes
6278 symbolic debugging impossible. It also triggers a bug in the HPUX
6279 8 and HPUX 9 linkers in which they give bogus error messages when
6280 linking some programs.
6281
6282 --mmssoofftt--ffllooaatt
6283 Generate output containing library calls for floating point. WWaarrnn‐‐
6284 iinngg:: the requisite libraries are not available for all HPPA tar‐
6285 gets. Normally the facilities of the machine's usual C compiler
6286 are used, but this cannot be done directly in cross-compilation.
6287 You must make your own arrangements to provide suitable library
6288 functions for cross-compilation. The embedded target hhppppaa11..11--**--pprroo
6289 does provide software floating point support.
6290
6291 --mmssoofftt--ffllooaatt changes the calling convention in the output file;
6292 therefore, it is only useful if you compile all of a program with
6293 this option. In particular, you need to compile libgcc.a, the
6294 library that comes with GCC, with --mmssoofftt--ffllooaatt in order for this to
6295 work.
6296
6297 Intel 960 Options
6298
6299 These --mm options are defined for the Intel 960 implementations:
6300
6301 --mmcpu-type
6302 Assume the defaults for the machine type cpu-type for some of the
6303 other options, including instruction scheduling, floating point
6304 support, and addressing modes. The choices for cpu-type are kkaa,
6305 kkbb, mmcc, ccaa, ccff, ssaa, and ssbb. The default is kkbb.
6306
6307 --mmnnuummeerriiccss
6308 --mmssoofftt--ffllooaatt
6309 The --mmnnuummeerriiccss option indicates that the processor does support
6310 floating-point instructions. The --mmssoofftt--ffllooaatt option indicates
6311 that floating-point support should not be assumed.
6312
6313 --mmlleeaaff--pprroocceedduurreess
6314 --mmnnoo--lleeaaff--pprroocceedduurreess
6315 Do (or do not) attempt to alter leaf procedures to be callable with
6316 the "bal" instruction as well as "call". This will result in more
6317 efficient code for explicit calls when the "bal" instruction can be
6318 substituted by the assembler or linker, but less efficient code in
6319 other cases, such as calls via function pointers, or using a linker
6320 that doesn't support this optimization.
6321
6322 --mmttaaiill--ccaallll
6323 --mmnnoo--ttaaiill--ccaallll
6324 Do (or do not) make additional attempts (beyond those of the
6325 machine-independent portions of the compiler) to optimize tail-
6326 recursive calls into branches. You may not want to do this because
6327 the detection of cases where this is not valid is not totally com‐
6328 plete. The default is --mmnnoo--ttaaiill--ccaallll.
6329
6330 --mmccoommpplleexx--aaddddrr
6331 --mmnnoo--ccoommpplleexx--aaddddrr
6332 Assume (or do not assume) that the use of a complex addressing mode
6333 is a win on this implementation of the i960. Complex addressing
6334 modes may not be worthwhile on the K-series, but they definitely
6335 are on the C-series. The default is currently --mmccoommpplleexx--aaddddrr for
6336 all processors except the CB and CC.
6337
6338 --mmccooddee--aalliiggnn
6339 --mmnnoo--ccooddee--aalliiggnn
6340 Align code to 8-byte boundaries for faster fetching (or don't
6341 bother). Currently turned on by default for C-series implementa‐
6342 tions only.
6343
6344 --mmiicc--ccoommppaatt
6345 --mmiicc22..00--ccoommppaatt
6346 --mmiicc33..00--ccoommppaatt
6347 Enable compatibility with iC960 v2.0 or v3.0.
6348
6349 --mmaassmm--ccoommppaatt
6350 --mmiinntteell--aassmm
6351 Enable compatibility with the iC960 assembler.
6352
6353 --mmssttrriicctt--aalliiggnn
6354 --mmnnoo--ssttrriicctt--aalliiggnn
6355 Do not permit (do permit) unaligned accesses.
6356
6357 --mmoolldd--aalliiggnn
6358 Enable structure-alignment compatibility with Intel's gcc release
6359 version 1.3 (based on gcc 1.37). This option implies --mmssttrriicctt--
6360 aalliiggnn.
6361
6362 --mmlloonngg--ddoouubbllee--6644
6363 Implement type lloonngg ddoouubbllee as 64-bit floating point numbers. With‐
6364 out the option lloonngg ddoouubbllee is implemented by 80-bit floating point
6365 numbers. The only reason we have it because there is no 128-bit
6366 lloonngg ddoouubbllee support in ffpp--bbiitt..cc yet. So it is only useful for peo‐
6367 ple using soft-float targets. Otherwise, we should recommend
6368 against use of it.
6369
6370 DEC Alpha Options
6371
6372 These --mm options are defined for the DEC Alpha implementations:
6373
6374 --mmnnoo--ssoofftt--ffllooaatt
6375 --mmssoofftt--ffllooaatt
6376 Use (do not use) the hardware floating-point instructions for
6377 floating-point operations. When --mmssoofftt--ffllooaatt is specified, func‐
6378 tions in libgcc.a will be used to perform floating-point opera‐
6379 tions. Unless they are replaced by routines that emulate the
6380 floating-point operations, or compiled in such a way as to call
6381 such emulations routines, these routines will issue floating-point
6382 operations. If you are compiling for an Alpha without floating-
6383 point operations, you must ensure that the library is built so as
6384 not to call them.
6385
6386 Note that Alpha implementations without floating-point operations
6387 are required to have floating-point registers.
6388
6389 --mmffpp--rreegg
6390 --mmnnoo--ffpp--rreeggss
6391 Generate code that uses (does not use) the floating-point register
6392 set. --mmnnoo--ffpp--rreeggss implies --mmssoofftt--ffllooaatt. If the floating-point
6393 register set is not used, floating point operands are passed in
6394 integer registers as if they were integers and floating-point
6395 results are passed in "$0" instead of "$f0". This is a non-stan‐
6396 dard calling sequence, so any function with a floating-point argu‐
6397 ment or return value called by code compiled with --mmnnoo--ffpp--rreeggss must
6398 also be compiled with that option.
6399
6400 A typical use of this option is building a kernel that does not
6401 use, and hence need not save and restore, any floating-point regis‐
6402 ters.
6403
6404 --mmiieeeeee
6405 The Alpha architecture implements floating-point hardware optimized
6406 for maximum performance. It is mostly compliant with the IEEE
6407 floating point standard. However, for full compliance, software
6408 assistance is required. This option generates code fully IEEE com‐
6409 pliant code except that the inexact-flag is not maintained (see
6410 below). If this option is turned on, the preprocessor macro
6411 "_IEEE_FP" is defined during compilation. The resulting code is
6412 less efficient but is able to correctly support denormalized num‐
6413 bers and exceptional IEEE values such as not-a-number and
6414 plus/minus infinity. Other Alpha compilers call this option
6415 --iieeeeee__wwiitthh__nnoo__iinneexxaacctt.
6416
6417 --mmiieeeeee--wwiitthh--iinneexxaacctt
6418 This is like --mmiieeeeee except the generated code also maintains the
6419 IEEE inexact-flag. Turning on this option causes the generated
6420 code to implement fully-compliant IEEE math. In addition to
6421 "_IEEE_FP", "_IEEE_FP_EXACT" is defined as a preprocessor macro.
6422 On some Alpha implementations the resulting code may execute sig‐
6423 nificantly slower than the code generated by default. Since there
6424 is very little code that depends on the inexact-flag, you should
6425 normally not specify this option. Other Alpha compilers call this
6426 option --iieeeeee__wwiitthh__iinneexxaacctt.
6427
6428 --mmffpp--ttrraapp--mmooddee==trap-mode
6429 This option controls what floating-point related traps are enabled.
6430 Other Alpha compilers call this option --ffppttmm trap-mode. The trap
6431 mode can be set to one of four values:
6432
6433 nn This is the default (normal) setting. The only traps that are
6434 enabled are the ones that cannot be disabled in software (e.g.,
6435 division by zero trap).
6436
6437 uu In addition to the traps enabled by nn, underflow traps are
6438 enabled as well.
6439
6440 ssuu Like ssuu, but the instructions are marked to be safe for soft‐
6441 ware completion (see Alpha architecture manual for details).
6442
6443 ssuuii Like ssuu, but inexact traps are enabled as well.
6444
6445 --mmffpp--rroouunnddiinngg--mmooddee==rounding-mode
6446 Selects the IEEE rounding mode. Other Alpha compilers call this
6447 option --ffpprrmm rounding-mode. The rounding-mode can be one of:
6448
6449 nn Normal IEEE rounding mode. Floating point numbers are rounded
6450 towards the nearest machine number or towards the even machine
6451 number in case of a tie.
6452
6453 mm Round towards minus infinity.
6454
6455 cc Chopped rounding mode. Floating point numbers are rounded
6456 towards zero.
6457
6458 dd Dynamic rounding mode. A field in the floating point control
6459 register (fpcr, see Alpha architecture reference manual) con‐
6460 trols the rounding mode in effect. The C library initializes
6461 this register for rounding towards plus infinity. Thus, unless
6462 your program modifies the fpcr, dd corresponds to round towards
6463 plus infinity.
6464
6465 --mmttrraapp--pprreecciissiioonn==trap-precision
6466 In the Alpha architecture, floating point traps are imprecise.
6467 This means without software assistance it is impossible to recover
6468 from a floating trap and program execution normally needs to be
6469 terminated. GCC can generate code that can assist operating system
6470 trap handlers in determining the exact location that caused a
6471 floating point trap. Depending on the requirements of an applica‐
6472 tion, different levels of precisions can be selected:
6473
6474 pp Program precision. This option is the default and means a trap
6475 handler can only identify which program caused a floating point
6476 exception.
6477
6478 ff Function precision. The trap handler can determine the func‐
6479 tion that caused a floating point exception.
6480
6481 ii Instruction precision. The trap handler can determine the
6482 exact instruction that caused a floating point exception.
6483
6484 Other Alpha compilers provide the equivalent options called
6485 --ssccooppee__ssaaffee and --rreessuummppttiioonn__ssaaffee.
6486
6487 --mmiieeeeee--ccoonnffoorrmmaanntt
6488 This option marks the generated code as IEEE conformant. You must
6489 not use this option unless you also specify --mmttrraapp--pprreecciissiioonn==ii and
6490 either --mmffpp--ttrraapp--mmooddee==ssuu or --mmffpp--ttrraapp--mmooddee==ssuuii. Its only effect is
6491 to emit the line ..eeffllaagg 4488 in the function prologue of the gener‐
6492 ated assembly file. Under DEC Unix, this has the effect that IEEE-
6493 conformant math library routines will be linked in.
6494
6495 --mmbbuuiilldd--ccoonnssttaannttss
6496 Normally GCC examines a 32- or 64-bit integer constant to see if it
6497 can construct it from smaller constants in two or three instruc‐
6498 tions. If it cannot, it will output the constant as a literal and
6499 generate code to load it from the data segment at runtime.
6500
6501 Use this option to require GCC to construct all integer constants
6502 using code, even if it takes more instructions (the maximum is
6503 six).
6504
6505 You would typically use this option to build a shared library
6506 dynamic loader. Itself a shared library, it must relocate itself
6507 in memory before it can find the variables and constants in its own
6508 data segment.
6509
6510 --mmaallpphhaa--aass
6511 --mmggaass
6512 Select whether to generate code to be assembled by the vendor-sup‐
6513 plied assembler (--mmaallpphhaa--aass) or by the GNU assembler --mmggaass.
6514
6515 --mmbbwwxx
6516 --mmnnoo--bbwwxx
6517 --mmcciixx
6518 --mmnnoo--cciixx
6519 --mmffiixx
6520 --mmnnoo--ffiixx
6521 --mmmmaaxx
6522 --mmnnoo--mmaaxx
6523 Indicate whether GCC should generate code to use the optional BWX,
6524 CIX, FIX and MAX instruction sets. The default is to use the
6525 instruction sets supported by the CPU type specified via --mmccppuu==
6526 option or that of the CPU on which GCC was built if none was speci‐
6527 fied.
6528
6529 --mmffllooaatt--vvaaxx
6530 --mmffllooaatt--iieeeeee
6531 Generate code that uses (does not use) VAX F and G floating point
6532 arithmetic instead of IEEE single and double precision.
6533
6534 --mmeexxpplliicciitt--rreellooccss
6535 --mmnnoo--eexxpplliicciitt--rreellooccss
6536 Older Alpha assemblers provided no way to generate symbol reloca‐
6537 tions except via assembler macros. Use of these macros does not
6538 allow optimial instruction scheduling. GNU binutils as of version
6539 2.12 supports a new syntax that allows the compiler to explicitly
6540 mark which relocations should apply to which instructions. This
6541 option is mostly useful for debugging, as GCC detects the capabili‐
6542 ties of the assembler when it is built and sets the default accord‐
6543 ingly.
6544
6545 --mmssmmaallll--ddaattaa
6546 --mmllaarrggee--ddaattaa
6547 When --mmeexxpplliicciitt--rreellooccss is in effect, static data is accessed via
6548 gp-relative relocations. When --mmssmmaallll--ddaattaa is used, objects 8
6549 bytes long or smaller are placed in a small data area (the ".sdata"
6550 and ".sbss" sections) and are accessed via 16-bit relocations off
6551 of the "$gp" register. This limits the size of the small data area
6552 to 64KB, but allows the variables to be directly accessed via a
6553 single instruction.
6554
6555 The default is --mmllaarrggee--ddaattaa. With this option the data area is
6556 limited to just below 2GB. Programs that require more than 2GB of
6557 data must use "malloc" or "mmap" to allocate the data in the heap
6558 instead of in the program's data segment.
6559
6560 When generating code for shared libraries, --ffppiicc implies --mmssmmaallll--
6561 ddaattaa and --ffPPIICC implies --mmllaarrggee--ddaattaa.
6562
6563 --mmccppuu==cpu_type
6564 Set the instruction set and instruction scheduling parameters for
6565 machine type cpu_type. You can specify either the EEVV style name or
6566 the corresponding chip number. GCC supports scheduling parameters
6567 for the EV4, EV5 and EV6 family of processors and will choose the
6568 default values for the instruction set from the processor you spec‐
6569 ify. If you do not specify a processor type, GCC will default to
6570 the processor on which the compiler was built.
6571
6572 Supported values for cpu_type are
6573
6574 eevv44
6575 eevv4455
6576 2211006644
6577 Schedules as an EV4 and has no instruction set extensions.
6578
6579 eevv55
6580 2211116644
6581 Schedules as an EV5 and has no instruction set extensions.
6582
6583 eevv5566
6584 2211116644aa
6585 Schedules as an EV5 and supports the BWX extension.
6586
6587 ppccaa5566
6588 2211116644ppcc
6589 2211116644PPCC
6590 Schedules as an EV5 and supports the BWX and MAX extensions.
6591
6592 eevv66
6593 2211226644
6594 Schedules as an EV6 and supports the BWX, FIX, and MAX exten‐
6595 sions.
6596
6597 eevv6677
6598 2211226644aa
6599 Schedules as an EV6 and supports the BWX, CIX, FIX, and MAX
6600 extensions.
6601
6602 --mmttuunnee==cpu_type
6603 Set only the instruction scheduling parameters for machine type
6604 cpu_type. The instruction set is not changed.
6605
6606 --mmmmeemmoorryy--llaatteennccyy==time
6607 Sets the latency the scheduler should assume for typical memory
6608 references as seen by the application. This number is highly
6609 dependent on the memory access patterns used by the application and
6610 the size of the external cache on the machine.
6611
6612 Valid options for time are
6613
6614 number
6615 A decimal number representing clock cycles.
6616
6617 LL11
6618 LL22
6619 LL33
6620 mmaaiinn
6621 The compiler contains estimates of the number of clock cycles
6622 for ``typical'' EV4 & EV5 hardware for the Level 1, 2 & 3
6623 caches (also called Dcache, Scache, and Bcache), as well as to
6624 main memory. Note that L3 is only valid for EV5.
6625
6626 DEC Alpha/VMS Options
6627
6628 These --mm options are defined for the DEC Alpha/VMS implementations:
6629
6630 --mmvvmmss--rreettuurrnn--ccooddeess
6631 Return VMS condition codes from main. The default is to return
6632 POSIX style condition (e.g. error) codes.
6633
6634 Clipper Options
6635
6636 These --mm options are defined for the Clipper implementations:
6637
6638 --mmcc330000
6639 Produce code for a C300 Clipper processor. This is the default.
6640
6641 --mmcc440000
6642 Produce code for a C400 Clipper processor, i.e. use floating point
6643 registers f8--f15.
6644
6645 H8/300 Options
6646
6647 These --mm options are defined for the H8/300 implementations:
6648
6649 --mmrreellaaxx
6650 Shorten some address references at link time, when possible; uses
6651 the linker option --rreellaaxx.
6652
6653 --mmhh Generate code for the H8/300H.
6654
6655 --mmss Generate code for the H8/S.
6656
6657 --mmss22660000
6658 Generate code for the H8/S2600. This switch must be used with --mmss.
6659
6660 --mmiinntt3322
6661 Make "int" data 32 bits by default.
6662
6663 --mmaalliiggnn--330000
6664 On the H8/300H and H8/S, use the same alignment rules as for the
6665 H8/300. The default for the H8/300H and H8/S is to align longs and
6666 floats on 4 byte boundaries. --mmaalliiggnn--330000 causes them to be aligned
6667 on 2 byte boundaries. This option has no effect on the H8/300.
6668
6669 SH Options
6670
6671 These --mm options are defined for the SH implementations:
6672
6673 --mm11 Generate code for the SH1.
6674
6675 --mm22 Generate code for the SH2.
6676
6677 --mm33 Generate code for the SH3.
6678
6679 --mm33ee
6680 Generate code for the SH3e.
6681
6682 --mm44--nnooffppuu
6683 Generate code for the SH4 without a floating-point unit.
6684
6685 --mm44--ssiinnggllee--oonnllyy
6686 Generate code for the SH4 with a floating-point unit that only sup‐
6687 ports single-precision arithmetic.
6688
6689 --mm44--ssiinnggllee
6690 Generate code for the SH4 assuming the floating-point unit is in
6691 single-precision mode by default.
6692
6693 --mm44 Generate code for the SH4.
6694
6695 --mmbb Compile code for the processor in big endian mode.
6696
6697 --mmll Compile code for the processor in little endian mode.
6698
6699 --mmddaalliiggnn
6700 Align doubles at 64-bit boundaries. Note that this changes the
6701 calling conventions, and thus some functions from the standard C
6702 library will not work unless you recompile it first with --mmddaalliiggnn.
6703
6704 --mmrreellaaxx
6705 Shorten some address references at link time, when possible; uses
6706 the linker option --rreellaaxx.
6707
6708 --mmbbiiggttaabbllee
6709 Use 32-bit offsets in "switch" tables. The default is to use
6710 16-bit offsets.
6711
6712 --mmffmmoovvdd
6713 Enable the use of the instruction "fmovd".
6714
6715 --mmhhiittaacchhii
6716 Comply with the calling conventions defined by Hitachi.
6717
6718 --mmnnoommaaccssaavvee
6719 Mark the "MAC" register as call-clobbered, even if --mmhhiittaacchhii is
6720 given.
6721
6722 --mmiieeeeee
6723 Increase IEEE-compliance of floating-point code.
6724
6725 --mmiissiizzee
6726 Dump instruction size and location in the assembly code.
6727
6728 --mmppaaddssttrruucctt
6729 This option is deprecated. It pads structures to multiple of 4
6730 bytes, which is incompatible with the SH ABI.
6731
6732 --mmssppaaccee
6733 Optimize for space instead of speed. Implied by --OOss.
6734
6735 --mmpprreeffeerrggoott
6736 When generating position-independent code, emit function calls
6737 using the Global Offset Table instead of the Procedure Linkage Ta‐
6738 ble.
6739
6740 --mmuusseerrmmooddee
6741 Generate a library function call to invalidate instruction cache
6742 entries, after fixing up a trampoline. This library function call
6743 doesn't assume it can write to the whole memory address space.
6744 This is the default when the target is "sh-*-linux*".
6745
6746 Options for System V
6747
6748 These additional options are available on System V Release 4 for com‐
6749 patibility with other compilers on those systems:
6750
6751 --GG Create a shared object. It is recommended that --ssyymmbboolliicc or
6752 --sshhaarreedd be used instead.
6753
6754 --QQyy Identify the versions of each tool used by the compiler, in a
6755 ".ident" assembler directive in the output.
6756
6757 --QQnn Refrain from adding ".ident" directives to the output file (this is
6758 the default).
6759
6760 --YYPP,,dirs
6761 Search the directories dirs, and no others, for libraries specified
6762 with --ll.
6763
6764 --YYmm,,dir
6765 Look in the directory dir to find the M4 preprocessor. The assem‐
6766 bler uses this option.
6767
6768 TMS320C3x/C4x Options
6769
6770 These --mm options are defined for TMS320C3x/C4x implementations:
6771
6772 --mmccppuu==cpu_type
6773 Set the instruction set, register set, and instruction scheduling
6774 parameters for machine type cpu_type. Supported values for
6775 cpu_type are cc3300, cc3311, cc3322, cc4400, and cc4444. The default is cc4400 to
6776 generate code for the TMS320C40.
6777
6778 --mmbbiigg--mmeemmoorryy
6779 --mmbbiigg
6780 --mmssmmaallll--mmeemmoorryy
6781 --mmssmmaallll
6782 Generates code for the big or small memory model. The small memory
6783 model assumed that all data fits into one 64K word page. At run-
6784 time the data page (DP) register must be set to point to the 64K
6785 page containing the .bss and .data program sections. The big mem‐
6786 ory model is the default and requires reloading of the DP register
6787 for every direct memory access.
6788
6789 --mmbbkk
6790 --mmnnoo--bbkk
6791 Allow (disallow) allocation of general integer operands into the
6792 block count register BK.
6793
6794 --mmddbb
6795 --mmnnoo--ddbb
6796 Enable (disable) generation of code using decrement and branch,
6797 DBcond(D), instructions. This is enabled by default for the C4x.
6798 To be on the safe side, this is disabled for the C3x, since the
6799 maximum iteration count on the C3x is 2^{23 + 1} (but who iterates
6800 loops more than 2^{23} times on the C3x?). Note that GCC will try
6801 to reverse a loop so that it can utilise the decrement and branch
6802 instruction, but will give up if there is more than one memory ref‐
6803 erence in the loop. Thus a loop where the loop counter is decre‐
6804 mented can generate slightly more efficient code, in cases where
6805 the RPTB instruction cannot be utilised.
6806
6807 --mmddpp--iissrr--rreellooaadd
6808 --mmppaarraannooiidd
6809 Force the DP register to be saved on entry to an interrupt service
6810 routine (ISR), reloaded to point to the data section, and restored
6811 on exit from the ISR. This should not be required unless someone
6812 has violated the small memory model by modifying the DP register,
6813 say within an object library.
6814
6815 --mmmmppyyii
6816 --mmnnoo--mmppyyii
6817 For the C3x use the 24-bit MPYI instruction for integer multiplies
6818 instead of a library call to guarantee 32-bit results. Note that
6819 if one of the operands is a constant, then the multiplication will
6820 be performed using shifts and adds. If the --mmmmppyyii option is not
6821 specified for the C3x, then squaring operations are performed
6822 inline instead of a library call.
6823
6824 --mmffaasstt--ffiixx
6825 --mmnnoo--ffaasstt--ffiixx
6826 The C3x/C4x FIX instruction to convert a floating point value to an
6827 integer value chooses the nearest integer less than or equal to the
6828 floating point value rather than to the nearest integer. Thus if
6829 the floating point number is negative, the result will be incor‐
6830 rectly truncated an additional code is necessary to detect and cor‐
6831 rect this case. This option can be used to disable generation of
6832 the additional code required to correct the result.
6833
6834 --mmrrppttbb
6835 --mmnnoo--rrppttbb
6836 Enable (disable) generation of repeat block sequences using the
6837 RPTB instruction for zero overhead looping. The RPTB construct is
6838 only used for innermost loops that do not call functions or jump
6839 across the loop boundaries. There is no advantage having nested
6840 RPTB loops due to the overhead required to save and restore the RC,
6841 RS, and RE registers. This is enabled by default with --OO22.
6842
6843 --mmrrppttss==count
6844 --mmnnoo--rrppttss
6845 Enable (disable) the use of the single instruction repeat instruc‐
6846 tion RPTS. If a repeat block contains a single instruction, and
6847 the loop count can be guaranteed to be less than the value count,
6848 GCC will emit a RPTS instruction instead of a RPTB. If no value is
6849 specified, then a RPTS will be emitted even if the loop count can‐
6850 not be determined at compile time. Note that the repeated instruc‐
6851 tion following RPTS does not have to be reloaded from memory each
6852 iteration, thus freeing up the CPU buses for operands. However,
6853 since interrupts are blocked by this instruction, it is disabled by
6854 default.
6855
6856 --mmlloooopp--uunnssiiggnneedd
6857 --mmnnoo--lloooopp--uunnssiiggnneedd
6858 The maximum iteration count when using RPTS and RPTB (and DB on the
6859 C40) is 2^{31 + 1} since these instructions test if the iteration
6860 count is negative to terminate the loop. If the iteration count is
6861 unsigned there is a possibility than the 2^{31 + 1} maximum itera‐
6862 tion count may be exceeded. This switch allows an unsigned itera‐
6863 tion count.
6864
6865 --mmttii
6866 Try to emit an assembler syntax that the TI assembler (asm30) is
6867 happy with. This also enforces compatibility with the API employed
6868 by the TI C3x C compiler. For example, long doubles are passed as
6869 structures rather than in floating point registers.
6870
6871 --mmrreeggppaarrmm
6872 --mmmmeemmppaarrmm
6873 Generate code that uses registers (stack) for passing arguments to
6874 functions. By default, arguments are passed in registers where
6875 possible rather than by pushing arguments on to the stack.
6876
6877 --mmppaarraalllleell--iinnssnnss
6878 --mmnnoo--ppaarraalllleell--iinnssnnss
6879 Allow the generation of parallel instructions. This is enabled by
6880 default with --OO22.
6881
6882 --mmppaarraalllleell--mmppyy
6883 --mmnnoo--ppaarraalllleell--mmppyy
6884 Allow the generation of MPY⎪⎪ADD and MPY⎪⎪SUB parallel instruc‐
6885 tions, provided --mmppaarraalllleell--iinnssnnss is also specified. These instruc‐
6886 tions have tight register constraints which can pessimize the code
6887 generation of large functions.
6888
6889 V850 Options
6890
6891 These --mm options are defined for V850 implementations:
6892
6893 --mmlloonngg--ccaallllss
6894 --mmnnoo--lloonngg--ccaallllss
6895 Treat all calls as being far away (near). If calls are assumed to
6896 be far away, the compiler will always load the functions address up
6897 into a register, and call indirect through the pointer.
6898
6899 --mmnnoo--eepp
6900 --mmeepp
6901 Do not optimize (do optimize) basic blocks that use the same index
6902 pointer 4 or more times to copy pointer into the "ep" register, and
6903 use the shorter "sld" and "sst" instructions. The --mmeepp option is
6904 on by default if you optimize.
6905
6906 --mmnnoo--pprroolloogg--ffuunnccttiioonn
6907 --mmpprroolloogg--ffuunnccttiioonn
6908 Do not use (do use) external functions to save and restore regis‐
6909 ters at the prolog and epilog of a function. The external func‐
6910 tions are slower, but use less code space if more than one function
6911 saves the same number of registers. The --mmpprroolloogg--ffuunnccttiioonn option
6912 is on by default if you optimize.
6913
6914 --mmssppaaccee
6915 Try to make the code as small as possible. At present, this just
6916 turns on the --mmeepp and --mmpprroolloogg--ffuunnccttiioonn options.
6917
6918 --mmttddaa==n
6919 Put static or global variables whose size is n bytes or less into
6920 the tiny data area that register "ep" points to. The tiny data
6921 area can hold up to 256 bytes in total (128 bytes for byte refer‐
6922 ences).
6923
6924 --mmssddaa==n
6925 Put static or global variables whose size is n bytes or less into
6926 the small data area that register "gp" points to. The small data
6927 area can hold up to 64 kilobytes.
6928
6929 --mmzzddaa==n
6930 Put static or global variables whose size is n bytes or less into
6931 the first 32 kilobytes of memory.
6932
6933 --mmvv885500
6934 Specify that the target processor is the V850.
6935
6936 --mmbbiigg--sswwiittcchh
6937 Generate code suitable for big switch tables. Use this option only
6938 if the assembler/linker complain about out of range branches within
6939 a switch table.
6940
6941 ARC Options
6942
6943 These options are defined for ARC implementations:
6944
6945 --EELL Compile code for little endian mode. This is the default.
6946
6947 --EEBB Compile code for big endian mode.
6948
6949 --mmmmaannggllee--ccppuu
6950 Prepend the name of the cpu to all public symbol names. In multi‐
6951 ple-processor systems, there are many ARC variants with different
6952 instruction and register set characteristics. This flag prevents
6953 code compiled for one cpu to be linked with code compiled for
6954 another. No facility exists for handling variants that are
6955 ``almost identical''. This is an all or nothing option.
6956
6957 --mmccppuu==cpu
6958 Compile code for ARC variant cpu. Which variants are supported
6959 depend on the configuration. All variants support --mmccppuu==bbaassee, this
6960 is the default.
6961
6962 --mmtteexxtt==text-section
6963 --mmddaattaa==data-section
6964 --mmrrooddaattaa==readonly-data-section
6965 Put functions, data, and readonly data in text-section, data-sec‐
6966 tion, and readonly-data-section respectively by default. This can
6967 be overridden with the "section" attribute.
6968
6969 NS32K Options
6970
6971 These are the --mm options defined for the 32000 series. The default
6972 values for these options depends on which style of 32000 was selected
6973 when the compiler was configured; the defaults for the most common
6974 choices are given below.
6975
6976 --mm3322003322
6977 --mm3322003322
6978 Generate output for a 32032. This is the default when the compiler
6979 is configured for 32032 and 32016 based systems.
6980
6981 --mm3322333322
6982 --mm3322333322
6983 Generate output for a 32332. This is the default when the compiler
6984 is configured for 32332-based systems.
6985
6986 --mm3322553322
6987 --mm3322553322
6988 Generate output for a 32532. This is the default when the compiler
6989 is configured for 32532-based systems.
6990
6991 --mm3322008811
6992 Generate output containing 32081 instructions for floating point.
6993 This is the default for all systems.
6994
6995 --mm3322338811
6996 Generate output containing 32381 instructions for floating point.
6997 This also implies --mm3322008811. The 32381 is only compatible with the
6998 32332 and 32532 cpus. This is the default for the pc532-netbsd
6999 configuration.
7000
7001 --mmmmuullttii--aadddd
7002 Try and generate multiply-add floating point instructions "polyF"
7003 and "dotF". This option is only available if the --mm3322338811 option is
7004 in effect. Using these instructions requires changes to register
7005 allocation which generally has a negative impact on performance.
7006 This option should only be enabled when compiling code particularly
7007 likely to make heavy use of multiply-add instructions.
7008
7009 --mmnnoommuullttii--aadddd
7010 Do not try and generate multiply-add floating point instructions
7011 "polyF" and "dotF". This is the default on all platforms.
7012
7013 --mmssoofftt--ffllooaatt
7014 Generate output containing library calls for floating point. WWaarrnn‐‐
7015 iinngg:: the requisite libraries may not be available.
7016
7017 --mmnnoobbiittffiieelldd
7018 Do not use the bit-field instructions. On some machines it is
7019 faster to use shifting and masking operations. This is the default
7020 for the pc532.
7021
7022 --mmbbiittffiieelldd
7023 Do use the bit-field instructions. This is the default for all
7024 platforms except the pc532.
7025
7026 --mmrrttdd
7027 Use a different function-calling convention, in which functions
7028 that take a fixed number of arguments return pop their arguments on
7029 return with the "ret" instruction.
7030
7031 This calling convention is incompatible with the one normally used
7032 on Unix, so you cannot use it if you need to call libraries com‐
7033 piled with the Unix compiler.
7034
7035 Also, you must provide function prototypes for all functions that
7036 take variable numbers of arguments (including "printf"); otherwise
7037 incorrect code will be generated for calls to those functions.
7038
7039 In addition, seriously incorrect code will result if you call a
7040 function with too many arguments. (Normally, extra arguments are
7041 harmlessly ignored.)
7042
7043 This option takes its name from the 680x0 "rtd" instruction.
7044
7045 --mmrreeggppaarraamm
7046 Use a different function-calling convention where the first two
7047 arguments are passed in registers.
7048
7049 This calling convention is incompatible with the one normally used
7050 on Unix, so you cannot use it if you need to call libraries com‐
7051 piled with the Unix compiler.
7052
7053 --mmnnoorreeggppaarraamm
7054 Do not pass any arguments in registers. This is the default for
7055 all targets.
7056
7057 --mmssbb
7058 It is OK to use the sb as an index register which is always loaded
7059 with zero. This is the default for the pc532-netbsd target.
7060
7061 --mmnnoossbb
7062 The sb register is not available for use or has not been initial‐
7063 ized to zero by the run time system. This is the default for all
7064 targets except the pc532-netbsd. It is also implied whenever
7065 --mmhhiimmeemm or --ffppiicc is set.
7066
7067 --mmhhiimmeemm
7068 Many ns32000 series addressing modes use displacements of up to
7069 512MB. If an address is above 512MB then displacements from zero
7070 can not be used. This option causes code to be generated which can
7071 be loaded above 512MB. This may be useful for operating systems or
7072 ROM code.
7073
7074 --mmnnoohhiimmeemm
7075 Assume code will be loaded in the first 512MB of virtual address
7076 space. This is the default for all platforms.
7077
7078 AVR Options
7079
7080 These options are defined for AVR implementations:
7081
7082 --mmmmccuu==mcu
7083 Specify ATMEL AVR instruction set or MCU type.
7084
7085 Instruction set avr1 is for the minimal AVR core, not supported by
7086 the C compiler, only for assembler programs (MCU types: at90s1200,
7087 attiny10, attiny11, attiny12, attiny15, attiny28).
7088
7089 Instruction set avr2 (default) is for the classic AVR core with up
7090 to 8K program memory space (MCU types: at90s2313, at90s2323,
7091 attiny22, at90s2333, at90s2343, at90s4414, at90s4433, at90s4434,
7092 at90s8515, at90c8534, at90s8535).
7093
7094 Instruction set avr3 is for the classic AVR core with up to 128K
7095 program memory space (MCU types: atmega103, atmega603, at43usb320,
7096 at76c711).
7097
7098 Instruction set avr4 is for the enhanced AVR core with up to 8K
7099 program memory space (MCU types: atmega8, atmega83, atmega85).
7100
7101 Instruction set avr5 is for the enhanced AVR core with up to 128K
7102 program memory space (MCU types: atmega16, atmega161, atmega163,
7103 atmega32, atmega323, atmega64, atmega128, at43usb355, at94k).
7104
7105 --mmssiizzee
7106 Output instruction sizes to the asm file.
7107
7108 --mmiinniitt--ssttaacckk==N
7109 Specify the initial stack address, which may be a symbol or numeric
7110 value, ____ssttaacckk is the default.
7111
7112 --mmnnoo--iinntteerrrruuppttss
7113 Generated code is not compatible with hardware interrupts. Code
7114 size will be smaller.
7115
7116 --mmccaallll--pprroolloogguueess
7117 Functions prologues/epilogues expanded as call to appropriate sub‐
7118 routines. Code size will be smaller.
7119
7120 --mmnnoo--ttaabblleejjuummpp
7121 Do not generate tablejump insns which sometimes increase code size.
7122
7123 --mmttiinnyy--ssttaacckk
7124 Change only the low 8 bits of the stack pointer.
7125
7126 MCore Options
7127
7128 These are the --mm options defined for the Motorola M*Core processors.
7129
7130 --mmhhaarrddlliitt
7131 --mmhhaarrddlliitt
7132 --mmnnoo--hhaarrddlliitt
7133 Inline constants into the code stream if it can be done in two
7134 instructions or less.
7135
7136 --mmddiivv
7137 --mmddiivv
7138 --mmnnoo--ddiivv
7139 Use the divide instruction. (Enabled by default).
7140
7141 --mmrreellaaxx--iimmmmeeddiiaattee
7142 --mmrreellaaxx--iimmmmeeddiiaattee
7143 --mmnnoo--rreellaaxx--iimmmmeeddiiaattee
7144 Allow arbitrary sized immediates in bit operations.
7145
7146 --mmwwiiddee--bbiittffiieellddss
7147 --mmwwiiddee--bbiittffiieellddss
7148 --mmnnoo--wwiiddee--bbiittffiieellddss
7149 Always treat bit-fields as int-sized.
7150
7151 --mm44bbyyttee--ffuunnccttiioonnss
7152 --mm44bbyyttee--ffuunnccttiioonnss
7153 --mmnnoo--44bbyyttee--ffuunnccttiioonnss
7154 Force all functions to be aligned to a four byte boundary.
7155
7156 --mmccaallllggrraapphh--ddaattaa
7157 --mmccaallllggrraapphh--ddaattaa
7158 --mmnnoo--ccaallllggrraapphh--ddaattaa
7159 Emit callgraph information.
7160
7161 --mmssllooww--bbyytteess
7162 --mmssllooww--bbyytteess
7163 --mmnnoo--ssllooww--bbyytteess
7164 Prefer word access when reading byte quantities.
7165
7166 --mmlliittttllee--eennddiiaann
7167 --mmlliittttllee--eennddiiaann
7168 --mmbbiigg--eennddiiaann
7169 Generate code for a little endian target.
7170
7171 --mm221100
7172 --mm221100
7173 --mm334400
7174 Generate code for the 210 processor.
7175
7176 IA-64 Options
7177
7178 These are the --mm options defined for the Intel IA-64 architecture.
7179
7180 --mmbbiigg--eennddiiaann
7181 Generate code for a big endian target. This is the default for
7182 HPUX.
7183
7184 --mmlliittttllee--eennddiiaann
7185 Generate code for a little endian target. This is the default for
7186 AIX5 and Linux.
7187
7188 --mmggnnuu--aass
7189 --mmnnoo--ggnnuu--aass
7190 Generate (or don't) code for the GNU assembler. This is the
7191 default.
7192
7193 --mmggnnuu--lldd
7194 --mmnnoo--ggnnuu--lldd
7195 Generate (or don't) code for the GNU linker. This is the default.
7196
7197 --mmnnoo--ppiicc
7198 Generate code that does not use a global pointer register. The
7199 result is not position independent code, and violates the IA-64
7200 ABI.
7201
7202 --mmvvoollaattiillee--aassmm--ssttoopp
7203 --mmnnoo--vvoollaattiillee--aassmm--ssttoopp
7204 Generate (or don't) a stop bit immediately before and after
7205 volatile asm statements.
7206
7207 --mmbb--sstteepp
7208 Generate code that works around Itanium B step errata.
7209
7210 --mmrreeggiisstteerr--nnaammeess
7211 --mmnnoo--rreeggiisstteerr--nnaammeess
7212 Generate (or don't) iinn, lloocc, and oouutt register names for the stacked
7213 registers. This may make assembler output more readable.
7214
7215 --mmnnoo--ssddaattaa
7216 --mmssddaattaa
7217 Disable (or enable) optimizations that use the small data section.
7218 This may be useful for working around optimizer bugs.
7219
7220 --mmccoonnssttaanntt--ggpp
7221 Generate code that uses a single constant global pointer value.
7222 This is useful when compiling kernel code.
7223
7224 --mmaauuttoo--ppiicc
7225 Generate code that is self-relocatable. This implies --mmccoonnssttaanntt--
7226 ggpp. This is useful when compiling firmware code.
7227
7228 --mmiinnlliinnee--ddiivviiddee--mmiinn--llaatteennccyy
7229 Generate code for inline divides using the minimum latency algo‐
7230 rithm.
7231
7232 --mmiinnlliinnee--ddiivviiddee--mmaaxx--tthhrroouugghhppuutt
7233 Generate code for inline divides using the maximum throughput algo‐
7234 rithm.
7235
7236 --mmnnoo--ddwwaarrff22--aassmm
7237 --mmddwwaarrff22--aassmm
7238 Don't (or do) generate assembler code for the DWARF2 line number
7239 debugging info. This may be useful when not using the GNU assem‐
7240 bler.
7241
7242 --mmffiixxeedd--rraannggee==register-range
7243 Generate code treating the given register range as fixed registers.
7244 A fixed register is one that the register allocator can not use.
7245 This is useful when compiling kernel code. A register range is
7246 specified as two registers separated by a dash. Multiple register
7247 ranges can be specified separated by a comma.
7248
7249 D30V Options
7250
7251 These --mm options are defined for D30V implementations:
7252
7253 --mmeexxttmmeemm
7254 Link the ..tteexxtt, ..ddaattaa, ..bbssss, ..ssttrriinnggss, ..rrooddaattaa, ..rrooddaattaa11, ..ddaattaa11
7255 sections into external memory, which starts at location
7256 "0x80000000".
7257
7258 --mmeexxttmmeemmoorryy
7259 Same as the --mmeexxttmmeemm switch.
7260
7261 --mmoonncchhiipp
7262 Link the ..tteexxtt section into onchip text memory, which starts at
7263 location "0x0". Also link ..ddaattaa, ..bbssss, ..ssttrriinnggss, ..rrooddaattaa,
7264 ..rrooddaattaa11, ..ddaattaa11 sections into onchip data memory, which starts at
7265 location "0x20000000".
7266
7267 --mmnnoo--aassmm--ooppttiimmiizzee
7268 --mmaassmm--ooppttiimmiizzee
7269 Disable (enable) passing --OO to the assembler when optimizing. The
7270 assembler uses the --OO option to automatically parallelize adjacent
7271 short instructions where possible.
7272
7273 --mmbbrraanncchh--ccoosstt==n
7274 Increase the internal costs of branches to n. Higher costs means
7275 that the compiler will issue more instructions to avoid doing a
7276 branch. The default is 2.
7277
7278 --mmccoonndd--eexxeecc==n
7279 Specify the maximum number of conditionally executed instructions
7280 that replace a branch. The default is 4.
7281
7282 S/390 and zSeries Options
7283
7284 These are the --mm options defined for the S/390 and zSeries architec‐
7285 ture.
7286
7287 --mmhhaarrdd--ffllooaatt
7288 --mmssoofftt--ffllooaatt
7289 Use (do not use) the hardware floating-point instructions and reg‐
7290 isters for floating-point operations. When --mmssoofftt--ffllooaatt is speci‐
7291 fied, functions in libgcc.a will be used to perform floating-point
7292 operations. When --mmhhaarrdd--ffllooaatt is specified, the compiler generates
7293 IEEE floating-point instructions. This is the default.
7294
7295 --mmbbaacckkcchhaaiinn
7296 --mmnnoo--bbaacckkcchhaaiinn
7297 Generate (or do not generate) code which maintains an explicit
7298 backchain within the stack frame that points to the caller's frame.
7299 This is currently needed to allow debugging. The default is to
7300 generate the backchain.
7301
7302 --mmssmmaallll--eexxeecc
7303 --mmnnoo--ssmmaallll--eexxeecc
7304 Generate (or do not generate) code using the "bras" instruction to
7305 do subroutine calls. This only works reliably if the total exe‐
7306 cutable size does not exceed 64k. The default is to use the "basr"
7307 instruction instead, which does not have this limitation.
7308
7309 --mm6644
7310 --mm3311
7311 When --mm3311 is specified, generate code compliant to the Linux for
7312 S/390 ABI. When --mm6644 is specified, generate code compliant to the
7313 Linux for zSeries ABI. This allows GCC in particular to generate
7314 64-bit instructions. For the ss339900 targets, the default is --mm3311,
7315 while the ss339900xx targets default to --mm6644.
7316
7317 --mmmmvvccllee
7318 --mmnnoo--mmvvccllee
7319 Generate (or do not generate) code using the "mvcle" instruction to
7320 perform block moves. When --mmnnoo--mmvvccllee is specifed, use a "mvc" loop
7321 instead. This is the default.
7322
7323 --mmddeebbuugg
7324 --mmnnoo--ddeebbuugg
7325 Print (or do not print) additional debug information when compil‐
7326 ing. The default is to not print debug information.
7327
7328 CRIS Options
7329
7330 These options are defined specifically for the CRIS ports.
7331
7332 --mmaarrcchh==architecture-type
7333 --mmccppuu==architecture-type
7334 Generate code for the specified architecture. The choices for
7335 architecture-type are vv33, vv88 and vv1100 for respectively ETRAX 4,
7336 ETRAX 100, and ETRAX 100 LX. Default is vv00 except for cris-axis-
7337 linux-gnu, where the default is vv1100.
7338
7339 --mmttuunnee==architecture-type
7340 Tune to architecture-type everything applicable about the generated
7341 code, except for the ABI and the set of available instructions.
7342 The choices for architecture-type are the same as for --mmaarrcchh==archi‐
7343 tecture-type.
7344
7345 --mmmmaaxx--ssttaacckk--ffrraammee==n
7346 Warn when the stack frame of a function exceeds n bytes.
7347
7348 --mmeelliinnuuxx--ssttaacckkssiizzee==n
7349 Only available with the ccrriiss--aaxxiiss--aaoouutt target. Arranges for indi‐
7350 cations in the program to the kernel loader that the stack of the
7351 program should be set to n bytes.
7352
7353 --mmeettrraaxx44
7354 --mmeettrraaxx110000
7355 The options --mmeettrraaxx44 and --mmeettrraaxx110000 are synonyms for --mmaarrcchh==vv33 and
7356 --mmaarrcchh==vv88 respectively.
7357
7358 --mmppddeebbuugg
7359 Enable CRIS-specific verbose debug-related information in the
7360 assembly code. This option also has the effect to turn off the
7361 ##NNOO__AAPPPP formatted-code indicator to the assembler at the beginning
7362 of the assembly file.
7363
7364 --mmcccc--iinniitt
7365 Do not use condition-code results from previous instruction; always
7366 emit compare and test instructions before use of condition codes.
7367
7368 --mmnnoo--ssiiddee--eeffffeeccttss
7369 Do not emit instructions with side-effects in addressing modes
7370 other than post-increment.
7371
7372 --mmssttaacckk--aalliiggnn
7373 --mmnnoo--ssttaacckk--aalliiggnn
7374 --mmddaattaa--aalliiggnn
7375 --mmnnoo--ddaattaa--aalliiggnn
7376 --mmccoonnsstt--aalliiggnn
7377 --mmnnoo--ccoonnsstt--aalliiggnn
7378 These options (no-options) arranges (eliminate arrangements) for
7379 the stack-frame, individual data and constants to be aligned for
7380 the maximum single data access size for the chosen CPU model. The
7381 default is to arrange for 32-bit alignment. ABI details such as
7382 structure layout are not affected by these options.
7383
7384 --mm3322--bbiitt
7385 --mm1166--bbiitt
7386 --mm88--bbiitt
7387 Similar to the stack- data- and const-align options above, these
7388 options arrange for stack-frame, writable data and constants to all
7389 be 32-bit, 16-bit or 8-bit aligned. The default is 32-bit align‐
7390 ment.
7391
7392 --mmnnoo--pprroolloogguuee--eeppiilloogguuee
7393 --mmpprroolloogguuee--eeppiilloogguuee
7394 With --mmnnoo--pprroolloogguuee--eeppiilloogguuee, the normal function prologue and epi‐
7395 logue that sets up the stack-frame are omitted and no return
7396 instructions or return sequences are generated in the code. Use
7397 this option only together with visual inspection of the compiled
7398 code: no warnings or errors are generated when call-saved registers
7399 must be saved, or storage for local variable needs to be allocated.
7400
7401 --mmnnoo--ggoottpplltt
7402 --mmggoottpplltt
7403 With --ffppiicc and --ffPPIICC, don't generate (do generate) instruction
7404 sequences that load addresses for functions from the PLT part of
7405 the GOT rather than (traditional on other architectures) calls to
7406 the PLT. The default is --mmggoottpplltt.
7407
7408 --mmaaoouutt
7409 Legacy no-op option only recognized with the cris-axis-aout target.
7410
7411 --mmeellff
7412 Legacy no-op option only recognized with the cris-axis-elf and
7413 cris-axis-linux-gnu targets.
7414
7415 --mmeelliinnuuxx
7416 Only recognized with the cris-axis-aout target, where it selects a
7417 GNU/linux-like multilib, include files and instruction set for
7418 --mmaarrcchh==vv88.
7419
7420 --mmlliinnuuxx
7421 Legacy no-op option only recognized with the cris-axis-linux-gnu
7422 target.
7423
7424 --ssiimm
7425 This option, recognized for the cris-axis-aout and cris-axis-elf
7426 arranges to link with input-output functions from a simulator
7427 library. Code, initialized data and zero-initialized data are
7428 allocated consecutively.
7429
7430 --ssiimm22
7431 Like --ssiimm, but pass linker options to locate initialized data at
7432 0x40000000 and zero-initialized data at 0x80000000.
7433
7434 MMIX Options
7435
7436 These options are defined for the MMIX:
7437
7438 --mmlliibbffuunnccss
7439 --mmnnoo--lliibbffuunnccss
7440 Specify that intrinsic library functions are being compiled, pass‐
7441 ing all values in registers, no matter the size.
7442
7443 --mmeeppssiilloonn
7444 --mmnnoo--eeppssiilloonn
7445 Generate floating-point comparison instructions that compare with
7446 respect to the "rE" epsilon register.
7447
7448 --mmaabbii==mmmmiixxwwaarree
7449 --mmaabbii==ggnnuu
7450 Generate code that passes function parameters and return values
7451 that (in the called function) are seen as registers "$0" and up, as
7452 opposed to the GNU ABI which uses global registers "$231" and up.
7453
7454 --mmzzeerroo--eexxtteenndd
7455 --mmnnoo--zzeerroo--eexxtteenndd
7456 When reading data from memory in sizes shorter than 64 bits, use
7457 (do not use) zero-extending load instructions by default, rather
7458 than sign-extending ones.
7459
7460 --mmkknnuutthhddiivv
7461 --mmnnoo--kknnuutthhddiivv
7462 Make the result of a division yielding a remainder have the same
7463 sign as the divisor. With the default, --mmnnoo--kknnuutthhddiivv, the sign of
7464 the remainder follows the sign of the dividend. Both methods are
7465 arithmetically valid, the latter being almost exclusively used.
7466
7467 --mmttoopplleevveell--ssyymmbboollss
7468 --mmnnoo--ttoopplleevveell--ssyymmbboollss
7469 Prepend (do not prepend) a :: to all global symbols, so the assembly
7470 code can be used with the "PREFIX" assembly directive.
7471
7472 --mmeellff
7473 Generate an executable in the ELF format, rather than the default
7474 mmmmoo format used by the mmmmiixx simulator.
7475
7476 --mmbbrraanncchh--pprreeddiicctt
7477 --mmnnoo--bbrraanncchh--pprreeddiicctt
7478 Use (do not use) the probable-branch instructions, when static
7479 branch prediction indicates a probable branch.
7480
7481 --mmbbaassee--aaddddrreesssseess
7482 --mmnnoo--bbaassee--aaddddrreesssseess
7483 Generate (do not generate) code that uses base addresses. Using a
7484 base address automatically generates a request (handled by the
7485 assembler and the linker) for a constant to be set up in a global
7486 register. The register is used for one or more base address
7487 requests within the range 0 to 255 from the value held in the reg‐
7488 ister. The generally leads to short and fast code, but the number
7489 of different data items that can be addressed is limited. This
7490 means that a program that uses lots of static data may require
7491 --mmnnoo--bbaassee--aaddddrreesssseess.
7492
7493 PDP-11 Options
7494
7495 These options are defined for the PDP-11:
7496
7497 --mmffppuu
7498 Use hardware FPP floating point. This is the default. (FIS float‐
7499 ing point on the PDP-11/40 is not supported.)
7500
7501 --mmssoofftt--ffllooaatt
7502 Do not use hardware floating point.
7503
7504 --mmaacc00
7505 Return floating-point results in ac0 (fr0 in Unix assembler syn‐
7506 tax).
7507
7508 --mmnnoo--aacc00
7509 Return floating-point results in memory. This is the default.
7510
7511 --mm4400
7512 Generate code for a PDP-11/40.
7513
7514 --mm4455
7515 Generate code for a PDP-11/45. This is the default.
7516
7517 --mm1100
7518 Generate code for a PDP-11/10.
7519
7520 --mmbbccooppyy--bbuuiillttiinn
7521 Use inline "movstrhi" patterns for copying memory. This is the
7522 default.
7523
7524 --mmbbccooppyy
7525 Do not use inline "movstrhi" patterns for copying memory.
7526
7527 --mmiinntt1166
7528 --mmnnoo--iinntt3322
7529 Use 16-bit "int". This is the default.
7530
7531 --mmiinntt3322
7532 --mmnnoo--iinntt1166
7533 Use 32-bit "int".
7534
7535 --mmffllooaatt6644
7536 --mmnnoo--ffllooaatt3322
7537 Use 64-bit "float". This is the default.
7538
7539 --mmffllooaatt3322
7540 --mmnnoo--ffllooaatt6644
7541 Use 32-bit "float".
7542
7543 --mmaabbsshhii
7544 Use "abshi2" pattern. This is the default.
7545
7546 --mmnnoo--aabbsshhii
7547 Do not use "abshi2" pattern.
7548
7549 --mmbbrraanncchh--eexxppeennssiivvee
7550 Pretend that branches are expensive. This is for experimenting
7551 with code generation only.
7552
7553 --mmbbrraanncchh--cchheeaapp
7554 Do not pretend that branches are expensive. This is the default.
7555
7556 --mmsspplliitt
7557 Generate code for a system with split I&D.
7558
7559 --mmnnoo--sspplliitt
7560 Generate code for a system without split I&D. This is the default.
7561
7562 --mmuunniixx--aassmm
7563 Use Unix assembler syntax. This is the default when configured for
7564 ppddpp1111--**--bbssdd.
7565
7566 --mmddeecc--aassmm
7567 Use DEC assembler syntax. This is the default when configured for
7568 any PDP-11 target other than ppddpp1111--**--bbssdd.
7569
7570 Xstormy16 Options
7571
7572 These options are defined for Xstormy16:
7573
7574 --mmssiimm
7575 Choose startup files and linker script suitable for the simulator.
7576
7577 Xtensa Options
7578
7579 The Xtensa architecture is designed to support many different configu‐
7580 rations. The compiler's default options can be set to match a particu‐
7581 lar Xtensa configuration by copying a configuration file into the GCC
7582 sources when building GCC. The options below may be used to override
7583 the default options.
7584
7585 --mmbbiigg--eennddiiaann
7586 --mmlliittttllee--eennddiiaann
7587 Specify big-endian or little-endian byte ordering for the target
7588 Xtensa processor.
7589
7590 --mmddeennssiittyy
7591 --mmnnoo--ddeennssiittyy
7592 Enable or disable use of the optional Xtensa code density instruc‐
7593 tions.
7594
7595 --mmmmaacc1166
7596 --mmnnoo--mmaacc1166
7597 Enable or disable use of the Xtensa MAC16 option. When enabled,
7598 GCC will generate MAC16 instructions from standard C code, with the
7599 limitation that it will use neither the MR register file nor any
7600 instruction that operates on the MR registers. When this option is
7601 disabled, GCC will translate 16-bit multiply/accumulate operations
7602 to a combination of core instructions and library calls, depending
7603 on whether any other multiplier options are enabled.
7604
7605 --mmmmuull1166
7606 --mmnnoo--mmuull1166
7607 Enable or disable use of the 16-bit integer multiplier option.
7608 When enabled, the compiler will generate 16-bit multiply instruc‐
7609 tions for multiplications of 16 bits or smaller in standard C code.
7610 When this option is disabled, the compiler will either use 32-bit
7611 multiply or MAC16 instructions if they are available or generate
7612 library calls to perform the multiply operations using shifts and
7613 adds.
7614
7615 --mmmmuull3322
7616 --mmnnoo--mmuull3322
7617 Enable or disable use of the 32-bit integer multiplier option.
7618 When enabled, the compiler will generate 32-bit multiply instruc‐
7619 tions for multiplications of 32 bits or smaller in standard C code.
7620 When this option is disabled, the compiler will generate library
7621 calls to perform the multiply operations using either shifts and
7622 adds or 16-bit multiply instructions if they are available.
7623
7624 --mmnnssaa
7625 --mmnnoo--nnssaa
7626 Enable or disable use of the optional normalization shift amount
7627 ("NSA") instructions to implement the built-in "ffs" function.
7628
7629 --mmmmiinnmmaaxx
7630 --mmnnoo--mmiinnmmaaxx
7631 Enable or disable use of the optional minimum and maximum value
7632 instructions.
7633
7634 --mmsseexxtt
7635 --mmnnoo--sseexxtt
7636 Enable or disable use of the optional sign extend ("SEXT") instruc‐
7637 tion.
7638
7639 --mmbboooolleeaannss
7640 --mmnnoo--bboooolleeaannss
7641 Enable or disable support for the boolean register file used by
7642 Xtensa coprocessors. This is not typically useful by itself but
7643 may be required for other options that make use of the boolean reg‐
7644 isters (e.g., the floating-point option).
7645
7646 --mmhhaarrdd--ffllooaatt
7647 --mmssoofftt--ffllooaatt
7648 Enable or disable use of the floating-point option. When enabled,
7649 GCC generates floating-point instructions for 32-bit "float" opera‐
7650 tions. When this option is disabled, GCC generates library calls
7651 to emulate 32-bit floating-point operations using integer instruc‐
7652 tions. Regardless of this option, 64-bit "double" operations are
7653 always emulated with calls to library functions.
7654
7655 --mmffuusseedd--mmaadddd
7656 --mmnnoo--ffuusseedd--mmaadddd
7657 Enable or disable use of fused multiply/add and multiply/subtract
7658 instructions in the floating-point option. This has no effect if
7659 the floating-point option is not also enabled. Disabling fused
7660 multiply/add and multiply/subtract instructions forces the compiler
7661 to use separate instructions for the multiply and add/subtract
7662 operations. This may be desirable in some cases where strict IEEE
7663 754-compliant results are required: the fused multiply add/subtract
7664 instructions do not round the intermediate result, thereby produc‐
7665 ing results with more bits of precision than specified by the IEEE
7666 standard. Disabling fused multiply add/subtract instructions also
7667 ensures that the program output is not sensitive to the compiler's
7668 ability to combine multiply and add/subtract operations.
7669
7670 --mmsseerriiaalliizzee--vvoollaattiillee
7671 --mmnnoo--sseerriiaalliizzee--vvoollaattiillee
7672 When this option is enabled, GCC inserts "MEMW" instructions before
7673 "volatile" memory references to guarantee sequential consistency.
7674 The default is --mmsseerriiaalliizzee--vvoollaattiillee. Use --mmnnoo--sseerriiaalliizzee--vvoollaattiillee
7675 to omit the "MEMW" instructions.
7676
7677 --mmtteexxtt--sseeccttiioonn--lliitteerraallss
7678 --mmnnoo--tteexxtt--sseeccttiioonn--lliitteerraallss
7679 Control the treatment of literal pools. The default is --mmnnoo--tteexxtt--
7680 sseeccttiioonn--lliitteerraallss, which places literals in a separate section in
7681 the output file. This allows the literal pool to be placed in a
7682 data RAM/ROM, and it also allows the linker to combine literal
7683 pools from separate object files to remove redundant literals and
7684 improve code size. With --mmtteexxtt--sseeccttiioonn--lliitteerraallss, the literals are
7685 interspersed in the text section in order to keep them as close as
7686 possible to their references. This may be necessary for large
7687 assembly files.
7688
7689 --mmttaarrggeett--aalliiggnn
7690 --mmnnoo--ttaarrggeett--aalliiggnn
7691 When this option is enabled, GCC instructs the assembler to auto‐
7692 matically align instructions to reduce branch penalties at the
7693 expense of some code density. The assembler attempts to widen den‐
7694 sity instructions to align branch targets and the instructions fol‐
7695 lowing call instructions. If there are not enough preceding safe
7696 density instructions to align a target, no widening will be per‐
7697 formed. The default is --mmttaarrggeett--aalliiggnn. These options do not
7698 affect the treatment of auto-aligned instructions like "LOOP",
7699 which the assembler will always align, either by widening density
7700 instructions or by inserting no-op instructions.
7701
7702 --mmlloonnggccaallllss
7703 --mmnnoo--lloonnggccaallllss
7704 When this option is enabled, GCC instructs the assembler to trans‐
7705 late direct calls to indirect calls unless it can determine that
7706 the target of a direct call is in the range allowed by the call
7707 instruction. This translation typically occurs for calls to func‐
7708 tions in other source files. Specifically, the assembler trans‐
7709 lates a direct "CALL" instruction into an "L32R" followed by a
7710 "CALLX" instruction. The default is --mmnnoo--lloonnggccaallllss. This option
7711 should be used in programs where the call target can potentially be
7712 out of range. This option is implemented in the assembler, not the
7713 compiler, so the assembly code generated by GCC will still show
7714 direct call instructions---look at the disassembled object code to
7715 see the actual instructions. Note that the assembler will use an
7716 indirect call for every cross-file call, not just those that really
7717 will be out of range.
7718
7719 OOppttiioonnss ffoorr CCooddee GGeenneerraattiioonn CCoonnvveennttiioonnss
7720
7721 These machine-independent options control the interface conventions
7722 used in code generation.
7723
7724 Most of them have both positive and negative forms; the negative form
7725 of --ffffoooo would be --ffnnoo--ffoooo. In the table below, only one of the forms
7726 is listed---the one which is not the default. You can figure out the
7727 other form by either removing nnoo-- or adding it.
7728
7729 --ffeexxcceeppttiioonnss
7730 Enable exception handling. Generates extra code needed to propa‐
7731 gate exceptions. For some targets, this implies GCC will generate
7732 frame unwind information for all functions, which can produce sig‐
7733 nificant data size overhead, although it does not affect execution.
7734 If you do not specify this option, GCC will enable it by default
7735 for languages like C++ which normally require exception handling,
7736 and disable it for languages like C that do not normally require
7737 it. However, you may need to enable this option when compiling C
7738 code that needs to interoperate properly with exception handlers
7739 written in C++. You may also wish to disable this option if you
7740 are compiling older C++ programs that don't use exception handling.
7741
7742 --ffnnoonn--ccaallll--eexxcceeppttiioonnss
7743 Generate code that allows trapping instructions to throw excep‐
7744 tions. Note that this requires platform-specific runtime support
7745 that does not exist everywhere. Moreover, it only allows trapping
7746 instructions to throw exceptions, i.e. memory references or float‐
7747 ing point instructions. It does not allow exceptions to be thrown
7748 from arbitrary signal handlers such as "SIGALRM".
7749
7750 --ffuunnwwiinndd--ttaabblleess
7751 Similar to --ffeexxcceeppttiioonnss, except that it will just generate any
7752 needed static data, but will not affect the generated code in any
7753 other way. You will normally not enable this option; instead, a
7754 language processor that needs this handling would enable it on your
7755 behalf.
7756
7757 --ffaassyynncchhrroonnoouuss--uunnwwiinndd--ttaabblleess
7758 Generate unwind table in dwarf2 format, if supported by target
7759 machine. The table is exact at each instruction boundary, so it
7760 can be used for stack unwinding from asynchronous events (such as
7761 debugger or garbage collector).
7762
7763 --ffppcccc--ssttrruucctt--rreettuurrnn
7764 Return ``short'' "struct" and "union" values in memory like longer
7765 ones, rather than in registers. This convention is less efficient,
7766 but it has the advantage of allowing intercallability between GCC-
7767 compiled files and files compiled with other compilers, particu‐
7768 larly the Portable C Compiler (pcc).
7769
7770 The precise convention for returning structures in memory depends
7771 on the target configuration macros.
7772
7773 Short structures and unions are those whose size and alignment
7774 match that of some integer type.
7775
7776 WWaarrnniinngg:: code compiled with the --ffppcccc--ssttrruucctt--rreettuurrnn switch is not
7777 binary compatible with code compiled with the --ffrreegg--ssttrruucctt--rreettuurrnn
7778 switch. Use it to conform to a non-default application binary
7779 interface.
7780
7781 --ffrreegg--ssttrruucctt--rreettuurrnn
7782 Return "struct" and "union" values in registers when possible.
7783 This is more efficient for small structures than --ffppcccc--ssttrruucctt--
7784 rreettuurrnn.
7785
7786 If you specify neither --ffppcccc--ssttrruucctt--rreettuurrnn nor --ffrreegg--ssttrruucctt--rreettuurrnn,
7787 GCC defaults to whichever convention is standard for the target.
7788 If there is no standard convention, GCC defaults to --ffppcccc--ssttrruucctt--
7789 rreettuurrnn, except on targets where GCC is the principal compiler. In
7790 those cases, we can choose the standard, and we chose the more
7791 efficient register return alternative.
7792
7793 WWaarrnniinngg:: code compiled with the --ffrreegg--ssttrruucctt--rreettuurrnn switch is not
7794 binary compatible with code compiled with the --ffppcccc--ssttrruucctt--rreettuurrnn
7795 switch. Use it to conform to a non-default application binary
7796 interface.
7797
7798 --ffsshhoorrtt--eennuummss
7799 Allocate to an "enum" type only as many bytes as it needs for the
7800 declared range of possible values. Specifically, the "enum" type
7801 will be equivalent to the smallest integer type which has enough
7802 room.
7803
7804 WWaarrnniinngg:: the --ffsshhoorrtt--eennuummss switch causes GCC to generate code that
7805 is not binary compatible with code generated without that switch.
7806 Use it to conform to a non-default application binary interface.
7807
7808 --ffsshhoorrtt--ddoouubbllee
7809 Use the same size for "double" as for "float".
7810
7811 WWaarrnniinngg:: the --ffsshhoorrtt--ddoouubbllee switch causes GCC to generate code that
7812 is not binary compatible with code generated without that switch.
7813 Use it to conform to a non-default application binary interface.
7814
7815 --ffsshhoorrtt--wwcchhaarr
7816 Override the underlying type for wwcchhaarr__tt to be sshhoorrtt uunnssiiggnneedd iinntt
7817 instead of the default for the target. This option is useful for
7818 building programs to run under WINE.
7819
7820 WWaarrnniinngg:: the --ffsshhoorrtt--wwcchhaarr switch causes GCC to generate code that
7821 is not binary compatible with code generated without that switch.
7822 Use it to conform to a non-default application binary interface.
7823
7824 --ffsshhaarreedd--ddaattaa
7825 Requests that the data and non-"const" variables of this compila‐
7826 tion be shared data rather than private data. The distinction
7827 makes sense only on certain operating systems, where shared data is
7828 shared between processes running the same program, while private
7829 data exists in one copy per process.
7830
7831 --ffnnoo--ccoommmmoonn
7832 In C, allocate even uninitialized global variables in the data sec‐
7833 tion of the object file, rather than generating them as common
7834 blocks. This has the effect that if the same variable is declared
7835 (without "extern") in two different compilations, you will get an
7836 error when you link them. The only reason this might be useful is
7837 if you wish to verify that the program will work on other systems
7838 which always work this way.
7839
7840 --ffnnoo--iiddeenntt
7841 Ignore the ##iiddeenntt directive.
7842
7843 --ffnnoo--ggnnuu--lliinnkkeerr
7844 Do not output global initializations (such as C++ constructors and
7845 destructors) in the form used by the GNU linker (on systems where
7846 the GNU linker is the standard method of handling them). Use this
7847 option when you want to use a non-GNU linker, which also requires
7848 using the ccoolllleecctt22 program to make sure the system linker includes
7849 constructors and destructors. (ccoolllleecctt22 is included in the GCC
7850 distribution.) For systems which must use ccoolllleecctt22, the compiler
7851 driver ggcccc is configured to do this automatically.
7852
7853 --ffiinnhhiibbiitt--ssiizzee--ddiirreeccttiivvee
7854 Don't output a ".size" assembler directive, or anything else that
7855 would cause trouble if the function is split in the middle, and the
7856 two halves are placed at locations far apart in memory. This
7857 option is used when compiling crtstuff.c; you should not need to
7858 use it for anything else.
7859
7860 --ffvveerrbboossee--aassmm
7861 Put extra commentary information in the generated assembly code to
7862 make it more readable. This option is generally only of use to
7863 those who actually need to read the generated assembly code (per‐
7864 haps while debugging the compiler itself).
7865
7866 --ffnnoo--vveerrbboossee--aassmm, the default, causes the extra information to be
7867 omitted and is useful when comparing two assembler files.
7868
7869 --ffvvoollaattiillee
7870 Consider all memory references through pointers to be volatile.
7871
7872 --ffvvoollaattiillee--gglloobbaall
7873 Consider all memory references to extern and global data items to
7874 be volatile. GCC does not consider static data items to be
7875 volatile because of this switch.
7876
7877 --ffvvoollaattiillee--ssttaattiicc
7878 Consider all memory references to static data to be volatile.
7879
7880 --ffppiicc
7881 Generate position-independent code (PIC) suitable for use in a
7882 shared library, if supported for the target machine. Such code
7883 accesses all constant addresses through a global offset table
7884 (GOT). The dynamic loader resolves the GOT entries when the pro‐
7885 gram starts (the dynamic loader is not part of GCC; it is part of
7886 the operating system). If the GOT size for the linked executable
7887 exceeds a machine-specific maximum size, you get an error message
7888 from the linker indicating that --ffppiicc does not work; in that case,
7889 recompile with --ffPPIICC instead. (These maximums are 16k on the m88k,
7890 8k on the Sparc, and 32k on the m68k and RS/6000. The 386 has no
7891 such limit.)
7892
7893 Position-independent code requires special support, and therefore
7894 works only on certain machines. For the 386, GCC supports PIC for
7895 System V but not for the Sun 386i. Code generated for the IBM
7896 RS/6000 is always position-independent.
7897
7898 --ffPPIICC
7899 If supported for the target machine, emit position-independent
7900 code, suitable for dynamic linking and avoiding any limit on the
7901 size of the global offset table. This option makes a difference on
7902 the m68k, m88k, and the Sparc.
7903
7904 Position-independent code requires special support, and therefore
7905 works only on certain machines.
7906
7907 --ffffiixxeedd--reg
7908 Treat the register named reg as a fixed register; generated code
7909 should never refer to it (except perhaps as a stack pointer, frame
7910 pointer or in some other fixed role).
7911
7912 reg must be the name of a register. The register names accepted
7913 are machine-specific and are defined in the "REGISTER_NAMES" macro
7914 in the machine description macro file.
7915
7916 This flag does not have a negative form, because it specifies a
7917 three-way choice.
7918
7919 --ffccaallll--uusseedd--reg
7920 Treat the register named reg as an allocable register that is clob‐
7921 bered by function calls. It may be allocated for temporaries or
7922 variables that do not live across a call. Functions compiled this
7923 way will not save and restore the register reg.
7924
7925 It is an error to used this flag with the frame pointer or stack
7926 pointer. Use of this flag for other registers that have fixed per‐
7927 vasive roles in the machine's execution model will produce disas‐
7928 trous results.
7929
7930 This flag does not have a negative form, because it specifies a
7931 three-way choice.
7932
7933 --ffccaallll--ssaavveedd--reg
7934 Treat the register named reg as an allocable register saved by
7935 functions. It may be allocated even for temporaries or variables
7936 that live across a call. Functions compiled this way will save and
7937 restore the register reg if they use it.
7938
7939 It is an error to used this flag with the frame pointer or stack
7940 pointer. Use of this flag for other registers that have fixed per‐
7941 vasive roles in the machine's execution model will produce disas‐
7942 trous results.
7943
7944 A different sort of disaster will result from the use of this flag
7945 for a register in which function values may be returned.
7946
7947 This flag does not have a negative form, because it specifies a
7948 three-way choice.
7949
7950 --ffppaacckk--ssttrruucctt
7951 Pack all structure members together without holes.
7952
7953 WWaarrnniinngg:: the --ffppaacckk--ssttrruucctt switch causes GCC to generate code that
7954 is not binary compatible with code generated without that switch.
7955 Additionally, it makes the code suboptimial. Use it to conform to
7956 a non-default application binary interface.
7957
7958 --ffiinnssttrruummeenntt--ffuunnccttiioonnss
7959 Generate instrumentation calls for entry and exit to functions.
7960 Just after function entry and just before function exit, the fol‐
7961 lowing profiling functions will be called with the address of the
7962 current function and its call site. (On some platforms,
7963 "__builtin_return_address" does not work beyond the current func‐
7964 tion, so the call site information may not be available to the pro‐
7965 filing functions otherwise.)
7966
7967 void __cyg_profile_func_enter (void *this_fn,
7968 void *call_site);
7969 void __cyg_profile_func_exit (void *this_fn,
7970 void *call_site);
7971
7972 The first argument is the address of the start of the current func‐
7973 tion, which may be looked up exactly in the symbol table.
7974
7975 This instrumentation is also done for functions expanded inline in
7976 other functions. The profiling calls will indicate where, concep‐
7977 tually, the inline function is entered and exited. This means that
7978 addressable versions of such functions must be available. If all
7979 your uses of a function are expanded inline, this may mean an addi‐
7980 tional expansion of code size. If you use eexxtteerrnn iinnlliinnee in your C
7981 code, an addressable version of such functions must be provided.
7982 (This is normally the case anyways, but if you get lucky and the
7983 optimizer always expands the functions inline, you might have got‐
7984 ten away without providing static copies.)
7985
7986 A function may be given the attribute "no_instrument_function", in
7987 which case this instrumentation will not be done. This can be
7988 used, for example, for the profiling functions listed above, high-
7989 priority interrupt routines, and any functions from which the pro‐
7990 filing functions cannot safely be called (perhaps signal handlers,
7991 if the profiling routines generate output or allocate memory).
7992
7993 --ffssttaacckk--cchheecckk
7994 Generate code to verify that you do not go beyond the boundary of
7995 the stack. You should specify this flag if you are running in an
7996 environment with multiple threads, but only rarely need to specify
7997 it in a single-threaded environment since stack overflow is auto‐
7998 matically detected on nearly all systems if there is only one
7999 stack.
8000
8001 Note that this switch does not actually cause checking to be done;
8002 the operating system must do that. The switch causes generation of
8003 code to ensure that the operating system sees the stack being
8004 extended.
8005
8006 --ffssttaacckk--lliimmiitt--rreeggiisstteerr==reg
8007 --ffssttaacckk--lliimmiitt--ssyymmbbooll==sym
8008 --ffnnoo--ssttaacckk--lliimmiitt
8009 Generate code to ensure that the stack does not grow beyond a cer‐
8010 tain value, either the value of a register or the address of a sym‐
8011 bol. If the stack would grow beyond the value, a signal is raised.
8012 For most targets, the signal is raised before the stack overruns
8013 the boundary, so it is possible to catch the signal without taking
8014 special precautions.
8015
8016 For instance, if the stack starts at absolute address 00xx8800000000000000
8017 and grows downwards, you can use the flags --ffssttaacckk--lliimmiitt--ssyymm‐‐
8018 bbooll==____ssttaacckk__lliimmiitt and --WWll,,----ddeeffssyymm,,____ssttaacckk__lliimmiitt==00xx77ffffee00000000 to
8019 enforce a stack limit of 128KB. Note that this may only work with
8020 the GNU linker.
8021
8022 --ffaarrgguummeenntt--aalliiaass
8023 --ffaarrgguummeenntt--nnooaalliiaass
8024 --ffaarrgguummeenntt--nnooaalliiaass--gglloobbaall
8025 Specify the possible relationships among parameters and between
8026 parameters and global data.
8027
8028 --ffaarrgguummeenntt--aalliiaass specifies that arguments (parameters) may alias
8029 each other and may alias global storage.--ffaarrgguummeenntt--nnooaalliiaass speci‐
8030 fies that arguments do not alias each other, but may alias global
8031 storage.--ffaarrgguummeenntt--nnooaalliiaass--gglloobbaall specifies that arguments do not
8032 alias each other and do not alias global storage.
8033
8034 Each language will automatically use whatever option is required by
8035 the language standard. You should not need to use these options
8036 yourself.
8037
8038 --fflleeaaddiinngg--uunnddeerrssccoorree
8039 This option and its counterpart, --ffnnoo--lleeaaddiinngg--uunnddeerrssccoorree, forcibly
8040 change the way C symbols are represented in the object file. One
8041 use is to help link with legacy assembly code.
8042
8043 WWaarrnniinngg:: the --fflleeaaddiinngg--uunnddeerrssccoorree switch causes GCC to generate
8044 code that is not binary compatible with code generated without that
8045 switch. Use it to conform to a non-default application binary
8046 interface. Not all targets provide complete support for this
8047 switch.
8048
8050 This section describes several environment variables that affect how
8051 GCC operates. Some of them work by specifying directories or prefixes
8052 to use when searching for various kinds of files. Some are used to
8053 specify other aspects of the compilation environment.
8054
8055 Note that you can also specify places to search using options such as
8056 --BB, --II and --LL. These take precedence over places specified using envi‐
8057 ronment variables, which in turn take precedence over those specified
8058 by the configuration of GCC.
8059
8060 LLAANNGG
8061 LLCC__CCTTYYPPEE
8062 LLCC__MMEESSSSAAGGEESS
8063 LLCC__AALLLL
8064 These environment variables control the way that GCC uses localiza‐
8065 tion information that allow GCC to work with different national
8066 conventions. GCC inspects the locale categories LLCC__CCTTYYPPEE and
8067 LLCC__MMEESSSSAAGGEESS if it has been configured to do so. These locale cate‐
8068 gories can be set to any value supported by your installation. A
8069 typical value is eenn__UUKK for English in the United Kingdom.
8070
8071 The LLCC__CCTTYYPPEE environment variable specifies character classifica‐
8072 tion. GCC uses it to determine the character boundaries in a
8073 string; this is needed for some multibyte encodings that contain
8074 quote and escape characters that would otherwise be interpreted as
8075 a string end or escape.
8076
8077 The LLCC__MMEESSSSAAGGEESS environment variable specifies the language to use
8078 in diagnostic messages.
8079
8080 If the LLCC__AALLLL environment variable is set, it overrides the value
8081 of LLCC__CCTTYYPPEE and LLCC__MMEESSSSAAGGEESS; otherwise, LLCC__CCTTYYPPEE and LLCC__MMEESSSSAAGGEESS
8082 default to the value of the LLAANNGG environment variable. If none of
8083 these variables are set, GCC defaults to traditional C English
8084 behavior.
8085
8086 TTMMPPDDIIRR
8087 If TTMMPPDDIIRR is set, it specifies the directory to use for temporary
8088 files. GCC uses temporary files to hold the output of one stage of
8089 compilation which is to be used as input to the next stage: for
8090 example, the output of the preprocessor, which is the input to the
8091 compiler proper.
8092
8093 GGCCCC__EEXXEECC__PPRREEFFIIXX
8094 If GGCCCC__EEXXEECC__PPRREEFFIIXX is set, it specifies a prefix to use in the
8095 names of the subprograms executed by the compiler. No slash is
8096 added when this prefix is combined with the name of a subprogram,
8097 but you can specify a prefix that ends with a slash if you wish.
8098
8099 If GGCCCC__EEXXEECC__PPRREEFFIIXX is not set, GCC will attempt to figure out an
8100 appropriate prefix to use based on the pathname it was invoked
8101 with.
8102
8103 If GCC cannot find the subprogram using the specified prefix, it
8104 tries looking in the usual places for the subprogram.
8105
8106 The default value of GGCCCC__EEXXEECC__PPRREEFFIIXX is prefix/lib/gcc-lib/ where
8107 prefix is the value of "prefix" when you ran the configure script.
8108
8109 Other prefixes specified with --BB take precedence over this prefix.
8110
8111 This prefix is also used for finding files such as crt0.o that are
8112 used for linking.
8113
8114 In addition, the prefix is used in an unusual way in finding the
8115 directories to search for header files. For each of the standard
8116 directories whose name normally begins with //uussrr//llooccaall//lliibb//ggcccc--lliibb
8117 (more precisely, with the value of GGCCCC__IINNCCLLUUDDEE__DDIIRR), GCC tries
8118 replacing that beginning with the specified prefix to produce an
8119 alternate directory name. Thus, with --BBffoooo//, GCC will search
8120 foo/bar where it would normally search /usr/local/lib/bar. These
8121 alternate directories are searched first; the standard directories
8122 come next.
8123
8124 CCOOMMPPIILLEERR__PPAATTHH
8125 The value of CCOOMMPPIILLEERR__PPAATTHH is a colon-separated list of directo‐
8126 ries, much like PPAATTHH. GCC tries the directories thus specified
8127 when searching for subprograms, if it can't find the subprograms
8128 using GGCCCC__EEXXEECC__PPRREEFFIIXX.
8129
8130 LLIIBBRRAARRYY__PPAATTHH
8131 The value of LLIIBBRRAARRYY__PPAATTHH is a colon-separated list of directories,
8132 much like PPAATTHH. When configured as a native compiler, GCC tries
8133 the directories thus specified when searching for special linker
8134 files, if it can't find them using GGCCCC__EEXXEECC__PPRREEFFIIXX. Linking using
8135 GCC also uses these directories when searching for ordinary
8136 libraries for the --ll option (but directories specified with --LL come
8137 first).
8138
8139 LLAANNGG
8140 This variable is used to pass locale information to the compiler.
8141 One way in which this information is used is to determine the char‐
8142 acter set to be used when character literals, string literals and
8143 comments are parsed in C and C++. When the compiler is configured
8144 to allow multibyte characters, the following values for LLAANNGG are
8145 recognized:
8146
8147 CC--JJIISS
8148 Recognize JIS characters.
8149
8150 CC--SSJJIISS
8151 Recognize SJIS characters.
8152
8153 CC--EEUUCCJJPP
8154 Recognize EUCJP characters.
8155
8156 If LLAANNGG is not defined, or if it has some other value, then the
8157 compiler will use mblen and mbtowc as defined by the default locale
8158 to recognize and translate multibyte characters.
8159
8160 Some additional environments variables affect the behavior of the pre‐
8161 processor.
8162
8163 CCPPAATTHH
8164 CC__IINNCCLLUUDDEE__PPAATTHH
8165 CCPPLLUUSS__IINNCCLLUUDDEE__PPAATTHH
8166 OOBBJJCC__IINNCCLLUUDDEE__PPAATTHH
8167 Each variable's value is a list of directories separated by a spe‐
8168 cial character, much like PPAATTHH, in which to look for header files.
8169 The special character, "PATH_SEPARATOR", is target-dependent and
8170 determined at GCC build time. For Windows-based targets it is a
8171 semicolon, and for almost all other targets it is a colon.
8172
8173 CCPPAATTHH specifies a list of directories to be searched as if speci‐
8174 fied with --II, but after any paths given with --II options on the com‐
8175 mand line. The environment variable is used regardless of which
8176 language is being preprocessed.
8177
8178 The remaining environment variables apply only when preprocessing
8179 the particular language indicated. Each specifies a list of direc‐
8180 tories to be searched as if specified with --iissyysstteemm, but after any
8181 paths given with --iissyysstteemm options on the command line.
8182
8183 DDEEPPEENNDDEENNCCIIEESS__OOUUTTPPUUTT
8184 @anchor{DEPENDENCIES_OUTPUT} If this variable is set, its value
8185 specifies how to output dependencies for Make based on the non-sys‐
8186 tem header files processed by the compiler. System header files
8187 are ignored in the dependency output.
8188
8189 The value of DDEEPPEENNDDEENNCCIIEESS__OOUUTTPPUUTT can be just a file name, in which
8190 case the Make rules are written to that file, guessing the target
8191 name from the source file name. Or the value can have the form
8192 file target, in which case the rules are written to file file using
8193 target as the target name.
8194
8195 In other words, this environment variable is equivalent to combin‐
8196 ing the options --MMMM and --MMFF, with an optional --MMTT switch too.
8197
8198 SSUUNNPPRROO__DDEEPPEENNDDEENNCCIIEESS
8199 This variable is the same as the environment variable DDEEPPEENNDDEENN‐‐
8200 CCIIEESS__OOUUTTPPUUTT, except that system header files are not ignored, so it
8201 implies --MM rather than --MMMM. However, the dependence on the main
8202 input file is omitted.
8203
8205 For instructions on reporting bugs, see <hhttttpp::////ggcccc..ggnnuu..oorrgg//bbuuggss..hhttmmll>.
8206 Use of the ggccccbbuugg script to report bugs is recommended.
8207
8209 1. On some systems, ggcccc --sshhaarreedd needs to build supplementary stub code
8210 for constructors to work. On multi-libbed systems, ggcccc --sshhaarreedd
8211 must select the correct support libraries to link against. Failing
8212 to supply the correct flags may lead to subtle defects. Supplying
8213 them in cases where they are not necessary is innocuous.
8214
8216 gpl(7), gfdl(7), fsf-funding(7), cpp(1), gcov(1), g77(1), as(1), ld(1),
8217 gdb(1), adb(1), dbx(1), sdb(1) and the Info entries for gcc, cpp, g77,
8218 as, ld, binutils and gdb.
8219
8221 See the Info entry for ggcccc, or <hhttttpp::////ggcccc..ggnnuu..oorrgg//oonnlliinneeddooccss//ggcccc//CCoonn‐‐
8222 ttrriibbuuttoorrss..hhttmmll>, for contributors to GCC.
8223
8225 Copyright (c) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
8226 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
8227
8228 Permission is granted to copy, distribute and/or modify this document
8229 under the terms of the GNU Free Documentation License, Version 1.1 or
8230 any later version published by the Free Software Foundation; with the
8231 Invariant Sections being ``GNU General Public License'' and ``Funding
8232 Free Software'', the Front-Cover texts being (a) (see below), and with
8233 the Back-Cover Texts being (b) (see below). A copy of the license is
8234 included in the gfdl(7) man page.
8235
8236 (a) The FSF's Front-Cover Text is:
8237
8238 A GNU Manual
8239
8240 (b) The FSF's Back-Cover Text is:
8241
8242 You have freedom to copy and modify this GNU Manual, like GNU
8243 software. Copies published by the Free Software Foundation raise
8244 funds for GNU development.
8245
8246
8247
8248
82493rd Berkeley Distribution gcc-3.2.3 GCC(1)