invoke.texi 911 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267
  1. @c Copyright (C) 1988-2015 Free Software Foundation, Inc.
  2. @c This is part of the GCC manual.
  3. @c For copying conditions, see the file gcc.texi.
  4. @ignore
  5. @c man begin INCLUDE
  6. @include gcc-vers.texi
  7. @c man end
  8. @c man begin COPYRIGHT
  9. Copyright @copyright{} 1988-2015 Free Software Foundation, Inc.
  10. Permission is granted to copy, distribute and/or modify this document
  11. under the terms of the GNU Free Documentation License, Version 1.3 or
  12. any later version published by the Free Software Foundation; with the
  13. Invariant Sections being ``GNU General Public License'' and ``Funding
  14. Free Software'', the Front-Cover texts being (a) (see below), and with
  15. the Back-Cover Texts being (b) (see below). A copy of the license is
  16. included in the gfdl(7) man page.
  17. (a) The FSF's Front-Cover Text is:
  18. A GNU Manual
  19. (b) The FSF's Back-Cover Text is:
  20. You have freedom to copy and modify this GNU Manual, like GNU
  21. software. Copies published by the Free Software Foundation raise
  22. funds for GNU development.
  23. @c man end
  24. @c Set file name and title for the man page.
  25. @setfilename gcc
  26. @settitle GNU project C and C++ compiler
  27. @c man begin SYNOPSIS
  28. gcc [@option{-c}|@option{-S}|@option{-E}] [@option{-std=}@var{standard}]
  29. [@option{-g}] [@option{-pg}] [@option{-O}@var{level}]
  30. [@option{-W}@var{warn}@dots{}] [@option{-Wpedantic}]
  31. [@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}]
  32. [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
  33. [@option{-f}@var{option}@dots{}] [@option{-m}@var{machine-option}@dots{}]
  34. [@option{-o} @var{outfile}] [@@@var{file}] @var{infile}@dots{}
  35. Only the most useful options are listed here; see below for the
  36. remainder. @command{g++} accepts mostly the same options as @command{gcc}.
  37. @c man end
  38. @c man begin SEEALSO
  39. gpl(7), gfdl(7), fsf-funding(7),
  40. cpp(1), gcov(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1)
  41. and the Info entries for @file{gcc}, @file{cpp}, @file{as},
  42. @file{ld}, @file{binutils} and @file{gdb}.
  43. @c man end
  44. @c man begin BUGS
  45. For instructions on reporting bugs, see
  46. @w{@value{BUGURL}}.
  47. @c man end
  48. @c man begin AUTHOR
  49. See the Info entry for @command{gcc}, or
  50. @w{@uref{http://gcc.gnu.org/onlinedocs/gcc/Contributors.html}},
  51. for contributors to GCC@.
  52. @c man end
  53. @end ignore
  54. @node Invoking GCC
  55. @chapter GCC Command Options
  56. @cindex GCC command options
  57. @cindex command options
  58. @cindex options, GCC command
  59. @c man begin DESCRIPTION
  60. When you invoke GCC, it normally does preprocessing, compilation,
  61. assembly and linking. The ``overall options'' allow you to stop this
  62. process at an intermediate stage. For example, the @option{-c} option
  63. says not to run the linker. Then the output consists of object files
  64. output by the assembler.
  65. Other options are passed on to one stage of processing. Some options
  66. control the preprocessor and others the compiler itself. Yet other
  67. options control the assembler and linker; most of these are not
  68. documented here, since you rarely need to use any of them.
  69. @cindex C compilation options
  70. Most of the command-line options that you can use with GCC are useful
  71. for C programs; when an option is only useful with another language
  72. (usually C++), the explanation says so explicitly. If the description
  73. for a particular option does not mention a source language, you can use
  74. that option with all supported languages.
  75. @cindex C++ compilation options
  76. @xref{Invoking G++,,Compiling C++ Programs}, for a summary of special
  77. options for compiling C++ programs.
  78. @cindex grouping options
  79. @cindex options, grouping
  80. The @command{gcc} program accepts options and file names as operands. Many
  81. options have multi-letter names; therefore multiple single-letter options
  82. may @emph{not} be grouped: @option{-dv} is very different from @w{@samp{-d
  83. -v}}.
  84. @cindex order of options
  85. @cindex options, order
  86. You can mix options and other arguments. For the most part, the order
  87. you use doesn't matter. Order does matter when you use several
  88. options of the same kind; for example, if you specify @option{-L} more
  89. than once, the directories are searched in the order specified. Also,
  90. the placement of the @option{-l} option is significant.
  91. Many options have long names starting with @samp{-f} or with
  92. @samp{-W}---for example,
  93. @option{-fmove-loop-invariants}, @option{-Wformat} and so on. Most of
  94. these have both positive and negative forms; the negative form of
  95. @option{-ffoo} is @option{-fno-foo}. This manual documents
  96. only one of these two forms, whichever one is not the default.
  97. @c man end
  98. @xref{Option Index}, for an index to GCC's options.
  99. @menu
  100. * Option Summary:: Brief list of all options, without explanations.
  101. * Overall Options:: Controlling the kind of output:
  102. an executable, object files, assembler files,
  103. or preprocessed source.
  104. * Invoking G++:: Compiling C++ programs.
  105. * C Dialect Options:: Controlling the variant of C language compiled.
  106. * C++ Dialect Options:: Variations on C++.
  107. * Objective-C and Objective-C++ Dialect Options:: Variations on Objective-C
  108. and Objective-C++.
  109. * Language Independent Options:: Controlling how diagnostics should be
  110. formatted.
  111. * Warning Options:: How picky should the compiler be?
  112. * Debugging Options:: Symbol tables, measurements, and debugging dumps.
  113. * Optimize Options:: How much optimization?
  114. * Preprocessor Options:: Controlling header files and macro definitions.
  115. Also, getting dependency information for Make.
  116. * Assembler Options:: Passing options to the assembler.
  117. * Link Options:: Specifying libraries and so on.
  118. * Directory Options:: Where to find header files and libraries.
  119. Where to find the compiler executable files.
  120. * Spec Files:: How to pass switches to sub-processes.
  121. * Target Options:: Running a cross-compiler, or an old version of GCC.
  122. * Submodel Options:: Specifying minor hardware or convention variations,
  123. such as 68010 vs 68020.
  124. * Code Gen Options:: Specifying conventions for function calls, data layout
  125. and register usage.
  126. * Environment Variables:: Env vars that affect GCC.
  127. * Precompiled Headers:: Compiling a header once, and using it many times.
  128. @end menu
  129. @c man begin OPTIONS
  130. @node Option Summary
  131. @section Option Summary
  132. Here is a summary of all the options, grouped by type. Explanations are
  133. in the following sections.
  134. @table @emph
  135. @item Overall Options
  136. @xref{Overall Options,,Options Controlling the Kind of Output}.
  137. @gccoptlist{-c -S -E -o @var{file} -no-canonical-prefixes @gol
  138. -pipe -pass-exit-codes @gol
  139. -x @var{language} -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help @gol
  140. --version -wrapper @@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg} @gol
  141. -fdump-ada-spec@r{[}-slim@r{]} -fada-spec-parent=@var{unit} -fdump-go-spec=@var{file}}
  142. @item C Language Options
  143. @xref{C Dialect Options,,Options Controlling C Dialect}.
  144. @gccoptlist{-ansi -std=@var{standard} -fgnu89-inline @gol
  145. -aux-info @var{filename} -fallow-parameterless-variadic-functions @gol
  146. -fno-asm -fno-builtin -fno-builtin-@var{function} @gol
  147. -fhosted -ffreestanding -fopenacc -fopenmp -fopenmp-simd @gol
  148. -fms-extensions -fplan9-extensions -trigraphs -traditional -traditional-cpp @gol
  149. -fallow-single-precision -fcond-mismatch -flax-vector-conversions @gol
  150. -fsigned-bitfields -fsigned-char @gol
  151. -funsigned-bitfields -funsigned-char}
  152. @item C++ Language Options
  153. @xref{C++ Dialect Options,,Options Controlling C++ Dialect}.
  154. @gccoptlist{-fabi-version=@var{n} -fno-access-control -fcheck-new @gol
  155. -fconstexpr-depth=@var{n} -ffriend-injection @gol
  156. -fno-elide-constructors @gol
  157. -fno-enforce-eh-specs @gol
  158. -ffor-scope -fno-for-scope -fno-gnu-keywords @gol
  159. -fno-implicit-templates @gol
  160. -fno-implicit-inline-templates @gol
  161. -fno-implement-inlines -fms-extensions @gol
  162. -fno-nonansi-builtins -fnothrow-opt -fno-operator-names @gol
  163. -fno-optional-diags -fpermissive @gol
  164. -fno-pretty-templates @gol
  165. -frepo -fno-rtti -fsized-deallocation @gol
  166. -fstats -ftemplate-backtrace-limit=@var{n} @gol
  167. -ftemplate-depth=@var{n} @gol
  168. -fno-threadsafe-statics -fuse-cxa-atexit @gol
  169. -fno-weak -nostdinc++ @gol
  170. -fvisibility-inlines-hidden @gol
  171. -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
  172. -fvtv-counts -fvtv-debug @gol
  173. -fvisibility-ms-compat @gol
  174. -fext-numeric-literals @gol
  175. -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
  176. -Wdelete-non-virtual-dtor -Wliteral-suffix -Wnarrowing @gol
  177. -Wnoexcept -Wnon-virtual-dtor -Wreorder @gol
  178. -Weffc++ -Wstrict-null-sentinel @gol
  179. -Wno-non-template-friend -Wold-style-cast @gol
  180. -Woverloaded-virtual -Wno-pmf-conversions @gol
  181. -Wsign-promo}
  182. @item Objective-C and Objective-C++ Language Options
  183. @xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling
  184. Objective-C and Objective-C++ Dialects}.
  185. @gccoptlist{-fconstant-string-class=@var{class-name} @gol
  186. -fgnu-runtime -fnext-runtime @gol
  187. -fno-nil-receivers @gol
  188. -fobjc-abi-version=@var{n} @gol
  189. -fobjc-call-cxx-cdtors @gol
  190. -fobjc-direct-dispatch @gol
  191. -fobjc-exceptions @gol
  192. -fobjc-gc @gol
  193. -fobjc-nilcheck @gol
  194. -fobjc-std=objc1 @gol
  195. -fno-local-ivars @gol
  196. -fivar-visibility=@r{[}public@r{|}protected@r{|}private@r{|}package@r{]} @gol
  197. -freplace-objc-classes @gol
  198. -fzero-link @gol
  199. -gen-decls @gol
  200. -Wassign-intercept @gol
  201. -Wno-protocol -Wselector @gol
  202. -Wstrict-selector-match @gol
  203. -Wundeclared-selector}
  204. @item Language Independent Options
  205. @xref{Language Independent Options,,Options to Control Diagnostic Messages Formatting}.
  206. @gccoptlist{-fmessage-length=@var{n} @gol
  207. -fdiagnostics-show-location=@r{[}once@r{|}every-line@r{]} @gol
  208. -fdiagnostics-color=@r{[}auto@r{|}never@r{|}always@r{]} @gol
  209. -fno-diagnostics-show-option -fno-diagnostics-show-caret}
  210. @item Warning Options
  211. @xref{Warning Options,,Options to Request or Suppress Warnings}.
  212. @gccoptlist{-fsyntax-only -fmax-errors=@var{n} -Wpedantic @gol
  213. -pedantic-errors @gol
  214. -w -Wextra -Wall -Waddress -Waggregate-return @gol
  215. -Waggressive-loop-optimizations -Warray-bounds -Warray-bounds=@var{n} @gol
  216. -Wbool-compare @gol
  217. -Wno-attributes -Wno-builtin-macro-redefined @gol
  218. -Wc90-c99-compat -Wc99-c11-compat @gol
  219. -Wc++-compat -Wc++11-compat -Wc++14-compat -Wcast-align -Wcast-qual @gol
  220. -Wchar-subscripts -Wclobbered -Wcomment -Wconditionally-supported @gol
  221. -Wconversion -Wcoverage-mismatch -Wdate-time -Wdelete-incomplete -Wno-cpp @gol
  222. -Wno-deprecated -Wno-deprecated-declarations -Wno-designated-init @gol
  223. -Wdisabled-optimization @gol
  224. -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol
  225. -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol
  226. -Wno-endif-labels -Werror -Werror=* @gol
  227. -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
  228. -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
  229. -Wformat-security -Wformat-signedness -Wformat-y2k @gol
  230. -Wframe-larger-than=@var{len} -Wno-free-nonheap-object -Wjump-misses-init @gol
  231. -Wignored-qualifiers -Wincompatible-pointer-types @gol
  232. -Wimplicit -Wimplicit-function-declaration -Wimplicit-int @gol
  233. -Winit-self -Winline -Wno-int-conversion @gol
  234. -Wno-int-to-pointer-cast -Wno-invalid-offsetof @gol
  235. -Winvalid-pch -Wlarger-than=@var{len} -Wunsafe-loop-optimizations @gol
  236. -Wlogical-op -Wlogical-not-parentheses -Wlong-long @gol
  237. -Wmain -Wmaybe-uninitialized -Wmemset-transposed-args -Wmissing-braces @gol
  238. -Wmissing-field-initializers -Wmissing-include-dirs @gol
  239. -Wno-multichar -Wnonnull -Wnormalized=@r{[}none@r{|}id@r{|}nfc@r{|}nfkc@r{]} @gol
  240. -Wodr -Wno-overflow -Wopenmp-simd @gol
  241. -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
  242. -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
  243. -Wpointer-arith -Wno-pointer-to-int-cast @gol
  244. -Wredundant-decls -Wno-return-local-addr @gol
  245. -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
  246. -Wshift-count-negative -Wshift-count-overflow @gol
  247. -Wsign-compare -Wsign-conversion -Wfloat-conversion @gol
  248. -Wsizeof-pointer-memaccess -Wsizeof-array-argument @gol
  249. -Wstack-protector -Wstack-usage=@var{len} -Wstrict-aliasing @gol
  250. -Wstrict-aliasing=n @gol -Wstrict-overflow -Wstrict-overflow=@var{n} @gol
  251. -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{]} @gol
  252. -Wsuggest-final-types @gol -Wsuggest-final-methods @gol -Wsuggest-override @gol
  253. -Wmissing-format-attribute @gol
  254. -Wswitch -Wswitch-default -Wswitch-enum -Wswitch-bool -Wsync-nand @gol
  255. -Wsystem-headers -Wtrampolines -Wtrigraphs -Wtype-limits -Wundef @gol
  256. -Wuninitialized -Wunknown-pragmas -Wno-pragmas @gol
  257. -Wunsuffixed-float-constants -Wunused -Wunused-function @gol
  258. -Wunused-label -Wunused-local-typedefs -Wunused-parameter @gol
  259. -Wno-unused-result -Wunused-value @gol -Wunused-variable @gol
  260. -Wunused-but-set-parameter -Wunused-but-set-variable @gol
  261. -Wuseless-cast -Wvariadic-macros -Wvector-operation-performance @gol
  262. -Wvla -Wvolatile-register-var -Wwrite-strings @gol
  263. -Wzero-as-null-pointer-constant}
  264. @item C and Objective-C-only Warning Options
  265. @gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
  266. -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs @gol
  267. -Wold-style-declaration -Wold-style-definition @gol
  268. -Wstrict-prototypes -Wtraditional -Wtraditional-conversion @gol
  269. -Wdeclaration-after-statement -Wpointer-sign}
  270. @item Debugging Options
  271. @xref{Debugging Options,,Options for Debugging Your Program or GCC}.
  272. @gccoptlist{-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol
  273. -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol
  274. -fasan-shadow-offset=@var{number} -fsanitize-undefined-trap-on-error @gol
  275. -fcheck-pointer-bounds -fchkp-check-incomplete-type @gol
  276. -fchkp-first-field-has-own-bounds -fchkp-narrow-bounds @gol
  277. -fchkp-narrow-to-innermost-array -fchkp-optimize @gol
  278. -fchkp-use-fast-string-functions -fchkp-use-nochk-string-functions @gol
  279. -fchkp-use-static-bounds -fchkp-use-static-const-bounds @gol
  280. -fchkp-treat-zero-dynamic-size-as-infinite -fchkp-check-read @gol
  281. -fchkp-check-read -fchkp-check-write -fchkp-store-bounds @gol
  282. -fchkp-instrument-calls -fchkp-instrument-marked-only @gol
  283. -fchkp-use-wrappers @gol
  284. -fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
  285. -fdisable-ipa-@var{pass_name} @gol
  286. -fdisable-rtl-@var{pass_name} @gol
  287. -fdisable-rtl-@var{pass-name}=@var{range-list} @gol
  288. -fdisable-tree-@var{pass_name} @gol
  289. -fdisable-tree-@var{pass-name}=@var{range-list} @gol
  290. -fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links @gol
  291. -fdump-translation-unit@r{[}-@var{n}@r{]} @gol
  292. -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
  293. -fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol
  294. -fdump-passes @gol
  295. -fdump-statistics @gol
  296. -fdump-tree-all @gol
  297. -fdump-tree-original@r{[}-@var{n}@r{]} @gol
  298. -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
  299. -fdump-tree-cfg -fdump-tree-alias @gol
  300. -fdump-tree-ch @gol
  301. -fdump-tree-ssa@r{[}-@var{n}@r{]} -fdump-tree-pre@r{[}-@var{n}@r{]} @gol
  302. -fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol
  303. -fdump-tree-gimple@r{[}-raw@r{]} @gol
  304. -fdump-tree-dom@r{[}-@var{n}@r{]} @gol
  305. -fdump-tree-dse@r{[}-@var{n}@r{]} @gol
  306. -fdump-tree-phiprop@r{[}-@var{n}@r{]} @gol
  307. -fdump-tree-phiopt@r{[}-@var{n}@r{]} @gol
  308. -fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
  309. -fdump-tree-copyrename@r{[}-@var{n}@r{]} @gol
  310. -fdump-tree-nrv -fdump-tree-vect @gol
  311. -fdump-tree-sink @gol
  312. -fdump-tree-sra@r{[}-@var{n}@r{]} @gol
  313. -fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
  314. -fdump-tree-fre@r{[}-@var{n}@r{]} @gol
  315. -fdump-tree-vtable-verify @gol
  316. -fdump-tree-vrp@r{[}-@var{n}@r{]} @gol
  317. -fdump-tree-storeccp@r{[}-@var{n}@r{]} @gol
  318. -fdump-final-insns=@var{file} @gol
  319. -fcompare-debug@r{[}=@var{opts}@r{]} -fcompare-debug-second @gol
  320. -feliminate-dwarf2-dups -fno-eliminate-unused-debug-types @gol
  321. -feliminate-unused-debug-symbols -femit-class-debug-always @gol
  322. -fenable-@var{kind}-@var{pass} @gol
  323. -fenable-@var{kind}-@var{pass}=@var{range-list} @gol
  324. -fdebug-types-section -fmem-report-wpa @gol
  325. -fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol
  326. -fopt-info @gol
  327. -fopt-info-@var{options}@r{[}=@var{file}@r{]} @gol
  328. -frandom-seed=@var{number} -fsched-verbose=@var{n} @gol
  329. -fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol
  330. -fstack-usage -ftest-coverage -ftime-report -fvar-tracking @gol
  331. -fvar-tracking-assignments -fvar-tracking-assignments-toggle @gol
  332. -g -g@var{level} -gtoggle -gcoff -gdwarf-@var{version} @gol
  333. -ggdb -grecord-gcc-switches -gno-record-gcc-switches @gol
  334. -gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol
  335. -gvms -gxcoff -gxcoff+ -gz@r{[}=@var{type}@r{]} @gol
  336. -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
  337. -fdebug-prefix-map=@var{old}=@var{new} @gol
  338. -femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
  339. -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol
  340. -p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
  341. -print-multi-directory -print-multi-lib -print-multi-os-directory @gol
  342. -print-prog-name=@var{program} -print-search-dirs -Q @gol
  343. -print-sysroot -print-sysroot-headers-suffix @gol
  344. -save-temps -save-temps=cwd -save-temps=obj -time@r{[}=@var{file}@r{]}}
  345. @item Optimization Options
  346. @xref{Optimize Options,,Options that Control Optimization}.
  347. @gccoptlist{-faggressive-loop-optimizations -falign-functions[=@var{n}] @gol
  348. -falign-jumps[=@var{n}] @gol
  349. -falign-labels[=@var{n}] -falign-loops[=@var{n}] @gol
  350. -fassociative-math -fauto-profile -fauto-profile[=@var{path}] @gol
  351. -fauto-inc-dec -fbranch-probabilities @gol
  352. -fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol
  353. -fbtr-bb-exclusive -fcaller-saves @gol
  354. -fcheck-data-deps -fcombine-stack-adjustments -fconserve-stack @gol
  355. -fcompare-elim -fcprop-registers -fcrossjumping @gol
  356. -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules @gol
  357. -fcx-limited-range @gol
  358. -fdata-sections -fdce -fdelayed-branch @gol
  359. -fdelete-null-pointer-checks -fdevirtualize -fdevirtualize-speculatively @gol
  360. -fdevirtualize-at-ltrans -fdse @gol
  361. -fearly-inlining -fipa-sra -fexpensive-optimizations -ffat-lto-objects @gol
  362. -ffast-math -ffinite-math-only -ffloat-store -fexcess-precision=@var{style} @gol
  363. -fforward-propagate -ffp-contract=@var{style} -ffunction-sections @gol
  364. -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm -fgraphite-identity @gol
  365. -fgcse-sm -fhoist-adjacent-loads -fif-conversion @gol
  366. -fif-conversion2 -findirect-inlining @gol
  367. -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
  368. -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-cp-alignment @gol
  369. -fipa-pta -fipa-profile -fipa-pure-const -fipa-reference -fipa-icf @gol
  370. -fira-algorithm=@var{algorithm} @gol
  371. -fira-region=@var{region} -fira-hoist-pressure @gol
  372. -fira-loop-pressure -fno-ira-share-save-slots @gol
  373. -fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
  374. -fisolate-erroneous-paths-dereference -fisolate-erroneous-paths-attribute @gol
  375. -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
  376. -flive-range-shrinkage @gol
  377. -floop-block -floop-interchange -floop-strip-mine @gol
  378. -floop-unroll-and-jam -floop-nest-optimize @gol
  379. -floop-parallelize-all -flra-remat -flto -flto-compression-level @gol
  380. -flto-partition=@var{alg} -flto-report -flto-report-wpa -fmerge-all-constants @gol
  381. -fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol
  382. -fmove-loop-invariants -fno-branch-count-reg @gol
  383. -fno-defer-pop -fno-function-cse -fno-guess-branch-probability @gol
  384. -fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
  385. -fno-sched-interblock -fno-sched-spec -fno-signed-zeros @gol
  386. -fno-toplevel-reorder -fno-trapping-math -fno-zero-initialized-in-bss @gol
  387. -fomit-frame-pointer -foptimize-sibling-calls @gol
  388. -fpartial-inlining -fpeel-loops -fpredictive-commoning @gol
  389. -fprefetch-loop-arrays -fprofile-report @gol
  390. -fprofile-correction -fprofile-dir=@var{path} -fprofile-generate @gol
  391. -fprofile-generate=@var{path} @gol
  392. -fprofile-use -fprofile-use=@var{path} -fprofile-values @gol
  393. -fprofile-reorder-functions @gol
  394. -freciprocal-math -free -frename-registers -freorder-blocks @gol
  395. -freorder-blocks-and-partition -freorder-functions @gol
  396. -frerun-cse-after-loop -freschedule-modulo-scheduled-loops @gol
  397. -frounding-math -fsched2-use-superblocks -fsched-pressure @gol
  398. -fsched-spec-load -fsched-spec-load-dangerous @gol
  399. -fsched-stalled-insns-dep[=@var{n}] -fsched-stalled-insns[=@var{n}] @gol
  400. -fsched-group-heuristic -fsched-critical-path-heuristic @gol
  401. -fsched-spec-insn-heuristic -fsched-rank-heuristic @gol
  402. -fsched-last-insn-heuristic -fsched-dep-count-heuristic @gol
  403. -fschedule-fusion @gol
  404. -fschedule-insns -fschedule-insns2 -fsection-anchors @gol
  405. -fselective-scheduling -fselective-scheduling2 @gol
  406. -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol
  407. -fsemantic-interposition @gol
  408. -fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol
  409. -fsplit-ivs-in-unroller -fsplit-wide-types -fssa-phiopt @gol
  410. -fstack-protector -fstack-protector-all -fstack-protector-strong @gol
  411. -fstack-protector-explicit -fstdarg-opt -fstrict-aliasing @gol
  412. -fstrict-overflow -fthread-jumps -ftracer -ftree-bit-ccp @gol
  413. -ftree-builtin-call-dce -ftree-ccp -ftree-ch @gol
  414. -ftree-coalesce-inline-vars -ftree-coalesce-vars -ftree-copy-prop @gol
  415. -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse @gol
  416. -ftree-forwprop -ftree-fre -ftree-loop-if-convert @gol
  417. -ftree-loop-if-convert-stores -ftree-loop-im @gol
  418. -ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-patterns @gol
  419. -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
  420. -ftree-loop-vectorize @gol
  421. -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-partial-pre -ftree-pta @gol
  422. -ftree-reassoc -ftree-sink -ftree-slsr -ftree-sra @gol
  423. -ftree-switch-conversion -ftree-tail-merge -ftree-ter @gol
  424. -ftree-vectorize -ftree-vrp @gol
  425. -funit-at-a-time -funroll-all-loops -funroll-loops @gol
  426. -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
  427. -fipa-ra -fvariable-expansion-in-unroller -fvect-cost-model -fvpt @gol
  428. -fweb -fwhole-program -fwpa -fuse-linker-plugin @gol
  429. --param @var{name}=@var{value}
  430. -O -O0 -O1 -O2 -O3 -Os -Ofast -Og}
  431. @item Preprocessor Options
  432. @xref{Preprocessor Options,,Options Controlling the Preprocessor}.
  433. @gccoptlist{-A@var{question}=@var{answer} @gol
  434. -A-@var{question}@r{[}=@var{answer}@r{]} @gol
  435. -C -dD -dI -dM -dN @gol
  436. -D@var{macro}@r{[}=@var{defn}@r{]} -E -H @gol
  437. -idirafter @var{dir} @gol
  438. -include @var{file} -imacros @var{file} @gol
  439. -iprefix @var{file} -iwithprefix @var{dir} @gol
  440. -iwithprefixbefore @var{dir} -isystem @var{dir} @gol
  441. -imultilib @var{dir} -isysroot @var{dir} @gol
  442. -M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
  443. -P -fdebug-cpp -ftrack-macro-expansion -fworking-directory @gol
  444. -remap -trigraphs -undef -U@var{macro} @gol
  445. -Wp,@var{option} -Xpreprocessor @var{option} -no-integrated-cpp}
  446. @item Assembler Option
  447. @xref{Assembler Options,,Passing Options to the Assembler}.
  448. @gccoptlist{-Wa,@var{option} -Xassembler @var{option}}
  449. @item Linker Options
  450. @xref{Link Options,,Options for Linking}.
  451. @gccoptlist{@var{object-file-name} -fuse-ld=@var{linker} -l@var{library} @gol
  452. -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
  453. -s -static -static-libgcc -static-libstdc++ @gol
  454. -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
  455. -static-libmpx -static-libmpxwrappers @gol
  456. -shared -shared-libgcc -symbolic @gol
  457. -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
  458. -u @var{symbol} -z @var{keyword}}
  459. @item Directory Options
  460. @xref{Directory Options,,Options for Directory Search}.
  461. @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol
  462. -iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol
  463. --sysroot=@var{dir} --no-sysroot-suffix}
  464. @item Machine Dependent Options
  465. @xref{Submodel Options,,Hardware Models and Configurations}.
  466. @c This list is ordered alphanumerically by subsection name.
  467. @c Try and put the significant identifier (CPU or system) first,
  468. @c so users have a clue at guessing where the ones they want will be.
  469. @emph{AArch64 Options}
  470. @gccoptlist{-mabi=@var{name} -mbig-endian -mlittle-endian @gol
  471. -mgeneral-regs-only @gol
  472. -mcmodel=tiny -mcmodel=small -mcmodel=large @gol
  473. -mstrict-align @gol
  474. -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer @gol
  475. -mtls-dialect=desc -mtls-dialect=traditional @gol
  476. -mfix-cortex-a53-835769 -mno-fix-cortex-a53-835769 @gol
  477. -mfix-cortex-a53-843419 -mno-fix-cortex-a53-843419 @gol
  478. -march=@var{name} -mcpu=@var{name} -mtune=@var{name}}
  479. @emph{Adapteva Epiphany Options}
  480. @gccoptlist{-mhalf-reg-file -mprefer-short-insn-regs @gol
  481. -mbranch-cost=@var{num} -mcmove -mnops=@var{num} -msoft-cmpsf @gol
  482. -msplit-lohi -mpost-inc -mpost-modify -mstack-offset=@var{num} @gol
  483. -mround-nearest -mlong-calls -mshort-calls -msmall16 @gol
  484. -mfp-mode=@var{mode} -mvect-double -max-vect-align=@var{num} @gol
  485. -msplit-vecmove-early -m1reg-@var{reg}}
  486. @emph{ARC Options}
  487. @gccoptlist{-mbarrel-shifter @gol
  488. -mcpu=@var{cpu} -mA6 -mARC600 -mA7 -mARC700 @gol
  489. -mdpfp -mdpfp-compact -mdpfp-fast -mno-dpfp-lrsr @gol
  490. -mea -mno-mpy -mmul32x16 -mmul64 @gol
  491. -mnorm -mspfp -mspfp-compact -mspfp-fast -msimd -msoft-float -mswap @gol
  492. -mcrc -mdsp-packa -mdvbf -mlock -mmac-d16 -mmac-24 -mrtsc -mswape @gol
  493. -mtelephony -mxy -misize -mannotate-align -marclinux -marclinux_prof @gol
  494. -mepilogue-cfi -mlong-calls -mmedium-calls -msdata @gol
  495. -mucb-mcount -mvolatile-cache @gol
  496. -malign-call -mauto-modify-reg -mbbit-peephole -mno-brcc @gol
  497. -mcase-vector-pcrel -mcompact-casesi -mno-cond-exec -mearly-cbranchsi @gol
  498. -mexpand-adddi -mindexed-loads -mlra -mlra-priority-none @gol
  499. -mlra-priority-compact mlra-priority-noncompact -mno-millicode @gol
  500. -mmixed-code -mq-class -mRcq -mRcw -msize-level=@var{level} @gol
  501. -mtune=@var{cpu} -mmultcost=@var{num} -munalign-prob-threshold=@var{probability}}
  502. @emph{ARM Options}
  503. @gccoptlist{-mapcs-frame -mno-apcs-frame @gol
  504. -mabi=@var{name} @gol
  505. -mapcs-stack-check -mno-apcs-stack-check @gol
  506. -mapcs-float -mno-apcs-float @gol
  507. -mapcs-reentrant -mno-apcs-reentrant @gol
  508. -msched-prolog -mno-sched-prolog @gol
  509. -mlittle-endian -mbig-endian @gol
  510. -mfloat-abi=@var{name} @gol
  511. -mfp16-format=@var{name}
  512. -mthumb-interwork -mno-thumb-interwork @gol
  513. -mcpu=@var{name} -march=@var{name} -mfpu=@var{name} @gol
  514. -mtune=@var{name} -mprint-tune-info @gol
  515. -mstructure-size-boundary=@var{n} @gol
  516. -mabort-on-noreturn @gol
  517. -mlong-calls -mno-long-calls @gol
  518. -msingle-pic-base -mno-single-pic-base @gol
  519. -mpic-register=@var{reg} @gol
  520. -mnop-fun-dllimport @gol
  521. -mpoke-function-name @gol
  522. -mthumb -marm @gol
  523. -mtpcs-frame -mtpcs-leaf-frame @gol
  524. -mcaller-super-interworking -mcallee-super-interworking @gol
  525. -mtp=@var{name} -mtls-dialect=@var{dialect} @gol
  526. -mword-relocations @gol
  527. -mfix-cortex-m3-ldrd @gol
  528. -munaligned-access @gol
  529. -mneon-for-64bits @gol
  530. -mslow-flash-data @gol
  531. -masm-syntax-unified @gol
  532. -mrestrict-it}
  533. @emph{AVR Options}
  534. @gccoptlist{-mmcu=@var{mcu} -maccumulate-args -mbranch-cost=@var{cost} @gol
  535. -mcall-prologues -mint8 -mn_flash=@var{size} -mno-interrupts @gol
  536. -mrelax -mrmw -mstrict-X -mtiny-stack -nodevicelib -Waddr-space-convert}
  537. @emph{Blackfin Options}
  538. @gccoptlist{-mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]} @gol
  539. -msim -momit-leaf-frame-pointer -mno-omit-leaf-frame-pointer @gol
  540. -mspecld-anomaly -mno-specld-anomaly -mcsync-anomaly -mno-csync-anomaly @gol
  541. -mlow-64k -mno-low64k -mstack-check-l1 -mid-shared-library @gol
  542. -mno-id-shared-library -mshared-library-id=@var{n} @gol
  543. -mleaf-id-shared-library -mno-leaf-id-shared-library @gol
  544. -msep-data -mno-sep-data -mlong-calls -mno-long-calls @gol
  545. -mfast-fp -minline-plt -mmulticore -mcorea -mcoreb -msdram @gol
  546. -micplb}
  547. @emph{C6X Options}
  548. @gccoptlist{-mbig-endian -mlittle-endian -march=@var{cpu} @gol
  549. -msim -msdata=@var{sdata-type}}
  550. @emph{CRIS Options}
  551. @gccoptlist{-mcpu=@var{cpu} -march=@var{cpu} -mtune=@var{cpu} @gol
  552. -mmax-stack-frame=@var{n} -melinux-stacksize=@var{n} @gol
  553. -metrax4 -metrax100 -mpdebug -mcc-init -mno-side-effects @gol
  554. -mstack-align -mdata-align -mconst-align @gol
  555. -m32-bit -m16-bit -m8-bit -mno-prologue-epilogue -mno-gotplt @gol
  556. -melf -maout -melinux -mlinux -sim -sim2 @gol
  557. -mmul-bug-workaround -mno-mul-bug-workaround}
  558. @emph{CR16 Options}
  559. @gccoptlist{-mmac @gol
  560. -mcr16cplus -mcr16c @gol
  561. -msim -mint32 -mbit-ops
  562. -mdata-model=@var{model}}
  563. @emph{Darwin Options}
  564. @gccoptlist{-all_load -allowable_client -arch -arch_errors_fatal @gol
  565. -arch_only -bind_at_load -bundle -bundle_loader @gol
  566. -client_name -compatibility_version -current_version @gol
  567. -dead_strip @gol
  568. -dependency-file -dylib_file -dylinker_install_name @gol
  569. -dynamic -dynamiclib -exported_symbols_list @gol
  570. -filelist -flat_namespace -force_cpusubtype_ALL @gol
  571. -force_flat_namespace -headerpad_max_install_names @gol
  572. -iframework @gol
  573. -image_base -init -install_name -keep_private_externs @gol
  574. -multi_module -multiply_defined -multiply_defined_unused @gol
  575. -noall_load -no_dead_strip_inits_and_terms @gol
  576. -nofixprebinding -nomultidefs -noprebind -noseglinkedit @gol
  577. -pagezero_size -prebind -prebind_all_twolevel_modules @gol
  578. -private_bundle -read_only_relocs -sectalign @gol
  579. -sectobjectsymbols -whyload -seg1addr @gol
  580. -sectcreate -sectobjectsymbols -sectorder @gol
  581. -segaddr -segs_read_only_addr -segs_read_write_addr @gol
  582. -seg_addr_table -seg_addr_table_filename -seglinkedit @gol
  583. -segprot -segs_read_only_addr -segs_read_write_addr @gol
  584. -single_module -static -sub_library -sub_umbrella @gol
  585. -twolevel_namespace -umbrella -undefined @gol
  586. -unexported_symbols_list -weak_reference_mismatches @gol
  587. -whatsloaded -F -gused -gfull -mmacosx-version-min=@var{version} @gol
  588. -mkernel -mone-byte-bool}
  589. @emph{DEC Alpha Options}
  590. @gccoptlist{-mno-fp-regs -msoft-float @gol
  591. -mieee -mieee-with-inexact -mieee-conformant @gol
  592. -mfp-trap-mode=@var{mode} -mfp-rounding-mode=@var{mode} @gol
  593. -mtrap-precision=@var{mode} -mbuild-constants @gol
  594. -mcpu=@var{cpu-type} -mtune=@var{cpu-type} @gol
  595. -mbwx -mmax -mfix -mcix @gol
  596. -mfloat-vax -mfloat-ieee @gol
  597. -mexplicit-relocs -msmall-data -mlarge-data @gol
  598. -msmall-text -mlarge-text @gol
  599. -mmemory-latency=@var{time}}
  600. @emph{FR30 Options}
  601. @gccoptlist{-msmall-model -mno-lsim}
  602. @emph{FRV Options}
  603. @gccoptlist{-mgpr-32 -mgpr-64 -mfpr-32 -mfpr-64 @gol
  604. -mhard-float -msoft-float @gol
  605. -malloc-cc -mfixed-cc -mdword -mno-dword @gol
  606. -mdouble -mno-double @gol
  607. -mmedia -mno-media -mmuladd -mno-muladd @gol
  608. -mfdpic -minline-plt -mgprel-ro -multilib-library-pic @gol
  609. -mlinked-fp -mlong-calls -malign-labels @gol
  610. -mlibrary-pic -macc-4 -macc-8 @gol
  611. -mpack -mno-pack -mno-eflags -mcond-move -mno-cond-move @gol
  612. -moptimize-membar -mno-optimize-membar @gol
  613. -mscc -mno-scc -mcond-exec -mno-cond-exec @gol
  614. -mvliw-branch -mno-vliw-branch @gol
  615. -mmulti-cond-exec -mno-multi-cond-exec -mnested-cond-exec @gol
  616. -mno-nested-cond-exec -mtomcat-stats @gol
  617. -mTLS -mtls @gol
  618. -mcpu=@var{cpu}}
  619. @emph{GNU/Linux Options}
  620. @gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol
  621. -tno-android-cc -tno-android-ld}
  622. @emph{H8/300 Options}
  623. @gccoptlist{-mrelax -mh -ms -mn -mexr -mno-exr -mint32 -malign-300}
  624. @emph{HPPA Options}
  625. @gccoptlist{-march=@var{architecture-type} @gol
  626. -mdisable-fpregs -mdisable-indexing @gol
  627. -mfast-indirect-calls -mgas -mgnu-ld -mhp-ld @gol
  628. -mfixed-range=@var{register-range} @gol
  629. -mjump-in-delay -mlinker-opt -mlong-calls @gol
  630. -mlong-load-store -mno-disable-fpregs @gol
  631. -mno-disable-indexing -mno-fast-indirect-calls -mno-gas @gol
  632. -mno-jump-in-delay -mno-long-load-store @gol
  633. -mno-portable-runtime -mno-soft-float @gol
  634. -mno-space-regs -msoft-float -mpa-risc-1-0 @gol
  635. -mpa-risc-1-1 -mpa-risc-2-0 -mportable-runtime @gol
  636. -mschedule=@var{cpu-type} -mspace-regs -msio -mwsio @gol
  637. -munix=@var{unix-std} -nolibdld -static -threads}
  638. @emph{IA-64 Options}
  639. @gccoptlist{-mbig-endian -mlittle-endian -mgnu-as -mgnu-ld -mno-pic @gol
  640. -mvolatile-asm-stop -mregister-names -msdata -mno-sdata @gol
  641. -mconstant-gp -mauto-pic -mfused-madd @gol
  642. -minline-float-divide-min-latency @gol
  643. -minline-float-divide-max-throughput @gol
  644. -mno-inline-float-divide @gol
  645. -minline-int-divide-min-latency @gol
  646. -minline-int-divide-max-throughput @gol
  647. -mno-inline-int-divide @gol
  648. -minline-sqrt-min-latency -minline-sqrt-max-throughput @gol
  649. -mno-inline-sqrt @gol
  650. -mdwarf2-asm -mearly-stop-bits @gol
  651. -mfixed-range=@var{register-range} -mtls-size=@var{tls-size} @gol
  652. -mtune=@var{cpu-type} -milp32 -mlp64 @gol
  653. -msched-br-data-spec -msched-ar-data-spec -msched-control-spec @gol
  654. -msched-br-in-data-spec -msched-ar-in-data-spec -msched-in-control-spec @gol
  655. -msched-spec-ldc -msched-spec-control-ldc @gol
  656. -msched-prefer-non-data-spec-insns -msched-prefer-non-control-spec-insns @gol
  657. -msched-stop-bits-after-every-cycle -msched-count-spec-in-critical-path @gol
  658. -msel-sched-dont-check-control-spec -msched-fp-mem-deps-zero-cost @gol
  659. -msched-max-memory-insns-hard-limit -msched-max-memory-insns=@var{max-insns}}
  660. @emph{LM32 Options}
  661. @gccoptlist{-mbarrel-shift-enabled -mdivide-enabled -mmultiply-enabled @gol
  662. -msign-extend-enabled -muser-enabled}
  663. @emph{M32R/D Options}
  664. @gccoptlist{-m32r2 -m32rx -m32r @gol
  665. -mdebug @gol
  666. -malign-loops -mno-align-loops @gol
  667. -missue-rate=@var{number} @gol
  668. -mbranch-cost=@var{number} @gol
  669. -mmodel=@var{code-size-model-type} @gol
  670. -msdata=@var{sdata-type} @gol
  671. -mno-flush-func -mflush-func=@var{name} @gol
  672. -mno-flush-trap -mflush-trap=@var{number} @gol
  673. -G @var{num}}
  674. @emph{M32C Options}
  675. @gccoptlist{-mcpu=@var{cpu} -msim -memregs=@var{number}}
  676. @emph{M680x0 Options}
  677. @gccoptlist{-march=@var{arch} -mcpu=@var{cpu} -mtune=@var{tune} @gol
  678. -m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 @gol
  679. -m68060 -mcpu32 -m5200 -m5206e -m528x -m5307 -m5407 @gol
  680. -mcfv4e -mbitfield -mno-bitfield -mc68000 -mc68020 @gol
  681. -mnobitfield -mrtd -mno-rtd -mdiv -mno-div -mshort @gol
  682. -mno-short -mhard-float -m68881 -msoft-float -mpcrel @gol
  683. -malign-int -mstrict-align -msep-data -mno-sep-data @gol
  684. -mshared-library-id=n -mid-shared-library -mno-id-shared-library @gol
  685. -mxgot -mno-xgot}
  686. @emph{MCore Options}
  687. @gccoptlist{-mhardlit -mno-hardlit -mdiv -mno-div -mrelax-immediates @gol
  688. -mno-relax-immediates -mwide-bitfields -mno-wide-bitfields @gol
  689. -m4byte-functions -mno-4byte-functions -mcallgraph-data @gol
  690. -mno-callgraph-data -mslow-bytes -mno-slow-bytes -mno-lsim @gol
  691. -mlittle-endian -mbig-endian -m210 -m340 -mstack-increment}
  692. @emph{MeP Options}
  693. @gccoptlist{-mabsdiff -mall-opts -maverage -mbased=@var{n} -mbitops @gol
  694. -mc=@var{n} -mclip -mconfig=@var{name} -mcop -mcop32 -mcop64 -mivc2 @gol
  695. -mdc -mdiv -meb -mel -mio-volatile -ml -mleadz -mm -mminmax @gol
  696. -mmult -mno-opts -mrepeat -ms -msatur -msdram -msim -msimnovec -mtf @gol
  697. -mtiny=@var{n}}
  698. @emph{MicroBlaze Options}
  699. @gccoptlist{-msoft-float -mhard-float -msmall-divides -mcpu=@var{cpu} @gol
  700. -mmemcpy -mxl-soft-mul -mxl-soft-div -mxl-barrel-shift @gol
  701. -mxl-pattern-compare -mxl-stack-check -mxl-gp-opt -mno-clearbss @gol
  702. -mxl-multiply-high -mxl-float-convert -mxl-float-sqrt @gol
  703. -mbig-endian -mlittle-endian -mxl-reorder -mxl-mode-@var{app-model}}
  704. @emph{MIPS Options}
  705. @gccoptlist{-EL -EB -march=@var{arch} -mtune=@var{arch} @gol
  706. -mips1 -mips2 -mips3 -mips4 -mips32 -mips32r2 -mips32r3 -mips32r5 @gol
  707. -mips32r6 -mips64 -mips64r2 -mips64r3 -mips64r5 -mips64r6 @gol
  708. -mips16 -mno-mips16 -mflip-mips16 @gol
  709. -minterlink-compressed -mno-interlink-compressed @gol
  710. -minterlink-mips16 -mno-interlink-mips16 @gol
  711. -mabi=@var{abi} -mabicalls -mno-abicalls @gol
  712. -mshared -mno-shared -mplt -mno-plt -mxgot -mno-xgot @gol
  713. -mgp32 -mgp64 -mfp32 -mfpxx -mfp64 -mhard-float -msoft-float @gol
  714. -mno-float -msingle-float -mdouble-float @gol
  715. -modd-spreg -mno-odd-spreg @gol
  716. -mabs=@var{mode} -mnan=@var{encoding} @gol
  717. -mdsp -mno-dsp -mdspr2 -mno-dspr2 @gol
  718. -mmcu -mmno-mcu @gol
  719. -meva -mno-eva @gol
  720. -mvirt -mno-virt @gol
  721. -mxpa -mno-xpa @gol
  722. -mmicromips -mno-micromips @gol
  723. -mfpu=@var{fpu-type} @gol
  724. -msmartmips -mno-smartmips @gol
  725. -mpaired-single -mno-paired-single -mdmx -mno-mdmx @gol
  726. -mips3d -mno-mips3d -mmt -mno-mt -mllsc -mno-llsc @gol
  727. -mlong64 -mlong32 -msym32 -mno-sym32 @gol
  728. -G@var{num} -mlocal-sdata -mno-local-sdata @gol
  729. -mextern-sdata -mno-extern-sdata -mgpopt -mno-gopt @gol
  730. -membedded-data -mno-embedded-data @gol
  731. -muninit-const-in-rodata -mno-uninit-const-in-rodata @gol
  732. -mcode-readable=@var{setting} @gol
  733. -msplit-addresses -mno-split-addresses @gol
  734. -mexplicit-relocs -mno-explicit-relocs @gol
  735. -mcheck-zero-division -mno-check-zero-division @gol
  736. -mdivide-traps -mdivide-breaks @gol
  737. -mmemcpy -mno-memcpy -mlong-calls -mno-long-calls @gol
  738. -mmad -mno-mad -mimadd -mno-imadd -mfused-madd -mno-fused-madd -nocpp @gol
  739. -mfix-24k -mno-fix-24k @gol
  740. -mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400 @gol
  741. -mfix-r10000 -mno-fix-r10000 -mfix-rm7000 -mno-fix-rm7000 @gol
  742. -mfix-vr4120 -mno-fix-vr4120 @gol
  743. -mfix-vr4130 -mno-fix-vr4130 -mfix-sb1 -mno-fix-sb1 @gol
  744. -mflush-func=@var{func} -mno-flush-func @gol
  745. -mbranch-cost=@var{num} -mbranch-likely -mno-branch-likely @gol
  746. -mfp-exceptions -mno-fp-exceptions @gol
  747. -mvr4130-align -mno-vr4130-align -msynci -mno-synci @gol
  748. -mrelax-pic-calls -mno-relax-pic-calls -mmcount-ra-address}
  749. @emph{MMIX Options}
  750. @gccoptlist{-mlibfuncs -mno-libfuncs -mepsilon -mno-epsilon -mabi=gnu @gol
  751. -mabi=mmixware -mzero-extend -mknuthdiv -mtoplevel-symbols @gol
  752. -melf -mbranch-predict -mno-branch-predict -mbase-addresses @gol
  753. -mno-base-addresses -msingle-exit -mno-single-exit}
  754. @emph{MN10300 Options}
  755. @gccoptlist{-mmult-bug -mno-mult-bug @gol
  756. -mno-am33 -mam33 -mam33-2 -mam34 @gol
  757. -mtune=@var{cpu-type} @gol
  758. -mreturn-pointer-on-d0 @gol
  759. -mno-crt0 -mrelax -mliw -msetlb}
  760. @emph{Moxie Options}
  761. @gccoptlist{-meb -mel -mmul.x -mno-crt0}
  762. @emph{MSP430 Options}
  763. @gccoptlist{-msim -masm-hex -mmcu= -mcpu= -mlarge -msmall -mrelax @gol
  764. -mhwmult= -minrt}
  765. @emph{NDS32 Options}
  766. @gccoptlist{-mbig-endian -mlittle-endian @gol
  767. -mreduced-regs -mfull-regs @gol
  768. -mcmov -mno-cmov @gol
  769. -mperf-ext -mno-perf-ext @gol
  770. -mv3push -mno-v3push @gol
  771. -m16bit -mno-16bit @gol
  772. -misr-vector-size=@var{num} @gol
  773. -mcache-block-size=@var{num} @gol
  774. -march=@var{arch} @gol
  775. -mcmodel=@var{code-model} @gol
  776. -mctor-dtor -mrelax}
  777. @emph{Nios II Options}
  778. @gccoptlist{-G @var{num} -mgpopt=@var{option} -mgpopt -mno-gpopt @gol
  779. -mel -meb @gol
  780. -mno-bypass-cache -mbypass-cache @gol
  781. -mno-cache-volatile -mcache-volatile @gol
  782. -mno-fast-sw-div -mfast-sw-div @gol
  783. -mhw-mul -mno-hw-mul -mhw-mulx -mno-hw-mulx -mno-hw-div -mhw-div @gol
  784. -mcustom-@var{insn}=@var{N} -mno-custom-@var{insn} @gol
  785. -mcustom-fpu-cfg=@var{name} @gol
  786. -mhal -msmallc -msys-crt0=@var{name} -msys-lib=@var{name}}
  787. @emph{Nvidia PTX Options}
  788. @gccoptlist{-m32 -m64 -mmainkernel}
  789. @emph{PDP-11 Options}
  790. @gccoptlist{-mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 @gol
  791. -mbcopy -mbcopy-builtin -mint32 -mno-int16 @gol
  792. -mint16 -mno-int32 -mfloat32 -mno-float64 @gol
  793. -mfloat64 -mno-float32 -mabshi -mno-abshi @gol
  794. -mbranch-expensive -mbranch-cheap @gol
  795. -munix-asm -mdec-asm}
  796. @emph{picoChip Options}
  797. @gccoptlist{-mae=@var{ae_type} -mvliw-lookahead=@var{N} @gol
  798. -msymbol-as-address -mno-inefficient-warnings}
  799. @emph{PowerPC Options}
  800. See RS/6000 and PowerPC Options.
  801. @emph{RL78 Options}
  802. @gccoptlist{-msim -mmul=none -mmul=g13 -mmul=rl78 @gol
  803. -m64bit-doubles -m32bit-doubles}
  804. @emph{RS/6000 and PowerPC Options}
  805. @gccoptlist{-mcpu=@var{cpu-type} @gol
  806. -mtune=@var{cpu-type} @gol
  807. -mcmodel=@var{code-model} @gol
  808. -mpowerpc64 @gol
  809. -maltivec -mno-altivec @gol
  810. -mpowerpc-gpopt -mno-powerpc-gpopt @gol
  811. -mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
  812. -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mpopcntd -mno-popcntd @gol
  813. -mfprnd -mno-fprnd @gol
  814. -mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr -mhard-dfp -mno-hard-dfp @gol
  815. -mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol
  816. -m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol
  817. -malign-power -malign-natural @gol
  818. -msoft-float -mhard-float -mmultiple -mno-multiple @gol
  819. -msingle-float -mdouble-float -msimple-fpu @gol
  820. -mstring -mno-string -mupdate -mno-update @gol
  821. -mavoid-indexed-addresses -mno-avoid-indexed-addresses @gol
  822. -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align @gol
  823. -mstrict-align -mno-strict-align -mrelocatable @gol
  824. -mno-relocatable -mrelocatable-lib -mno-relocatable-lib @gol
  825. -mtoc -mno-toc -mlittle -mlittle-endian -mbig -mbig-endian @gol
  826. -mdynamic-no-pic -maltivec -mswdiv -msingle-pic-base @gol
  827. -mprioritize-restricted-insns=@var{priority} @gol
  828. -msched-costly-dep=@var{dependence_type} @gol
  829. -minsert-sched-nops=@var{scheme} @gol
  830. -mcall-sysv -mcall-netbsd @gol
  831. -maix-struct-return -msvr4-struct-return @gol
  832. -mabi=@var{abi-type} -msecure-plt -mbss-plt @gol
  833. -mblock-move-inline-limit=@var{num} @gol
  834. -misel -mno-isel @gol
  835. -misel=yes -misel=no @gol
  836. -mspe -mno-spe @gol
  837. -mspe=yes -mspe=no @gol
  838. -mpaired @gol
  839. -mgen-cell-microcode -mwarn-cell-microcode @gol
  840. -mvrsave -mno-vrsave @gol
  841. -mmulhw -mno-mulhw @gol
  842. -mdlmzb -mno-dlmzb @gol
  843. -mfloat-gprs=yes -mfloat-gprs=no -mfloat-gprs=single -mfloat-gprs=double @gol
  844. -mprototype -mno-prototype @gol
  845. -msim -mmvme -mads -myellowknife -memb -msdata @gol
  846. -msdata=@var{opt} -mvxworks -G @var{num} -pthread @gol
  847. -mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision @gol
  848. -mno-recip-precision @gol
  849. -mveclibabi=@var{type} -mfriz -mno-friz @gol
  850. -mpointers-to-nested-functions -mno-pointers-to-nested-functions @gol
  851. -msave-toc-indirect -mno-save-toc-indirect @gol
  852. -mpower8-fusion -mno-mpower8-fusion -mpower8-vector -mno-power8-vector @gol
  853. -mcrypto -mno-crypto -mdirect-move -mno-direct-move @gol
  854. -mquad-memory -mno-quad-memory @gol
  855. -mquad-memory-atomic -mno-quad-memory-atomic @gol
  856. -mcompat-align-parm -mno-compat-align-parm @gol
  857. -mupper-regs-df -mno-upper-regs-df -mupper-regs-sf -mno-upper-regs-sf @gol
  858. -mupper-regs -mno-upper-regs}
  859. @emph{RX Options}
  860. @gccoptlist{-m64bit-doubles -m32bit-doubles -fpu -nofpu@gol
  861. -mcpu=@gol
  862. -mbig-endian-data -mlittle-endian-data @gol
  863. -msmall-data @gol
  864. -msim -mno-sim@gol
  865. -mas100-syntax -mno-as100-syntax@gol
  866. -mrelax@gol
  867. -mmax-constant-size=@gol
  868. -mint-register=@gol
  869. -mpid@gol
  870. -mno-warn-multiple-fast-interrupts@gol
  871. -msave-acc-in-interrupts}
  872. @emph{S/390 and zSeries Options}
  873. @gccoptlist{-mtune=@var{cpu-type} -march=@var{cpu-type} @gol
  874. -mhard-float -msoft-float -mhard-dfp -mno-hard-dfp @gol
  875. -mlong-double-64 -mlong-double-128 @gol
  876. -mbackchain -mno-backchain -mpacked-stack -mno-packed-stack @gol
  877. -msmall-exec -mno-small-exec -mmvcle -mno-mvcle @gol
  878. -m64 -m31 -mdebug -mno-debug -mesa -mzarch @gol
  879. -mtpf-trace -mno-tpf-trace -mfused-madd -mno-fused-madd @gol
  880. -mwarn-framesize -mwarn-dynamicstack -mstack-size -mstack-guard @gol
  881. -mhotpatch=@var{halfwords},@var{halfwords}}
  882. @emph{Score Options}
  883. @gccoptlist{-meb -mel @gol
  884. -mnhwloop @gol
  885. -muls @gol
  886. -mmac @gol
  887. -mscore5 -mscore5u -mscore7 -mscore7d}
  888. @emph{SH Options}
  889. @gccoptlist{-m1 -m2 -m2e @gol
  890. -m2a-nofpu -m2a-single-only -m2a-single -m2a @gol
  891. -m3 -m3e @gol
  892. -m4-nofpu -m4-single-only -m4-single -m4 @gol
  893. -m4a-nofpu -m4a-single-only -m4a-single -m4a -m4al @gol
  894. -m5-64media -m5-64media-nofpu @gol
  895. -m5-32media -m5-32media-nofpu @gol
  896. -m5-compact -m5-compact-nofpu @gol
  897. -mb -ml -mdalign -mrelax @gol
  898. -mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
  899. -mieee -mno-ieee -mbitops -misize -minline-ic_invalidate -mpadstruct @gol
  900. -mspace -mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
  901. -mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
  902. -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
  903. -maccumulate-outgoing-args -minvalid-symbols @gol
  904. -matomic-model=@var{atomic-model} @gol
  905. -mbranch-cost=@var{num} -mzdcbranch -mno-zdcbranch @gol
  906. -mcbranch-force-delay-slot @gol
  907. -mfused-madd -mno-fused-madd -mfsca -mno-fsca -mfsrra -mno-fsrra @gol
  908. -mpretend-cmove -mtas}
  909. @emph{Solaris 2 Options}
  910. @gccoptlist{-mclear-hwcap -mno-clear-hwcap -mimpure-text -mno-impure-text @gol
  911. -pthreads -pthread}
  912. @emph{SPARC Options}
  913. @gccoptlist{-mcpu=@var{cpu-type} @gol
  914. -mtune=@var{cpu-type} @gol
  915. -mcmodel=@var{code-model} @gol
  916. -mmemory-model=@var{mem-model} @gol
  917. -m32 -m64 -mapp-regs -mno-app-regs @gol
  918. -mfaster-structs -mno-faster-structs -mflat -mno-flat @gol
  919. -mfpu -mno-fpu -mhard-float -msoft-float @gol
  920. -mhard-quad-float -msoft-quad-float @gol
  921. -mstack-bias -mno-stack-bias @gol
  922. -munaligned-doubles -mno-unaligned-doubles @gol
  923. -muser-mode -mno-user-mode @gol
  924. -mv8plus -mno-v8plus -mvis -mno-vis @gol
  925. -mvis2 -mno-vis2 -mvis3 -mno-vis3 @gol
  926. -mcbcond -mno-cbcond @gol
  927. -mfmaf -mno-fmaf -mpopc -mno-popc @gol
  928. -mfix-at697f -mfix-ut699}
  929. @emph{SPU Options}
  930. @gccoptlist{-mwarn-reloc -merror-reloc @gol
  931. -msafe-dma -munsafe-dma @gol
  932. -mbranch-hints @gol
  933. -msmall-mem -mlarge-mem -mstdmain @gol
  934. -mfixed-range=@var{register-range} @gol
  935. -mea32 -mea64 @gol
  936. -maddress-space-conversion -mno-address-space-conversion @gol
  937. -mcache-size=@var{cache-size} @gol
  938. -matomic-updates -mno-atomic-updates}
  939. @emph{System V Options}
  940. @gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}}
  941. @emph{TILE-Gx Options}
  942. @gccoptlist{-mcpu=CPU -m32 -m64 -mbig-endian -mlittle-endian @gol
  943. -mcmodel=@var{code-model}}
  944. @emph{TILEPro Options}
  945. @gccoptlist{-mcpu=@var{cpu} -m32}
  946. @emph{V850 Options}
  947. @gccoptlist{-mlong-calls -mno-long-calls -mep -mno-ep @gol
  948. -mprolog-function -mno-prolog-function -mspace @gol
  949. -mtda=@var{n} -msda=@var{n} -mzda=@var{n} @gol
  950. -mapp-regs -mno-app-regs @gol
  951. -mdisable-callt -mno-disable-callt @gol
  952. -mv850e2v3 -mv850e2 -mv850e1 -mv850es @gol
  953. -mv850e -mv850 -mv850e3v5 @gol
  954. -mloop @gol
  955. -mrelax @gol
  956. -mlong-jumps @gol
  957. -msoft-float @gol
  958. -mhard-float @gol
  959. -mgcc-abi @gol
  960. -mrh850-abi @gol
  961. -mbig-switch}
  962. @emph{VAX Options}
  963. @gccoptlist{-mg -mgnu -munix}
  964. @emph{Visium Options}
  965. @gccoptlist{-mdebug -msim -mfpu -mno-fpu -mhard-float -msoft-float @gol
  966. -mcpu=@var{cpu-type} -mtune=@var{cpu-type} -msv-mode -muser-mode}
  967. @emph{VMS Options}
  968. @gccoptlist{-mvms-return-codes -mdebug-main=@var{prefix} -mmalloc64 @gol
  969. -mpointer-size=@var{size}}
  970. @emph{VxWorks Options}
  971. @gccoptlist{-mrtp -non-static -Bstatic -Bdynamic @gol
  972. -Xbind-lazy -Xbind-now}
  973. @emph{x86 Options}
  974. @gccoptlist{-mtune=@var{cpu-type} -march=@var{cpu-type} @gol
  975. -mtune-ctrl=@var{feature-list} -mdump-tune-features -mno-default @gol
  976. -mfpmath=@var{unit} @gol
  977. -masm=@var{dialect} -mno-fancy-math-387 @gol
  978. -mno-fp-ret-in-387 -msoft-float @gol
  979. -mno-wide-multiply -mrtd -malign-double @gol
  980. -mpreferred-stack-boundary=@var{num} @gol
  981. -mincoming-stack-boundary=@var{num} @gol
  982. -mcld -mcx16 -msahf -mmovbe -mcrc32 @gol
  983. -mrecip -mrecip=@var{opt} @gol
  984. -mvzeroupper -mprefer-avx128 @gol
  985. -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx @gol
  986. -mavx2 -mavx512f -mavx512pf -mavx512er -mavx512cd -msha @gol
  987. -maes -mpclmul -mfsgsbase -mrdrnd -mf16c -mfma -mprefetchwt1 @gol
  988. -mclflushopt -mxsavec -mxsaves @gol
  989. -msse4a -m3dnow -mpopcnt -mabm -mbmi -mtbm -mfma4 -mxop -mlzcnt @gol
  990. -mbmi2 -mfxsr -mxsave -mxsaveopt -mrtm -mlwp -mmpx -mmwaitx -mthreads @gol
  991. -mno-align-stringops -minline-all-stringops @gol
  992. -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol
  993. -mmemcpy-strategy=@var{strategy} -mmemset-strategy=@var{strategy} @gol
  994. -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
  995. -m96bit-long-double -mlong-double-64 -mlong-double-80 -mlong-double-128 @gol
  996. -mregparm=@var{num} -msseregparm @gol
  997. -mveclibabi=@var{type} -mvect8-ret-in-mem @gol
  998. -mpc32 -mpc64 -mpc80 -mstackrealign @gol
  999. -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
  1000. -mcmodel=@var{code-model} -mabi=@var{name} -maddress-mode=@var{mode} @gol
  1001. -m32 -m64 -mx32 -m16 -mlarge-data-threshold=@var{num} @gol
  1002. -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
  1003. -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
  1004. -malign-data=@var{type} -mstack-protector-guard=@var{guard}}
  1005. @emph{x86 Windows Options}
  1006. @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
  1007. -mnop-fun-dllimport -mthread @gol
  1008. -municode -mwin32 -mwindows -fno-set-stack-executable}
  1009. @emph{Xstormy16 Options}
  1010. @gccoptlist{-msim}
  1011. @emph{Xtensa Options}
  1012. @gccoptlist{-mconst16 -mno-const16 @gol
  1013. -mfused-madd -mno-fused-madd @gol
  1014. -mforce-no-pic @gol
  1015. -mserialize-volatile -mno-serialize-volatile @gol
  1016. -mtext-section-literals -mno-text-section-literals @gol
  1017. -mtarget-align -mno-target-align @gol
  1018. -mlongcalls -mno-longcalls}
  1019. @emph{zSeries Options}
  1020. See S/390 and zSeries Options.
  1021. @item Code Generation Options
  1022. @xref{Code Gen Options,,Options for Code Generation Conventions}.
  1023. @gccoptlist{-fcall-saved-@var{reg} -fcall-used-@var{reg} @gol
  1024. -ffixed-@var{reg} -fexceptions @gol
  1025. -fnon-call-exceptions -fdelete-dead-exceptions -funwind-tables @gol
  1026. -fasynchronous-unwind-tables @gol
  1027. -fno-gnu-unique @gol
  1028. -finhibit-size-directive -finstrument-functions @gol
  1029. -finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{} @gol
  1030. -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
  1031. -fno-common -fno-ident @gol
  1032. -fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol
  1033. -fno-jump-tables @gol
  1034. -frecord-gcc-switches @gol
  1035. -freg-struct-return -fshort-enums @gol
  1036. -fshort-double -fshort-wchar @gol
  1037. -fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
  1038. -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
  1039. -fno-stack-limit -fsplit-stack @gol
  1040. -fleading-underscore -ftls-model=@var{model} @gol
  1041. -fstack-reuse=@var{reuse_level} @gol
  1042. -ftrapv -fwrapv -fbounds-check @gol
  1043. -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]} @gol
  1044. -fstrict-volatile-bitfields -fsync-libcalls}
  1045. @end table
  1046. @node Overall Options
  1047. @section Options Controlling the Kind of Output
  1048. Compilation can involve up to four stages: preprocessing, compilation
  1049. proper, assembly and linking, always in that order. GCC is capable of
  1050. preprocessing and compiling several files either into several
  1051. assembler input files, or into one assembler input file; then each
  1052. assembler input file produces an object file, and linking combines all
  1053. the object files (those newly compiled, and those specified as input)
  1054. into an executable file.
  1055. @cindex file name suffix
  1056. For any given input file, the file name suffix determines what kind of
  1057. compilation is done:
  1058. @table @gcctabopt
  1059. @item @var{file}.c
  1060. C source code that must be preprocessed.
  1061. @item @var{file}.i
  1062. C source code that should not be preprocessed.
  1063. @item @var{file}.ii
  1064. C++ source code that should not be preprocessed.
  1065. @item @var{file}.m
  1066. Objective-C source code. Note that you must link with the @file{libobjc}
  1067. library to make an Objective-C program work.
  1068. @item @var{file}.mi
  1069. Objective-C source code that should not be preprocessed.
  1070. @item @var{file}.mm
  1071. @itemx @var{file}.M
  1072. Objective-C++ source code. Note that you must link with the @file{libobjc}
  1073. library to make an Objective-C++ program work. Note that @samp{.M} refers
  1074. to a literal capital M@.
  1075. @item @var{file}.mii
  1076. Objective-C++ source code that should not be preprocessed.
  1077. @item @var{file}.h
  1078. C, C++, Objective-C or Objective-C++ header file to be turned into a
  1079. precompiled header (default), or C, C++ header file to be turned into an
  1080. Ada spec (via the @option{-fdump-ada-spec} switch).
  1081. @item @var{file}.cc
  1082. @itemx @var{file}.cp
  1083. @itemx @var{file}.cxx
  1084. @itemx @var{file}.cpp
  1085. @itemx @var{file}.CPP
  1086. @itemx @var{file}.c++
  1087. @itemx @var{file}.C
  1088. C++ source code that must be preprocessed. Note that in @samp{.cxx},
  1089. the last two letters must both be literally @samp{x}. Likewise,
  1090. @samp{.C} refers to a literal capital C@.
  1091. @item @var{file}.mm
  1092. @itemx @var{file}.M
  1093. Objective-C++ source code that must be preprocessed.
  1094. @item @var{file}.mii
  1095. Objective-C++ source code that should not be preprocessed.
  1096. @item @var{file}.hh
  1097. @itemx @var{file}.H
  1098. @itemx @var{file}.hp
  1099. @itemx @var{file}.hxx
  1100. @itemx @var{file}.hpp
  1101. @itemx @var{file}.HPP
  1102. @itemx @var{file}.h++
  1103. @itemx @var{file}.tcc
  1104. C++ header file to be turned into a precompiled header or Ada spec.
  1105. @item @var{file}.f
  1106. @itemx @var{file}.for
  1107. @itemx @var{file}.ftn
  1108. Fixed form Fortran source code that should not be preprocessed.
  1109. @item @var{file}.F
  1110. @itemx @var{file}.FOR
  1111. @itemx @var{file}.fpp
  1112. @itemx @var{file}.FPP
  1113. @itemx @var{file}.FTN
  1114. Fixed form Fortran source code that must be preprocessed (with the traditional
  1115. preprocessor).
  1116. @item @var{file}.f90
  1117. @itemx @var{file}.f95
  1118. @itemx @var{file}.f03
  1119. @itemx @var{file}.f08
  1120. Free form Fortran source code that should not be preprocessed.
  1121. @item @var{file}.F90
  1122. @itemx @var{file}.F95
  1123. @itemx @var{file}.F03
  1124. @itemx @var{file}.F08
  1125. Free form Fortran source code that must be preprocessed (with the
  1126. traditional preprocessor).
  1127. @item @var{file}.go
  1128. Go source code.
  1129. @c FIXME: Descriptions of Java file types.
  1130. @c @var{file}.java
  1131. @c @var{file}.class
  1132. @c @var{file}.zip
  1133. @c @var{file}.jar
  1134. @item @var{file}.ads
  1135. Ada source code file that contains a library unit declaration (a
  1136. declaration of a package, subprogram, or generic, or a generic
  1137. instantiation), or a library unit renaming declaration (a package,
  1138. generic, or subprogram renaming declaration). Such files are also
  1139. called @dfn{specs}.
  1140. @item @var{file}.adb
  1141. Ada source code file containing a library unit body (a subprogram or
  1142. package body). Such files are also called @dfn{bodies}.
  1143. @c GCC also knows about some suffixes for languages not yet included:
  1144. @c Pascal:
  1145. @c @var{file}.p
  1146. @c @var{file}.pas
  1147. @c Ratfor:
  1148. @c @var{file}.r
  1149. @item @var{file}.s
  1150. Assembler code.
  1151. @item @var{file}.S
  1152. @itemx @var{file}.sx
  1153. Assembler code that must be preprocessed.
  1154. @item @var{other}
  1155. An object file to be fed straight into linking.
  1156. Any file name with no recognized suffix is treated this way.
  1157. @end table
  1158. @opindex x
  1159. You can specify the input language explicitly with the @option{-x} option:
  1160. @table @gcctabopt
  1161. @item -x @var{language}
  1162. Specify explicitly the @var{language} for the following input files
  1163. (rather than letting the compiler choose a default based on the file
  1164. name suffix). This option applies to all following input files until
  1165. the next @option{-x} option. Possible values for @var{language} are:
  1166. @smallexample
  1167. c c-header cpp-output
  1168. c++ c++-header c++-cpp-output
  1169. objective-c objective-c-header objective-c-cpp-output
  1170. objective-c++ objective-c++-header objective-c++-cpp-output
  1171. assembler assembler-with-cpp
  1172. ada
  1173. f77 f77-cpp-input f95 f95-cpp-input
  1174. go
  1175. java
  1176. @end smallexample
  1177. @item -x none
  1178. Turn off any specification of a language, so that subsequent files are
  1179. handled according to their file name suffixes (as they are if @option{-x}
  1180. has not been used at all).
  1181. @item -pass-exit-codes
  1182. @opindex pass-exit-codes
  1183. Normally the @command{gcc} program exits with the code of 1 if any
  1184. phase of the compiler returns a non-success return code. If you specify
  1185. @option{-pass-exit-codes}, the @command{gcc} program instead returns with
  1186. the numerically highest error produced by any phase returning an error
  1187. indication. The C, C++, and Fortran front ends return 4 if an internal
  1188. compiler error is encountered.
  1189. @end table
  1190. If you only want some of the stages of compilation, you can use
  1191. @option{-x} (or filename suffixes) to tell @command{gcc} where to start, and
  1192. one of the options @option{-c}, @option{-S}, or @option{-E} to say where
  1193. @command{gcc} is to stop. Note that some combinations (for example,
  1194. @samp{-x cpp-output -E}) instruct @command{gcc} to do nothing at all.
  1195. @table @gcctabopt
  1196. @item -c
  1197. @opindex c
  1198. Compile or assemble the source files, but do not link. The linking
  1199. stage simply is not done. The ultimate output is in the form of an
  1200. object file for each source file.
  1201. By default, the object file name for a source file is made by replacing
  1202. the suffix @samp{.c}, @samp{.i}, @samp{.s}, etc., with @samp{.o}.
  1203. Unrecognized input files, not requiring compilation or assembly, are
  1204. ignored.
  1205. @item -S
  1206. @opindex S
  1207. Stop after the stage of compilation proper; do not assemble. The output
  1208. is in the form of an assembler code file for each non-assembler input
  1209. file specified.
  1210. By default, the assembler file name for a source file is made by
  1211. replacing the suffix @samp{.c}, @samp{.i}, etc., with @samp{.s}.
  1212. Input files that don't require compilation are ignored.
  1213. @item -E
  1214. @opindex E
  1215. Stop after the preprocessing stage; do not run the compiler proper. The
  1216. output is in the form of preprocessed source code, which is sent to the
  1217. standard output.
  1218. Input files that don't require preprocessing are ignored.
  1219. @cindex output file option
  1220. @item -o @var{file}
  1221. @opindex o
  1222. Place output in file @var{file}. This applies to whatever
  1223. sort of output is being produced, whether it be an executable file,
  1224. an object file, an assembler file or preprocessed C code.
  1225. If @option{-o} is not specified, the default is to put an executable
  1226. file in @file{a.out}, the object file for
  1227. @file{@var{source}.@var{suffix}} in @file{@var{source}.o}, its
  1228. assembler file in @file{@var{source}.s}, a precompiled header file in
  1229. @file{@var{source}.@var{suffix}.gch}, and all preprocessed C source on
  1230. standard output.
  1231. @item -v
  1232. @opindex v
  1233. Print (on standard error output) the commands executed to run the stages
  1234. of compilation. Also print the version number of the compiler driver
  1235. program and of the preprocessor and the compiler proper.
  1236. @item -###
  1237. @opindex ###
  1238. Like @option{-v} except the commands are not executed and arguments
  1239. are quoted unless they contain only alphanumeric characters or @code{./-_}.
  1240. This is useful for shell scripts to capture the driver-generated command lines.
  1241. @item -pipe
  1242. @opindex pipe
  1243. Use pipes rather than temporary files for communication between the
  1244. various stages of compilation. This fails to work on some systems where
  1245. the assembler is unable to read from a pipe; but the GNU assembler has
  1246. no trouble.
  1247. @item --help
  1248. @opindex help
  1249. Print (on the standard output) a description of the command-line options
  1250. understood by @command{gcc}. If the @option{-v} option is also specified
  1251. then @option{--help} is also passed on to the various processes
  1252. invoked by @command{gcc}, so that they can display the command-line options
  1253. they accept. If the @option{-Wextra} option has also been specified
  1254. (prior to the @option{--help} option), then command-line options that
  1255. have no documentation associated with them are also displayed.
  1256. @item --target-help
  1257. @opindex target-help
  1258. Print (on the standard output) a description of target-specific command-line
  1259. options for each tool. For some targets extra target-specific
  1260. information may also be printed.
  1261. @item --help=@{@var{class}@r{|[}^@r{]}@var{qualifier}@}@r{[},@dots{}@r{]}
  1262. Print (on the standard output) a description of the command-line
  1263. options understood by the compiler that fit into all specified classes
  1264. and qualifiers. These are the supported classes:
  1265. @table @asis
  1266. @item @samp{optimizers}
  1267. Display all of the optimization options supported by the
  1268. compiler.
  1269. @item @samp{warnings}
  1270. Display all of the options controlling warning messages
  1271. produced by the compiler.
  1272. @item @samp{target}
  1273. Display target-specific options. Unlike the
  1274. @option{--target-help} option however, target-specific options of the
  1275. linker and assembler are not displayed. This is because those
  1276. tools do not currently support the extended @option{--help=} syntax.
  1277. @item @samp{params}
  1278. Display the values recognized by the @option{--param}
  1279. option.
  1280. @item @var{language}
  1281. Display the options supported for @var{language}, where
  1282. @var{language} is the name of one of the languages supported in this
  1283. version of GCC@.
  1284. @item @samp{common}
  1285. Display the options that are common to all languages.
  1286. @end table
  1287. These are the supported qualifiers:
  1288. @table @asis
  1289. @item @samp{undocumented}
  1290. Display only those options that are undocumented.
  1291. @item @samp{joined}
  1292. Display options taking an argument that appears after an equal
  1293. sign in the same continuous piece of text, such as:
  1294. @samp{--help=target}.
  1295. @item @samp{separate}
  1296. Display options taking an argument that appears as a separate word
  1297. following the original option, such as: @samp{-o output-file}.
  1298. @end table
  1299. Thus for example to display all the undocumented target-specific
  1300. switches supported by the compiler, use:
  1301. @smallexample
  1302. --help=target,undocumented
  1303. @end smallexample
  1304. The sense of a qualifier can be inverted by prefixing it with the
  1305. @samp{^} character, so for example to display all binary warning
  1306. options (i.e., ones that are either on or off and that do not take an
  1307. argument) that have a description, use:
  1308. @smallexample
  1309. --help=warnings,^joined,^undocumented
  1310. @end smallexample
  1311. The argument to @option{--help=} should not consist solely of inverted
  1312. qualifiers.
  1313. Combining several classes is possible, although this usually
  1314. restricts the output so much that there is nothing to display. One
  1315. case where it does work, however, is when one of the classes is
  1316. @var{target}. For example, to display all the target-specific
  1317. optimization options, use:
  1318. @smallexample
  1319. --help=target,optimizers
  1320. @end smallexample
  1321. The @option{--help=} option can be repeated on the command line. Each
  1322. successive use displays its requested class of options, skipping
  1323. those that have already been displayed.
  1324. If the @option{-Q} option appears on the command line before the
  1325. @option{--help=} option, then the descriptive text displayed by
  1326. @option{--help=} is changed. Instead of describing the displayed
  1327. options, an indication is given as to whether the option is enabled,
  1328. disabled or set to a specific value (assuming that the compiler
  1329. knows this at the point where the @option{--help=} option is used).
  1330. Here is a truncated example from the ARM port of @command{gcc}:
  1331. @smallexample
  1332. % gcc -Q -mabi=2 --help=target -c
  1333. The following options are target specific:
  1334. -mabi= 2
  1335. -mabort-on-noreturn [disabled]
  1336. -mapcs [disabled]
  1337. @end smallexample
  1338. The output is sensitive to the effects of previous command-line
  1339. options, so for example it is possible to find out which optimizations
  1340. are enabled at @option{-O2} by using:
  1341. @smallexample
  1342. -Q -O2 --help=optimizers
  1343. @end smallexample
  1344. Alternatively you can discover which binary optimizations are enabled
  1345. by @option{-O3} by using:
  1346. @smallexample
  1347. gcc -c -Q -O3 --help=optimizers > /tmp/O3-opts
  1348. gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts
  1349. diff /tmp/O2-opts /tmp/O3-opts | grep enabled
  1350. @end smallexample
  1351. @item -no-canonical-prefixes
  1352. @opindex no-canonical-prefixes
  1353. Do not expand any symbolic links, resolve references to @samp{/../}
  1354. or @samp{/./}, or make the path absolute when generating a relative
  1355. prefix.
  1356. @item --version
  1357. @opindex version
  1358. Display the version number and copyrights of the invoked GCC@.
  1359. @item -wrapper
  1360. @opindex wrapper
  1361. Invoke all subcommands under a wrapper program. The name of the
  1362. wrapper program and its parameters are passed as a comma separated
  1363. list.
  1364. @smallexample
  1365. gcc -c t.c -wrapper gdb,--args
  1366. @end smallexample
  1367. @noindent
  1368. This invokes all subprograms of @command{gcc} under
  1369. @samp{gdb --args}, thus the invocation of @command{cc1} is
  1370. @samp{gdb --args cc1 @dots{}}.
  1371. @item -fplugin=@var{name}.so
  1372. @opindex fplugin
  1373. Load the plugin code in file @var{name}.so, assumed to be a
  1374. shared object to be dlopen'd by the compiler. The base name of
  1375. the shared object file is used to identify the plugin for the
  1376. purposes of argument parsing (See
  1377. @option{-fplugin-arg-@var{name}-@var{key}=@var{value}} below).
  1378. Each plugin should define the callback functions specified in the
  1379. Plugins API.
  1380. @item -fplugin-arg-@var{name}-@var{key}=@var{value}
  1381. @opindex fplugin-arg
  1382. Define an argument called @var{key} with a value of @var{value}
  1383. for the plugin called @var{name}.
  1384. @item -fdump-ada-spec@r{[}-slim@r{]}
  1385. @opindex fdump-ada-spec
  1386. For C and C++ source and include files, generate corresponding Ada specs.
  1387. @xref{Generating Ada Bindings for C and C++ headers,,, gnat_ugn,
  1388. GNAT User's Guide}, which provides detailed documentation on this feature.
  1389. @item -fada-spec-parent=@var{unit}
  1390. @opindex fada-spec-parent
  1391. In conjunction with @option{-fdump-ada-spec@r{[}-slim@r{]}} above, generate
  1392. Ada specs as child units of parent @var{unit}.
  1393. @item -fdump-go-spec=@var{file}
  1394. @opindex fdump-go-spec
  1395. For input files in any language, generate corresponding Go
  1396. declarations in @var{file}. This generates Go @code{const},
  1397. @code{type}, @code{var}, and @code{func} declarations which may be a
  1398. useful way to start writing a Go interface to code written in some
  1399. other language.
  1400. @include @value{srcdir}/../libiberty/at-file.texi
  1401. @end table
  1402. @node Invoking G++
  1403. @section Compiling C++ Programs
  1404. @cindex suffixes for C++ source
  1405. @cindex C++ source file suffixes
  1406. C++ source files conventionally use one of the suffixes @samp{.C},
  1407. @samp{.cc}, @samp{.cpp}, @samp{.CPP}, @samp{.c++}, @samp{.cp}, or
  1408. @samp{.cxx}; C++ header files often use @samp{.hh}, @samp{.hpp},
  1409. @samp{.H}, or (for shared template code) @samp{.tcc}; and
  1410. preprocessed C++ files use the suffix @samp{.ii}. GCC recognizes
  1411. files with these names and compiles them as C++ programs even if you
  1412. call the compiler the same way as for compiling C programs (usually
  1413. with the name @command{gcc}).
  1414. @findex g++
  1415. @findex c++
  1416. However, the use of @command{gcc} does not add the C++ library.
  1417. @command{g++} is a program that calls GCC and automatically specifies linking
  1418. against the C++ library. It treats @samp{.c},
  1419. @samp{.h} and @samp{.i} files as C++ source files instead of C source
  1420. files unless @option{-x} is used. This program is also useful when
  1421. precompiling a C header file with a @samp{.h} extension for use in C++
  1422. compilations. On many systems, @command{g++} is also installed with
  1423. the name @command{c++}.
  1424. @cindex invoking @command{g++}
  1425. When you compile C++ programs, you may specify many of the same
  1426. command-line options that you use for compiling programs in any
  1427. language; or command-line options meaningful for C and related
  1428. languages; or options that are meaningful only for C++ programs.
  1429. @xref{C Dialect Options,,Options Controlling C Dialect}, for
  1430. explanations of options for languages related to C@.
  1431. @xref{C++ Dialect Options,,Options Controlling C++ Dialect}, for
  1432. explanations of options that are meaningful only for C++ programs.
  1433. @node C Dialect Options
  1434. @section Options Controlling C Dialect
  1435. @cindex dialect options
  1436. @cindex language dialect options
  1437. @cindex options, dialect
  1438. The following options control the dialect of C (or languages derived
  1439. from C, such as C++, Objective-C and Objective-C++) that the compiler
  1440. accepts:
  1441. @table @gcctabopt
  1442. @cindex ANSI support
  1443. @cindex ISO support
  1444. @item -ansi
  1445. @opindex ansi
  1446. In C mode, this is equivalent to @option{-std=c90}. In C++ mode, it is
  1447. equivalent to @option{-std=c++98}.
  1448. This turns off certain features of GCC that are incompatible with ISO
  1449. C90 (when compiling C code), or of standard C++ (when compiling C++ code),
  1450. such as the @code{asm} and @code{typeof} keywords, and
  1451. predefined macros such as @code{unix} and @code{vax} that identify the
  1452. type of system you are using. It also enables the undesirable and
  1453. rarely used ISO trigraph feature. For the C compiler,
  1454. it disables recognition of C++ style @samp{//} comments as well as
  1455. the @code{inline} keyword.
  1456. The alternate keywords @code{__asm__}, @code{__extension__},
  1457. @code{__inline__} and @code{__typeof__} continue to work despite
  1458. @option{-ansi}. You would not want to use them in an ISO C program, of
  1459. course, but it is useful to put them in header files that might be included
  1460. in compilations done with @option{-ansi}. Alternate predefined macros
  1461. such as @code{__unix__} and @code{__vax__} are also available, with or
  1462. without @option{-ansi}.
  1463. The @option{-ansi} option does not cause non-ISO programs to be
  1464. rejected gratuitously. For that, @option{-Wpedantic} is required in
  1465. addition to @option{-ansi}. @xref{Warning Options}.
  1466. The macro @code{__STRICT_ANSI__} is predefined when the @option{-ansi}
  1467. option is used. Some header files may notice this macro and refrain
  1468. from declaring certain functions or defining certain macros that the
  1469. ISO standard doesn't call for; this is to avoid interfering with any
  1470. programs that might use these names for other things.
  1471. Functions that are normally built in but do not have semantics
  1472. defined by ISO C (such as @code{alloca} and @code{ffs}) are not built-in
  1473. functions when @option{-ansi} is used. @xref{Other Builtins,,Other
  1474. built-in functions provided by GCC}, for details of the functions
  1475. affected.
  1476. @item -std=
  1477. @opindex std
  1478. Determine the language standard. @xref{Standards,,Language Standards
  1479. Supported by GCC}, for details of these standard versions. This option
  1480. is currently only supported when compiling C or C++.
  1481. The compiler can accept several base standards, such as @samp{c90} or
  1482. @samp{c++98}, and GNU dialects of those standards, such as
  1483. @samp{gnu90} or @samp{gnu++98}. When a base standard is specified, the
  1484. compiler accepts all programs following that standard plus those
  1485. using GNU extensions that do not contradict it. For example,
  1486. @option{-std=c90} turns off certain features of GCC that are
  1487. incompatible with ISO C90, such as the @code{asm} and @code{typeof}
  1488. keywords, but not other GNU extensions that do not have a meaning in
  1489. ISO C90, such as omitting the middle term of a @code{?:}
  1490. expression. On the other hand, when a GNU dialect of a standard is
  1491. specified, all features supported by the compiler are enabled, even when
  1492. those features change the meaning of the base standard. As a result, some
  1493. strict-conforming programs may be rejected. The particular standard
  1494. is used by @option{-Wpedantic} to identify which features are GNU
  1495. extensions given that version of the standard. For example
  1496. @option{-std=gnu90 -Wpedantic} warns about C++ style @samp{//}
  1497. comments, while @option{-std=gnu99 -Wpedantic} does not.
  1498. A value for this option must be provided; possible values are
  1499. @table @samp
  1500. @item c90
  1501. @itemx c89
  1502. @itemx iso9899:1990
  1503. Support all ISO C90 programs (certain GNU extensions that conflict
  1504. with ISO C90 are disabled). Same as @option{-ansi} for C code.
  1505. @item iso9899:199409
  1506. ISO C90 as modified in amendment 1.
  1507. @item c99
  1508. @itemx c9x
  1509. @itemx iso9899:1999
  1510. @itemx iso9899:199x
  1511. ISO C99. This standard is substantially completely supported, modulo
  1512. bugs and floating-point issues
  1513. (mainly but not entirely relating to optional C99 features from
  1514. Annexes F and G). See
  1515. @w{@uref{http://gcc.gnu.org/c99status.html}} for more information. The
  1516. names @samp{c9x} and @samp{iso9899:199x} are deprecated.
  1517. @item c11
  1518. @itemx c1x
  1519. @itemx iso9899:2011
  1520. ISO C11, the 2011 revision of the ISO C standard. This standard is
  1521. substantially completely supported, modulo bugs, floating-point issues
  1522. (mainly but not entirely relating to optional C11 features from
  1523. Annexes F and G) and the optional Annexes K (Bounds-checking
  1524. interfaces) and L (Analyzability). The name @samp{c1x} is deprecated.
  1525. @item gnu90
  1526. @itemx gnu89
  1527. GNU dialect of ISO C90 (including some C99 features).
  1528. @item gnu99
  1529. @itemx gnu9x
  1530. GNU dialect of ISO C99. The name @samp{gnu9x} is deprecated.
  1531. @item gnu11
  1532. @itemx gnu1x
  1533. GNU dialect of ISO C11. This is the default for C code.
  1534. The name @samp{gnu1x} is deprecated.
  1535. @item c++98
  1536. @itemx c++03
  1537. The 1998 ISO C++ standard plus the 2003 technical corrigendum and some
  1538. additional defect reports. Same as @option{-ansi} for C++ code.
  1539. @item gnu++98
  1540. @itemx gnu++03
  1541. GNU dialect of @option{-std=c++98}. This is the default for
  1542. C++ code.
  1543. @item c++11
  1544. @itemx c++0x
  1545. The 2011 ISO C++ standard plus amendments.
  1546. The name @samp{c++0x} is deprecated.
  1547. @item gnu++11
  1548. @itemx gnu++0x
  1549. GNU dialect of @option{-std=c++11}.
  1550. The name @samp{gnu++0x} is deprecated.
  1551. @item c++14
  1552. @itemx c++1y
  1553. The 2014 ISO C++ standard plus amendments.
  1554. The name @samp{c++1y} is deprecated.
  1555. @item gnu++14
  1556. @itemx gnu++1y
  1557. GNU dialect of @option{-std=c++14}.
  1558. The name @samp{gnu++1y} is deprecated.
  1559. @item c++1z
  1560. The next revision of the ISO C++ standard, tentatively planned for
  1561. 2017. Support is highly experimental, and will almost certainly
  1562. change in incompatible ways in future releases.
  1563. @item gnu++1z
  1564. GNU dialect of @option{-std=c++1z}. Support is highly experimental,
  1565. and will almost certainly change in incompatible ways in future
  1566. releases.
  1567. @end table
  1568. @item -fgnu89-inline
  1569. @opindex fgnu89-inline
  1570. The option @option{-fgnu89-inline} tells GCC to use the traditional
  1571. GNU semantics for @code{inline} functions when in C99 mode.
  1572. @xref{Inline,,An Inline Function is As Fast As a Macro}.
  1573. Using this option is roughly equivalent to adding the
  1574. @code{gnu_inline} function attribute to all inline functions
  1575. (@pxref{Function Attributes}).
  1576. The option @option{-fno-gnu89-inline} explicitly tells GCC to use the
  1577. C99 semantics for @code{inline} when in C99 or gnu99 mode (i.e., it
  1578. specifies the default behavior).
  1579. This option is not supported in @option{-std=c90} or
  1580. @option{-std=gnu90} mode.
  1581. The preprocessor macros @code{__GNUC_GNU_INLINE__} and
  1582. @code{__GNUC_STDC_INLINE__} may be used to check which semantics are
  1583. in effect for @code{inline} functions. @xref{Common Predefined
  1584. Macros,,,cpp,The C Preprocessor}.
  1585. @item -aux-info @var{filename}
  1586. @opindex aux-info
  1587. Output to the given filename prototyped declarations for all functions
  1588. declared and/or defined in a translation unit, including those in header
  1589. files. This option is silently ignored in any language other than C@.
  1590. Besides declarations, the file indicates, in comments, the origin of
  1591. each declaration (source file and line), whether the declaration was
  1592. implicit, prototyped or unprototyped (@samp{I}, @samp{N} for new or
  1593. @samp{O} for old, respectively, in the first character after the line
  1594. number and the colon), and whether it came from a declaration or a
  1595. definition (@samp{C} or @samp{F}, respectively, in the following
  1596. character). In the case of function definitions, a K&R-style list of
  1597. arguments followed by their declarations is also provided, inside
  1598. comments, after the declaration.
  1599. @item -fallow-parameterless-variadic-functions
  1600. @opindex fallow-parameterless-variadic-functions
  1601. Accept variadic functions without named parameters.
  1602. Although it is possible to define such a function, this is not very
  1603. useful as it is not possible to read the arguments. This is only
  1604. supported for C as this construct is allowed by C++.
  1605. @item -fno-asm
  1606. @opindex fno-asm
  1607. Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
  1608. keyword, so that code can use these words as identifiers. You can use
  1609. the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__}
  1610. instead. @option{-ansi} implies @option{-fno-asm}.
  1611. In C++, this switch only affects the @code{typeof} keyword, since
  1612. @code{asm} and @code{inline} are standard keywords. You may want to
  1613. use the @option{-fno-gnu-keywords} flag instead, which has the same
  1614. effect. In C99 mode (@option{-std=c99} or @option{-std=gnu99}), this
  1615. switch only affects the @code{asm} and @code{typeof} keywords, since
  1616. @code{inline} is a standard keyword in ISO C99.
  1617. @item -fno-builtin
  1618. @itemx -fno-builtin-@var{function}
  1619. @opindex fno-builtin
  1620. @cindex built-in functions
  1621. Don't recognize built-in functions that do not begin with
  1622. @samp{__builtin_} as prefix. @xref{Other Builtins,,Other built-in
  1623. functions provided by GCC}, for details of the functions affected,
  1624. including those which are not built-in functions when @option{-ansi} or
  1625. @option{-std} options for strict ISO C conformance are used because they
  1626. do not have an ISO standard meaning.
  1627. GCC normally generates special code to handle certain built-in functions
  1628. more efficiently; for instance, calls to @code{alloca} may become single
  1629. instructions which adjust the stack directly, and calls to @code{memcpy}
  1630. may become inline copy loops. The resulting code is often both smaller
  1631. and faster, but since the function calls no longer appear as such, you
  1632. cannot set a breakpoint on those calls, nor can you change the behavior
  1633. of the functions by linking with a different library. In addition,
  1634. when a function is recognized as a built-in function, GCC may use
  1635. information about that function to warn about problems with calls to
  1636. that function, or to generate more efficient code, even if the
  1637. resulting code still contains calls to that function. For example,
  1638. warnings are given with @option{-Wformat} for bad calls to
  1639. @code{printf} when @code{printf} is built in and @code{strlen} is
  1640. known not to modify global memory.
  1641. With the @option{-fno-builtin-@var{function}} option
  1642. only the built-in function @var{function} is
  1643. disabled. @var{function} must not begin with @samp{__builtin_}. If a
  1644. function is named that is not built-in in this version of GCC, this
  1645. option is ignored. There is no corresponding
  1646. @option{-fbuiltin-@var{function}} option; if you wish to enable
  1647. built-in functions selectively when using @option{-fno-builtin} or
  1648. @option{-ffreestanding}, you may define macros such as:
  1649. @smallexample
  1650. #define abs(n) __builtin_abs ((n))
  1651. #define strcpy(d, s) __builtin_strcpy ((d), (s))
  1652. @end smallexample
  1653. @item -fhosted
  1654. @opindex fhosted
  1655. @cindex hosted environment
  1656. Assert that compilation targets a hosted environment. This implies
  1657. @option{-fbuiltin}. A hosted environment is one in which the
  1658. entire standard library is available, and in which @code{main} has a return
  1659. type of @code{int}. Examples are nearly everything except a kernel.
  1660. This is equivalent to @option{-fno-freestanding}.
  1661. @item -ffreestanding
  1662. @opindex ffreestanding
  1663. @cindex hosted environment
  1664. Assert that compilation targets a freestanding environment. This
  1665. implies @option{-fno-builtin}. A freestanding environment
  1666. is one in which the standard library may not exist, and program startup may
  1667. not necessarily be at @code{main}. The most obvious example is an OS kernel.
  1668. This is equivalent to @option{-fno-hosted}.
  1669. @xref{Standards,,Language Standards Supported by GCC}, for details of
  1670. freestanding and hosted environments.
  1671. @item -fopenacc
  1672. @opindex fopenacc
  1673. @cindex OpenACC accelerator programming
  1674. Enable handling of OpenACC directives @code{#pragma acc} in C/C++ and
  1675. @code{!$acc} in Fortran. When @option{-fopenacc} is specified, the
  1676. compiler generates accelerated code according to the OpenACC Application
  1677. Programming Interface v2.0 @w{@uref{http://www.openacc.org/}}. This option
  1678. implies @option{-pthread}, and thus is only supported on targets that
  1679. have support for @option{-pthread}.
  1680. Note that this is an experimental feature, incomplete, and subject to
  1681. change in future versions of GCC. See
  1682. @w{@uref{https://gcc.gnu.org/wiki/OpenACC}} for more information.
  1683. @item -fopenmp
  1684. @opindex fopenmp
  1685. @cindex OpenMP parallel
  1686. Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and
  1687. @code{!$omp} in Fortran. When @option{-fopenmp} is specified, the
  1688. compiler generates parallel code according to the OpenMP Application
  1689. Program Interface v4.0 @w{@uref{http://www.openmp.org/}}. This option
  1690. implies @option{-pthread}, and thus is only supported on targets that
  1691. have support for @option{-pthread}. @option{-fopenmp} implies
  1692. @option{-fopenmp-simd}.
  1693. @item -fopenmp-simd
  1694. @opindex fopenmp-simd
  1695. @cindex OpenMP SIMD
  1696. @cindex SIMD
  1697. Enable handling of OpenMP's SIMD directives with @code{#pragma omp}
  1698. in C/C++ and @code{!$omp} in Fortran. Other OpenMP directives
  1699. are ignored.
  1700. @item -fcilkplus
  1701. @opindex fcilkplus
  1702. @cindex Enable Cilk Plus
  1703. Enable the usage of Cilk Plus language extension features for C/C++.
  1704. When the option @option{-fcilkplus} is specified, enable the usage of
  1705. the Cilk Plus Language extension features for C/C++. The present
  1706. implementation follows ABI version 1.2. This is an experimental
  1707. feature that is only partially complete, and whose interface may
  1708. change in future versions of GCC as the official specification
  1709. changes. Currently, all features but @code{_Cilk_for} have been
  1710. implemented.
  1711. @item -fgnu-tm
  1712. @opindex fgnu-tm
  1713. When the option @option{-fgnu-tm} is specified, the compiler
  1714. generates code for the Linux variant of Intel's current Transactional
  1715. Memory ABI specification document (Revision 1.1, May 6 2009). This is
  1716. an experimental feature whose interface may change in future versions
  1717. of GCC, as the official specification changes. Please note that not
  1718. all architectures are supported for this feature.
  1719. For more information on GCC's support for transactional memory,
  1720. @xref{Enabling libitm,,The GNU Transactional Memory Library,libitm,GNU
  1721. Transactional Memory Library}.
  1722. Note that the transactional memory feature is not supported with
  1723. non-call exceptions (@option{-fnon-call-exceptions}).
  1724. @item -fms-extensions
  1725. @opindex fms-extensions
  1726. Accept some non-standard constructs used in Microsoft header files.
  1727. In C++ code, this allows member names in structures to be similar
  1728. to previous types declarations.
  1729. @smallexample
  1730. typedef int UOW;
  1731. struct ABC @{
  1732. UOW UOW;
  1733. @};
  1734. @end smallexample
  1735. Some cases of unnamed fields in structures and unions are only
  1736. accepted with this option. @xref{Unnamed Fields,,Unnamed struct/union
  1737. fields within structs/unions}, for details.
  1738. Note that this option is off for all targets but x86
  1739. targets using ms-abi.
  1740. @item -fplan9-extensions
  1741. @opindex fplan9-extensions
  1742. Accept some non-standard constructs used in Plan 9 code.
  1743. This enables @option{-fms-extensions}, permits passing pointers to
  1744. structures with anonymous fields to functions that expect pointers to
  1745. elements of the type of the field, and permits referring to anonymous
  1746. fields declared using a typedef. @xref{Unnamed Fields,,Unnamed
  1747. struct/union fields within structs/unions}, for details. This is only
  1748. supported for C, not C++.
  1749. @item -trigraphs
  1750. @opindex trigraphs
  1751. Support ISO C trigraphs. The @option{-ansi} option (and @option{-std}
  1752. options for strict ISO C conformance) implies @option{-trigraphs}.
  1753. @cindex traditional C language
  1754. @cindex C language, traditional
  1755. @item -traditional
  1756. @itemx -traditional-cpp
  1757. @opindex traditional-cpp
  1758. @opindex traditional
  1759. Formerly, these options caused GCC to attempt to emulate a pre-standard
  1760. C compiler. They are now only supported with the @option{-E} switch.
  1761. The preprocessor continues to support a pre-standard mode. See the GNU
  1762. CPP manual for details.
  1763. @item -fcond-mismatch
  1764. @opindex fcond-mismatch
  1765. Allow conditional expressions with mismatched types in the second and
  1766. third arguments. The value of such an expression is void. This option
  1767. is not supported for C++.
  1768. @item -flax-vector-conversions
  1769. @opindex flax-vector-conversions
  1770. Allow implicit conversions between vectors with differing numbers of
  1771. elements and/or incompatible element types. This option should not be
  1772. used for new code.
  1773. @item -funsigned-char
  1774. @opindex funsigned-char
  1775. Let the type @code{char} be unsigned, like @code{unsigned char}.
  1776. Each kind of machine has a default for what @code{char} should
  1777. be. It is either like @code{unsigned char} by default or like
  1778. @code{signed char} by default.
  1779. Ideally, a portable program should always use @code{signed char} or
  1780. @code{unsigned char} when it depends on the signedness of an object.
  1781. But many programs have been written to use plain @code{char} and
  1782. expect it to be signed, or expect it to be unsigned, depending on the
  1783. machines they were written for. This option, and its inverse, let you
  1784. make such a program work with the opposite default.
  1785. The type @code{char} is always a distinct type from each of
  1786. @code{signed char} or @code{unsigned char}, even though its behavior
  1787. is always just like one of those two.
  1788. @item -fsigned-char
  1789. @opindex fsigned-char
  1790. Let the type @code{char} be signed, like @code{signed char}.
  1791. Note that this is equivalent to @option{-fno-unsigned-char}, which is
  1792. the negative form of @option{-funsigned-char}. Likewise, the option
  1793. @option{-fno-signed-char} is equivalent to @option{-funsigned-char}.
  1794. @item -fsigned-bitfields
  1795. @itemx -funsigned-bitfields
  1796. @itemx -fno-signed-bitfields
  1797. @itemx -fno-unsigned-bitfields
  1798. @opindex fsigned-bitfields
  1799. @opindex funsigned-bitfields
  1800. @opindex fno-signed-bitfields
  1801. @opindex fno-unsigned-bitfields
  1802. These options control whether a bit-field is signed or unsigned, when the
  1803. declaration does not use either @code{signed} or @code{unsigned}. By
  1804. default, such a bit-field is signed, because this is consistent: the
  1805. basic integer types such as @code{int} are signed types.
  1806. @end table
  1807. @node C++ Dialect Options
  1808. @section Options Controlling C++ Dialect
  1809. @cindex compiler options, C++
  1810. @cindex C++ options, command-line
  1811. @cindex options, C++
  1812. This section describes the command-line options that are only meaningful
  1813. for C++ programs. You can also use most of the GNU compiler options
  1814. regardless of what language your program is in. For example, you
  1815. might compile a file @file{firstClass.C} like this:
  1816. @smallexample
  1817. g++ -g -frepo -O -c firstClass.C
  1818. @end smallexample
  1819. @noindent
  1820. In this example, only @option{-frepo} is an option meant
  1821. only for C++ programs; you can use the other options with any
  1822. language supported by GCC@.
  1823. Here is a list of options that are @emph{only} for compiling C++ programs:
  1824. @table @gcctabopt
  1825. @item -fabi-version=@var{n}
  1826. @opindex fabi-version
  1827. Use version @var{n} of the C++ ABI@. The default is version 0.
  1828. Version 0 refers to the version conforming most closely to
  1829. the C++ ABI specification. Therefore, the ABI obtained using version 0
  1830. will change in different versions of G++ as ABI bugs are fixed.
  1831. Version 1 is the version of the C++ ABI that first appeared in G++ 3.2.
  1832. Version 2 is the version of the C++ ABI that first appeared in G++
  1833. 3.4, and was the default through G++ 4.9.
  1834. Version 3 corrects an error in mangling a constant address as a
  1835. template argument.
  1836. Version 4, which first appeared in G++ 4.5, implements a standard
  1837. mangling for vector types.
  1838. Version 5, which first appeared in G++ 4.6, corrects the mangling of
  1839. attribute const/volatile on function pointer types, decltype of a
  1840. plain decl, and use of a function parameter in the declaration of
  1841. another parameter.
  1842. Version 6, which first appeared in G++ 4.7, corrects the promotion
  1843. behavior of C++11 scoped enums and the mangling of template argument
  1844. packs, const/static_cast, prefix ++ and --, and a class scope function
  1845. used as a template argument.
  1846. Version 7, which first appeared in G++ 4.8, that treats nullptr_t as a
  1847. builtin type and corrects the mangling of lambdas in default argument
  1848. scope.
  1849. Version 8, which first appeared in G++ 4.9, corrects the substitution
  1850. behavior of function types with function-cv-qualifiers.
  1851. See also @option{-Wabi}.
  1852. @item -fabi-compat-version=@var{n}
  1853. @opindex fabi-compat-version
  1854. On targets that support strong aliases, G++
  1855. works around mangling changes by creating an alias with the correct
  1856. mangled name when defining a symbol with an incorrect mangled name.
  1857. This switch specifies which ABI version to use for the alias.
  1858. With @option{-fabi-version=0} (the default), this defaults to 2. If
  1859. another ABI version is explicitly selected, this defaults to 0.
  1860. The compatibility version is also set by @option{-Wabi=@var{n}}.
  1861. @item -fno-access-control
  1862. @opindex fno-access-control
  1863. Turn off all access checking. This switch is mainly useful for working
  1864. around bugs in the access control code.
  1865. @item -fcheck-new
  1866. @opindex fcheck-new
  1867. Check that the pointer returned by @code{operator new} is non-null
  1868. before attempting to modify the storage allocated. This check is
  1869. normally unnecessary because the C++ standard specifies that
  1870. @code{operator new} only returns @code{0} if it is declared
  1871. @code{throw()}, in which case the compiler always checks the
  1872. return value even without this option. In all other cases, when
  1873. @code{operator new} has a non-empty exception specification, memory
  1874. exhaustion is signalled by throwing @code{std::bad_alloc}. See also
  1875. @samp{new (nothrow)}.
  1876. @item -fconstexpr-depth=@var{n}
  1877. @opindex fconstexpr-depth
  1878. Set the maximum nested evaluation depth for C++11 constexpr functions
  1879. to @var{n}. A limit is needed to detect endless recursion during
  1880. constant expression evaluation. The minimum specified by the standard
  1881. is 512.
  1882. @item -fdeduce-init-list
  1883. @opindex fdeduce-init-list
  1884. Enable deduction of a template type parameter as
  1885. @code{std::initializer_list} from a brace-enclosed initializer list, i.e.@:
  1886. @smallexample
  1887. template <class T> auto forward(T t) -> decltype (realfn (t))
  1888. @{
  1889. return realfn (t);
  1890. @}
  1891. void f()
  1892. @{
  1893. forward(@{1,2@}); // call forward<std::initializer_list<int>>
  1894. @}
  1895. @end smallexample
  1896. This deduction was implemented as a possible extension to the
  1897. originally proposed semantics for the C++11 standard, but was not part
  1898. of the final standard, so it is disabled by default. This option is
  1899. deprecated, and may be removed in a future version of G++.
  1900. @item -ffriend-injection
  1901. @opindex ffriend-injection
  1902. Inject friend functions into the enclosing namespace, so that they are
  1903. visible outside the scope of the class in which they are declared.
  1904. Friend functions were documented to work this way in the old Annotated
  1905. C++ Reference Manual.
  1906. However, in ISO C++ a friend function that is not declared
  1907. in an enclosing scope can only be found using argument dependent
  1908. lookup. GCC defaults to the standard behavior.
  1909. This option is for compatibility, and may be removed in a future
  1910. release of G++.
  1911. @item -fno-elide-constructors
  1912. @opindex fno-elide-constructors
  1913. The C++ standard allows an implementation to omit creating a temporary
  1914. that is only used to initialize another object of the same type.
  1915. Specifying this option disables that optimization, and forces G++ to
  1916. call the copy constructor in all cases.
  1917. @item -fno-enforce-eh-specs
  1918. @opindex fno-enforce-eh-specs
  1919. Don't generate code to check for violation of exception specifications
  1920. at run time. This option violates the C++ standard, but may be useful
  1921. for reducing code size in production builds, much like defining
  1922. @code{NDEBUG}. This does not give user code permission to throw
  1923. exceptions in violation of the exception specifications; the compiler
  1924. still optimizes based on the specifications, so throwing an
  1925. unexpected exception results in undefined behavior at run time.
  1926. @item -fextern-tls-init
  1927. @itemx -fno-extern-tls-init
  1928. @opindex fextern-tls-init
  1929. @opindex fno-extern-tls-init
  1930. The C++11 and OpenMP standards allow @code{thread_local} and
  1931. @code{threadprivate} variables to have dynamic (runtime)
  1932. initialization. To support this, any use of such a variable goes
  1933. through a wrapper function that performs any necessary initialization.
  1934. When the use and definition of the variable are in the same
  1935. translation unit, this overhead can be optimized away, but when the
  1936. use is in a different translation unit there is significant overhead
  1937. even if the variable doesn't actually need dynamic initialization. If
  1938. the programmer can be sure that no use of the variable in a
  1939. non-defining TU needs to trigger dynamic initialization (either
  1940. because the variable is statically initialized, or a use of the
  1941. variable in the defining TU will be executed before any uses in
  1942. another TU), they can avoid this overhead with the
  1943. @option{-fno-extern-tls-init} option.
  1944. On targets that support symbol aliases, the default is
  1945. @option{-fextern-tls-init}. On targets that do not support symbol
  1946. aliases, the default is @option{-fno-extern-tls-init}.
  1947. @item -ffor-scope
  1948. @itemx -fno-for-scope
  1949. @opindex ffor-scope
  1950. @opindex fno-for-scope
  1951. If @option{-ffor-scope} is specified, the scope of variables declared in
  1952. a @i{for-init-statement} is limited to the @code{for} loop itself,
  1953. as specified by the C++ standard.
  1954. If @option{-fno-for-scope} is specified, the scope of variables declared in
  1955. a @i{for-init-statement} extends to the end of the enclosing scope,
  1956. as was the case in old versions of G++, and other (traditional)
  1957. implementations of C++.
  1958. If neither flag is given, the default is to follow the standard,
  1959. but to allow and give a warning for old-style code that would
  1960. otherwise be invalid, or have different behavior.
  1961. @item -fno-gnu-keywords
  1962. @opindex fno-gnu-keywords
  1963. Do not recognize @code{typeof} as a keyword, so that code can use this
  1964. word as an identifier. You can use the keyword @code{__typeof__} instead.
  1965. @option{-ansi} implies @option{-fno-gnu-keywords}.
  1966. @item -fno-implicit-templates
  1967. @opindex fno-implicit-templates
  1968. Never emit code for non-inline templates that are instantiated
  1969. implicitly (i.e.@: by use); only emit code for explicit instantiations.
  1970. @xref{Template Instantiation}, for more information.
  1971. @item -fno-implicit-inline-templates
  1972. @opindex fno-implicit-inline-templates
  1973. Don't emit code for implicit instantiations of inline templates, either.
  1974. The default is to handle inlines differently so that compiles with and
  1975. without optimization need the same set of explicit instantiations.
  1976. @item -fno-implement-inlines
  1977. @opindex fno-implement-inlines
  1978. To save space, do not emit out-of-line copies of inline functions
  1979. controlled by @code{#pragma implementation}. This causes linker
  1980. errors if these functions are not inlined everywhere they are called.
  1981. @item -fms-extensions
  1982. @opindex fms-extensions
  1983. Disable Wpedantic warnings about constructs used in MFC, such as implicit
  1984. int and getting a pointer to member function via non-standard syntax.
  1985. @item -fno-nonansi-builtins
  1986. @opindex fno-nonansi-builtins
  1987. Disable built-in declarations of functions that are not mandated by
  1988. ANSI/ISO C@. These include @code{ffs}, @code{alloca}, @code{_exit},
  1989. @code{index}, @code{bzero}, @code{conjf}, and other related functions.
  1990. @item -fnothrow-opt
  1991. @opindex fnothrow-opt
  1992. Treat a @code{throw()} exception specification as if it were a
  1993. @code{noexcept} specification to reduce or eliminate the text size
  1994. overhead relative to a function with no exception specification. If
  1995. the function has local variables of types with non-trivial
  1996. destructors, the exception specification actually makes the
  1997. function smaller because the EH cleanups for those variables can be
  1998. optimized away. The semantic effect is that an exception thrown out of
  1999. a function with such an exception specification results in a call
  2000. to @code{terminate} rather than @code{unexpected}.
  2001. @item -fno-operator-names
  2002. @opindex fno-operator-names
  2003. Do not treat the operator name keywords @code{and}, @code{bitand},
  2004. @code{bitor}, @code{compl}, @code{not}, @code{or} and @code{xor} as
  2005. synonyms as keywords.
  2006. @item -fno-optional-diags
  2007. @opindex fno-optional-diags
  2008. Disable diagnostics that the standard says a compiler does not need to
  2009. issue. Currently, the only such diagnostic issued by G++ is the one for
  2010. a name having multiple meanings within a class.
  2011. @item -fpermissive
  2012. @opindex fpermissive
  2013. Downgrade some diagnostics about nonconformant code from errors to
  2014. warnings. Thus, using @option{-fpermissive} allows some
  2015. nonconforming code to compile.
  2016. @item -fno-pretty-templates
  2017. @opindex fno-pretty-templates
  2018. When an error message refers to a specialization of a function
  2019. template, the compiler normally prints the signature of the
  2020. template followed by the template arguments and any typedefs or
  2021. typenames in the signature (e.g. @code{void f(T) [with T = int]}
  2022. rather than @code{void f(int)}) so that it's clear which template is
  2023. involved. When an error message refers to a specialization of a class
  2024. template, the compiler omits any template arguments that match
  2025. the default template arguments for that template. If either of these
  2026. behaviors make it harder to understand the error message rather than
  2027. easier, you can use @option{-fno-pretty-templates} to disable them.
  2028. @item -frepo
  2029. @opindex frepo
  2030. Enable automatic template instantiation at link time. This option also
  2031. implies @option{-fno-implicit-templates}. @xref{Template
  2032. Instantiation}, for more information.
  2033. @item -fno-rtti
  2034. @opindex fno-rtti
  2035. Disable generation of information about every class with virtual
  2036. functions for use by the C++ run-time type identification features
  2037. (@code{dynamic_cast} and @code{typeid}). If you don't use those parts
  2038. of the language, you can save some space by using this flag. Note that
  2039. exception handling uses the same information, but G++ generates it as
  2040. needed. The @code{dynamic_cast} operator can still be used for casts that
  2041. do not require run-time type information, i.e.@: casts to @code{void *} or to
  2042. unambiguous base classes.
  2043. @item -fsized-deallocation
  2044. @opindex fsized-deallocation
  2045. Enable the built-in global declarations
  2046. @smallexample
  2047. void operator delete (void *, std::size_t) noexcept;
  2048. void operator delete[] (void *, std::size_t) noexcept;
  2049. @end smallexample
  2050. as introduced in C++14. This is useful for user-defined replacement
  2051. deallocation functions that, for example, use the size of the object
  2052. to make deallocation faster. Enabled by default under
  2053. @option{-std=c++14} and above. The flag @option{-Wsized-deallocation}
  2054. warns about places that might want to add a definition.
  2055. @item -fstats
  2056. @opindex fstats
  2057. Emit statistics about front-end processing at the end of the compilation.
  2058. This information is generally only useful to the G++ development team.
  2059. @item -fstrict-enums
  2060. @opindex fstrict-enums
  2061. Allow the compiler to optimize using the assumption that a value of
  2062. enumerated type can only be one of the values of the enumeration (as
  2063. defined in the C++ standard; basically, a value that can be
  2064. represented in the minimum number of bits needed to represent all the
  2065. enumerators). This assumption may not be valid if the program uses a
  2066. cast to convert an arbitrary integer value to the enumerated type.
  2067. @item -ftemplate-backtrace-limit=@var{n}
  2068. @opindex ftemplate-backtrace-limit
  2069. Set the maximum number of template instantiation notes for a single
  2070. warning or error to @var{n}. The default value is 10.
  2071. @item -ftemplate-depth=@var{n}
  2072. @opindex ftemplate-depth
  2073. Set the maximum instantiation depth for template classes to @var{n}.
  2074. A limit on the template instantiation depth is needed to detect
  2075. endless recursions during template class instantiation. ANSI/ISO C++
  2076. conforming programs must not rely on a maximum depth greater than 17
  2077. (changed to 1024 in C++11). The default value is 900, as the compiler
  2078. can run out of stack space before hitting 1024 in some situations.
  2079. @item -fno-threadsafe-statics
  2080. @opindex fno-threadsafe-statics
  2081. Do not emit the extra code to use the routines specified in the C++
  2082. ABI for thread-safe initialization of local statics. You can use this
  2083. option to reduce code size slightly in code that doesn't need to be
  2084. thread-safe.
  2085. @item -fuse-cxa-atexit
  2086. @opindex fuse-cxa-atexit
  2087. Register destructors for objects with static storage duration with the
  2088. @code{__cxa_atexit} function rather than the @code{atexit} function.
  2089. This option is required for fully standards-compliant handling of static
  2090. destructors, but only works if your C library supports
  2091. @code{__cxa_atexit}.
  2092. @item -fno-use-cxa-get-exception-ptr
  2093. @opindex fno-use-cxa-get-exception-ptr
  2094. Don't use the @code{__cxa_get_exception_ptr} runtime routine. This
  2095. causes @code{std::uncaught_exception} to be incorrect, but is necessary
  2096. if the runtime routine is not available.
  2097. @item -fvisibility-inlines-hidden
  2098. @opindex fvisibility-inlines-hidden
  2099. This switch declares that the user does not attempt to compare
  2100. pointers to inline functions or methods where the addresses of the two functions
  2101. are taken in different shared objects.
  2102. The effect of this is that GCC may, effectively, mark inline methods with
  2103. @code{__attribute__ ((visibility ("hidden")))} so that they do not
  2104. appear in the export table of a DSO and do not require a PLT indirection
  2105. when used within the DSO@. Enabling this option can have a dramatic effect
  2106. on load and link times of a DSO as it massively reduces the size of the
  2107. dynamic export table when the library makes heavy use of templates.
  2108. The behavior of this switch is not quite the same as marking the
  2109. methods as hidden directly, because it does not affect static variables
  2110. local to the function or cause the compiler to deduce that
  2111. the function is defined in only one shared object.
  2112. You may mark a method as having a visibility explicitly to negate the
  2113. effect of the switch for that method. For example, if you do want to
  2114. compare pointers to a particular inline method, you might mark it as
  2115. having default visibility. Marking the enclosing class with explicit
  2116. visibility has no effect.
  2117. Explicitly instantiated inline methods are unaffected by this option
  2118. as their linkage might otherwise cross a shared library boundary.
  2119. @xref{Template Instantiation}.
  2120. @item -fvisibility-ms-compat
  2121. @opindex fvisibility-ms-compat
  2122. This flag attempts to use visibility settings to make GCC's C++
  2123. linkage model compatible with that of Microsoft Visual Studio.
  2124. The flag makes these changes to GCC's linkage model:
  2125. @enumerate
  2126. @item
  2127. It sets the default visibility to @code{hidden}, like
  2128. @option{-fvisibility=hidden}.
  2129. @item
  2130. Types, but not their members, are not hidden by default.
  2131. @item
  2132. The One Definition Rule is relaxed for types without explicit
  2133. visibility specifications that are defined in more than one
  2134. shared object: those declarations are permitted if they are
  2135. permitted when this option is not used.
  2136. @end enumerate
  2137. In new code it is better to use @option{-fvisibility=hidden} and
  2138. export those classes that are intended to be externally visible.
  2139. Unfortunately it is possible for code to rely, perhaps accidentally,
  2140. on the Visual Studio behavior.
  2141. Among the consequences of these changes are that static data members
  2142. of the same type with the same name but defined in different shared
  2143. objects are different, so changing one does not change the other;
  2144. and that pointers to function members defined in different shared
  2145. objects may not compare equal. When this flag is given, it is a
  2146. violation of the ODR to define types with the same name differently.
  2147. @item -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]}
  2148. @opindex fvtable-verify
  2149. Turn on (or off, if using @option{-fvtable-verify=none}) the security
  2150. feature that verifies at run time, for every virtual call, that
  2151. the vtable pointer through which the call is made is valid for the type of
  2152. the object, and has not been corrupted or overwritten. If an invalid vtable
  2153. pointer is detected at run time, an error is reported and execution of the
  2154. program is immediately halted.
  2155. This option causes run-time data structures to be built at program startup,
  2156. which are used for verifying the vtable pointers.
  2157. The options @samp{std} and @samp{preinit}
  2158. control the timing of when these data structures are built. In both cases the
  2159. data structures are built before execution reaches @code{main}. Using
  2160. @option{-fvtable-verify=std} causes the data structures to be built after
  2161. shared libraries have been loaded and initialized.
  2162. @option{-fvtable-verify=preinit} causes them to be built before shared
  2163. libraries have been loaded and initialized.
  2164. If this option appears multiple times in the command line with different
  2165. values specified, @samp{none} takes highest priority over both @samp{std} and
  2166. @samp{preinit}; @samp{preinit} takes priority over @samp{std}.
  2167. @item -fvtv-debug
  2168. @opindex fvtv-debug
  2169. When used in conjunction with @option{-fvtable-verify=std} or
  2170. @option{-fvtable-verify=preinit}, causes debug versions of the
  2171. runtime functions for the vtable verification feature to be called.
  2172. This flag also causes the compiler to log information about which
  2173. vtable pointers it finds for each class.
  2174. This information is written to a file named @file{vtv_set_ptr_data.log}
  2175. in the directory named by the environment variable @env{VTV_LOGS_DIR}
  2176. if that is defined or the current working directory otherwise.
  2177. Note: This feature @emph{appends} data to the log file. If you want a fresh log
  2178. file, be sure to delete any existing one.
  2179. @item -fvtv-counts
  2180. @opindex fvtv-counts
  2181. This is a debugging flag. When used in conjunction with
  2182. @option{-fvtable-verify=std} or @option{-fvtable-verify=preinit}, this
  2183. causes the compiler to keep track of the total number of virtual calls
  2184. it encounters and the number of verifications it inserts. It also
  2185. counts the number of calls to certain run-time library functions
  2186. that it inserts and logs this information for each compilation unit.
  2187. The compiler writes this information to a file named
  2188. @file{vtv_count_data.log} in the directory named by the environment
  2189. variable @env{VTV_LOGS_DIR} if that is defined or the current working
  2190. directory otherwise. It also counts the size of the vtable pointer sets
  2191. for each class, and writes this information to @file{vtv_class_set_sizes.log}
  2192. in the same directory.
  2193. Note: This feature @emph{appends} data to the log files. To get fresh log
  2194. files, be sure to delete any existing ones.
  2195. @item -fno-weak
  2196. @opindex fno-weak
  2197. Do not use weak symbol support, even if it is provided by the linker.
  2198. By default, G++ uses weak symbols if they are available. This
  2199. option exists only for testing, and should not be used by end-users;
  2200. it results in inferior code and has no benefits. This option may
  2201. be removed in a future release of G++.
  2202. @item -nostdinc++
  2203. @opindex nostdinc++
  2204. Do not search for header files in the standard directories specific to
  2205. C++, but do still search the other standard directories. (This option
  2206. is used when building the C++ library.)
  2207. @end table
  2208. In addition, these optimization, warning, and code generation options
  2209. have meanings only for C++ programs:
  2210. @table @gcctabopt
  2211. @item -Wabi @r{(C, Objective-C, C++ and Objective-C++ only)}
  2212. @opindex Wabi
  2213. @opindex Wno-abi
  2214. When an explicit @option{-fabi-version=@var{n}} option is used, causes
  2215. G++ to warn when it generates code that is probably not compatible with the
  2216. vendor-neutral C++ ABI@. Since G++ now defaults to
  2217. @option{-fabi-version=0}, @option{-Wabi} has no effect unless either
  2218. an older ABI version is selected (with @option{-fabi-version=@var{n}})
  2219. or an older compatibility version is selected (with
  2220. @option{-Wabi=@var{n}} or @option{-fabi-compat-version=@var{n}}).
  2221. Although an effort has been made to warn about
  2222. all such cases, there are probably some cases that are not warned about,
  2223. even though G++ is generating incompatible code. There may also be
  2224. cases where warnings are emitted even though the code that is generated
  2225. is compatible.
  2226. You should rewrite your code to avoid these warnings if you are
  2227. concerned about the fact that code generated by G++ may not be binary
  2228. compatible with code generated by other compilers.
  2229. @option{-Wabi} can also be used with an explicit version number to
  2230. warn about compatibility with a particular @option{-fabi-version}
  2231. level, e.g. @option{-Wabi=2} to warn about changes relative to
  2232. @option{-fabi-version=2}. Specifying a version number also sets
  2233. @option{-fabi-compat-version=@var{n}}.
  2234. The known incompatibilities in @option{-fabi-version=2} (which was the
  2235. default from GCC 3.4 to 4.9) include:
  2236. @itemize @bullet
  2237. @item
  2238. A template with a non-type template parameter of reference type was
  2239. mangled incorrectly:
  2240. @smallexample
  2241. extern int N;
  2242. template <int &> struct S @{@};
  2243. void n (S<N>) @{2@}
  2244. @end smallexample
  2245. This was fixed in @option{-fabi-version=3}.
  2246. @item
  2247. SIMD vector types declared using @code{__attribute ((vector_size))} were
  2248. mangled in a non-standard way that does not allow for overloading of
  2249. functions taking vectors of different sizes.
  2250. The mangling was changed in @option{-fabi-version=4}.
  2251. @item
  2252. @code{__attribute ((const))} and @code{noreturn} were mangled as type
  2253. qualifiers, and @code{decltype} of a plain declaration was folded away.
  2254. These mangling issues were fixed in @option{-fabi-version=5}.
  2255. @item
  2256. Scoped enumerators passed as arguments to a variadic function are
  2257. promoted like unscoped enumerators, causing @code{va_arg} to complain.
  2258. On most targets this does not actually affect the parameter passing
  2259. ABI, as there is no way to pass an argument smaller than @code{int}.
  2260. Also, the ABI changed the mangling of template argument packs,
  2261. @code{const_cast}, @code{static_cast}, prefix increment/decrement, and
  2262. a class scope function used as a template argument.
  2263. These issues were corrected in @option{-fabi-version=6}.
  2264. @item
  2265. Lambdas in default argument scope were mangled incorrectly, and the
  2266. ABI changed the mangling of @code{nullptr_t}.
  2267. These issues were corrected in @option{-fabi-version=7}.
  2268. @item
  2269. When mangling a function type with function-cv-qualifiers, the
  2270. un-qualified function type was incorrectly treated as a substitution
  2271. candidate.
  2272. This was fixed in @option{-fabi-version=8}.
  2273. @end itemize
  2274. It also warns about psABI-related changes. The known psABI changes at this
  2275. point include:
  2276. @itemize @bullet
  2277. @item
  2278. For SysV/x86-64, unions with @code{long double} members are
  2279. passed in memory as specified in psABI. For example:
  2280. @smallexample
  2281. union U @{
  2282. long double ld;
  2283. int i;
  2284. @};
  2285. @end smallexample
  2286. @noindent
  2287. @code{union U} is always passed in memory.
  2288. @end itemize
  2289. @item -Wabi-tag @r{(C++ and Objective-C++ only)}
  2290. @opindex Wabi-tag
  2291. @opindex -Wabi-tag
  2292. Warn when a type with an ABI tag is used in a context that does not
  2293. have that ABI tag. See @ref{C++ Attributes} for more information
  2294. about ABI tags.
  2295. @item -Wctor-dtor-privacy @r{(C++ and Objective-C++ only)}
  2296. @opindex Wctor-dtor-privacy
  2297. @opindex Wno-ctor-dtor-privacy
  2298. Warn when a class seems unusable because all the constructors or
  2299. destructors in that class are private, and it has neither friends nor
  2300. public static member functions. Also warn if there are no non-private
  2301. methods, and there's at least one private member function that isn't
  2302. a constructor or destructor.
  2303. @item -Wdelete-non-virtual-dtor @r{(C++ and Objective-C++ only)}
  2304. @opindex Wdelete-non-virtual-dtor
  2305. @opindex Wno-delete-non-virtual-dtor
  2306. Warn when @code{delete} is used to destroy an instance of a class that
  2307. has virtual functions and non-virtual destructor. It is unsafe to delete
  2308. an instance of a derived class through a pointer to a base class if the
  2309. base class does not have a virtual destructor. This warning is enabled
  2310. by @option{-Wall}.
  2311. @item -Wliteral-suffix @r{(C++ and Objective-C++ only)}
  2312. @opindex Wliteral-suffix
  2313. @opindex Wno-literal-suffix
  2314. Warn when a string or character literal is followed by a ud-suffix which does
  2315. not begin with an underscore. As a conforming extension, GCC treats such
  2316. suffixes as separate preprocessing tokens in order to maintain backwards
  2317. compatibility with code that uses formatting macros from @code{<inttypes.h>}.
  2318. For example:
  2319. @smallexample
  2320. #define __STDC_FORMAT_MACROS
  2321. #include <inttypes.h>
  2322. #include <stdio.h>
  2323. int main() @{
  2324. int64_t i64 = 123;
  2325. printf("My int64: %"PRId64"\n", i64);
  2326. @}
  2327. @end smallexample
  2328. In this case, @code{PRId64} is treated as a separate preprocessing token.
  2329. This warning is enabled by default.
  2330. @item -Wnarrowing @r{(C++ and Objective-C++ only)}
  2331. @opindex Wnarrowing
  2332. @opindex Wno-narrowing
  2333. Warn when a narrowing conversion prohibited by C++11 occurs within
  2334. @samp{@{ @}}, e.g.
  2335. @smallexample
  2336. int i = @{ 2.2 @}; // error: narrowing from double to int
  2337. @end smallexample
  2338. This flag is included in @option{-Wall} and @option{-Wc++11-compat}.
  2339. With @option{-std=c++11}, @option{-Wno-narrowing} suppresses the diagnostic
  2340. required by the standard. Note that this does not affect the meaning
  2341. of well-formed code; narrowing conversions are still considered
  2342. ill-formed in SFINAE context.
  2343. @item -Wnoexcept @r{(C++ and Objective-C++ only)}
  2344. @opindex Wnoexcept
  2345. @opindex Wno-noexcept
  2346. Warn when a noexcept-expression evaluates to false because of a call
  2347. to a function that does not have a non-throwing exception
  2348. specification (i.e. @code{throw()} or @code{noexcept}) but is known by
  2349. the compiler to never throw an exception.
  2350. @item -Wnon-virtual-dtor @r{(C++ and Objective-C++ only)}
  2351. @opindex Wnon-virtual-dtor
  2352. @opindex Wno-non-virtual-dtor
  2353. Warn when a class has virtual functions and an accessible non-virtual
  2354. destructor itself or in an accessible polymorphic base class, in which
  2355. case it is possible but unsafe to delete an instance of a derived
  2356. class through a pointer to the class itself or base class. This
  2357. warning is automatically enabled if @option{-Weffc++} is specified.
  2358. @item -Wreorder @r{(C++ and Objective-C++ only)}
  2359. @opindex Wreorder
  2360. @opindex Wno-reorder
  2361. @cindex reordering, warning
  2362. @cindex warning for reordering of member initializers
  2363. Warn when the order of member initializers given in the code does not
  2364. match the order in which they must be executed. For instance:
  2365. @smallexample
  2366. struct A @{
  2367. int i;
  2368. int j;
  2369. A(): j (0), i (1) @{ @}
  2370. @};
  2371. @end smallexample
  2372. @noindent
  2373. The compiler rearranges the member initializers for @code{i}
  2374. and @code{j} to match the declaration order of the members, emitting
  2375. a warning to that effect. This warning is enabled by @option{-Wall}.
  2376. @item -fext-numeric-literals @r{(C++ and Objective-C++ only)}
  2377. @opindex fext-numeric-literals
  2378. @opindex fno-ext-numeric-literals
  2379. Accept imaginary, fixed-point, or machine-defined
  2380. literal number suffixes as GNU extensions.
  2381. When this option is turned off these suffixes are treated
  2382. as C++11 user-defined literal numeric suffixes.
  2383. This is on by default for all pre-C++11 dialects and all GNU dialects:
  2384. @option{-std=c++98}, @option{-std=gnu++98}, @option{-std=gnu++11},
  2385. @option{-std=gnu++14}.
  2386. This option is off by default
  2387. for ISO C++11 onwards (@option{-std=c++11}, ...).
  2388. @end table
  2389. The following @option{-W@dots{}} options are not affected by @option{-Wall}.
  2390. @table @gcctabopt
  2391. @item -Weffc++ @r{(C++ and Objective-C++ only)}
  2392. @opindex Weffc++
  2393. @opindex Wno-effc++
  2394. Warn about violations of the following style guidelines from Scott Meyers'
  2395. @cite{Effective C++} series of books:
  2396. @itemize @bullet
  2397. @item
  2398. Define a copy constructor and an assignment operator for classes
  2399. with dynamically-allocated memory.
  2400. @item
  2401. Prefer initialization to assignment in constructors.
  2402. @item
  2403. Have @code{operator=} return a reference to @code{*this}.
  2404. @item
  2405. Don't try to return a reference when you must return an object.
  2406. @item
  2407. Distinguish between prefix and postfix forms of increment and
  2408. decrement operators.
  2409. @item
  2410. Never overload @code{&&}, @code{||}, or @code{,}.
  2411. @end itemize
  2412. This option also enables @option{-Wnon-virtual-dtor}, which is also
  2413. one of the effective C++ recommendations. However, the check is
  2414. extended to warn about the lack of virtual destructor in accessible
  2415. non-polymorphic bases classes too.
  2416. When selecting this option, be aware that the standard library
  2417. headers do not obey all of these guidelines; use @samp{grep -v}
  2418. to filter out those warnings.
  2419. @item -Wstrict-null-sentinel @r{(C++ and Objective-C++ only)}
  2420. @opindex Wstrict-null-sentinel
  2421. @opindex Wno-strict-null-sentinel
  2422. Warn about the use of an uncasted @code{NULL} as sentinel. When
  2423. compiling only with GCC this is a valid sentinel, as @code{NULL} is defined
  2424. to @code{__null}. Although it is a null pointer constant rather than a
  2425. null pointer, it is guaranteed to be of the same size as a pointer.
  2426. But this use is not portable across different compilers.
  2427. @item -Wno-non-template-friend @r{(C++ and Objective-C++ only)}
  2428. @opindex Wno-non-template-friend
  2429. @opindex Wnon-template-friend
  2430. Disable warnings when non-templatized friend functions are declared
  2431. within a template. Since the advent of explicit template specification
  2432. support in G++, if the name of the friend is an unqualified-id (i.e.,
  2433. @samp{friend foo(int)}), the C++ language specification demands that the
  2434. friend declare or define an ordinary, nontemplate function. (Section
  2435. 14.5.3). Before G++ implemented explicit specification, unqualified-ids
  2436. could be interpreted as a particular specialization of a templatized
  2437. function. Because this non-conforming behavior is no longer the default
  2438. behavior for G++, @option{-Wnon-template-friend} allows the compiler to
  2439. check existing code for potential trouble spots and is on by default.
  2440. This new compiler behavior can be turned off with
  2441. @option{-Wno-non-template-friend}, which keeps the conformant compiler code
  2442. but disables the helpful warning.
  2443. @item -Wold-style-cast @r{(C++ and Objective-C++ only)}
  2444. @opindex Wold-style-cast
  2445. @opindex Wno-old-style-cast
  2446. Warn if an old-style (C-style) cast to a non-void type is used within
  2447. a C++ program. The new-style casts (@code{dynamic_cast},
  2448. @code{static_cast}, @code{reinterpret_cast}, and @code{const_cast}) are
  2449. less vulnerable to unintended effects and much easier to search for.
  2450. @item -Woverloaded-virtual @r{(C++ and Objective-C++ only)}
  2451. @opindex Woverloaded-virtual
  2452. @opindex Wno-overloaded-virtual
  2453. @cindex overloaded virtual function, warning
  2454. @cindex warning for overloaded virtual function
  2455. Warn when a function declaration hides virtual functions from a
  2456. base class. For example, in:
  2457. @smallexample
  2458. struct A @{
  2459. virtual void f();
  2460. @};
  2461. struct B: public A @{
  2462. void f(int);
  2463. @};
  2464. @end smallexample
  2465. the @code{A} class version of @code{f} is hidden in @code{B}, and code
  2466. like:
  2467. @smallexample
  2468. B* b;
  2469. b->f();
  2470. @end smallexample
  2471. @noindent
  2472. fails to compile.
  2473. @item -Wno-pmf-conversions @r{(C++ and Objective-C++ only)}
  2474. @opindex Wno-pmf-conversions
  2475. @opindex Wpmf-conversions
  2476. Disable the diagnostic for converting a bound pointer to member function
  2477. to a plain pointer.
  2478. @item -Wsign-promo @r{(C++ and Objective-C++ only)}
  2479. @opindex Wsign-promo
  2480. @opindex Wno-sign-promo
  2481. Warn when overload resolution chooses a promotion from unsigned or
  2482. enumerated type to a signed type, over a conversion to an unsigned type of
  2483. the same size. Previous versions of G++ tried to preserve
  2484. unsignedness, but the standard mandates the current behavior.
  2485. @end table
  2486. @node Objective-C and Objective-C++ Dialect Options
  2487. @section Options Controlling Objective-C and Objective-C++ Dialects
  2488. @cindex compiler options, Objective-C and Objective-C++
  2489. @cindex Objective-C and Objective-C++ options, command-line
  2490. @cindex options, Objective-C and Objective-C++
  2491. (NOTE: This manual does not describe the Objective-C and Objective-C++
  2492. languages themselves. @xref{Standards,,Language Standards
  2493. Supported by GCC}, for references.)
  2494. This section describes the command-line options that are only meaningful
  2495. for Objective-C and Objective-C++ programs. You can also use most of
  2496. the language-independent GNU compiler options.
  2497. For example, you might compile a file @file{some_class.m} like this:
  2498. @smallexample
  2499. gcc -g -fgnu-runtime -O -c some_class.m
  2500. @end smallexample
  2501. @noindent
  2502. In this example, @option{-fgnu-runtime} is an option meant only for
  2503. Objective-C and Objective-C++ programs; you can use the other options with
  2504. any language supported by GCC@.
  2505. Note that since Objective-C is an extension of the C language, Objective-C
  2506. compilations may also use options specific to the C front-end (e.g.,
  2507. @option{-Wtraditional}). Similarly, Objective-C++ compilations may use
  2508. C++-specific options (e.g., @option{-Wabi}).
  2509. Here is a list of options that are @emph{only} for compiling Objective-C
  2510. and Objective-C++ programs:
  2511. @table @gcctabopt
  2512. @item -fconstant-string-class=@var{class-name}
  2513. @opindex fconstant-string-class
  2514. Use @var{class-name} as the name of the class to instantiate for each
  2515. literal string specified with the syntax @code{@@"@dots{}"}. The default
  2516. class name is @code{NXConstantString} if the GNU runtime is being used, and
  2517. @code{NSConstantString} if the NeXT runtime is being used (see below). The
  2518. @option{-fconstant-cfstrings} option, if also present, overrides the
  2519. @option{-fconstant-string-class} setting and cause @code{@@"@dots{}"} literals
  2520. to be laid out as constant CoreFoundation strings.
  2521. @item -fgnu-runtime
  2522. @opindex fgnu-runtime
  2523. Generate object code compatible with the standard GNU Objective-C
  2524. runtime. This is the default for most types of systems.
  2525. @item -fnext-runtime
  2526. @opindex fnext-runtime
  2527. Generate output compatible with the NeXT runtime. This is the default
  2528. for NeXT-based systems, including Darwin and Mac OS X@. The macro
  2529. @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is
  2530. used.
  2531. @item -fno-nil-receivers
  2532. @opindex fno-nil-receivers
  2533. Assume that all Objective-C message dispatches (@code{[receiver
  2534. message:arg]}) in this translation unit ensure that the receiver is
  2535. not @code{nil}. This allows for more efficient entry points in the
  2536. runtime to be used. This option is only available in conjunction with
  2537. the NeXT runtime and ABI version 0 or 1.
  2538. @item -fobjc-abi-version=@var{n}
  2539. @opindex fobjc-abi-version
  2540. Use version @var{n} of the Objective-C ABI for the selected runtime.
  2541. This option is currently supported only for the NeXT runtime. In that
  2542. case, Version 0 is the traditional (32-bit) ABI without support for
  2543. properties and other Objective-C 2.0 additions. Version 1 is the
  2544. traditional (32-bit) ABI with support for properties and other
  2545. Objective-C 2.0 additions. Version 2 is the modern (64-bit) ABI. If
  2546. nothing is specified, the default is Version 0 on 32-bit target
  2547. machines, and Version 2 on 64-bit target machines.
  2548. @item -fobjc-call-cxx-cdtors
  2549. @opindex fobjc-call-cxx-cdtors
  2550. For each Objective-C class, check if any of its instance variables is a
  2551. C++ object with a non-trivial default constructor. If so, synthesize a
  2552. special @code{- (id) .cxx_construct} instance method which runs
  2553. non-trivial default constructors on any such instance variables, in order,
  2554. and then return @code{self}. Similarly, check if any instance variable
  2555. is a C++ object with a non-trivial destructor, and if so, synthesize a
  2556. special @code{- (void) .cxx_destruct} method which runs
  2557. all such default destructors, in reverse order.
  2558. The @code{- (id) .cxx_construct} and @code{- (void) .cxx_destruct}
  2559. methods thusly generated only operate on instance variables
  2560. declared in the current Objective-C class, and not those inherited
  2561. from superclasses. It is the responsibility of the Objective-C
  2562. runtime to invoke all such methods in an object's inheritance
  2563. hierarchy. The @code{- (id) .cxx_construct} methods are invoked
  2564. by the runtime immediately after a new object instance is allocated;
  2565. the @code{- (void) .cxx_destruct} methods are invoked immediately
  2566. before the runtime deallocates an object instance.
  2567. As of this writing, only the NeXT runtime on Mac OS X 10.4 and later has
  2568. support for invoking the @code{- (id) .cxx_construct} and
  2569. @code{- (void) .cxx_destruct} methods.
  2570. @item -fobjc-direct-dispatch
  2571. @opindex fobjc-direct-dispatch
  2572. Allow fast jumps to the message dispatcher. On Darwin this is
  2573. accomplished via the comm page.
  2574. @item -fobjc-exceptions
  2575. @opindex fobjc-exceptions
  2576. Enable syntactic support for structured exception handling in
  2577. Objective-C, similar to what is offered by C++ and Java. This option
  2578. is required to use the Objective-C keywords @code{@@try},
  2579. @code{@@throw}, @code{@@catch}, @code{@@finally} and
  2580. @code{@@synchronized}. This option is available with both the GNU
  2581. runtime and the NeXT runtime (but not available in conjunction with
  2582. the NeXT runtime on Mac OS X 10.2 and earlier).
  2583. @item -fobjc-gc
  2584. @opindex fobjc-gc
  2585. Enable garbage collection (GC) in Objective-C and Objective-C++
  2586. programs. This option is only available with the NeXT runtime; the
  2587. GNU runtime has a different garbage collection implementation that
  2588. does not require special compiler flags.
  2589. @item -fobjc-nilcheck
  2590. @opindex fobjc-nilcheck
  2591. For the NeXT runtime with version 2 of the ABI, check for a nil
  2592. receiver in method invocations before doing the actual method call.
  2593. This is the default and can be disabled using
  2594. @option{-fno-objc-nilcheck}. Class methods and super calls are never
  2595. checked for nil in this way no matter what this flag is set to.
  2596. Currently this flag does nothing when the GNU runtime, or an older
  2597. version of the NeXT runtime ABI, is used.
  2598. @item -fobjc-std=objc1
  2599. @opindex fobjc-std
  2600. Conform to the language syntax of Objective-C 1.0, the language
  2601. recognized by GCC 4.0. This only affects the Objective-C additions to
  2602. the C/C++ language; it does not affect conformance to C/C++ standards,
  2603. which is controlled by the separate C/C++ dialect option flags. When
  2604. this option is used with the Objective-C or Objective-C++ compiler,
  2605. any Objective-C syntax that is not recognized by GCC 4.0 is rejected.
  2606. This is useful if you need to make sure that your Objective-C code can
  2607. be compiled with older versions of GCC@.
  2608. @item -freplace-objc-classes
  2609. @opindex freplace-objc-classes
  2610. Emit a special marker instructing @command{ld(1)} not to statically link in
  2611. the resulting object file, and allow @command{dyld(1)} to load it in at
  2612. run time instead. This is used in conjunction with the Fix-and-Continue
  2613. debugging mode, where the object file in question may be recompiled and
  2614. dynamically reloaded in the course of program execution, without the need
  2615. to restart the program itself. Currently, Fix-and-Continue functionality
  2616. is only available in conjunction with the NeXT runtime on Mac OS X 10.3
  2617. and later.
  2618. @item -fzero-link
  2619. @opindex fzero-link
  2620. When compiling for the NeXT runtime, the compiler ordinarily replaces calls
  2621. to @code{objc_getClass("@dots{}")} (when the name of the class is known at
  2622. compile time) with static class references that get initialized at load time,
  2623. which improves run-time performance. Specifying the @option{-fzero-link} flag
  2624. suppresses this behavior and causes calls to @code{objc_getClass("@dots{}")}
  2625. to be retained. This is useful in Zero-Link debugging mode, since it allows
  2626. for individual class implementations to be modified during program execution.
  2627. The GNU runtime currently always retains calls to @code{objc_get_class("@dots{}")}
  2628. regardless of command-line options.
  2629. @item -fno-local-ivars
  2630. @opindex fno-local-ivars
  2631. @opindex flocal-ivars
  2632. By default instance variables in Objective-C can be accessed as if
  2633. they were local variables from within the methods of the class they're
  2634. declared in. This can lead to shadowing between instance variables
  2635. and other variables declared either locally inside a class method or
  2636. globally with the same name. Specifying the @option{-fno-local-ivars}
  2637. flag disables this behavior thus avoiding variable shadowing issues.
  2638. @item -fivar-visibility=@r{[}public@r{|}protected@r{|}private@r{|}package@r{]}
  2639. @opindex fivar-visibility
  2640. Set the default instance variable visibility to the specified option
  2641. so that instance variables declared outside the scope of any access
  2642. modifier directives default to the specified visibility.
  2643. @item -gen-decls
  2644. @opindex gen-decls
  2645. Dump interface declarations for all classes seen in the source file to a
  2646. file named @file{@var{sourcename}.decl}.
  2647. @item -Wassign-intercept @r{(Objective-C and Objective-C++ only)}
  2648. @opindex Wassign-intercept
  2649. @opindex Wno-assign-intercept
  2650. Warn whenever an Objective-C assignment is being intercepted by the
  2651. garbage collector.
  2652. @item -Wno-protocol @r{(Objective-C and Objective-C++ only)}
  2653. @opindex Wno-protocol
  2654. @opindex Wprotocol
  2655. If a class is declared to implement a protocol, a warning is issued for
  2656. every method in the protocol that is not implemented by the class. The
  2657. default behavior is to issue a warning for every method not explicitly
  2658. implemented in the class, even if a method implementation is inherited
  2659. from the superclass. If you use the @option{-Wno-protocol} option, then
  2660. methods inherited from the superclass are considered to be implemented,
  2661. and no warning is issued for them.
  2662. @item -Wselector @r{(Objective-C and Objective-C++ only)}
  2663. @opindex Wselector
  2664. @opindex Wno-selector
  2665. Warn if multiple methods of different types for the same selector are
  2666. found during compilation. The check is performed on the list of methods
  2667. in the final stage of compilation. Additionally, a check is performed
  2668. for each selector appearing in a @code{@@selector(@dots{})}
  2669. expression, and a corresponding method for that selector has been found
  2670. during compilation. Because these checks scan the method table only at
  2671. the end of compilation, these warnings are not produced if the final
  2672. stage of compilation is not reached, for example because an error is
  2673. found during compilation, or because the @option{-fsyntax-only} option is
  2674. being used.
  2675. @item -Wstrict-selector-match @r{(Objective-C and Objective-C++ only)}
  2676. @opindex Wstrict-selector-match
  2677. @opindex Wno-strict-selector-match
  2678. Warn if multiple methods with differing argument and/or return types are
  2679. found for a given selector when attempting to send a message using this
  2680. selector to a receiver of type @code{id} or @code{Class}. When this flag
  2681. is off (which is the default behavior), the compiler omits such warnings
  2682. if any differences found are confined to types that share the same size
  2683. and alignment.
  2684. @item -Wundeclared-selector @r{(Objective-C and Objective-C++ only)}
  2685. @opindex Wundeclared-selector
  2686. @opindex Wno-undeclared-selector
  2687. Warn if a @code{@@selector(@dots{})} expression referring to an
  2688. undeclared selector is found. A selector is considered undeclared if no
  2689. method with that name has been declared before the
  2690. @code{@@selector(@dots{})} expression, either explicitly in an
  2691. @code{@@interface} or @code{@@protocol} declaration, or implicitly in
  2692. an @code{@@implementation} section. This option always performs its
  2693. checks as soon as a @code{@@selector(@dots{})} expression is found,
  2694. while @option{-Wselector} only performs its checks in the final stage of
  2695. compilation. This also enforces the coding style convention
  2696. that methods and selectors must be declared before being used.
  2697. @item -print-objc-runtime-info
  2698. @opindex print-objc-runtime-info
  2699. Generate C header describing the largest structure that is passed by
  2700. value, if any.
  2701. @end table
  2702. @node Language Independent Options
  2703. @section Options to Control Diagnostic Messages Formatting
  2704. @cindex options to control diagnostics formatting
  2705. @cindex diagnostic messages
  2706. @cindex message formatting
  2707. Traditionally, diagnostic messages have been formatted irrespective of
  2708. the output device's aspect (e.g.@: its width, @dots{}). You can use the
  2709. options described below
  2710. to control the formatting algorithm for diagnostic messages,
  2711. e.g.@: how many characters per line, how often source location
  2712. information should be reported. Note that some language front ends may not
  2713. honor these options.
  2714. @table @gcctabopt
  2715. @item -fmessage-length=@var{n}
  2716. @opindex fmessage-length
  2717. Try to format error messages so that they fit on lines of about
  2718. @var{n} characters. If @var{n} is zero, then no line-wrapping is
  2719. done; each error message appears on a single line. This is the
  2720. default for all front ends.
  2721. @item -fdiagnostics-show-location=once
  2722. @opindex fdiagnostics-show-location
  2723. Only meaningful in line-wrapping mode. Instructs the diagnostic messages
  2724. reporter to emit source location information @emph{once}; that is, in
  2725. case the message is too long to fit on a single physical line and has to
  2726. be wrapped, the source location won't be emitted (as prefix) again,
  2727. over and over, in subsequent continuation lines. This is the default
  2728. behavior.
  2729. @item -fdiagnostics-show-location=every-line
  2730. Only meaningful in line-wrapping mode. Instructs the diagnostic
  2731. messages reporter to emit the same source location information (as
  2732. prefix) for physical lines that result from the process of breaking
  2733. a message which is too long to fit on a single line.
  2734. @item -fdiagnostics-color[=@var{WHEN}]
  2735. @itemx -fno-diagnostics-color
  2736. @opindex fdiagnostics-color
  2737. @cindex highlight, color, colour
  2738. @vindex GCC_COLORS @r{environment variable}
  2739. Use color in diagnostics. @var{WHEN} is @samp{never}, @samp{always},
  2740. or @samp{auto}. The default depends on how the compiler has been configured,
  2741. it can be any of the above @var{WHEN} options or also @samp{never}
  2742. if @env{GCC_COLORS} environment variable isn't present in the environment,
  2743. and @samp{auto} otherwise.
  2744. @samp{auto} means to use color only when the standard error is a terminal.
  2745. The forms @option{-fdiagnostics-color} and @option{-fno-diagnostics-color} are
  2746. aliases for @option{-fdiagnostics-color=always} and
  2747. @option{-fdiagnostics-color=never}, respectively.
  2748. The colors are defined by the environment variable @env{GCC_COLORS}.
  2749. Its value is a colon-separated list of capabilities and Select Graphic
  2750. Rendition (SGR) substrings. SGR commands are interpreted by the
  2751. terminal or terminal emulator. (See the section in the documentation
  2752. of your text terminal for permitted values and their meanings as
  2753. character attributes.) These substring values are integers in decimal
  2754. representation and can be concatenated with semicolons.
  2755. Common values to concatenate include
  2756. @samp{1} for bold,
  2757. @samp{4} for underline,
  2758. @samp{5} for blink,
  2759. @samp{7} for inverse,
  2760. @samp{39} for default foreground color,
  2761. @samp{30} to @samp{37} for foreground colors,
  2762. @samp{90} to @samp{97} for 16-color mode foreground colors,
  2763. @samp{38;5;0} to @samp{38;5;255}
  2764. for 88-color and 256-color modes foreground colors,
  2765. @samp{49} for default background color,
  2766. @samp{40} to @samp{47} for background colors,
  2767. @samp{100} to @samp{107} for 16-color mode background colors,
  2768. and @samp{48;5;0} to @samp{48;5;255}
  2769. for 88-color and 256-color modes background colors.
  2770. The default @env{GCC_COLORS} is
  2771. @smallexample
  2772. error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01
  2773. @end smallexample
  2774. @noindent
  2775. where @samp{01;31} is bold red, @samp{01;35} is bold magenta,
  2776. @samp{01;36} is bold cyan, @samp{01;32} is bold green and
  2777. @samp{01} is bold. Setting @env{GCC_COLORS} to the empty
  2778. string disables colors.
  2779. Supported capabilities are as follows.
  2780. @table @code
  2781. @item error=
  2782. @vindex error GCC_COLORS @r{capability}
  2783. SGR substring for error: markers.
  2784. @item warning=
  2785. @vindex warning GCC_COLORS @r{capability}
  2786. SGR substring for warning: markers.
  2787. @item note=
  2788. @vindex note GCC_COLORS @r{capability}
  2789. SGR substring for note: markers.
  2790. @item caret=
  2791. @vindex caret GCC_COLORS @r{capability}
  2792. SGR substring for caret line.
  2793. @item locus=
  2794. @vindex locus GCC_COLORS @r{capability}
  2795. SGR substring for location information, @samp{file:line} or
  2796. @samp{file:line:column} etc.
  2797. @item quote=
  2798. @vindex quote GCC_COLORS @r{capability}
  2799. SGR substring for information printed within quotes.
  2800. @end table
  2801. @item -fno-diagnostics-show-option
  2802. @opindex fno-diagnostics-show-option
  2803. @opindex fdiagnostics-show-option
  2804. By default, each diagnostic emitted includes text indicating the
  2805. command-line option that directly controls the diagnostic (if such an
  2806. option is known to the diagnostic machinery). Specifying the
  2807. @option{-fno-diagnostics-show-option} flag suppresses that behavior.
  2808. @item -fno-diagnostics-show-caret
  2809. @opindex fno-diagnostics-show-caret
  2810. @opindex fdiagnostics-show-caret
  2811. By default, each diagnostic emitted includes the original source line
  2812. and a caret '^' indicating the column. This option suppresses this
  2813. information. The source line is truncated to @var{n} characters, if
  2814. the @option{-fmessage-length=n} option is given. When the output is done
  2815. to the terminal, the width is limited to the width given by the
  2816. @env{COLUMNS} environment variable or, if not set, to the terminal width.
  2817. @end table
  2818. @node Warning Options
  2819. @section Options to Request or Suppress Warnings
  2820. @cindex options to control warnings
  2821. @cindex warning messages
  2822. @cindex messages, warning
  2823. @cindex suppressing warnings
  2824. Warnings are diagnostic messages that report constructions that
  2825. are not inherently erroneous but that are risky or suggest there
  2826. may have been an error.
  2827. The following language-independent options do not enable specific
  2828. warnings but control the kinds of diagnostics produced by GCC@.
  2829. @table @gcctabopt
  2830. @cindex syntax checking
  2831. @item -fsyntax-only
  2832. @opindex fsyntax-only
  2833. Check the code for syntax errors, but don't do anything beyond that.
  2834. @item -fmax-errors=@var{n}
  2835. @opindex fmax-errors
  2836. Limits the maximum number of error messages to @var{n}, at which point
  2837. GCC bails out rather than attempting to continue processing the source
  2838. code. If @var{n} is 0 (the default), there is no limit on the number
  2839. of error messages produced. If @option{-Wfatal-errors} is also
  2840. specified, then @option{-Wfatal-errors} takes precedence over this
  2841. option.
  2842. @item -w
  2843. @opindex w
  2844. Inhibit all warning messages.
  2845. @item -Werror
  2846. @opindex Werror
  2847. @opindex Wno-error
  2848. Make all warnings into errors.
  2849. @item -Werror=
  2850. @opindex Werror=
  2851. @opindex Wno-error=
  2852. Make the specified warning into an error. The specifier for a warning
  2853. is appended; for example @option{-Werror=switch} turns the warnings
  2854. controlled by @option{-Wswitch} into errors. This switch takes a
  2855. negative form, to be used to negate @option{-Werror} for specific
  2856. warnings; for example @option{-Wno-error=switch} makes
  2857. @option{-Wswitch} warnings not be errors, even when @option{-Werror}
  2858. is in effect.
  2859. The warning message for each controllable warning includes the
  2860. option that controls the warning. That option can then be used with
  2861. @option{-Werror=} and @option{-Wno-error=} as described above.
  2862. (Printing of the option in the warning message can be disabled using the
  2863. @option{-fno-diagnostics-show-option} flag.)
  2864. Note that specifying @option{-Werror=}@var{foo} automatically implies
  2865. @option{-W}@var{foo}. However, @option{-Wno-error=}@var{foo} does not
  2866. imply anything.
  2867. @item -Wfatal-errors
  2868. @opindex Wfatal-errors
  2869. @opindex Wno-fatal-errors
  2870. This option causes the compiler to abort compilation on the first error
  2871. occurred rather than trying to keep going and printing further error
  2872. messages.
  2873. @end table
  2874. You can request many specific warnings with options beginning with
  2875. @samp{-W}, for example @option{-Wimplicit} to request warnings on
  2876. implicit declarations. Each of these specific warning options also
  2877. has a negative form beginning @samp{-Wno-} to turn off warnings; for
  2878. example, @option{-Wno-implicit}. This manual lists only one of the
  2879. two forms, whichever is not the default. For further
  2880. language-specific options also refer to @ref{C++ Dialect Options} and
  2881. @ref{Objective-C and Objective-C++ Dialect Options}.
  2882. Some options, such as @option{-Wall} and @option{-Wextra}, turn on other
  2883. options, such as @option{-Wunused}, which may turn on further options,
  2884. such as @option{-Wunused-value}. The combined effect of positive and
  2885. negative forms is that more specific options have priority over less
  2886. specific ones, independently of their position in the command-line. For
  2887. options of the same specificity, the last one takes effect. Options
  2888. enabled or disabled via pragmas (@pxref{Diagnostic Pragmas}) take effect
  2889. as if they appeared at the end of the command-line.
  2890. When an unrecognized warning option is requested (e.g.,
  2891. @option{-Wunknown-warning}), GCC emits a diagnostic stating
  2892. that the option is not recognized. However, if the @option{-Wno-} form
  2893. is used, the behavior is slightly different: no diagnostic is
  2894. produced for @option{-Wno-unknown-warning} unless other diagnostics
  2895. are being produced. This allows the use of new @option{-Wno-} options
  2896. with old compilers, but if something goes wrong, the compiler
  2897. warns that an unrecognized option is present.
  2898. @table @gcctabopt
  2899. @item -Wpedantic
  2900. @itemx -pedantic
  2901. @opindex pedantic
  2902. @opindex Wpedantic
  2903. Issue all the warnings demanded by strict ISO C and ISO C++;
  2904. reject all programs that use forbidden extensions, and some other
  2905. programs that do not follow ISO C and ISO C++. For ISO C, follows the
  2906. version of the ISO C standard specified by any @option{-std} option used.
  2907. Valid ISO C and ISO C++ programs should compile properly with or without
  2908. this option (though a rare few require @option{-ansi} or a
  2909. @option{-std} option specifying the required version of ISO C)@. However,
  2910. without this option, certain GNU extensions and traditional C and C++
  2911. features are supported as well. With this option, they are rejected.
  2912. @option{-Wpedantic} does not cause warning messages for use of the
  2913. alternate keywords whose names begin and end with @samp{__}. Pedantic
  2914. warnings are also disabled in the expression that follows
  2915. @code{__extension__}. However, only system header files should use
  2916. these escape routes; application programs should avoid them.
  2917. @xref{Alternate Keywords}.
  2918. Some users try to use @option{-Wpedantic} to check programs for strict ISO
  2919. C conformance. They soon find that it does not do quite what they want:
  2920. it finds some non-ISO practices, but not all---only those for which
  2921. ISO C @emph{requires} a diagnostic, and some others for which
  2922. diagnostics have been added.
  2923. A feature to report any failure to conform to ISO C might be useful in
  2924. some instances, but would require considerable additional work and would
  2925. be quite different from @option{-Wpedantic}. We don't have plans to
  2926. support such a feature in the near future.
  2927. Where the standard specified with @option{-std} represents a GNU
  2928. extended dialect of C, such as @samp{gnu90} or @samp{gnu99}, there is a
  2929. corresponding @dfn{base standard}, the version of ISO C on which the GNU
  2930. extended dialect is based. Warnings from @option{-Wpedantic} are given
  2931. where they are required by the base standard. (It does not make sense
  2932. for such warnings to be given only for features not in the specified GNU
  2933. C dialect, since by definition the GNU dialects of C include all
  2934. features the compiler supports with the given option, and there would be
  2935. nothing to warn about.)
  2936. @item -pedantic-errors
  2937. @opindex pedantic-errors
  2938. Give an error whenever the @dfn{base standard} (see @option{-Wpedantic})
  2939. requires a diagnostic, in some cases where there is undefined behavior
  2940. at compile-time and in some other cases that do not prevent compilation
  2941. of programs that are valid according to the standard. This is not
  2942. equivalent to @option{-Werror=pedantic}, since there are errors enabled
  2943. by this option and not enabled by the latter and vice versa.
  2944. @item -Wall
  2945. @opindex Wall
  2946. @opindex Wno-all
  2947. This enables all the warnings about constructions that some users
  2948. consider questionable, and that are easy to avoid (or modify to
  2949. prevent the warning), even in conjunction with macros. This also
  2950. enables some language-specific warnings described in @ref{C++ Dialect
  2951. Options} and @ref{Objective-C and Objective-C++ Dialect Options}.
  2952. @option{-Wall} turns on the following warning flags:
  2953. @gccoptlist{-Waddress @gol
  2954. -Warray-bounds=1 @r{(only with} @option{-O2}@r{)} @gol
  2955. -Wc++11-compat -Wc++14-compat@gol
  2956. -Wchar-subscripts @gol
  2957. -Wenum-compare @r{(in C/ObjC; this is on by default in C++)} @gol
  2958. -Wimplicit-int @r{(C and Objective-C only)} @gol
  2959. -Wimplicit-function-declaration @r{(C and Objective-C only)} @gol
  2960. -Wcomment @gol
  2961. -Wformat @gol
  2962. -Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol
  2963. -Wmaybe-uninitialized @gol
  2964. -Wmissing-braces @r{(only for C/ObjC)} @gol
  2965. -Wnonnull @gol
  2966. -Wopenmp-simd @gol
  2967. -Wparentheses @gol
  2968. -Wpointer-sign @gol
  2969. -Wreorder @gol
  2970. -Wreturn-type @gol
  2971. -Wsequence-point @gol
  2972. -Wsign-compare @r{(only in C++)} @gol
  2973. -Wstrict-aliasing @gol
  2974. -Wstrict-overflow=1 @gol
  2975. -Wswitch @gol
  2976. -Wtrigraphs @gol
  2977. -Wuninitialized @gol
  2978. -Wunknown-pragmas @gol
  2979. -Wunused-function @gol
  2980. -Wunused-label @gol
  2981. -Wunused-value @gol
  2982. -Wunused-variable @gol
  2983. -Wvolatile-register-var @gol
  2984. }
  2985. Note that some warning flags are not implied by @option{-Wall}. Some of
  2986. them warn about constructions that users generally do not consider
  2987. questionable, but which occasionally you might wish to check for;
  2988. others warn about constructions that are necessary or hard to avoid in
  2989. some cases, and there is no simple way to modify the code to suppress
  2990. the warning. Some of them are enabled by @option{-Wextra} but many of
  2991. them must be enabled individually.
  2992. @item -Wextra
  2993. @opindex W
  2994. @opindex Wextra
  2995. @opindex Wno-extra
  2996. This enables some extra warning flags that are not enabled by
  2997. @option{-Wall}. (This option used to be called @option{-W}. The older
  2998. name is still supported, but the newer name is more descriptive.)
  2999. @gccoptlist{-Wclobbered @gol
  3000. -Wempty-body @gol
  3001. -Wignored-qualifiers @gol
  3002. -Wmissing-field-initializers @gol
  3003. -Wmissing-parameter-type @r{(C only)} @gol
  3004. -Wold-style-declaration @r{(C only)} @gol
  3005. -Woverride-init @gol
  3006. -Wsign-compare @gol
  3007. -Wtype-limits @gol
  3008. -Wuninitialized @gol
  3009. -Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
  3010. -Wunused-but-set-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)} @gol
  3011. }
  3012. The option @option{-Wextra} also prints warning messages for the
  3013. following cases:
  3014. @itemize @bullet
  3015. @item
  3016. A pointer is compared against integer zero with @code{<}, @code{<=},
  3017. @code{>}, or @code{>=}.
  3018. @item
  3019. (C++ only) An enumerator and a non-enumerator both appear in a
  3020. conditional expression.
  3021. @item
  3022. (C++ only) Ambiguous virtual bases.
  3023. @item
  3024. (C++ only) Subscripting an array that has been declared @code{register}.
  3025. @item
  3026. (C++ only) Taking the address of a variable that has been declared
  3027. @code{register}.
  3028. @item
  3029. (C++ only) A base class is not initialized in a derived class's copy
  3030. constructor.
  3031. @end itemize
  3032. @item -Wchar-subscripts
  3033. @opindex Wchar-subscripts
  3034. @opindex Wno-char-subscripts
  3035. Warn if an array subscript has type @code{char}. This is a common cause
  3036. of error, as programmers often forget that this type is signed on some
  3037. machines.
  3038. This warning is enabled by @option{-Wall}.
  3039. @item -Wcomment
  3040. @opindex Wcomment
  3041. @opindex Wno-comment
  3042. Warn whenever a comment-start sequence @samp{/*} appears in a @samp{/*}
  3043. comment, or whenever a Backslash-Newline appears in a @samp{//} comment.
  3044. This warning is enabled by @option{-Wall}.
  3045. @item -Wno-coverage-mismatch
  3046. @opindex Wno-coverage-mismatch
  3047. Warn if feedback profiles do not match when using the
  3048. @option{-fprofile-use} option.
  3049. If a source file is changed between compiling with @option{-fprofile-gen} and
  3050. with @option{-fprofile-use}, the files with the profile feedback can fail
  3051. to match the source file and GCC cannot use the profile feedback
  3052. information. By default, this warning is enabled and is treated as an
  3053. error. @option{-Wno-coverage-mismatch} can be used to disable the
  3054. warning or @option{-Wno-error=coverage-mismatch} can be used to
  3055. disable the error. Disabling the error for this warning can result in
  3056. poorly optimized code and is useful only in the
  3057. case of very minor changes such as bug fixes to an existing code-base.
  3058. Completely disabling the warning is not recommended.
  3059. @item -Wno-cpp
  3060. @r{(C, Objective-C, C++, Objective-C++ and Fortran only)}
  3061. Suppress warning messages emitted by @code{#warning} directives.
  3062. @item -Wdouble-promotion @r{(C, C++, Objective-C and Objective-C++ only)}
  3063. @opindex Wdouble-promotion
  3064. @opindex Wno-double-promotion
  3065. Give a warning when a value of type @code{float} is implicitly
  3066. promoted to @code{double}. CPUs with a 32-bit ``single-precision''
  3067. floating-point unit implement @code{float} in hardware, but emulate
  3068. @code{double} in software. On such a machine, doing computations
  3069. using @code{double} values is much more expensive because of the
  3070. overhead required for software emulation.
  3071. It is easy to accidentally do computations with @code{double} because
  3072. floating-point literals are implicitly of type @code{double}. For
  3073. example, in:
  3074. @smallexample
  3075. @group
  3076. float area(float radius)
  3077. @{
  3078. return 3.14159 * radius * radius;
  3079. @}
  3080. @end group
  3081. @end smallexample
  3082. the compiler performs the entire computation with @code{double}
  3083. because the floating-point literal is a @code{double}.
  3084. @item -Wformat
  3085. @itemx -Wformat=@var{n}
  3086. @opindex Wformat
  3087. @opindex Wno-format
  3088. @opindex ffreestanding
  3089. @opindex fno-builtin
  3090. @opindex Wformat=
  3091. Check calls to @code{printf} and @code{scanf}, etc., to make sure that
  3092. the arguments supplied have types appropriate to the format string
  3093. specified, and that the conversions specified in the format string make
  3094. sense. This includes standard functions, and others specified by format
  3095. attributes (@pxref{Function Attributes}), in the @code{printf},
  3096. @code{scanf}, @code{strftime} and @code{strfmon} (an X/Open extension,
  3097. not in the C standard) families (or other target-specific families).
  3098. Which functions are checked without format attributes having been
  3099. specified depends on the standard version selected, and such checks of
  3100. functions without the attribute specified are disabled by
  3101. @option{-ffreestanding} or @option{-fno-builtin}.
  3102. The formats are checked against the format features supported by GNU
  3103. libc version 2.2. These include all ISO C90 and C99 features, as well
  3104. as features from the Single Unix Specification and some BSD and GNU
  3105. extensions. Other library implementations may not support all these
  3106. features; GCC does not support warning about features that go beyond a
  3107. particular library's limitations. However, if @option{-Wpedantic} is used
  3108. with @option{-Wformat}, warnings are given about format features not
  3109. in the selected standard version (but not for @code{strfmon} formats,
  3110. since those are not in any version of the C standard). @xref{C Dialect
  3111. Options,,Options Controlling C Dialect}.
  3112. @table @gcctabopt
  3113. @item -Wformat=1
  3114. @itemx -Wformat
  3115. @opindex Wformat
  3116. @opindex Wformat=1
  3117. Option @option{-Wformat} is equivalent to @option{-Wformat=1}, and
  3118. @option{-Wno-format} is equivalent to @option{-Wformat=0}. Since
  3119. @option{-Wformat} also checks for null format arguments for several
  3120. functions, @option{-Wformat} also implies @option{-Wnonnull}. Some
  3121. aspects of this level of format checking can be disabled by the
  3122. options: @option{-Wno-format-contains-nul},
  3123. @option{-Wno-format-extra-args}, and @option{-Wno-format-zero-length}.
  3124. @option{-Wformat} is enabled by @option{-Wall}.
  3125. @item -Wno-format-contains-nul
  3126. @opindex Wno-format-contains-nul
  3127. @opindex Wformat-contains-nul
  3128. If @option{-Wformat} is specified, do not warn about format strings that
  3129. contain NUL bytes.
  3130. @item -Wno-format-extra-args
  3131. @opindex Wno-format-extra-args
  3132. @opindex Wformat-extra-args
  3133. If @option{-Wformat} is specified, do not warn about excess arguments to a
  3134. @code{printf} or @code{scanf} format function. The C standard specifies
  3135. that such arguments are ignored.
  3136. Where the unused arguments lie between used arguments that are
  3137. specified with @samp{$} operand number specifications, normally
  3138. warnings are still given, since the implementation could not know what
  3139. type to pass to @code{va_arg} to skip the unused arguments. However,
  3140. in the case of @code{scanf} formats, this option suppresses the
  3141. warning if the unused arguments are all pointers, since the Single
  3142. Unix Specification says that such unused arguments are allowed.
  3143. @item -Wno-format-zero-length
  3144. @opindex Wno-format-zero-length
  3145. @opindex Wformat-zero-length
  3146. If @option{-Wformat} is specified, do not warn about zero-length formats.
  3147. The C standard specifies that zero-length formats are allowed.
  3148. @item -Wformat=2
  3149. @opindex Wformat=2
  3150. Enable @option{-Wformat} plus additional format checks. Currently
  3151. equivalent to @option{-Wformat -Wformat-nonliteral -Wformat-security
  3152. -Wformat-y2k}.
  3153. @item -Wformat-nonliteral
  3154. @opindex Wformat-nonliteral
  3155. @opindex Wno-format-nonliteral
  3156. If @option{-Wformat} is specified, also warn if the format string is not a
  3157. string literal and so cannot be checked, unless the format function
  3158. takes its format arguments as a @code{va_list}.
  3159. @item -Wformat-security
  3160. @opindex Wformat-security
  3161. @opindex Wno-format-security
  3162. If @option{-Wformat} is specified, also warn about uses of format
  3163. functions that represent possible security problems. At present, this
  3164. warns about calls to @code{printf} and @code{scanf} functions where the
  3165. format string is not a string literal and there are no format arguments,
  3166. as in @code{printf (foo);}. This may be a security hole if the format
  3167. string came from untrusted input and contains @samp{%n}. (This is
  3168. currently a subset of what @option{-Wformat-nonliteral} warns about, but
  3169. in future warnings may be added to @option{-Wformat-security} that are not
  3170. included in @option{-Wformat-nonliteral}.)
  3171. @item -Wformat-signedness
  3172. @opindex Wformat-signedness
  3173. @opindex Wno-format-signedness
  3174. If @option{-Wformat} is specified, also warn if the format string
  3175. requires an unsigned argument and the argument is signed and vice versa.
  3176. @item -Wformat-y2k
  3177. @opindex Wformat-y2k
  3178. @opindex Wno-format-y2k
  3179. If @option{-Wformat} is specified, also warn about @code{strftime}
  3180. formats that may yield only a two-digit year.
  3181. @end table
  3182. @item -Wnonnull
  3183. @opindex Wnonnull
  3184. @opindex Wno-nonnull
  3185. Warn about passing a null pointer for arguments marked as
  3186. requiring a non-null value by the @code{nonnull} function attribute.
  3187. @option{-Wnonnull} is included in @option{-Wall} and @option{-Wformat}. It
  3188. can be disabled with the @option{-Wno-nonnull} option.
  3189. @item -Winit-self @r{(C, C++, Objective-C and Objective-C++ only)}
  3190. @opindex Winit-self
  3191. @opindex Wno-init-self
  3192. Warn about uninitialized variables that are initialized with themselves.
  3193. Note this option can only be used with the @option{-Wuninitialized} option.
  3194. For example, GCC warns about @code{i} being uninitialized in the
  3195. following snippet only when @option{-Winit-self} has been specified:
  3196. @smallexample
  3197. @group
  3198. int f()
  3199. @{
  3200. int i = i;
  3201. return i;
  3202. @}
  3203. @end group
  3204. @end smallexample
  3205. This warning is enabled by @option{-Wall} in C++.
  3206. @item -Wimplicit-int @r{(C and Objective-C only)}
  3207. @opindex Wimplicit-int
  3208. @opindex Wno-implicit-int
  3209. Warn when a declaration does not specify a type.
  3210. This warning is enabled by @option{-Wall}.
  3211. @item -Wimplicit-function-declaration @r{(C and Objective-C only)}
  3212. @opindex Wimplicit-function-declaration
  3213. @opindex Wno-implicit-function-declaration
  3214. Give a warning whenever a function is used before being declared. In
  3215. C99 mode (@option{-std=c99} or @option{-std=gnu99}), this warning is
  3216. enabled by default and it is made into an error by
  3217. @option{-pedantic-errors}. This warning is also enabled by
  3218. @option{-Wall}.
  3219. @item -Wimplicit @r{(C and Objective-C only)}
  3220. @opindex Wimplicit
  3221. @opindex Wno-implicit
  3222. Same as @option{-Wimplicit-int} and @option{-Wimplicit-function-declaration}.
  3223. This warning is enabled by @option{-Wall}.
  3224. @item -Wignored-qualifiers @r{(C and C++ only)}
  3225. @opindex Wignored-qualifiers
  3226. @opindex Wno-ignored-qualifiers
  3227. Warn if the return type of a function has a type qualifier
  3228. such as @code{const}. For ISO C such a type qualifier has no effect,
  3229. since the value returned by a function is not an lvalue.
  3230. For C++, the warning is only emitted for scalar types or @code{void}.
  3231. ISO C prohibits qualified @code{void} return types on function
  3232. definitions, so such return types always receive a warning
  3233. even without this option.
  3234. This warning is also enabled by @option{-Wextra}.
  3235. @item -Wmain
  3236. @opindex Wmain
  3237. @opindex Wno-main
  3238. Warn if the type of @code{main} is suspicious. @code{main} should be
  3239. a function with external linkage, returning int, taking either zero
  3240. arguments, two, or three arguments of appropriate types. This warning
  3241. is enabled by default in C++ and is enabled by either @option{-Wall}
  3242. or @option{-Wpedantic}.
  3243. @item -Wmissing-braces
  3244. @opindex Wmissing-braces
  3245. @opindex Wno-missing-braces
  3246. Warn if an aggregate or union initializer is not fully bracketed. In
  3247. the following example, the initializer for @code{a} is not fully
  3248. bracketed, but that for @code{b} is fully bracketed. This warning is
  3249. enabled by @option{-Wall} in C.
  3250. @smallexample
  3251. int a[2][2] = @{ 0, 1, 2, 3 @};
  3252. int b[2][2] = @{ @{ 0, 1 @}, @{ 2, 3 @} @};
  3253. @end smallexample
  3254. This warning is enabled by @option{-Wall}.
  3255. @item -Wmissing-include-dirs @r{(C, C++, Objective-C and Objective-C++ only)}
  3256. @opindex Wmissing-include-dirs
  3257. @opindex Wno-missing-include-dirs
  3258. Warn if a user-supplied include directory does not exist.
  3259. @item -Wparentheses
  3260. @opindex Wparentheses
  3261. @opindex Wno-parentheses
  3262. Warn if parentheses are omitted in certain contexts, such
  3263. as when there is an assignment in a context where a truth value
  3264. is expected, or when operators are nested whose precedence people
  3265. often get confused about.
  3266. Also warn if a comparison like @code{x<=y<=z} appears; this is
  3267. equivalent to @code{(x<=y ? 1 : 0) <= z}, which is a different
  3268. interpretation from that of ordinary mathematical notation.
  3269. Also warn about constructions where there may be confusion to which
  3270. @code{if} statement an @code{else} branch belongs. Here is an example of
  3271. such a case:
  3272. @smallexample
  3273. @group
  3274. @{
  3275. if (a)
  3276. if (b)
  3277. foo ();
  3278. else
  3279. bar ();
  3280. @}
  3281. @end group
  3282. @end smallexample
  3283. In C/C++, every @code{else} branch belongs to the innermost possible
  3284. @code{if} statement, which in this example is @code{if (b)}. This is
  3285. often not what the programmer expected, as illustrated in the above
  3286. example by indentation the programmer chose. When there is the
  3287. potential for this confusion, GCC issues a warning when this flag
  3288. is specified. To eliminate the warning, add explicit braces around
  3289. the innermost @code{if} statement so there is no way the @code{else}
  3290. can belong to the enclosing @code{if}. The resulting code
  3291. looks like this:
  3292. @smallexample
  3293. @group
  3294. @{
  3295. if (a)
  3296. @{
  3297. if (b)
  3298. foo ();
  3299. else
  3300. bar ();
  3301. @}
  3302. @}
  3303. @end group
  3304. @end smallexample
  3305. Also warn for dangerous uses of the GNU extension to
  3306. @code{?:} with omitted middle operand. When the condition
  3307. in the @code{?}: operator is a boolean expression, the omitted value is
  3308. always 1. Often programmers expect it to be a value computed
  3309. inside the conditional expression instead.
  3310. This warning is enabled by @option{-Wall}.
  3311. @item -Wsequence-point
  3312. @opindex Wsequence-point
  3313. @opindex Wno-sequence-point
  3314. Warn about code that may have undefined semantics because of violations
  3315. of sequence point rules in the C and C++ standards.
  3316. The C and C++ standards define the order in which expressions in a C/C++
  3317. program are evaluated in terms of @dfn{sequence points}, which represent
  3318. a partial ordering between the execution of parts of the program: those
  3319. executed before the sequence point, and those executed after it. These
  3320. occur after the evaluation of a full expression (one which is not part
  3321. of a larger expression), after the evaluation of the first operand of a
  3322. @code{&&}, @code{||}, @code{? :} or @code{,} (comma) operator, before a
  3323. function is called (but after the evaluation of its arguments and the
  3324. expression denoting the called function), and in certain other places.
  3325. Other than as expressed by the sequence point rules, the order of
  3326. evaluation of subexpressions of an expression is not specified. All
  3327. these rules describe only a partial order rather than a total order,
  3328. since, for example, if two functions are called within one expression
  3329. with no sequence point between them, the order in which the functions
  3330. are called is not specified. However, the standards committee have
  3331. ruled that function calls do not overlap.
  3332. It is not specified when between sequence points modifications to the
  3333. values of objects take effect. Programs whose behavior depends on this
  3334. have undefined behavior; the C and C++ standards specify that ``Between
  3335. the previous and next sequence point an object shall have its stored
  3336. value modified at most once by the evaluation of an expression.
  3337. Furthermore, the prior value shall be read only to determine the value
  3338. to be stored.''. If a program breaks these rules, the results on any
  3339. particular implementation are entirely unpredictable.
  3340. Examples of code with undefined behavior are @code{a = a++;}, @code{a[n]
  3341. = b[n++]} and @code{a[i++] = i;}. Some more complicated cases are not
  3342. diagnosed by this option, and it may give an occasional false positive
  3343. result, but in general it has been found fairly effective at detecting
  3344. this sort of problem in programs.
  3345. The standard is worded confusingly, therefore there is some debate
  3346. over the precise meaning of the sequence point rules in subtle cases.
  3347. Links to discussions of the problem, including proposed formal
  3348. definitions, may be found on the GCC readings page, at
  3349. @uref{http://gcc.gnu.org/@/readings.html}.
  3350. This warning is enabled by @option{-Wall} for C and C++.
  3351. @item -Wno-return-local-addr
  3352. @opindex Wno-return-local-addr
  3353. @opindex Wreturn-local-addr
  3354. Do not warn about returning a pointer (or in C++, a reference) to a
  3355. variable that goes out of scope after the function returns.
  3356. @item -Wreturn-type
  3357. @opindex Wreturn-type
  3358. @opindex Wno-return-type
  3359. Warn whenever a function is defined with a return type that defaults
  3360. to @code{int}. Also warn about any @code{return} statement with no
  3361. return value in a function whose return type is not @code{void}
  3362. (falling off the end of the function body is considered returning
  3363. without a value), and about a @code{return} statement with an
  3364. expression in a function whose return type is @code{void}.
  3365. For C++, a function without return type always produces a diagnostic
  3366. message, even when @option{-Wno-return-type} is specified. The only
  3367. exceptions are @code{main} and functions defined in system headers.
  3368. This warning is enabled by @option{-Wall}.
  3369. @item -Wshift-count-negative
  3370. @opindex Wshift-count-negative
  3371. @opindex Wno-shift-count-negative
  3372. Warn if shift count is negative. This warning is enabled by default.
  3373. @item -Wshift-count-overflow
  3374. @opindex Wshift-count-overflow
  3375. @opindex Wno-shift-count-overflow
  3376. Warn if shift count >= width of type. This warning is enabled by default.
  3377. @item -Wswitch
  3378. @opindex Wswitch
  3379. @opindex Wno-switch
  3380. Warn whenever a @code{switch} statement has an index of enumerated type
  3381. and lacks a @code{case} for one or more of the named codes of that
  3382. enumeration. (The presence of a @code{default} label prevents this
  3383. warning.) @code{case} labels outside the enumeration range also
  3384. provoke warnings when this option is used (even if there is a
  3385. @code{default} label).
  3386. This warning is enabled by @option{-Wall}.
  3387. @item -Wswitch-default
  3388. @opindex Wswitch-default
  3389. @opindex Wno-switch-default
  3390. Warn whenever a @code{switch} statement does not have a @code{default}
  3391. case.
  3392. @item -Wswitch-enum
  3393. @opindex Wswitch-enum
  3394. @opindex Wno-switch-enum
  3395. Warn whenever a @code{switch} statement has an index of enumerated type
  3396. and lacks a @code{case} for one or more of the named codes of that
  3397. enumeration. @code{case} labels outside the enumeration range also
  3398. provoke warnings when this option is used. The only difference
  3399. between @option{-Wswitch} and this option is that this option gives a
  3400. warning about an omitted enumeration code even if there is a
  3401. @code{default} label.
  3402. @item -Wswitch-bool
  3403. @opindex Wswitch-bool
  3404. @opindex Wno-switch-bool
  3405. Warn whenever a @code{switch} statement has an index of boolean type.
  3406. It is possible to suppress this warning by casting the controlling
  3407. expression to a type other than @code{bool}. For example:
  3408. @smallexample
  3409. @group
  3410. switch ((int) (a == 4))
  3411. @{
  3412. @dots{}
  3413. @}
  3414. @end group
  3415. @end smallexample
  3416. This warning is enabled by default for C and C++ programs.
  3417. @item -Wsync-nand @r{(C and C++ only)}
  3418. @opindex Wsync-nand
  3419. @opindex Wno-sync-nand
  3420. Warn when @code{__sync_fetch_and_nand} and @code{__sync_nand_and_fetch}
  3421. built-in functions are used. These functions changed semantics in GCC 4.4.
  3422. @item -Wtrigraphs
  3423. @opindex Wtrigraphs
  3424. @opindex Wno-trigraphs
  3425. Warn if any trigraphs are encountered that might change the meaning of
  3426. the program (trigraphs within comments are not warned about).
  3427. This warning is enabled by @option{-Wall}.
  3428. @item -Wunused-but-set-parameter
  3429. @opindex Wunused-but-set-parameter
  3430. @opindex Wno-unused-but-set-parameter
  3431. Warn whenever a function parameter is assigned to, but otherwise unused
  3432. (aside from its declaration).
  3433. To suppress this warning use the @code{unused} attribute
  3434. (@pxref{Variable Attributes}).
  3435. This warning is also enabled by @option{-Wunused} together with
  3436. @option{-Wextra}.
  3437. @item -Wunused-but-set-variable
  3438. @opindex Wunused-but-set-variable
  3439. @opindex Wno-unused-but-set-variable
  3440. Warn whenever a local variable is assigned to, but otherwise unused
  3441. (aside from its declaration).
  3442. This warning is enabled by @option{-Wall}.
  3443. To suppress this warning use the @code{unused} attribute
  3444. (@pxref{Variable Attributes}).
  3445. This warning is also enabled by @option{-Wunused}, which is enabled
  3446. by @option{-Wall}.
  3447. @item -Wunused-function
  3448. @opindex Wunused-function
  3449. @opindex Wno-unused-function
  3450. Warn whenever a static function is declared but not defined or a
  3451. non-inline static function is unused.
  3452. This warning is enabled by @option{-Wall}.
  3453. @item -Wunused-label
  3454. @opindex Wunused-label
  3455. @opindex Wno-unused-label
  3456. Warn whenever a label is declared but not used.
  3457. This warning is enabled by @option{-Wall}.
  3458. To suppress this warning use the @code{unused} attribute
  3459. (@pxref{Variable Attributes}).
  3460. @item -Wunused-local-typedefs @r{(C, Objective-C, C++ and Objective-C++ only)}
  3461. @opindex Wunused-local-typedefs
  3462. Warn when a typedef locally defined in a function is not used.
  3463. This warning is enabled by @option{-Wall}.
  3464. @item -Wunused-parameter
  3465. @opindex Wunused-parameter
  3466. @opindex Wno-unused-parameter
  3467. Warn whenever a function parameter is unused aside from its declaration.
  3468. To suppress this warning use the @code{unused} attribute
  3469. (@pxref{Variable Attributes}).
  3470. @item -Wno-unused-result
  3471. @opindex Wunused-result
  3472. @opindex Wno-unused-result
  3473. Do not warn if a caller of a function marked with attribute
  3474. @code{warn_unused_result} (@pxref{Function Attributes}) does not use
  3475. its return value. The default is @option{-Wunused-result}.
  3476. @item -Wunused-variable
  3477. @opindex Wunused-variable
  3478. @opindex Wno-unused-variable
  3479. Warn whenever a local variable or non-constant static variable is unused
  3480. aside from its declaration.
  3481. This warning is enabled by @option{-Wall}.
  3482. To suppress this warning use the @code{unused} attribute
  3483. (@pxref{Variable Attributes}).
  3484. @item -Wunused-value
  3485. @opindex Wunused-value
  3486. @opindex Wno-unused-value
  3487. Warn whenever a statement computes a result that is explicitly not
  3488. used. To suppress this warning cast the unused expression to
  3489. @code{void}. This includes an expression-statement or the left-hand
  3490. side of a comma expression that contains no side effects. For example,
  3491. an expression such as @code{x[i,j]} causes a warning, while
  3492. @code{x[(void)i,j]} does not.
  3493. This warning is enabled by @option{-Wall}.
  3494. @item -Wunused
  3495. @opindex Wunused
  3496. @opindex Wno-unused
  3497. All the above @option{-Wunused} options combined.
  3498. In order to get a warning about an unused function parameter, you must
  3499. either specify @option{-Wextra -Wunused} (note that @option{-Wall} implies
  3500. @option{-Wunused}), or separately specify @option{-Wunused-parameter}.
  3501. @item -Wuninitialized
  3502. @opindex Wuninitialized
  3503. @opindex Wno-uninitialized
  3504. Warn if an automatic variable is used without first being initialized
  3505. or if a variable may be clobbered by a @code{setjmp} call. In C++,
  3506. warn if a non-static reference or non-static @code{const} member
  3507. appears in a class without constructors.
  3508. If you want to warn about code that uses the uninitialized value of the
  3509. variable in its own initializer, use the @option{-Winit-self} option.
  3510. These warnings occur for individual uninitialized or clobbered
  3511. elements of structure, union or array variables as well as for
  3512. variables that are uninitialized or clobbered as a whole. They do
  3513. not occur for variables or elements declared @code{volatile}. Because
  3514. these warnings depend on optimization, the exact variables or elements
  3515. for which there are warnings depends on the precise optimization
  3516. options and version of GCC used.
  3517. Note that there may be no warning about a variable that is used only
  3518. to compute a value that itself is never used, because such
  3519. computations may be deleted by data flow analysis before the warnings
  3520. are printed.
  3521. @item -Wmaybe-uninitialized
  3522. @opindex Wmaybe-uninitialized
  3523. @opindex Wno-maybe-uninitialized
  3524. For an automatic variable, if there exists a path from the function
  3525. entry to a use of the variable that is initialized, but there exist
  3526. some other paths for which the variable is not initialized, the compiler
  3527. emits a warning if it cannot prove the uninitialized paths are not
  3528. executed at run time. These warnings are made optional because GCC is
  3529. not smart enough to see all the reasons why the code might be correct
  3530. in spite of appearing to have an error. Here is one example of how
  3531. this can happen:
  3532. @smallexample
  3533. @group
  3534. @{
  3535. int x;
  3536. switch (y)
  3537. @{
  3538. case 1: x = 1;
  3539. break;
  3540. case 2: x = 4;
  3541. break;
  3542. case 3: x = 5;
  3543. @}
  3544. foo (x);
  3545. @}
  3546. @end group
  3547. @end smallexample
  3548. @noindent
  3549. If the value of @code{y} is always 1, 2 or 3, then @code{x} is
  3550. always initialized, but GCC doesn't know this. To suppress the
  3551. warning, you need to provide a default case with assert(0) or
  3552. similar code.
  3553. @cindex @code{longjmp} warnings
  3554. This option also warns when a non-volatile automatic variable might be
  3555. changed by a call to @code{longjmp}. These warnings as well are possible
  3556. only in optimizing compilation.
  3557. The compiler sees only the calls to @code{setjmp}. It cannot know
  3558. where @code{longjmp} will be called; in fact, a signal handler could
  3559. call it at any point in the code. As a result, you may get a warning
  3560. even when there is in fact no problem because @code{longjmp} cannot
  3561. in fact be called at the place that would cause a problem.
  3562. Some spurious warnings can be avoided if you declare all the functions
  3563. you use that never return as @code{noreturn}. @xref{Function
  3564. Attributes}.
  3565. This warning is enabled by @option{-Wall} or @option{-Wextra}.
  3566. @item -Wunknown-pragmas
  3567. @opindex Wunknown-pragmas
  3568. @opindex Wno-unknown-pragmas
  3569. @cindex warning for unknown pragmas
  3570. @cindex unknown pragmas, warning
  3571. @cindex pragmas, warning of unknown
  3572. Warn when a @code{#pragma} directive is encountered that is not understood by
  3573. GCC@. If this command-line option is used, warnings are even issued
  3574. for unknown pragmas in system header files. This is not the case if
  3575. the warnings are only enabled by the @option{-Wall} command-line option.
  3576. @item -Wno-pragmas
  3577. @opindex Wno-pragmas
  3578. @opindex Wpragmas
  3579. Do not warn about misuses of pragmas, such as incorrect parameters,
  3580. invalid syntax, or conflicts between pragmas. See also
  3581. @option{-Wunknown-pragmas}.
  3582. @item -Wstrict-aliasing
  3583. @opindex Wstrict-aliasing
  3584. @opindex Wno-strict-aliasing
  3585. This option is only active when @option{-fstrict-aliasing} is active.
  3586. It warns about code that might break the strict aliasing rules that the
  3587. compiler is using for optimization. The warning does not catch all
  3588. cases, but does attempt to catch the more common pitfalls. It is
  3589. included in @option{-Wall}.
  3590. It is equivalent to @option{-Wstrict-aliasing=3}
  3591. @item -Wstrict-aliasing=n
  3592. @opindex Wstrict-aliasing=n
  3593. This option is only active when @option{-fstrict-aliasing} is active.
  3594. It warns about code that might break the strict aliasing rules that the
  3595. compiler is using for optimization.
  3596. Higher levels correspond to higher accuracy (fewer false positives).
  3597. Higher levels also correspond to more effort, similar to the way @option{-O}
  3598. works.
  3599. @option{-Wstrict-aliasing} is equivalent to @option{-Wstrict-aliasing=3}.
  3600. Level 1: Most aggressive, quick, least accurate.
  3601. Possibly useful when higher levels
  3602. do not warn but @option{-fstrict-aliasing} still breaks the code, as it has very few
  3603. false negatives. However, it has many false positives.
  3604. Warns for all pointer conversions between possibly incompatible types,
  3605. even if never dereferenced. Runs in the front end only.
  3606. Level 2: Aggressive, quick, not too precise.
  3607. May still have many false positives (not as many as level 1 though),
  3608. and few false negatives (but possibly more than level 1).
  3609. Unlike level 1, it only warns when an address is taken. Warns about
  3610. incomplete types. Runs in the front end only.
  3611. Level 3 (default for @option{-Wstrict-aliasing}):
  3612. Should have very few false positives and few false
  3613. negatives. Slightly slower than levels 1 or 2 when optimization is enabled.
  3614. Takes care of the common pun+dereference pattern in the front end:
  3615. @code{*(int*)&some_float}.
  3616. If optimization is enabled, it also runs in the back end, where it deals
  3617. with multiple statement cases using flow-sensitive points-to information.
  3618. Only warns when the converted pointer is dereferenced.
  3619. Does not warn about incomplete types.
  3620. @item -Wstrict-overflow
  3621. @itemx -Wstrict-overflow=@var{n}
  3622. @opindex Wstrict-overflow
  3623. @opindex Wno-strict-overflow
  3624. This option is only active when @option{-fstrict-overflow} is active.
  3625. It warns about cases where the compiler optimizes based on the
  3626. assumption that signed overflow does not occur. Note that it does not
  3627. warn about all cases where the code might overflow: it only warns
  3628. about cases where the compiler implements some optimization. Thus
  3629. this warning depends on the optimization level.
  3630. An optimization that assumes that signed overflow does not occur is
  3631. perfectly safe if the values of the variables involved are such that
  3632. overflow never does, in fact, occur. Therefore this warning can
  3633. easily give a false positive: a warning about code that is not
  3634. actually a problem. To help focus on important issues, several
  3635. warning levels are defined. No warnings are issued for the use of
  3636. undefined signed overflow when estimating how many iterations a loop
  3637. requires, in particular when determining whether a loop will be
  3638. executed at all.
  3639. @table @gcctabopt
  3640. @item -Wstrict-overflow=1
  3641. Warn about cases that are both questionable and easy to avoid. For
  3642. example, with @option{-fstrict-overflow}, the compiler simplifies
  3643. @code{x + 1 > x} to @code{1}. This level of
  3644. @option{-Wstrict-overflow} is enabled by @option{-Wall}; higher levels
  3645. are not, and must be explicitly requested.
  3646. @item -Wstrict-overflow=2
  3647. Also warn about other cases where a comparison is simplified to a
  3648. constant. For example: @code{abs (x) >= 0}. This can only be
  3649. simplified when @option{-fstrict-overflow} is in effect, because
  3650. @code{abs (INT_MIN)} overflows to @code{INT_MIN}, which is less than
  3651. zero. @option{-Wstrict-overflow} (with no level) is the same as
  3652. @option{-Wstrict-overflow=2}.
  3653. @item -Wstrict-overflow=3
  3654. Also warn about other cases where a comparison is simplified. For
  3655. example: @code{x + 1 > 1} is simplified to @code{x > 0}.
  3656. @item -Wstrict-overflow=4
  3657. Also warn about other simplifications not covered by the above cases.
  3658. For example: @code{(x * 10) / 5} is simplified to @code{x * 2}.
  3659. @item -Wstrict-overflow=5
  3660. Also warn about cases where the compiler reduces the magnitude of a
  3661. constant involved in a comparison. For example: @code{x + 2 > y} is
  3662. simplified to @code{x + 1 >= y}. This is reported only at the
  3663. highest warning level because this simplification applies to many
  3664. comparisons, so this warning level gives a very large number of
  3665. false positives.
  3666. @end table
  3667. @item -Wsuggest-attribute=@r{[}pure@r{|}const@r{|}noreturn@r{|}format@r{]}
  3668. @opindex Wsuggest-attribute=
  3669. @opindex Wno-suggest-attribute=
  3670. Warn for cases where adding an attribute may be beneficial. The
  3671. attributes currently supported are listed below.
  3672. @table @gcctabopt
  3673. @item -Wsuggest-attribute=pure
  3674. @itemx -Wsuggest-attribute=const
  3675. @itemx -Wsuggest-attribute=noreturn
  3676. @opindex Wsuggest-attribute=pure
  3677. @opindex Wno-suggest-attribute=pure
  3678. @opindex Wsuggest-attribute=const
  3679. @opindex Wno-suggest-attribute=const
  3680. @opindex Wsuggest-attribute=noreturn
  3681. @opindex Wno-suggest-attribute=noreturn
  3682. Warn about functions that might be candidates for attributes
  3683. @code{pure}, @code{const} or @code{noreturn}. The compiler only warns for
  3684. functions visible in other compilation units or (in the case of @code{pure} and
  3685. @code{const}) if it cannot prove that the function returns normally. A function
  3686. returns normally if it doesn't contain an infinite loop or return abnormally
  3687. by throwing, calling @code{abort} or trapping. This analysis requires option
  3688. @option{-fipa-pure-const}, which is enabled by default at @option{-O} and
  3689. higher. Higher optimization levels improve the accuracy of the analysis.
  3690. @item -Wsuggest-attribute=format
  3691. @itemx -Wmissing-format-attribute
  3692. @opindex Wsuggest-attribute=format
  3693. @opindex Wmissing-format-attribute
  3694. @opindex Wno-suggest-attribute=format
  3695. @opindex Wno-missing-format-attribute
  3696. @opindex Wformat
  3697. @opindex Wno-format
  3698. Warn about function pointers that might be candidates for @code{format}
  3699. attributes. Note these are only possible candidates, not absolute ones.
  3700. GCC guesses that function pointers with @code{format} attributes that
  3701. are used in assignment, initialization, parameter passing or return
  3702. statements should have a corresponding @code{format} attribute in the
  3703. resulting type. I.e.@: the left-hand side of the assignment or
  3704. initialization, the type of the parameter variable, or the return type
  3705. of the containing function respectively should also have a @code{format}
  3706. attribute to avoid the warning.
  3707. GCC also warns about function definitions that might be
  3708. candidates for @code{format} attributes. Again, these are only
  3709. possible candidates. GCC guesses that @code{format} attributes
  3710. might be appropriate for any function that calls a function like
  3711. @code{vprintf} or @code{vscanf}, but this might not always be the
  3712. case, and some functions for which @code{format} attributes are
  3713. appropriate may not be detected.
  3714. @end table
  3715. @item -Wsuggest-final-types
  3716. @opindex Wno-suggest-final-types
  3717. @opindex Wsuggest-final-types
  3718. Warn about types with virtual methods where code quality would be improved
  3719. if the type were declared with the C++11 @code{final} specifier,
  3720. or, if possible,
  3721. declared in an anonymous namespace. This allows GCC to more aggressively
  3722. devirtualize the polymorphic calls. This warning is more effective with link
  3723. time optimization, where the information about the class hierarchy graph is
  3724. more complete.
  3725. @item -Wsuggest-final-methods
  3726. @opindex Wno-suggest-final-methods
  3727. @opindex Wsuggest-final-methods
  3728. Warn about virtual methods where code quality would be improved if the method
  3729. were declared with the C++11 @code{final} specifier,
  3730. or, if possible, its type were
  3731. declared in an anonymous namespace or with the @code{final} specifier.
  3732. This warning is
  3733. more effective with link time optimization, where the information about the
  3734. class hierarchy graph is more complete. It is recommended to first consider
  3735. suggestions of @option{-Wsuggest-final-types} and then rebuild with new
  3736. annotations.
  3737. @item -Wsuggest-override
  3738. Warn about overriding virtual functions that are not marked with the override
  3739. keyword.
  3740. @item -Warray-bounds
  3741. @itemx -Warray-bounds=@var{n}
  3742. @opindex Wno-array-bounds
  3743. @opindex Warray-bounds
  3744. This option is only active when @option{-ftree-vrp} is active
  3745. (default for @option{-O2} and above). It warns about subscripts to arrays
  3746. that are always out of bounds. This warning is enabled by @option{-Wall}.
  3747. @table @gcctabopt
  3748. @item -Warray-bounds=1
  3749. This is the warning level of @option{-Warray-bounds} and is enabled
  3750. by @option{-Wall}; higher levels are not, and must be explicitly requested.
  3751. @item -Warray-bounds=2
  3752. This warning level also warns about out of bounds access for
  3753. arrays at the end of a struct and for arrays accessed through
  3754. pointers. This warning level may give a larger number of
  3755. false positives and is deactivated by default.
  3756. @end table
  3757. @item -Wbool-compare
  3758. @opindex Wno-bool-compare
  3759. @opindex Wbool-compare
  3760. Warn about boolean expression compared with an integer value different from
  3761. @code{true}/@code{false}. For instance, the following comparison is
  3762. always false:
  3763. @smallexample
  3764. int n = 5;
  3765. @dots{}
  3766. if ((n > 1) == 2) @{ @dots{} @}
  3767. @end smallexample
  3768. This warning is enabled by @option{-Wall}.
  3769. @item -Wno-discarded-qualifiers @r{(C and Objective-C only)}
  3770. @opindex Wno-discarded-qualifiers
  3771. @opindex Wdiscarded-qualifiers
  3772. Do not warn if type qualifiers on pointers are being discarded.
  3773. Typically, the compiler warns if a @code{const char *} variable is
  3774. passed to a function that takes a @code{char *} parameter. This option
  3775. can be used to suppress such a warning.
  3776. @item -Wno-discarded-array-qualifiers @r{(C and Objective-C only)}
  3777. @opindex Wno-discarded-array-qualifiers
  3778. @opindex Wdiscarded-array-qualifiers
  3779. Do not warn if type qualifiers on arrays which are pointer targets
  3780. are being discarded. Typically, the compiler warns if a
  3781. @code{const int (*)[]} variable is passed to a function that
  3782. takes a @code{int (*)[]} parameter. This option can be used to
  3783. suppress such a warning.
  3784. @item -Wno-incompatible-pointer-types @r{(C and Objective-C only)}
  3785. @opindex Wno-incompatible-pointer-types
  3786. @opindex Wincompatible-pointer-types
  3787. Do not warn when there is a conversion between pointers that have incompatible
  3788. types. This warning is for cases not covered by @option{-Wno-pointer-sign},
  3789. which warns for pointer argument passing or assignment with different
  3790. signedness.
  3791. @item -Wno-int-conversion @r{(C and Objective-C only)}
  3792. @opindex Wno-int-conversion
  3793. @opindex Wint-conversion
  3794. Do not warn about incompatible integer to pointer and pointer to integer
  3795. conversions. This warning is about implicit conversions; for explicit
  3796. conversions the warnings @option{-Wno-int-to-pointer-cast} and
  3797. @option{-Wno-pointer-to-int-cast} may be used.
  3798. @item -Wno-div-by-zero
  3799. @opindex Wno-div-by-zero
  3800. @opindex Wdiv-by-zero
  3801. Do not warn about compile-time integer division by zero. Floating-point
  3802. division by zero is not warned about, as it can be a legitimate way of
  3803. obtaining infinities and NaNs.
  3804. @item -Wsystem-headers
  3805. @opindex Wsystem-headers
  3806. @opindex Wno-system-headers
  3807. @cindex warnings from system headers
  3808. @cindex system headers, warnings from
  3809. Print warning messages for constructs found in system header files.
  3810. Warnings from system headers are normally suppressed, on the assumption
  3811. that they usually do not indicate real problems and would only make the
  3812. compiler output harder to read. Using this command-line option tells
  3813. GCC to emit warnings from system headers as if they occurred in user
  3814. code. However, note that using @option{-Wall} in conjunction with this
  3815. option does @emph{not} warn about unknown pragmas in system
  3816. headers---for that, @option{-Wunknown-pragmas} must also be used.
  3817. @item -Wtrampolines
  3818. @opindex Wtrampolines
  3819. @opindex Wno-trampolines
  3820. Warn about trampolines generated for pointers to nested functions.
  3821. A trampoline is a small piece of data or code that is created at run
  3822. time on the stack when the address of a nested function is taken, and is
  3823. used to call the nested function indirectly. For some targets, it is
  3824. made up of data only and thus requires no special treatment. But, for
  3825. most targets, it is made up of code and thus requires the stack to be
  3826. made executable in order for the program to work properly.
  3827. @item -Wfloat-equal
  3828. @opindex Wfloat-equal
  3829. @opindex Wno-float-equal
  3830. Warn if floating-point values are used in equality comparisons.
  3831. The idea behind this is that sometimes it is convenient (for the
  3832. programmer) to consider floating-point values as approximations to
  3833. infinitely precise real numbers. If you are doing this, then you need
  3834. to compute (by analyzing the code, or in some other way) the maximum or
  3835. likely maximum error that the computation introduces, and allow for it
  3836. when performing comparisons (and when producing output, but that's a
  3837. different problem). In particular, instead of testing for equality, you
  3838. should check to see whether the two values have ranges that overlap; and
  3839. this is done with the relational operators, so equality comparisons are
  3840. probably mistaken.
  3841. @item -Wtraditional @r{(C and Objective-C only)}
  3842. @opindex Wtraditional
  3843. @opindex Wno-traditional
  3844. Warn about certain constructs that behave differently in traditional and
  3845. ISO C@. Also warn about ISO C constructs that have no traditional C
  3846. equivalent, and/or problematic constructs that should be avoided.
  3847. @itemize @bullet
  3848. @item
  3849. Macro parameters that appear within string literals in the macro body.
  3850. In traditional C macro replacement takes place within string literals,
  3851. but in ISO C it does not.
  3852. @item
  3853. In traditional C, some preprocessor directives did not exist.
  3854. Traditional preprocessors only considered a line to be a directive
  3855. if the @samp{#} appeared in column 1 on the line. Therefore
  3856. @option{-Wtraditional} warns about directives that traditional C
  3857. understands but ignores because the @samp{#} does not appear as the
  3858. first character on the line. It also suggests you hide directives like
  3859. @code{#pragma} not understood by traditional C by indenting them. Some
  3860. traditional implementations do not recognize @code{#elif}, so this option
  3861. suggests avoiding it altogether.
  3862. @item
  3863. A function-like macro that appears without arguments.
  3864. @item
  3865. The unary plus operator.
  3866. @item
  3867. The @samp{U} integer constant suffix, or the @samp{F} or @samp{L} floating-point
  3868. constant suffixes. (Traditional C does support the @samp{L} suffix on integer
  3869. constants.) Note, these suffixes appear in macros defined in the system
  3870. headers of most modern systems, e.g.@: the @samp{_MIN}/@samp{_MAX} macros in @code{<limits.h>}.
  3871. Use of these macros in user code might normally lead to spurious
  3872. warnings, however GCC's integrated preprocessor has enough context to
  3873. avoid warning in these cases.
  3874. @item
  3875. A function declared external in one block and then used after the end of
  3876. the block.
  3877. @item
  3878. A @code{switch} statement has an operand of type @code{long}.
  3879. @item
  3880. A non-@code{static} function declaration follows a @code{static} one.
  3881. This construct is not accepted by some traditional C compilers.
  3882. @item
  3883. The ISO type of an integer constant has a different width or
  3884. signedness from its traditional type. This warning is only issued if
  3885. the base of the constant is ten. I.e.@: hexadecimal or octal values, which
  3886. typically represent bit patterns, are not warned about.
  3887. @item
  3888. Usage of ISO string concatenation is detected.
  3889. @item
  3890. Initialization of automatic aggregates.
  3891. @item
  3892. Identifier conflicts with labels. Traditional C lacks a separate
  3893. namespace for labels.
  3894. @item
  3895. Initialization of unions. If the initializer is zero, the warning is
  3896. omitted. This is done under the assumption that the zero initializer in
  3897. user code appears conditioned on e.g.@: @code{__STDC__} to avoid missing
  3898. initializer warnings and relies on default initialization to zero in the
  3899. traditional C case.
  3900. @item
  3901. Conversions by prototypes between fixed/floating-point values and vice
  3902. versa. The absence of these prototypes when compiling with traditional
  3903. C causes serious problems. This is a subset of the possible
  3904. conversion warnings; for the full set use @option{-Wtraditional-conversion}.
  3905. @item
  3906. Use of ISO C style function definitions. This warning intentionally is
  3907. @emph{not} issued for prototype declarations or variadic functions
  3908. because these ISO C features appear in your code when using
  3909. libiberty's traditional C compatibility macros, @code{PARAMS} and
  3910. @code{VPARAMS}. This warning is also bypassed for nested functions
  3911. because that feature is already a GCC extension and thus not relevant to
  3912. traditional C compatibility.
  3913. @end itemize
  3914. @item -Wtraditional-conversion @r{(C and Objective-C only)}
  3915. @opindex Wtraditional-conversion
  3916. @opindex Wno-traditional-conversion
  3917. Warn if a prototype causes a type conversion that is different from what
  3918. would happen to the same argument in the absence of a prototype. This
  3919. includes conversions of fixed point to floating and vice versa, and
  3920. conversions changing the width or signedness of a fixed-point argument
  3921. except when the same as the default promotion.
  3922. @item -Wdeclaration-after-statement @r{(C and Objective-C only)}
  3923. @opindex Wdeclaration-after-statement
  3924. @opindex Wno-declaration-after-statement
  3925. Warn when a declaration is found after a statement in a block. This
  3926. construct, known from C++, was introduced with ISO C99 and is by default
  3927. allowed in GCC@. It is not supported by ISO C90. @xref{Mixed Declarations}.
  3928. @item -Wundef
  3929. @opindex Wundef
  3930. @opindex Wno-undef
  3931. Warn if an undefined identifier is evaluated in an @code{#if} directive.
  3932. @item -Wno-endif-labels
  3933. @opindex Wno-endif-labels
  3934. @opindex Wendif-labels
  3935. Do not warn whenever an @code{#else} or an @code{#endif} are followed by text.
  3936. @item -Wshadow
  3937. @opindex Wshadow
  3938. @opindex Wno-shadow
  3939. Warn whenever a local variable or type declaration shadows another
  3940. variable, parameter, type, class member (in C++), or instance variable
  3941. (in Objective-C) or whenever a built-in function is shadowed. Note
  3942. that in C++, the compiler warns if a local variable shadows an
  3943. explicit typedef, but not if it shadows a struct/class/enum.
  3944. @item -Wno-shadow-ivar @r{(Objective-C only)}
  3945. @opindex Wno-shadow-ivar
  3946. @opindex Wshadow-ivar
  3947. Do not warn whenever a local variable shadows an instance variable in an
  3948. Objective-C method.
  3949. @item -Wlarger-than=@var{len}
  3950. @opindex Wlarger-than=@var{len}
  3951. @opindex Wlarger-than-@var{len}
  3952. Warn whenever an object of larger than @var{len} bytes is defined.
  3953. @item -Wframe-larger-than=@var{len}
  3954. @opindex Wframe-larger-than
  3955. Warn if the size of a function frame is larger than @var{len} bytes.
  3956. The computation done to determine the stack frame size is approximate
  3957. and not conservative.
  3958. The actual requirements may be somewhat greater than @var{len}
  3959. even if you do not get a warning. In addition, any space allocated
  3960. via @code{alloca}, variable-length arrays, or related constructs
  3961. is not included by the compiler when determining
  3962. whether or not to issue a warning.
  3963. @item -Wno-free-nonheap-object
  3964. @opindex Wno-free-nonheap-object
  3965. @opindex Wfree-nonheap-object
  3966. Do not warn when attempting to free an object that was not allocated
  3967. on the heap.
  3968. @item -Wstack-usage=@var{len}
  3969. @opindex Wstack-usage
  3970. Warn if the stack usage of a function might be larger than @var{len} bytes.
  3971. The computation done to determine the stack usage is conservative.
  3972. Any space allocated via @code{alloca}, variable-length arrays, or related
  3973. constructs is included by the compiler when determining whether or not to
  3974. issue a warning.
  3975. The message is in keeping with the output of @option{-fstack-usage}.
  3976. @itemize
  3977. @item
  3978. If the stack usage is fully static but exceeds the specified amount, it's:
  3979. @smallexample
  3980. warning: stack usage is 1120 bytes
  3981. @end smallexample
  3982. @item
  3983. If the stack usage is (partly) dynamic but bounded, it's:
  3984. @smallexample
  3985. warning: stack usage might be 1648 bytes
  3986. @end smallexample
  3987. @item
  3988. If the stack usage is (partly) dynamic and not bounded, it's:
  3989. @smallexample
  3990. warning: stack usage might be unbounded
  3991. @end smallexample
  3992. @end itemize
  3993. @item -Wunsafe-loop-optimizations
  3994. @opindex Wunsafe-loop-optimizations
  3995. @opindex Wno-unsafe-loop-optimizations
  3996. Warn if the loop cannot be optimized because the compiler cannot
  3997. assume anything on the bounds of the loop indices. With
  3998. @option{-funsafe-loop-optimizations} warn if the compiler makes
  3999. such assumptions.
  4000. @item -Wno-pedantic-ms-format @r{(MinGW targets only)}
  4001. @opindex Wno-pedantic-ms-format
  4002. @opindex Wpedantic-ms-format
  4003. When used in combination with @option{-Wformat}
  4004. and @option{-pedantic} without GNU extensions, this option
  4005. disables the warnings about non-ISO @code{printf} / @code{scanf} format
  4006. width specifiers @code{I32}, @code{I64}, and @code{I} used on Windows targets,
  4007. which depend on the MS runtime.
  4008. @item -Wpointer-arith
  4009. @opindex Wpointer-arith
  4010. @opindex Wno-pointer-arith
  4011. Warn about anything that depends on the ``size of'' a function type or
  4012. of @code{void}. GNU C assigns these types a size of 1, for
  4013. convenience in calculations with @code{void *} pointers and pointers
  4014. to functions. In C++, warn also when an arithmetic operation involves
  4015. @code{NULL}. This warning is also enabled by @option{-Wpedantic}.
  4016. @item -Wtype-limits
  4017. @opindex Wtype-limits
  4018. @opindex Wno-type-limits
  4019. Warn if a comparison is always true or always false due to the limited
  4020. range of the data type, but do not warn for constant expressions. For
  4021. example, warn if an unsigned variable is compared against zero with
  4022. @code{<} or @code{>=}. This warning is also enabled by
  4023. @option{-Wextra}.
  4024. @item -Wbad-function-cast @r{(C and Objective-C only)}
  4025. @opindex Wbad-function-cast
  4026. @opindex Wno-bad-function-cast
  4027. Warn when a function call is cast to a non-matching type.
  4028. For example, warn if a call to a function returning an integer type
  4029. is cast to a pointer type.
  4030. @item -Wc90-c99-compat @r{(C and Objective-C only)}
  4031. @opindex Wc90-c99-compat
  4032. @opindex Wno-c90-c99-compat
  4033. Warn about features not present in ISO C90, but present in ISO C99.
  4034. For instance, warn about use of variable length arrays, @code{long long}
  4035. type, @code{bool} type, compound literals, designated initializers, and so
  4036. on. This option is independent of the standards mode. Warnings are disabled
  4037. in the expression that follows @code{__extension__}.
  4038. @item -Wc99-c11-compat @r{(C and Objective-C only)}
  4039. @opindex Wc99-c11-compat
  4040. @opindex Wno-c99-c11-compat
  4041. Warn about features not present in ISO C99, but present in ISO C11.
  4042. For instance, warn about use of anonymous structures and unions,
  4043. @code{_Atomic} type qualifier, @code{_Thread_local} storage-class specifier,
  4044. @code{_Alignas} specifier, @code{Alignof} operator, @code{_Generic} keyword,
  4045. and so on. This option is independent of the standards mode. Warnings are
  4046. disabled in the expression that follows @code{__extension__}.
  4047. @item -Wc++-compat @r{(C and Objective-C only)}
  4048. @opindex Wc++-compat
  4049. Warn about ISO C constructs that are outside of the common subset of
  4050. ISO C and ISO C++, e.g.@: request for implicit conversion from
  4051. @code{void *} to a pointer to non-@code{void} type.
  4052. @item -Wc++11-compat @r{(C++ and Objective-C++ only)}
  4053. @opindex Wc++11-compat
  4054. Warn about C++ constructs whose meaning differs between ISO C++ 1998
  4055. and ISO C++ 2011, e.g., identifiers in ISO C++ 1998 that are keywords
  4056. in ISO C++ 2011. This warning turns on @option{-Wnarrowing} and is
  4057. enabled by @option{-Wall}.
  4058. @item -Wc++14-compat @r{(C++ and Objective-C++ only)}
  4059. @opindex Wc++14-compat
  4060. Warn about C++ constructs whose meaning differs between ISO C++ 2011
  4061. and ISO C++ 2014. This warning is enabled by @option{-Wall}.
  4062. @item -Wcast-qual
  4063. @opindex Wcast-qual
  4064. @opindex Wno-cast-qual
  4065. Warn whenever a pointer is cast so as to remove a type qualifier from
  4066. the target type. For example, warn if a @code{const char *} is cast
  4067. to an ordinary @code{char *}.
  4068. Also warn when making a cast that introduces a type qualifier in an
  4069. unsafe way. For example, casting @code{char **} to @code{const char **}
  4070. is unsafe, as in this example:
  4071. @smallexample
  4072. /* p is char ** value. */
  4073. const char **q = (const char **) p;
  4074. /* Assignment of readonly string to const char * is OK. */
  4075. *q = "string";
  4076. /* Now char** pointer points to read-only memory. */
  4077. **p = 'b';
  4078. @end smallexample
  4079. @item -Wcast-align
  4080. @opindex Wcast-align
  4081. @opindex Wno-cast-align
  4082. Warn whenever a pointer is cast such that the required alignment of the
  4083. target is increased. For example, warn if a @code{char *} is cast to
  4084. an @code{int *} on machines where integers can only be accessed at
  4085. two- or four-byte boundaries.
  4086. @item -Wwrite-strings
  4087. @opindex Wwrite-strings
  4088. @opindex Wno-write-strings
  4089. When compiling C, give string constants the type @code{const
  4090. char[@var{length}]} so that copying the address of one into a
  4091. non-@code{const} @code{char *} pointer produces a warning. These
  4092. warnings help you find at compile time code that can try to write
  4093. into a string constant, but only if you have been very careful about
  4094. using @code{const} in declarations and prototypes. Otherwise, it is
  4095. just a nuisance. This is why we did not make @option{-Wall} request
  4096. these warnings.
  4097. When compiling C++, warn about the deprecated conversion from string
  4098. literals to @code{char *}. This warning is enabled by default for C++
  4099. programs.
  4100. @item -Wclobbered
  4101. @opindex Wclobbered
  4102. @opindex Wno-clobbered
  4103. Warn for variables that might be changed by @code{longjmp} or
  4104. @code{vfork}. This warning is also enabled by @option{-Wextra}.
  4105. @item -Wconditionally-supported @r{(C++ and Objective-C++ only)}
  4106. @opindex Wconditionally-supported
  4107. @opindex Wno-conditionally-supported
  4108. Warn for conditionally-supported (C++11 [intro.defs]) constructs.
  4109. @item -Wconversion
  4110. @opindex Wconversion
  4111. @opindex Wno-conversion
  4112. Warn for implicit conversions that may alter a value. This includes
  4113. conversions between real and integer, like @code{abs (x)} when
  4114. @code{x} is @code{double}; conversions between signed and unsigned,
  4115. like @code{unsigned ui = -1}; and conversions to smaller types, like
  4116. @code{sqrtf (M_PI)}. Do not warn for explicit casts like @code{abs
  4117. ((int) x)} and @code{ui = (unsigned) -1}, or if the value is not
  4118. changed by the conversion like in @code{abs (2.0)}. Warnings about
  4119. conversions between signed and unsigned integers can be disabled by
  4120. using @option{-Wno-sign-conversion}.
  4121. For C++, also warn for confusing overload resolution for user-defined
  4122. conversions; and conversions that never use a type conversion
  4123. operator: conversions to @code{void}, the same type, a base class or a
  4124. reference to them. Warnings about conversions between signed and
  4125. unsigned integers are disabled by default in C++ unless
  4126. @option{-Wsign-conversion} is explicitly enabled.
  4127. @item -Wno-conversion-null @r{(C++ and Objective-C++ only)}
  4128. @opindex Wconversion-null
  4129. @opindex Wno-conversion-null
  4130. Do not warn for conversions between @code{NULL} and non-pointer
  4131. types. @option{-Wconversion-null} is enabled by default.
  4132. @item -Wzero-as-null-pointer-constant @r{(C++ and Objective-C++ only)}
  4133. @opindex Wzero-as-null-pointer-constant
  4134. @opindex Wno-zero-as-null-pointer-constant
  4135. Warn when a literal '0' is used as null pointer constant. This can
  4136. be useful to facilitate the conversion to @code{nullptr} in C++11.
  4137. @item -Wdate-time
  4138. @opindex Wdate-time
  4139. @opindex Wno-date-time
  4140. Warn when macros @code{__TIME__}, @code{__DATE__} or @code{__TIMESTAMP__}
  4141. are encountered as they might prevent bit-wise-identical reproducible
  4142. compilations.
  4143. @item -Wdelete-incomplete @r{(C++ and Objective-C++ only)}
  4144. @opindex Wdelete-incomplete
  4145. @opindex Wno-delete-incomplete
  4146. Warn when deleting a pointer to incomplete type, which may cause
  4147. undefined behavior at runtime. This warning is enabled by default.
  4148. @item -Wuseless-cast @r{(C++ and Objective-C++ only)}
  4149. @opindex Wuseless-cast
  4150. @opindex Wno-useless-cast
  4151. Warn when an expression is casted to its own type.
  4152. @item -Wempty-body
  4153. @opindex Wempty-body
  4154. @opindex Wno-empty-body
  4155. Warn if an empty body occurs in an @code{if}, @code{else} or @code{do
  4156. while} statement. This warning is also enabled by @option{-Wextra}.
  4157. @item -Wenum-compare
  4158. @opindex Wenum-compare
  4159. @opindex Wno-enum-compare
  4160. Warn about a comparison between values of different enumerated types.
  4161. In C++ enumeral mismatches in conditional expressions are also
  4162. diagnosed and the warning is enabled by default. In C this warning is
  4163. enabled by @option{-Wall}.
  4164. @item -Wjump-misses-init @r{(C, Objective-C only)}
  4165. @opindex Wjump-misses-init
  4166. @opindex Wno-jump-misses-init
  4167. Warn if a @code{goto} statement or a @code{switch} statement jumps
  4168. forward across the initialization of a variable, or jumps backward to a
  4169. label after the variable has been initialized. This only warns about
  4170. variables that are initialized when they are declared. This warning is
  4171. only supported for C and Objective-C; in C++ this sort of branch is an
  4172. error in any case.
  4173. @option{-Wjump-misses-init} is included in @option{-Wc++-compat}. It
  4174. can be disabled with the @option{-Wno-jump-misses-init} option.
  4175. @item -Wsign-compare
  4176. @opindex Wsign-compare
  4177. @opindex Wno-sign-compare
  4178. @cindex warning for comparison of signed and unsigned values
  4179. @cindex comparison of signed and unsigned values, warning
  4180. @cindex signed and unsigned values, comparison warning
  4181. Warn when a comparison between signed and unsigned values could produce
  4182. an incorrect result when the signed value is converted to unsigned.
  4183. This warning is also enabled by @option{-Wextra}; to get the other warnings
  4184. of @option{-Wextra} without this warning, use @option{-Wextra -Wno-sign-compare}.
  4185. @item -Wsign-conversion
  4186. @opindex Wsign-conversion
  4187. @opindex Wno-sign-conversion
  4188. Warn for implicit conversions that may change the sign of an integer
  4189. value, like assigning a signed integer expression to an unsigned
  4190. integer variable. An explicit cast silences the warning. In C, this
  4191. option is enabled also by @option{-Wconversion}.
  4192. @item -Wfloat-conversion
  4193. @opindex Wfloat-conversion
  4194. @opindex Wno-float-conversion
  4195. Warn for implicit conversions that reduce the precision of a real value.
  4196. This includes conversions from real to integer, and from higher precision
  4197. real to lower precision real values. This option is also enabled by
  4198. @option{-Wconversion}.
  4199. @item -Wsized-deallocation @r{(C++ and Objective-C++ only)}
  4200. @opindex Wsized-deallocation
  4201. @opindex Wno-sized-deallocation
  4202. Warn about a definition of an unsized deallocation function
  4203. @smallexample
  4204. void operator delete (void *) noexcept;
  4205. void operator delete[] (void *) noexcept;
  4206. @end smallexample
  4207. without a definition of the corresponding sized deallocation function
  4208. @smallexample
  4209. void operator delete (void *, std::size_t) noexcept;
  4210. void operator delete[] (void *, std::size_t) noexcept;
  4211. @end smallexample
  4212. or vice versa. Enabled by @option{-Wextra} along with
  4213. @option{-fsized-deallocation}.
  4214. @item -Wsizeof-pointer-memaccess
  4215. @opindex Wsizeof-pointer-memaccess
  4216. @opindex Wno-sizeof-pointer-memaccess
  4217. Warn for suspicious length parameters to certain string and memory built-in
  4218. functions if the argument uses @code{sizeof}. This warning warns e.g.@:
  4219. about @code{memset (ptr, 0, sizeof (ptr));} if @code{ptr} is not an array,
  4220. but a pointer, and suggests a possible fix, or about
  4221. @code{memcpy (&foo, ptr, sizeof (&foo));}. This warning is enabled by
  4222. @option{-Wall}.
  4223. @item -Wsizeof-array-argument
  4224. @opindex Wsizeof-array-argument
  4225. @opindex Wno-sizeof-array-argument
  4226. Warn when the @code{sizeof} operator is applied to a parameter that is
  4227. declared as an array in a function definition. This warning is enabled by
  4228. default for C and C++ programs.
  4229. @item -Wmemset-transposed-args
  4230. @opindex Wmemset-transposed-args
  4231. @opindex Wno-memset-transposed-args
  4232. Warn for suspicious calls to the @code{memset} built-in function, if the
  4233. second argument is not zero and the third argument is zero. This warns e.g.@
  4234. about @code{memset (buf, sizeof buf, 0)} where most probably
  4235. @code{memset (buf, 0, sizeof buf)} was meant instead. The diagnostics
  4236. is only emitted if the third argument is literal zero. If it is some
  4237. expression that is folded to zero, a cast of zero to some type, etc.,
  4238. it is far less likely that the user has mistakenly exchanged the arguments
  4239. and no warning is emitted. This warning is enabled by @option{-Wall}.
  4240. @item -Waddress
  4241. @opindex Waddress
  4242. @opindex Wno-address
  4243. Warn about suspicious uses of memory addresses. These include using
  4244. the address of a function in a conditional expression, such as
  4245. @code{void func(void); if (func)}, and comparisons against the memory
  4246. address of a string literal, such as @code{if (x == "abc")}. Such
  4247. uses typically indicate a programmer error: the address of a function
  4248. always evaluates to true, so their use in a conditional usually
  4249. indicate that the programmer forgot the parentheses in a function
  4250. call; and comparisons against string literals result in unspecified
  4251. behavior and are not portable in C, so they usually indicate that the
  4252. programmer intended to use @code{strcmp}. This warning is enabled by
  4253. @option{-Wall}.
  4254. @item -Wlogical-op
  4255. @opindex Wlogical-op
  4256. @opindex Wno-logical-op
  4257. Warn about suspicious uses of logical operators in expressions.
  4258. This includes using logical operators in contexts where a
  4259. bit-wise operator is likely to be expected.
  4260. @item -Wlogical-not-parentheses
  4261. @opindex Wlogical-not-parentheses
  4262. @opindex Wno-logical-not-parentheses
  4263. Warn about logical not used on the left hand side operand of a comparison.
  4264. This option does not warn if the RHS operand is of a boolean type. Its
  4265. purpose is to detect suspicious code like the following:
  4266. @smallexample
  4267. int a;
  4268. @dots{}
  4269. if (!a > 1) @{ @dots{} @}
  4270. @end smallexample
  4271. It is possible to suppress the warning by wrapping the LHS into
  4272. parentheses:
  4273. @smallexample
  4274. if ((!a) > 1) @{ @dots{} @}
  4275. @end smallexample
  4276. This warning is enabled by @option{-Wall}.
  4277. @item -Waggregate-return
  4278. @opindex Waggregate-return
  4279. @opindex Wno-aggregate-return
  4280. Warn if any functions that return structures or unions are defined or
  4281. called. (In languages where you can return an array, this also elicits
  4282. a warning.)
  4283. @item -Wno-aggressive-loop-optimizations
  4284. @opindex Wno-aggressive-loop-optimizations
  4285. @opindex Waggressive-loop-optimizations
  4286. Warn if in a loop with constant number of iterations the compiler detects
  4287. undefined behavior in some statement during one or more of the iterations.
  4288. @item -Wno-attributes
  4289. @opindex Wno-attributes
  4290. @opindex Wattributes
  4291. Do not warn if an unexpected @code{__attribute__} is used, such as
  4292. unrecognized attributes, function attributes applied to variables,
  4293. etc. This does not stop errors for incorrect use of supported
  4294. attributes.
  4295. @item -Wno-builtin-macro-redefined
  4296. @opindex Wno-builtin-macro-redefined
  4297. @opindex Wbuiltin-macro-redefined
  4298. Do not warn if certain built-in macros are redefined. This suppresses
  4299. warnings for redefinition of @code{__TIMESTAMP__}, @code{__TIME__},
  4300. @code{__DATE__}, @code{__FILE__}, and @code{__BASE_FILE__}.
  4301. @item -Wstrict-prototypes @r{(C and Objective-C only)}
  4302. @opindex Wstrict-prototypes
  4303. @opindex Wno-strict-prototypes
  4304. Warn if a function is declared or defined without specifying the
  4305. argument types. (An old-style function definition is permitted without
  4306. a warning if preceded by a declaration that specifies the argument
  4307. types.)
  4308. @item -Wold-style-declaration @r{(C and Objective-C only)}
  4309. @opindex Wold-style-declaration
  4310. @opindex Wno-old-style-declaration
  4311. Warn for obsolescent usages, according to the C Standard, in a
  4312. declaration. For example, warn if storage-class specifiers like
  4313. @code{static} are not the first things in a declaration. This warning
  4314. is also enabled by @option{-Wextra}.
  4315. @item -Wold-style-definition @r{(C and Objective-C only)}
  4316. @opindex Wold-style-definition
  4317. @opindex Wno-old-style-definition
  4318. Warn if an old-style function definition is used. A warning is given
  4319. even if there is a previous prototype.
  4320. @item -Wmissing-parameter-type @r{(C and Objective-C only)}
  4321. @opindex Wmissing-parameter-type
  4322. @opindex Wno-missing-parameter-type
  4323. A function parameter is declared without a type specifier in K&R-style
  4324. functions:
  4325. @smallexample
  4326. void foo(bar) @{ @}
  4327. @end smallexample
  4328. This warning is also enabled by @option{-Wextra}.
  4329. @item -Wmissing-prototypes @r{(C and Objective-C only)}
  4330. @opindex Wmissing-prototypes
  4331. @opindex Wno-missing-prototypes
  4332. Warn if a global function is defined without a previous prototype
  4333. declaration. This warning is issued even if the definition itself
  4334. provides a prototype. Use this option to detect global functions
  4335. that do not have a matching prototype declaration in a header file.
  4336. This option is not valid for C++ because all function declarations
  4337. provide prototypes and a non-matching declaration declares an
  4338. overload rather than conflict with an earlier declaration.
  4339. Use @option{-Wmissing-declarations} to detect missing declarations in C++.
  4340. @item -Wmissing-declarations
  4341. @opindex Wmissing-declarations
  4342. @opindex Wno-missing-declarations
  4343. Warn if a global function is defined without a previous declaration.
  4344. Do so even if the definition itself provides a prototype.
  4345. Use this option to detect global functions that are not declared in
  4346. header files. In C, no warnings are issued for functions with previous
  4347. non-prototype declarations; use @option{-Wmissing-prototypes} to detect
  4348. missing prototypes. In C++, no warnings are issued for function templates,
  4349. or for inline functions, or for functions in anonymous namespaces.
  4350. @item -Wmissing-field-initializers
  4351. @opindex Wmissing-field-initializers
  4352. @opindex Wno-missing-field-initializers
  4353. @opindex W
  4354. @opindex Wextra
  4355. @opindex Wno-extra
  4356. Warn if a structure's initializer has some fields missing. For
  4357. example, the following code causes such a warning, because
  4358. @code{x.h} is implicitly zero:
  4359. @smallexample
  4360. struct s @{ int f, g, h; @};
  4361. struct s x = @{ 3, 4 @};
  4362. @end smallexample
  4363. This option does not warn about designated initializers, so the following
  4364. modification does not trigger a warning:
  4365. @smallexample
  4366. struct s @{ int f, g, h; @};
  4367. struct s x = @{ .f = 3, .g = 4 @};
  4368. @end smallexample
  4369. In C++ this option does not warn either about the empty @{ @}
  4370. initializer, for example:
  4371. @smallexample
  4372. struct s @{ int f, g, h; @};
  4373. s x = @{ @};
  4374. @end smallexample
  4375. This warning is included in @option{-Wextra}. To get other @option{-Wextra}
  4376. warnings without this one, use @option{-Wextra -Wno-missing-field-initializers}.
  4377. @item -Wno-multichar
  4378. @opindex Wno-multichar
  4379. @opindex Wmultichar
  4380. Do not warn if a multicharacter constant (@samp{'FOOF'}) is used.
  4381. Usually they indicate a typo in the user's code, as they have
  4382. implementation-defined values, and should not be used in portable code.
  4383. @item -Wnormalized@r{[}=@r{<}none@r{|}id@r{|}nfc@r{|}nfkc@r{>]}
  4384. @opindex Wnormalized=
  4385. @opindex Wnormalized
  4386. @opindex Wno-normalized
  4387. @cindex NFC
  4388. @cindex NFKC
  4389. @cindex character set, input normalization
  4390. In ISO C and ISO C++, two identifiers are different if they are
  4391. different sequences of characters. However, sometimes when characters
  4392. outside the basic ASCII character set are used, you can have two
  4393. different character sequences that look the same. To avoid confusion,
  4394. the ISO 10646 standard sets out some @dfn{normalization rules} which
  4395. when applied ensure that two sequences that look the same are turned into
  4396. the same sequence. GCC can warn you if you are using identifiers that
  4397. have not been normalized; this option controls that warning.
  4398. There are four levels of warning supported by GCC@. The default is
  4399. @option{-Wnormalized=nfc}, which warns about any identifier that is
  4400. not in the ISO 10646 ``C'' normalized form, @dfn{NFC}. NFC is the
  4401. recommended form for most uses. It is equivalent to
  4402. @option{-Wnormalized}.
  4403. Unfortunately, there are some characters allowed in identifiers by
  4404. ISO C and ISO C++ that, when turned into NFC, are not allowed in
  4405. identifiers. That is, there's no way to use these symbols in portable
  4406. ISO C or C++ and have all your identifiers in NFC@.
  4407. @option{-Wnormalized=id} suppresses the warning for these characters.
  4408. It is hoped that future versions of the standards involved will correct
  4409. this, which is why this option is not the default.
  4410. You can switch the warning off for all characters by writing
  4411. @option{-Wnormalized=none} or @option{-Wno-normalized}. You should
  4412. only do this if you are using some other normalization scheme (like
  4413. ``D''), because otherwise you can easily create bugs that are
  4414. literally impossible to see.
  4415. Some characters in ISO 10646 have distinct meanings but look identical
  4416. in some fonts or display methodologies, especially once formatting has
  4417. been applied. For instance @code{\u207F}, ``SUPERSCRIPT LATIN SMALL
  4418. LETTER N'', displays just like a regular @code{n} that has been
  4419. placed in a superscript. ISO 10646 defines the @dfn{NFKC}
  4420. normalization scheme to convert all these into a standard form as
  4421. well, and GCC warns if your code is not in NFKC if you use
  4422. @option{-Wnormalized=nfkc}. This warning is comparable to warning
  4423. about every identifier that contains the letter O because it might be
  4424. confused with the digit 0, and so is not the default, but may be
  4425. useful as a local coding convention if the programming environment
  4426. cannot be fixed to display these characters distinctly.
  4427. @item -Wno-deprecated
  4428. @opindex Wno-deprecated
  4429. @opindex Wdeprecated
  4430. Do not warn about usage of deprecated features. @xref{Deprecated Features}.
  4431. @item -Wno-deprecated-declarations
  4432. @opindex Wno-deprecated-declarations
  4433. @opindex Wdeprecated-declarations
  4434. Do not warn about uses of functions (@pxref{Function Attributes}),
  4435. variables (@pxref{Variable Attributes}), and types (@pxref{Type
  4436. Attributes}) marked as deprecated by using the @code{deprecated}
  4437. attribute.
  4438. @item -Wno-overflow
  4439. @opindex Wno-overflow
  4440. @opindex Woverflow
  4441. Do not warn about compile-time overflow in constant expressions.
  4442. @item -Wno-odr
  4443. @opindex Wno-odr
  4444. @opindex Wodr
  4445. Warn about One Definition Rule violations during link-time optimization.
  4446. Requires @option{-flto-odr-type-merging} to be enabled. Enabled by default.
  4447. @item -Wopenmp-simd
  4448. @opindex Wopenm-simd
  4449. Warn if the vectorizer cost model overrides the OpenMP or the Cilk Plus
  4450. simd directive set by user. The @option{-fsimd-cost-model=unlimited}
  4451. option can be used to relax the cost model.
  4452. @item -Woverride-init @r{(C and Objective-C only)}
  4453. @opindex Woverride-init
  4454. @opindex Wno-override-init
  4455. @opindex W
  4456. @opindex Wextra
  4457. @opindex Wno-extra
  4458. Warn if an initialized field without side effects is overridden when
  4459. using designated initializers (@pxref{Designated Inits, , Designated
  4460. Initializers}).
  4461. This warning is included in @option{-Wextra}. To get other
  4462. @option{-Wextra} warnings without this one, use @option{-Wextra
  4463. -Wno-override-init}.
  4464. @item -Wpacked
  4465. @opindex Wpacked
  4466. @opindex Wno-packed
  4467. Warn if a structure is given the packed attribute, but the packed
  4468. attribute has no effect on the layout or size of the structure.
  4469. Such structures may be mis-aligned for little benefit. For
  4470. instance, in this code, the variable @code{f.x} in @code{struct bar}
  4471. is misaligned even though @code{struct bar} does not itself
  4472. have the packed attribute:
  4473. @smallexample
  4474. @group
  4475. struct foo @{
  4476. int x;
  4477. char a, b, c, d;
  4478. @} __attribute__((packed));
  4479. struct bar @{
  4480. char z;
  4481. struct foo f;
  4482. @};
  4483. @end group
  4484. @end smallexample
  4485. @item -Wpacked-bitfield-compat
  4486. @opindex Wpacked-bitfield-compat
  4487. @opindex Wno-packed-bitfield-compat
  4488. The 4.1, 4.2 and 4.3 series of GCC ignore the @code{packed} attribute
  4489. on bit-fields of type @code{char}. This has been fixed in GCC 4.4 but
  4490. the change can lead to differences in the structure layout. GCC
  4491. informs you when the offset of such a field has changed in GCC 4.4.
  4492. For example there is no longer a 4-bit padding between field @code{a}
  4493. and @code{b} in this structure:
  4494. @smallexample
  4495. struct foo
  4496. @{
  4497. char a:4;
  4498. char b:8;
  4499. @} __attribute__ ((packed));
  4500. @end smallexample
  4501. This warning is enabled by default. Use
  4502. @option{-Wno-packed-bitfield-compat} to disable this warning.
  4503. @item -Wpadded
  4504. @opindex Wpadded
  4505. @opindex Wno-padded
  4506. Warn if padding is included in a structure, either to align an element
  4507. of the structure or to align the whole structure. Sometimes when this
  4508. happens it is possible to rearrange the fields of the structure to
  4509. reduce the padding and so make the structure smaller.
  4510. @item -Wredundant-decls
  4511. @opindex Wredundant-decls
  4512. @opindex Wno-redundant-decls
  4513. Warn if anything is declared more than once in the same scope, even in
  4514. cases where multiple declaration is valid and changes nothing.
  4515. @item -Wnested-externs @r{(C and Objective-C only)}
  4516. @opindex Wnested-externs
  4517. @opindex Wno-nested-externs
  4518. Warn if an @code{extern} declaration is encountered within a function.
  4519. @item -Wno-inherited-variadic-ctor
  4520. @opindex Winherited-variadic-ctor
  4521. @opindex Wno-inherited-variadic-ctor
  4522. Suppress warnings about use of C++11 inheriting constructors when the
  4523. base class inherited from has a C variadic constructor; the warning is
  4524. on by default because the ellipsis is not inherited.
  4525. @item -Winline
  4526. @opindex Winline
  4527. @opindex Wno-inline
  4528. Warn if a function that is declared as inline cannot be inlined.
  4529. Even with this option, the compiler does not warn about failures to
  4530. inline functions declared in system headers.
  4531. The compiler uses a variety of heuristics to determine whether or not
  4532. to inline a function. For example, the compiler takes into account
  4533. the size of the function being inlined and the amount of inlining
  4534. that has already been done in the current function. Therefore,
  4535. seemingly insignificant changes in the source program can cause the
  4536. warnings produced by @option{-Winline} to appear or disappear.
  4537. @item -Wno-invalid-offsetof @r{(C++ and Objective-C++ only)}
  4538. @opindex Wno-invalid-offsetof
  4539. @opindex Winvalid-offsetof
  4540. Suppress warnings from applying the @code{offsetof} macro to a non-POD
  4541. type. According to the 2014 ISO C++ standard, applying @code{offsetof}
  4542. to a non-standard-layout type is undefined. In existing C++ implementations,
  4543. however, @code{offsetof} typically gives meaningful results.
  4544. This flag is for users who are aware that they are
  4545. writing nonportable code and who have deliberately chosen to ignore the
  4546. warning about it.
  4547. The restrictions on @code{offsetof} may be relaxed in a future version
  4548. of the C++ standard.
  4549. @item -Wno-int-to-pointer-cast
  4550. @opindex Wno-int-to-pointer-cast
  4551. @opindex Wint-to-pointer-cast
  4552. Suppress warnings from casts to pointer type of an integer of a
  4553. different size. In C++, casting to a pointer type of smaller size is
  4554. an error. @option{Wint-to-pointer-cast} is enabled by default.
  4555. @item -Wno-pointer-to-int-cast @r{(C and Objective-C only)}
  4556. @opindex Wno-pointer-to-int-cast
  4557. @opindex Wpointer-to-int-cast
  4558. Suppress warnings from casts from a pointer to an integer type of a
  4559. different size.
  4560. @item -Winvalid-pch
  4561. @opindex Winvalid-pch
  4562. @opindex Wno-invalid-pch
  4563. Warn if a precompiled header (@pxref{Precompiled Headers}) is found in
  4564. the search path but can't be used.
  4565. @item -Wlong-long
  4566. @opindex Wlong-long
  4567. @opindex Wno-long-long
  4568. Warn if @code{long long} type is used. This is enabled by either
  4569. @option{-Wpedantic} or @option{-Wtraditional} in ISO C90 and C++98
  4570. modes. To inhibit the warning messages, use @option{-Wno-long-long}.
  4571. @item -Wvariadic-macros
  4572. @opindex Wvariadic-macros
  4573. @opindex Wno-variadic-macros
  4574. Warn if variadic macros are used in ISO C90 mode, or if the GNU
  4575. alternate syntax is used in ISO C99 mode. This is enabled by either
  4576. @option{-Wpedantic} or @option{-Wtraditional}. To inhibit the warning
  4577. messages, use @option{-Wno-variadic-macros}.
  4578. @item -Wvarargs
  4579. @opindex Wvarargs
  4580. @opindex Wno-varargs
  4581. Warn upon questionable usage of the macros used to handle variable
  4582. arguments like @code{va_start}. This is default. To inhibit the
  4583. warning messages, use @option{-Wno-varargs}.
  4584. @item -Wvector-operation-performance
  4585. @opindex Wvector-operation-performance
  4586. @opindex Wno-vector-operation-performance
  4587. Warn if vector operation is not implemented via SIMD capabilities of the
  4588. architecture. Mainly useful for the performance tuning.
  4589. Vector operation can be implemented @code{piecewise}, which means that the
  4590. scalar operation is performed on every vector element;
  4591. @code{in parallel}, which means that the vector operation is implemented
  4592. using scalars of wider type, which normally is more performance efficient;
  4593. and @code{as a single scalar}, which means that vector fits into a
  4594. scalar type.
  4595. @item -Wno-virtual-move-assign
  4596. @opindex Wvirtual-move-assign
  4597. @opindex Wno-virtual-move-assign
  4598. Suppress warnings about inheriting from a virtual base with a
  4599. non-trivial C++11 move assignment operator. This is dangerous because
  4600. if the virtual base is reachable along more than one path, it is
  4601. moved multiple times, which can mean both objects end up in the
  4602. moved-from state. If the move assignment operator is written to avoid
  4603. moving from a moved-from object, this warning can be disabled.
  4604. @item -Wvla
  4605. @opindex Wvla
  4606. @opindex Wno-vla
  4607. Warn if variable length array is used in the code.
  4608. @option{-Wno-vla} prevents the @option{-Wpedantic} warning of
  4609. the variable length array.
  4610. @item -Wvolatile-register-var
  4611. @opindex Wvolatile-register-var
  4612. @opindex Wno-volatile-register-var
  4613. Warn if a register variable is declared volatile. The volatile
  4614. modifier does not inhibit all optimizations that may eliminate reads
  4615. and/or writes to register variables. This warning is enabled by
  4616. @option{-Wall}.
  4617. @item -Wdisabled-optimization
  4618. @opindex Wdisabled-optimization
  4619. @opindex Wno-disabled-optimization
  4620. Warn if a requested optimization pass is disabled. This warning does
  4621. not generally indicate that there is anything wrong with your code; it
  4622. merely indicates that GCC's optimizers are unable to handle the code
  4623. effectively. Often, the problem is that your code is too big or too
  4624. complex; GCC refuses to optimize programs when the optimization
  4625. itself is likely to take inordinate amounts of time.
  4626. @item -Wpointer-sign @r{(C and Objective-C only)}
  4627. @opindex Wpointer-sign
  4628. @opindex Wno-pointer-sign
  4629. Warn for pointer argument passing or assignment with different signedness.
  4630. This option is only supported for C and Objective-C@. It is implied by
  4631. @option{-Wall} and by @option{-Wpedantic}, which can be disabled with
  4632. @option{-Wno-pointer-sign}.
  4633. @item -Wstack-protector
  4634. @opindex Wstack-protector
  4635. @opindex Wno-stack-protector
  4636. This option is only active when @option{-fstack-protector} is active. It
  4637. warns about functions that are not protected against stack smashing.
  4638. @item -Woverlength-strings
  4639. @opindex Woverlength-strings
  4640. @opindex Wno-overlength-strings
  4641. Warn about string constants that are longer than the ``minimum
  4642. maximum'' length specified in the C standard. Modern compilers
  4643. generally allow string constants that are much longer than the
  4644. standard's minimum limit, but very portable programs should avoid
  4645. using longer strings.
  4646. The limit applies @emph{after} string constant concatenation, and does
  4647. not count the trailing NUL@. In C90, the limit was 509 characters; in
  4648. C99, it was raised to 4095. C++98 does not specify a normative
  4649. minimum maximum, so we do not diagnose overlength strings in C++@.
  4650. This option is implied by @option{-Wpedantic}, and can be disabled with
  4651. @option{-Wno-overlength-strings}.
  4652. @item -Wunsuffixed-float-constants @r{(C and Objective-C only)}
  4653. @opindex Wunsuffixed-float-constants
  4654. Issue a warning for any floating constant that does not have
  4655. a suffix. When used together with @option{-Wsystem-headers} it
  4656. warns about such constants in system header files. This can be useful
  4657. when preparing code to use with the @code{FLOAT_CONST_DECIMAL64} pragma
  4658. from the decimal floating-point extension to C99.
  4659. @item -Wno-designated-init @r{(C and Objective-C only)}
  4660. Suppress warnings when a positional initializer is used to initialize
  4661. a structure that has been marked with the @code{designated_init}
  4662. attribute.
  4663. @end table
  4664. @node Debugging Options
  4665. @section Options for Debugging Your Program or GCC
  4666. @cindex options, debugging
  4667. @cindex debugging information options
  4668. GCC has various special options that are used for debugging
  4669. either your program or GCC:
  4670. @table @gcctabopt
  4671. @item -g
  4672. @opindex g
  4673. Produce debugging information in the operating system's native format
  4674. (stabs, COFF, XCOFF, or DWARF 2)@. GDB can work with this debugging
  4675. information.
  4676. On most systems that use stabs format, @option{-g} enables use of extra
  4677. debugging information that only GDB can use; this extra information
  4678. makes debugging work better in GDB but probably makes other debuggers
  4679. crash or
  4680. refuse to read the program. If you want to control for certain whether
  4681. to generate the extra information, use @option{-gstabs+}, @option{-gstabs},
  4682. @option{-gxcoff+}, @option{-gxcoff}, or @option{-gvms} (see below).
  4683. GCC allows you to use @option{-g} with
  4684. @option{-O}. The shortcuts taken by optimized code may occasionally
  4685. produce surprising results: some variables you declared may not exist
  4686. at all; flow of control may briefly move where you did not expect it;
  4687. some statements may not be executed because they compute constant
  4688. results or their values are already at hand; some statements may
  4689. execute in different places because they have been moved out of loops.
  4690. Nevertheless it proves possible to debug optimized output. This makes
  4691. it reasonable to use the optimizer for programs that might have bugs.
  4692. The following options are useful when GCC is generated with the
  4693. capability for more than one debugging format.
  4694. @item -gsplit-dwarf
  4695. @opindex gsplit-dwarf
  4696. Separate as much dwarf debugging information as possible into a
  4697. separate output file with the extension .dwo. This option allows
  4698. the build system to avoid linking files with debug information. To
  4699. be useful, this option requires a debugger capable of reading .dwo
  4700. files.
  4701. @item -ggdb
  4702. @opindex ggdb
  4703. Produce debugging information for use by GDB@. This means to use the
  4704. most expressive format available (DWARF 2, stabs, or the native format
  4705. if neither of those are supported), including GDB extensions if at all
  4706. possible.
  4707. @item -gpubnames
  4708. @opindex gpubnames
  4709. Generate dwarf .debug_pubnames and .debug_pubtypes sections.
  4710. @item -ggnu-pubnames
  4711. @opindex ggnu-pubnames
  4712. Generate .debug_pubnames and .debug_pubtypes sections in a format
  4713. suitable for conversion into a GDB@ index. This option is only useful
  4714. with a linker that can produce GDB@ index version 7.
  4715. @item -gstabs
  4716. @opindex gstabs
  4717. Produce debugging information in stabs format (if that is supported),
  4718. without GDB extensions. This is the format used by DBX on most BSD
  4719. systems. On MIPS, Alpha and System V Release 4 systems this option
  4720. produces stabs debugging output that is not understood by DBX or SDB@.
  4721. On System V Release 4 systems this option requires the GNU assembler.
  4722. @item -feliminate-unused-debug-symbols
  4723. @opindex feliminate-unused-debug-symbols
  4724. Produce debugging information in stabs format (if that is supported),
  4725. for only symbols that are actually used.
  4726. @item -femit-class-debug-always
  4727. @opindex femit-class-debug-always
  4728. Instead of emitting debugging information for a C++ class in only one
  4729. object file, emit it in all object files using the class. This option
  4730. should be used only with debuggers that are unable to handle the way GCC
  4731. normally emits debugging information for classes because using this
  4732. option increases the size of debugging information by as much as a
  4733. factor of two.
  4734. @item -fdebug-types-section
  4735. @opindex fdebug-types-section
  4736. @opindex fno-debug-types-section
  4737. When using DWARF Version 4 or higher, type DIEs can be put into
  4738. their own @code{.debug_types} section instead of making them part of the
  4739. @code{.debug_info} section. It is more efficient to put them in a separate
  4740. comdat sections since the linker can then remove duplicates.
  4741. But not all DWARF consumers support @code{.debug_types} sections yet
  4742. and on some objects @code{.debug_types} produces larger instead of smaller
  4743. debugging information.
  4744. @item -gstabs+
  4745. @opindex gstabs+
  4746. Produce debugging information in stabs format (if that is supported),
  4747. using GNU extensions understood only by the GNU debugger (GDB)@. The
  4748. use of these extensions is likely to make other debuggers crash or
  4749. refuse to read the program.
  4750. @item -gcoff
  4751. @opindex gcoff
  4752. Produce debugging information in COFF format (if that is supported).
  4753. This is the format used by SDB on most System V systems prior to
  4754. System V Release 4.
  4755. @item -gxcoff
  4756. @opindex gxcoff
  4757. Produce debugging information in XCOFF format (if that is supported).
  4758. This is the format used by the DBX debugger on IBM RS/6000 systems.
  4759. @item -gxcoff+
  4760. @opindex gxcoff+
  4761. Produce debugging information in XCOFF format (if that is supported),
  4762. using GNU extensions understood only by the GNU debugger (GDB)@. The
  4763. use of these extensions is likely to make other debuggers crash or
  4764. refuse to read the program, and may cause assemblers other than the GNU
  4765. assembler (GAS) to fail with an error.
  4766. @item -gdwarf-@var{version}
  4767. @opindex gdwarf-@var{version}
  4768. Produce debugging information in DWARF format (if that is supported).
  4769. The value of @var{version} may be either 2, 3, 4 or 5; the default version
  4770. for most targets is 4. DWARF Version 5 is only experimental.
  4771. Note that with DWARF Version 2, some ports require and always
  4772. use some non-conflicting DWARF 3 extensions in the unwind tables.
  4773. Version 4 may require GDB 7.0 and @option{-fvar-tracking-assignments}
  4774. for maximum benefit.
  4775. @item -grecord-gcc-switches
  4776. @opindex grecord-gcc-switches
  4777. This switch causes the command-line options used to invoke the
  4778. compiler that may affect code generation to be appended to the
  4779. DW_AT_producer attribute in DWARF debugging information. The options
  4780. are concatenated with spaces separating them from each other and from
  4781. the compiler version. See also @option{-frecord-gcc-switches} for another
  4782. way of storing compiler options into the object file. This is the default.
  4783. @item -gno-record-gcc-switches
  4784. @opindex gno-record-gcc-switches
  4785. Disallow appending command-line options to the DW_AT_producer attribute
  4786. in DWARF debugging information.
  4787. @item -gstrict-dwarf
  4788. @opindex gstrict-dwarf
  4789. Disallow using extensions of later DWARF standard version than selected
  4790. with @option{-gdwarf-@var{version}}. On most targets using non-conflicting
  4791. DWARF extensions from later standard versions is allowed.
  4792. @item -gno-strict-dwarf
  4793. @opindex gno-strict-dwarf
  4794. Allow using extensions of later DWARF standard version than selected with
  4795. @option{-gdwarf-@var{version}}.
  4796. @item -gz@r{[}=@var{type}@r{]}
  4797. @opindex gz
  4798. Produce compressed debug sections in DWARF format, if that is supported.
  4799. If @var{type} is not given, the default type depends on the capabilities
  4800. of the assembler and linker used. @var{type} may be one of
  4801. @samp{none} (don't compress debug sections), @samp{zlib} (use zlib
  4802. compression in ELF gABI format), or @samp{zlib-gnu} (use zlib
  4803. compression in traditional GNU format). If the linker doesn't support
  4804. writing compressed debug sections, the option is rejected. Otherwise,
  4805. if the assembler does not support them, @option{-gz} is silently ignored
  4806. when producing object files.
  4807. @item -gvms
  4808. @opindex gvms
  4809. Produce debugging information in Alpha/VMS debug format (if that is
  4810. supported). This is the format used by DEBUG on Alpha/VMS systems.
  4811. @item -g@var{level}
  4812. @itemx -ggdb@var{level}
  4813. @itemx -gstabs@var{level}
  4814. @itemx -gcoff@var{level}
  4815. @itemx -gxcoff@var{level}
  4816. @itemx -gvms@var{level}
  4817. Request debugging information and also use @var{level} to specify how
  4818. much information. The default level is 2.
  4819. Level 0 produces no debug information at all. Thus, @option{-g0} negates
  4820. @option{-g}.
  4821. Level 1 produces minimal information, enough for making backtraces in
  4822. parts of the program that you don't plan to debug. This includes
  4823. descriptions of functions and external variables, and line number
  4824. tables, but no information about local variables.
  4825. Level 3 includes extra information, such as all the macro definitions
  4826. present in the program. Some debuggers support macro expansion when
  4827. you use @option{-g3}.
  4828. @option{-gdwarf-2} does not accept a concatenated debug level, because
  4829. GCC used to support an option @option{-gdwarf} that meant to generate
  4830. debug information in version 1 of the DWARF format (which is very
  4831. different from version 2), and it would have been too confusing. That
  4832. debug format is long obsolete, but the option cannot be changed now.
  4833. Instead use an additional @option{-g@var{level}} option to change the
  4834. debug level for DWARF.
  4835. @item -gtoggle
  4836. @opindex gtoggle
  4837. Turn off generation of debug info, if leaving out this option
  4838. generates it, or turn it on at level 2 otherwise. The position of this
  4839. argument in the command line does not matter; it takes effect after all
  4840. other options are processed, and it does so only once, no matter how
  4841. many times it is given. This is mainly intended to be used with
  4842. @option{-fcompare-debug}.
  4843. @item -fsanitize=address
  4844. @opindex fsanitize=address
  4845. Enable AddressSanitizer, a fast memory error detector.
  4846. Memory access instructions are instrumented to detect
  4847. out-of-bounds and use-after-free bugs.
  4848. See @uref{http://code.google.com/p/address-sanitizer/} for
  4849. more details. The run-time behavior can be influenced using the
  4850. @env{ASAN_OPTIONS} environment variable; see
  4851. @url{https://code.google.com/p/address-sanitizer/wiki/Flags#Run-time_flags} for
  4852. a list of supported options.
  4853. @item -fsanitize=kernel-address
  4854. @opindex fsanitize=kernel-address
  4855. Enable AddressSanitizer for Linux kernel.
  4856. See @uref{http://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel} for more details.
  4857. @item -fsanitize=thread
  4858. @opindex fsanitize=thread
  4859. Enable ThreadSanitizer, a fast data race detector.
  4860. Memory access instructions are instrumented to detect
  4861. data race bugs. See @uref{http://code.google.com/p/thread-sanitizer/} for more
  4862. details. The run-time behavior can be influenced using the @env{TSAN_OPTIONS}
  4863. environment variable; see
  4864. @url{https://code.google.com/p/thread-sanitizer/wiki/Flags} for a list of
  4865. supported options.
  4866. @item -fsanitize=leak
  4867. @opindex fsanitize=leak
  4868. Enable LeakSanitizer, a memory leak detector.
  4869. This option only matters for linking of executables and if neither
  4870. @option{-fsanitize=address} nor @option{-fsanitize=thread} is used. In that
  4871. case the executable is linked against a library that overrides @code{malloc}
  4872. and other allocator functions. See
  4873. @uref{https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer} for more
  4874. details. The run-time behavior can be influenced using the
  4875. @env{LSAN_OPTIONS} environment variable.
  4876. @item -fsanitize=undefined
  4877. @opindex fsanitize=undefined
  4878. Enable UndefinedBehaviorSanitizer, a fast undefined behavior detector.
  4879. Various computations are instrumented to detect undefined behavior
  4880. at runtime. Current suboptions are:
  4881. @table @gcctabopt
  4882. @item -fsanitize=shift
  4883. @opindex fsanitize=shift
  4884. This option enables checking that the result of a shift operation is
  4885. not undefined. Note that what exactly is considered undefined differs
  4886. slightly between C and C++, as well as between ISO C90 and C99, etc.
  4887. @item -fsanitize=integer-divide-by-zero
  4888. @opindex fsanitize=integer-divide-by-zero
  4889. Detect integer division by zero as well as @code{INT_MIN / -1} division.
  4890. @item -fsanitize=unreachable
  4891. @opindex fsanitize=unreachable
  4892. With this option, the compiler turns the @code{__builtin_unreachable}
  4893. call into a diagnostics message call instead. When reaching the
  4894. @code{__builtin_unreachable} call, the behavior is undefined.
  4895. @item -fsanitize=vla-bound
  4896. @opindex fsanitize=vla-bound
  4897. This option instructs the compiler to check that the size of a variable
  4898. length array is positive.
  4899. @item -fsanitize=null
  4900. @opindex fsanitize=null
  4901. This option enables pointer checking. Particularly, the application
  4902. built with this option turned on will issue an error message when it
  4903. tries to dereference a NULL pointer, or if a reference (possibly an
  4904. rvalue reference) is bound to a NULL pointer, or if a method is invoked
  4905. on an object pointed by a NULL pointer.
  4906. @item -fsanitize=return
  4907. @opindex fsanitize=return
  4908. This option enables return statement checking. Programs
  4909. built with this option turned on will issue an error message
  4910. when the end of a non-void function is reached without actually
  4911. returning a value. This option works in C++ only.
  4912. @item -fsanitize=signed-integer-overflow
  4913. @opindex fsanitize=signed-integer-overflow
  4914. This option enables signed integer overflow checking. We check that
  4915. the result of @code{+}, @code{*}, and both unary and binary @code{-}
  4916. does not overflow in the signed arithmetics. Note, integer promotion
  4917. rules must be taken into account. That is, the following is not an
  4918. overflow:
  4919. @smallexample
  4920. signed char a = SCHAR_MAX;
  4921. a++;
  4922. @end smallexample
  4923. @item -fsanitize=bounds
  4924. @opindex fsanitize=bounds
  4925. This option enables instrumentation of array bounds. Various out of bounds
  4926. accesses are detected. Flexible array members, flexible array member-like
  4927. arrays, and initializers of variables with static storage are not instrumented.
  4928. @item -fsanitize=alignment
  4929. @opindex fsanitize=alignment
  4930. This option enables checking of alignment of pointers when they are
  4931. dereferenced, or when a reference is bound to insufficiently aligned target,
  4932. or when a method or constructor is invoked on insufficiently aligned object.
  4933. @item -fsanitize=object-size
  4934. @opindex fsanitize=object-size
  4935. This option enables instrumentation of memory references using the
  4936. @code{__builtin_object_size} function. Various out of bounds pointer
  4937. accesses are detected.
  4938. @item -fsanitize=float-divide-by-zero
  4939. @opindex fsanitize=float-divide-by-zero
  4940. Detect floating-point division by zero. Unlike other similar options,
  4941. @option{-fsanitize=float-divide-by-zero} is not enabled by
  4942. @option{-fsanitize=undefined}, since floating-point division by zero can
  4943. be a legitimate way of obtaining infinities and NaNs.
  4944. @item -fsanitize=float-cast-overflow
  4945. @opindex fsanitize=float-cast-overflow
  4946. This option enables floating-point type to integer conversion checking.
  4947. We check that the result of the conversion does not overflow.
  4948. Unlike other similar options, @option{-fsanitize=float-cast-overflow} is
  4949. not enabled by @option{-fsanitize=undefined}.
  4950. This option does not work well with @code{FE_INVALID} exceptions enabled.
  4951. @item -fsanitize=nonnull-attribute
  4952. @opindex fsanitize=nonnull-attribute
  4953. This option enables instrumentation of calls, checking whether null values
  4954. are not passed to arguments marked as requiring a non-null value by the
  4955. @code{nonnull} function attribute.
  4956. @item -fsanitize=returns-nonnull-attribute
  4957. @opindex fsanitize=returns-nonnull-attribute
  4958. This option enables instrumentation of return statements in functions
  4959. marked with @code{returns_nonnull} function attribute, to detect returning
  4960. of null values from such functions.
  4961. @item -fsanitize=bool
  4962. @opindex fsanitize=bool
  4963. This option enables instrumentation of loads from bool. If a value other
  4964. than 0/1 is loaded, a run-time error is issued.
  4965. @item -fsanitize=enum
  4966. @opindex fsanitize=enum
  4967. This option enables instrumentation of loads from an enum type. If
  4968. a value outside the range of values for the enum type is loaded,
  4969. a run-time error is issued.
  4970. @item -fsanitize=vptr
  4971. @opindex fsanitize=vptr
  4972. This option enables instrumentation of C++ member function calls, member
  4973. accesses and some conversions between pointers to base and derived classes,
  4974. to verify the referenced object has the correct dynamic type.
  4975. @end table
  4976. While @option{-ftrapv} causes traps for signed overflows to be emitted,
  4977. @option{-fsanitize=undefined} gives a diagnostic message.
  4978. This currently works only for the C family of languages.
  4979. @item -fno-sanitize=all
  4980. @opindex fno-sanitize=all
  4981. This option disables all previously enabled sanitizers.
  4982. @option{-fsanitize=all} is not allowed, as some sanitizers cannot be used
  4983. together.
  4984. @item -fasan-shadow-offset=@var{number}
  4985. @opindex fasan-shadow-offset
  4986. This option forces GCC to use custom shadow offset in AddressSanitizer checks.
  4987. It is useful for experimenting with different shadow memory layouts in
  4988. Kernel AddressSanitizer.
  4989. @item -fsanitize-recover@r{[}=@var{opts}@r{]}
  4990. @opindex fsanitize-recover
  4991. @opindex fno-sanitize-recover
  4992. @option{-fsanitize-recover=} controls error recovery mode for sanitizers
  4993. mentioned in comma-separated list of @var{opts}. Enabling this option
  4994. for a sanitizer component causes it to attempt to continue
  4995. running the program as if no error happened. This means multiple
  4996. runtime errors can be reported in a single program run, and the exit
  4997. code of the program may indicate success even when errors
  4998. have been reported. The @option{-fno-sanitize-recover=} option
  4999. can be used to alter
  5000. this behavior: only the first detected error is reported
  5001. and program then exits with a non-zero exit code.
  5002. Currently this feature only works for @option{-fsanitize=undefined} (and its suboptions
  5003. except for @option{-fsanitize=unreachable} and @option{-fsanitize=return}),
  5004. @option{-fsanitize=float-cast-overflow}, @option{-fsanitize=float-divide-by-zero} and
  5005. @option{-fsanitize=kernel-address}. For these sanitizers error recovery is turned on by default.
  5006. @option{-fsanitize-recover=all} and @option{-fno-sanitize-recover=all} is also
  5007. accepted, the former enables recovery for all sanitizers that support it,
  5008. the latter disables recovery for all sanitizers that support it.
  5009. Syntax without explicit @var{opts} parameter is deprecated. It is equivalent to
  5010. @smallexample
  5011. -fsanitize-recover=undefined,float-cast-overflow,float-divide-by-zero
  5012. @end smallexample
  5013. @noindent
  5014. Similarly @option{-fno-sanitize-recover} is equivalent to
  5015. @smallexample
  5016. -fno-sanitize-recover=undefined,float-cast-overflow,float-divide-by-zero
  5017. @end smallexample
  5018. @item -fsanitize-undefined-trap-on-error
  5019. @opindex fsanitize-undefined-trap-on-error
  5020. The @option{-fsanitize-undefined-trap-on-error} option instructs the compiler to
  5021. report undefined behavior using @code{__builtin_trap} rather than
  5022. a @code{libubsan} library routine. The advantage of this is that the
  5023. @code{libubsan} library is not needed and is not linked in, so this
  5024. is usable even in freestanding environments.
  5025. @item -fcheck-pointer-bounds
  5026. @opindex fcheck-pointer-bounds
  5027. @opindex fno-check-pointer-bounds
  5028. @cindex Pointer Bounds Checker options
  5029. Enable Pointer Bounds Checker instrumentation. Each memory reference
  5030. is instrumented with checks of the pointer used for memory access against
  5031. bounds associated with that pointer.
  5032. Currently there
  5033. is only an implementation for Intel MPX available, thus x86 target
  5034. and @option{-mmpx} are required to enable this feature.
  5035. MPX-based instrumentation requires
  5036. a runtime library to enable MPX in hardware and handle bounds
  5037. violation signals. By default when @option{-fcheck-pointer-bounds}
  5038. and @option{-mmpx} options are used to link a program, the GCC driver
  5039. links against the @file{libmpx} runtime library and @file{libmpxwrappers}
  5040. library. It also passes '-z bndplt' to a linker in case it supports this
  5041. option (which is checked on libmpx configuration). Note that old versions
  5042. of linker may ignore option. Gold linker doesn't support '-z bndplt'
  5043. option. With no '-z bndplt' support in linker all calls to dynamic libraries
  5044. lose passed bounds reducing overall protection level. It's highly
  5045. recommended to use linker with '-z bndplt' support. In case such linker
  5046. is not available it is adviced to always use @option{-static-libmpxwrappers}
  5047. for better protection level or use @option{-static} to completely avoid
  5048. external calls to dynamic libraries. MPX-based instrumentation
  5049. may be used for debugging and also may be included in production code
  5050. to increase program security. Depending on usage, you may
  5051. have different requirements for the runtime library. The current version
  5052. of the MPX runtime library is more oriented for use as a debugging
  5053. tool. MPX runtime library usage implies @option{-lpthread}. See
  5054. also @option{-static-libmpx}. The runtime library behavior can be
  5055. influenced using various @env{CHKP_RT_*} environment variables. See
  5056. @uref{https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler}
  5057. for more details.
  5058. Generated instrumentation may be controlled by various
  5059. @option{-fchkp-*} options and by the @code{bnd_variable_size}
  5060. structure field attribute (@pxref{Type Attributes}) and
  5061. @code{bnd_legacy}, and @code{bnd_instrument} function attributes
  5062. (@pxref{Function Attributes}). GCC also provides a number of built-in
  5063. functions for controlling the Pointer Bounds Checker. @xref{Pointer
  5064. Bounds Checker builtins}, for more information.
  5065. @item -fchkp-check-incomplete-type
  5066. @opindex fchkp-check-incomplete-type
  5067. @opindex fno-chkp-check-incomplete-type
  5068. Generate pointer bounds checks for variables with incomplete type.
  5069. Enabled by default.
  5070. @item -fchkp-narrow-bounds
  5071. @opindex fchkp-narrow-bounds
  5072. @opindex fno-chkp-narrow-bounds
  5073. Controls bounds used by Pointer Bounds Checker for pointers to object
  5074. fields. If narrowing is enabled then field bounds are used. Otherwise
  5075. object bounds are used. See also @option{-fchkp-narrow-to-innermost-array}
  5076. and @option{-fchkp-first-field-has-own-bounds}. Enabled by default.
  5077. @item -fchkp-first-field-has-own-bounds
  5078. @opindex fchkp-first-field-has-own-bounds
  5079. @opindex fno-chkp-first-field-has-own-bounds
  5080. Forces Pointer Bounds Checker to use narrowed bounds for the address of the
  5081. first field in the structure. By default a pointer to the first field has
  5082. the same bounds as a pointer to the whole structure.
  5083. @item -fchkp-narrow-to-innermost-array
  5084. @opindex fchkp-narrow-to-innermost-array
  5085. @opindex fno-chkp-narrow-to-innermost-array
  5086. Forces Pointer Bounds Checker to use bounds of the innermost arrays in
  5087. case of nested static array access. By default this option is disabled and
  5088. bounds of the outermost array are used.
  5089. @item -fchkp-optimize
  5090. @opindex fchkp-optimize
  5091. @opindex fno-chkp-optimize
  5092. Enables Pointer Bounds Checker optimizations. Enabled by default at
  5093. optimization levels @option{-O}, @option{-O2}, @option{-O3}.
  5094. @item -fchkp-use-fast-string-functions
  5095. @opindex fchkp-use-fast-string-functions
  5096. @opindex fno-chkp-use-fast-string-functions
  5097. Enables use of @code{*_nobnd} versions of string functions (not copying bounds)
  5098. by Pointer Bounds Checker. Disabled by default.
  5099. @item -fchkp-use-nochk-string-functions
  5100. @opindex fchkp-use-nochk-string-functions
  5101. @opindex fno-chkp-use-nochk-string-functions
  5102. Enables use of @code{*_nochk} versions of string functions (not checking bounds)
  5103. by Pointer Bounds Checker. Disabled by default.
  5104. @item -fchkp-use-static-bounds
  5105. @opindex fchkp-use-static-bounds
  5106. @opindex fno-chkp-use-static-bounds
  5107. Allow Pointer Bounds Checker to generate static bounds holding
  5108. bounds of static variables. Enabled by default.
  5109. @item -fchkp-use-static-const-bounds
  5110. @opindex fchkp-use-static-const-bounds
  5111. @opindex fno-chkp-use-static-const-bounds
  5112. Use statically-initialized bounds for constant bounds instead of
  5113. generating them each time they are required. By default enabled when
  5114. @option{-fchkp-use-static-bounds} is enabled.
  5115. @item -fchkp-treat-zero-dynamic-size-as-infinite
  5116. @opindex fchkp-treat-zero-dynamic-size-as-infinite
  5117. @opindex fno-chkp-treat-zero-dynamic-size-as-infinite
  5118. With this option, objects with incomplete type whose
  5119. dynamically-obtained size is zero are treated as having infinite size
  5120. instead by Pointer Bounds
  5121. Checker. This option may be helpful if a program is linked with a library
  5122. missing size information for some symbols. Disabled by default.
  5123. @item -fchkp-check-read
  5124. @opindex fchkp-check-read
  5125. @opindex fno-chkp-check-read
  5126. Instructs Pointer Bounds Checker to generate checks for all read
  5127. accesses to memory. Enabled by default.
  5128. @item -fchkp-check-write
  5129. @opindex fchkp-check-write
  5130. @opindex fno-chkp-check-write
  5131. Instructs Pointer Bounds Checker to generate checks for all write
  5132. accesses to memory. Enabled by default.
  5133. @item -fchkp-store-bounds
  5134. @opindex fchkp-store-bounds
  5135. @opindex fno-chkp-store-bounds
  5136. Instructs Pointer Bounds Checker to generate bounds stores for
  5137. pointer writes. Enabled by default.
  5138. @item -fchkp-instrument-calls
  5139. @opindex fchkp-instrument-calls
  5140. @opindex fno-chkp-instrument-calls
  5141. Instructs Pointer Bounds Checker to pass pointer bounds to calls.
  5142. Enabled by default.
  5143. @item -fchkp-instrument-marked-only
  5144. @opindex fchkp-instrument-marked-only
  5145. @opindex fno-chkp-instrument-marked-only
  5146. Instructs Pointer Bounds Checker to instrument only functions
  5147. marked with the @code{bnd_instrument} attribute
  5148. (@pxref{Function Attributes}). Disabled by default.
  5149. @item -fchkp-use-wrappers
  5150. @opindex fchkp-use-wrappers
  5151. @opindex fno-chkp-use-wrappers
  5152. Allows Pointer Bounds Checker to replace calls to built-in functions
  5153. with calls to wrapper functions. When @option{-fchkp-use-wrappers}
  5154. is used to link a program, the GCC driver automatically links
  5155. against @file{libmpxwrappers}. See also @option{-static-libmpxwrappers}.
  5156. Enabled by default.
  5157. @item -fdump-final-insns@r{[}=@var{file}@r{]}
  5158. @opindex fdump-final-insns
  5159. Dump the final internal representation (RTL) to @var{file}. If the
  5160. optional argument is omitted (or if @var{file} is @code{.}), the name
  5161. of the dump file is determined by appending @code{.gkd} to the
  5162. compilation output file name.
  5163. @item -fcompare-debug@r{[}=@var{opts}@r{]}
  5164. @opindex fcompare-debug
  5165. @opindex fno-compare-debug
  5166. If no error occurs during compilation, run the compiler a second time,
  5167. adding @var{opts} and @option{-fcompare-debug-second} to the arguments
  5168. passed to the second compilation. Dump the final internal
  5169. representation in both compilations, and print an error if they differ.
  5170. If the equal sign is omitted, the default @option{-gtoggle} is used.
  5171. The environment variable @env{GCC_COMPARE_DEBUG}, if defined, non-empty
  5172. and nonzero, implicitly enables @option{-fcompare-debug}. If
  5173. @env{GCC_COMPARE_DEBUG} is defined to a string starting with a dash,
  5174. then it is used for @var{opts}, otherwise the default @option{-gtoggle}
  5175. is used.
  5176. @option{-fcompare-debug=}, with the equal sign but without @var{opts},
  5177. is equivalent to @option{-fno-compare-debug}, which disables the dumping
  5178. of the final representation and the second compilation, preventing even
  5179. @env{GCC_COMPARE_DEBUG} from taking effect.
  5180. To verify full coverage during @option{-fcompare-debug} testing, set
  5181. @env{GCC_COMPARE_DEBUG} to say @option{-fcompare-debug-not-overridden},
  5182. which GCC rejects as an invalid option in any actual compilation
  5183. (rather than preprocessing, assembly or linking). To get just a
  5184. warning, setting @env{GCC_COMPARE_DEBUG} to @samp{-w%n-fcompare-debug
  5185. not overridden} will do.
  5186. @item -fcompare-debug-second
  5187. @opindex fcompare-debug-second
  5188. This option is implicitly passed to the compiler for the second
  5189. compilation requested by @option{-fcompare-debug}, along with options to
  5190. silence warnings, and omitting other options that would cause
  5191. side-effect compiler outputs to files or to the standard output. Dump
  5192. files and preserved temporary files are renamed so as to contain the
  5193. @code{.gk} additional extension during the second compilation, to avoid
  5194. overwriting those generated by the first.
  5195. When this option is passed to the compiler driver, it causes the
  5196. @emph{first} compilation to be skipped, which makes it useful for little
  5197. other than debugging the compiler proper.
  5198. @item -feliminate-dwarf2-dups
  5199. @opindex feliminate-dwarf2-dups
  5200. Compress DWARF 2 debugging information by eliminating duplicated
  5201. information about each symbol. This option only makes sense when
  5202. generating DWARF 2 debugging information with @option{-gdwarf-2}.
  5203. @item -femit-struct-debug-baseonly
  5204. @opindex femit-struct-debug-baseonly
  5205. Emit debug information for struct-like types
  5206. only when the base name of the compilation source file
  5207. matches the base name of file in which the struct is defined.
  5208. This option substantially reduces the size of debugging information,
  5209. but at significant potential loss in type information to the debugger.
  5210. See @option{-femit-struct-debug-reduced} for a less aggressive option.
  5211. See @option{-femit-struct-debug-detailed} for more detailed control.
  5212. This option works only with DWARF 2.
  5213. @item -femit-struct-debug-reduced
  5214. @opindex femit-struct-debug-reduced
  5215. Emit debug information for struct-like types
  5216. only when the base name of the compilation source file
  5217. matches the base name of file in which the type is defined,
  5218. unless the struct is a template or defined in a system header.
  5219. This option significantly reduces the size of debugging information,
  5220. with some potential loss in type information to the debugger.
  5221. See @option{-femit-struct-debug-baseonly} for a more aggressive option.
  5222. See @option{-femit-struct-debug-detailed} for more detailed control.
  5223. This option works only with DWARF 2.
  5224. @item -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]}
  5225. @opindex femit-struct-debug-detailed
  5226. Specify the struct-like types
  5227. for which the compiler generates debug information.
  5228. The intent is to reduce duplicate struct debug information
  5229. between different object files within the same program.
  5230. This option is a detailed version of
  5231. @option{-femit-struct-debug-reduced} and @option{-femit-struct-debug-baseonly},
  5232. which serves for most needs.
  5233. A specification has the syntax@*
  5234. [@samp{dir:}|@samp{ind:}][@samp{ord:}|@samp{gen:}](@samp{any}|@samp{sys}|@samp{base}|@samp{none})
  5235. The optional first word limits the specification to
  5236. structs that are used directly (@samp{dir:}) or used indirectly (@samp{ind:}).
  5237. A struct type is used directly when it is the type of a variable, member.
  5238. Indirect uses arise through pointers to structs.
  5239. That is, when use of an incomplete struct is valid, the use is indirect.
  5240. An example is
  5241. @samp{struct one direct; struct two * indirect;}.
  5242. The optional second word limits the specification to
  5243. ordinary structs (@samp{ord:}) or generic structs (@samp{gen:}).
  5244. Generic structs are a bit complicated to explain.
  5245. For C++, these are non-explicit specializations of template classes,
  5246. or non-template classes within the above.
  5247. Other programming languages have generics,
  5248. but @option{-femit-struct-debug-detailed} does not yet implement them.
  5249. The third word specifies the source files for those
  5250. structs for which the compiler should emit debug information.
  5251. The values @samp{none} and @samp{any} have the normal meaning.
  5252. The value @samp{base} means that
  5253. the base of name of the file in which the type declaration appears
  5254. must match the base of the name of the main compilation file.
  5255. In practice, this means that when compiling @file{foo.c}, debug information
  5256. is generated for types declared in that file and @file{foo.h},
  5257. but not other header files.
  5258. The value @samp{sys} means those types satisfying @samp{base}
  5259. or declared in system or compiler headers.
  5260. You may need to experiment to determine the best settings for your application.
  5261. The default is @option{-femit-struct-debug-detailed=all}.
  5262. This option works only with DWARF 2.
  5263. @item -fno-merge-debug-strings
  5264. @opindex fmerge-debug-strings
  5265. @opindex fno-merge-debug-strings
  5266. Direct the linker to not merge together strings in the debugging
  5267. information that are identical in different object files. Merging is
  5268. not supported by all assemblers or linkers. Merging decreases the size
  5269. of the debug information in the output file at the cost of increasing
  5270. link processing time. Merging is enabled by default.
  5271. @item -fdebug-prefix-map=@var{old}=@var{new}
  5272. @opindex fdebug-prefix-map
  5273. When compiling files in directory @file{@var{old}}, record debugging
  5274. information describing them as in @file{@var{new}} instead.
  5275. @item -fno-dwarf2-cfi-asm
  5276. @opindex fdwarf2-cfi-asm
  5277. @opindex fno-dwarf2-cfi-asm
  5278. Emit DWARF 2 unwind info as compiler generated @code{.eh_frame} section
  5279. instead of using GAS @code{.cfi_*} directives.
  5280. @cindex @command{prof}
  5281. @item -p
  5282. @opindex p
  5283. Generate extra code to write profile information suitable for the
  5284. analysis program @command{prof}. You must use this option when compiling
  5285. the source files you want data about, and you must also use it when
  5286. linking.
  5287. @cindex @command{gprof}
  5288. @item -pg
  5289. @opindex pg
  5290. Generate extra code to write profile information suitable for the
  5291. analysis program @command{gprof}. You must use this option when compiling
  5292. the source files you want data about, and you must also use it when
  5293. linking.
  5294. @item -Q
  5295. @opindex Q
  5296. Makes the compiler print out each function name as it is compiled, and
  5297. print some statistics about each pass when it finishes.
  5298. @item -ftime-report
  5299. @opindex ftime-report
  5300. Makes the compiler print some statistics about the time consumed by each
  5301. pass when it finishes.
  5302. @item -fmem-report
  5303. @opindex fmem-report
  5304. Makes the compiler print some statistics about permanent memory
  5305. allocation when it finishes.
  5306. @item -fmem-report-wpa
  5307. @opindex fmem-report-wpa
  5308. Makes the compiler print some statistics about permanent memory
  5309. allocation for the WPA phase only.
  5310. @item -fpre-ipa-mem-report
  5311. @opindex fpre-ipa-mem-report
  5312. @item -fpost-ipa-mem-report
  5313. @opindex fpost-ipa-mem-report
  5314. Makes the compiler print some statistics about permanent memory
  5315. allocation before or after interprocedural optimization.
  5316. @item -fprofile-report
  5317. @opindex fprofile-report
  5318. Makes the compiler print some statistics about consistency of the
  5319. (estimated) profile and effect of individual passes.
  5320. @item -fstack-usage
  5321. @opindex fstack-usage
  5322. Makes the compiler output stack usage information for the program, on a
  5323. per-function basis. The filename for the dump is made by appending
  5324. @file{.su} to the @var{auxname}. @var{auxname} is generated from the name of
  5325. the output file, if explicitly specified and it is not an executable,
  5326. otherwise it is the basename of the source file. An entry is made up
  5327. of three fields:
  5328. @itemize
  5329. @item
  5330. The name of the function.
  5331. @item
  5332. A number of bytes.
  5333. @item
  5334. One or more qualifiers: @code{static}, @code{dynamic}, @code{bounded}.
  5335. @end itemize
  5336. The qualifier @code{static} means that the function manipulates the stack
  5337. statically: a fixed number of bytes are allocated for the frame on function
  5338. entry and released on function exit; no stack adjustments are otherwise made
  5339. in the function. The second field is this fixed number of bytes.
  5340. The qualifier @code{dynamic} means that the function manipulates the stack
  5341. dynamically: in addition to the static allocation described above, stack
  5342. adjustments are made in the body of the function, for example to push/pop
  5343. arguments around function calls. If the qualifier @code{bounded} is also
  5344. present, the amount of these adjustments is bounded at compile time and
  5345. the second field is an upper bound of the total amount of stack used by
  5346. the function. If it is not present, the amount of these adjustments is
  5347. not bounded at compile time and the second field only represents the
  5348. bounded part.
  5349. @item -fprofile-arcs
  5350. @opindex fprofile-arcs
  5351. Add code so that program flow @dfn{arcs} are instrumented. During
  5352. execution the program records how many times each branch and call is
  5353. executed and how many times it is taken or returns. When the compiled
  5354. program exits it saves this data to a file called
  5355. @file{@var{auxname}.gcda} for each source file. The data may be used for
  5356. profile-directed optimizations (@option{-fbranch-probabilities}), or for
  5357. test coverage analysis (@option{-ftest-coverage}). Each object file's
  5358. @var{auxname} is generated from the name of the output file, if
  5359. explicitly specified and it is not the final executable, otherwise it is
  5360. the basename of the source file. In both cases any suffix is removed
  5361. (e.g.@: @file{foo.gcda} for input file @file{dir/foo.c}, or
  5362. @file{dir/foo.gcda} for output file specified as @option{-o dir/foo.o}).
  5363. @xref{Cross-profiling}.
  5364. @cindex @command{gcov}
  5365. @item --coverage
  5366. @opindex coverage
  5367. This option is used to compile and link code instrumented for coverage
  5368. analysis. The option is a synonym for @option{-fprofile-arcs}
  5369. @option{-ftest-coverage} (when compiling) and @option{-lgcov} (when
  5370. linking). See the documentation for those options for more details.
  5371. @itemize
  5372. @item
  5373. Compile the source files with @option{-fprofile-arcs} plus optimization
  5374. and code generation options. For test coverage analysis, use the
  5375. additional @option{-ftest-coverage} option. You do not need to profile
  5376. every source file in a program.
  5377. @item
  5378. Link your object files with @option{-lgcov} or @option{-fprofile-arcs}
  5379. (the latter implies the former).
  5380. @item
  5381. Run the program on a representative workload to generate the arc profile
  5382. information. This may be repeated any number of times. You can run
  5383. concurrent instances of your program, and provided that the file system
  5384. supports locking, the data files will be correctly updated. Also
  5385. @code{fork} calls are detected and correctly handled (double counting
  5386. will not happen).
  5387. @item
  5388. For profile-directed optimizations, compile the source files again with
  5389. the same optimization and code generation options plus
  5390. @option{-fbranch-probabilities} (@pxref{Optimize Options,,Options that
  5391. Control Optimization}).
  5392. @item
  5393. For test coverage analysis, use @command{gcov} to produce human readable
  5394. information from the @file{.gcno} and @file{.gcda} files. Refer to the
  5395. @command{gcov} documentation for further information.
  5396. @end itemize
  5397. With @option{-fprofile-arcs}, for each function of your program GCC
  5398. creates a program flow graph, then finds a spanning tree for the graph.
  5399. Only arcs that are not on the spanning tree have to be instrumented: the
  5400. compiler adds code to count the number of times that these arcs are
  5401. executed. When an arc is the only exit or only entrance to a block, the
  5402. instrumentation code can be added to the block; otherwise, a new basic
  5403. block must be created to hold the instrumentation code.
  5404. @need 2000
  5405. @item -ftest-coverage
  5406. @opindex ftest-coverage
  5407. Produce a notes file that the @command{gcov} code-coverage utility
  5408. (@pxref{Gcov,, @command{gcov}---a Test Coverage Program}) can use to
  5409. show program coverage. Each source file's note file is called
  5410. @file{@var{auxname}.gcno}. Refer to the @option{-fprofile-arcs} option
  5411. above for a description of @var{auxname} and instructions on how to
  5412. generate test coverage data. Coverage data matches the source files
  5413. more closely if you do not optimize.
  5414. @item -fdbg-cnt-list
  5415. @opindex fdbg-cnt-list
  5416. Print the name and the counter upper bound for all debug counters.
  5417. @item -fdbg-cnt=@var{counter-value-list}
  5418. @opindex fdbg-cnt
  5419. Set the internal debug counter upper bound. @var{counter-value-list}
  5420. is a comma-separated list of @var{name}:@var{value} pairs
  5421. which sets the upper bound of each debug counter @var{name} to @var{value}.
  5422. All debug counters have the initial upper bound of @code{UINT_MAX};
  5423. thus @code{dbg_cnt} returns true always unless the upper bound
  5424. is set by this option.
  5425. For example, with @option{-fdbg-cnt=dce:10,tail_call:0},
  5426. @code{dbg_cnt(dce)} returns true only for first 10 invocations.
  5427. @item -fenable-@var{kind}-@var{pass}
  5428. @itemx -fdisable-@var{kind}-@var{pass}=@var{range-list}
  5429. @opindex fdisable-
  5430. @opindex fenable-
  5431. This is a set of options that are used to explicitly disable/enable
  5432. optimization passes. These options are intended for use for debugging GCC.
  5433. Compiler users should use regular options for enabling/disabling
  5434. passes instead.
  5435. @table @gcctabopt
  5436. @item -fdisable-ipa-@var{pass}
  5437. Disable IPA pass @var{pass}. @var{pass} is the pass name. If the same pass is
  5438. statically invoked in the compiler multiple times, the pass name should be
  5439. appended with a sequential number starting from 1.
  5440. @item -fdisable-rtl-@var{pass}
  5441. @itemx -fdisable-rtl-@var{pass}=@var{range-list}
  5442. Disable RTL pass @var{pass}. @var{pass} is the pass name. If the same pass is
  5443. statically invoked in the compiler multiple times, the pass name should be
  5444. appended with a sequential number starting from 1. @var{range-list} is a
  5445. comma-separated list of function ranges or assembler names. Each range is a number
  5446. pair separated by a colon. The range is inclusive in both ends. If the range
  5447. is trivial, the number pair can be simplified as a single number. If the
  5448. function's call graph node's @var{uid} falls within one of the specified ranges,
  5449. the @var{pass} is disabled for that function. The @var{uid} is shown in the
  5450. function header of a dump file, and the pass names can be dumped by using
  5451. option @option{-fdump-passes}.
  5452. @item -fdisable-tree-@var{pass}
  5453. @itemx -fdisable-tree-@var{pass}=@var{range-list}
  5454. Disable tree pass @var{pass}. See @option{-fdisable-rtl} for the description of
  5455. option arguments.
  5456. @item -fenable-ipa-@var{pass}
  5457. Enable IPA pass @var{pass}. @var{pass} is the pass name. If the same pass is
  5458. statically invoked in the compiler multiple times, the pass name should be
  5459. appended with a sequential number starting from 1.
  5460. @item -fenable-rtl-@var{pass}
  5461. @itemx -fenable-rtl-@var{pass}=@var{range-list}
  5462. Enable RTL pass @var{pass}. See @option{-fdisable-rtl} for option argument
  5463. description and examples.
  5464. @item -fenable-tree-@var{pass}
  5465. @itemx -fenable-tree-@var{pass}=@var{range-list}
  5466. Enable tree pass @var{pass}. See @option{-fdisable-rtl} for the description
  5467. of option arguments.
  5468. @end table
  5469. Here are some examples showing uses of these options.
  5470. @smallexample
  5471. # disable ccp1 for all functions
  5472. -fdisable-tree-ccp1
  5473. # disable complete unroll for function whose cgraph node uid is 1
  5474. -fenable-tree-cunroll=1
  5475. # disable gcse2 for functions at the following ranges [1,1],
  5476. # [300,400], and [400,1000]
  5477. # disable gcse2 for functions foo and foo2
  5478. -fdisable-rtl-gcse2=foo,foo2
  5479. # disable early inlining
  5480. -fdisable-tree-einline
  5481. # disable ipa inlining
  5482. -fdisable-ipa-inline
  5483. # enable tree full unroll
  5484. -fenable-tree-unroll
  5485. @end smallexample
  5486. @item -d@var{letters}
  5487. @itemx -fdump-rtl-@var{pass}
  5488. @itemx -fdump-rtl-@var{pass}=@var{filename}
  5489. @opindex d
  5490. @opindex fdump-rtl-@var{pass}
  5491. Says to make debugging dumps during compilation at times specified by
  5492. @var{letters}. This is used for debugging the RTL-based passes of the
  5493. compiler. The file names for most of the dumps are made by appending
  5494. a pass number and a word to the @var{dumpname}, and the files are
  5495. created in the directory of the output file. In case of
  5496. @option{=@var{filename}} option, the dump is output on the given file
  5497. instead of the pass numbered dump files. Note that the pass number is
  5498. computed statically as passes get registered into the pass manager.
  5499. Thus the numbering is not related to the dynamic order of execution of
  5500. passes. In particular, a pass installed by a plugin could have a
  5501. number over 200 even if it executed quite early. @var{dumpname} is
  5502. generated from the name of the output file, if explicitly specified
  5503. and it is not an executable, otherwise it is the basename of the
  5504. source file. These switches may have different effects when
  5505. @option{-E} is used for preprocessing.
  5506. Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
  5507. @option{-d} option @var{letters}. Here are the possible
  5508. letters for use in @var{pass} and @var{letters}, and their meanings:
  5509. @table @gcctabopt
  5510. @item -fdump-rtl-alignments
  5511. @opindex fdump-rtl-alignments
  5512. Dump after branch alignments have been computed.
  5513. @item -fdump-rtl-asmcons
  5514. @opindex fdump-rtl-asmcons
  5515. Dump after fixing rtl statements that have unsatisfied in/out constraints.
  5516. @item -fdump-rtl-auto_inc_dec
  5517. @opindex fdump-rtl-auto_inc_dec
  5518. Dump after auto-inc-dec discovery. This pass is only run on
  5519. architectures that have auto inc or auto dec instructions.
  5520. @item -fdump-rtl-barriers
  5521. @opindex fdump-rtl-barriers
  5522. Dump after cleaning up the barrier instructions.
  5523. @item -fdump-rtl-bbpart
  5524. @opindex fdump-rtl-bbpart
  5525. Dump after partitioning hot and cold basic blocks.
  5526. @item -fdump-rtl-bbro
  5527. @opindex fdump-rtl-bbro
  5528. Dump after block reordering.
  5529. @item -fdump-rtl-btl1
  5530. @itemx -fdump-rtl-btl2
  5531. @opindex fdump-rtl-btl2
  5532. @opindex fdump-rtl-btl2
  5533. @option{-fdump-rtl-btl1} and @option{-fdump-rtl-btl2} enable dumping
  5534. after the two branch
  5535. target load optimization passes.
  5536. @item -fdump-rtl-bypass
  5537. @opindex fdump-rtl-bypass
  5538. Dump after jump bypassing and control flow optimizations.
  5539. @item -fdump-rtl-combine
  5540. @opindex fdump-rtl-combine
  5541. Dump after the RTL instruction combination pass.
  5542. @item -fdump-rtl-compgotos
  5543. @opindex fdump-rtl-compgotos
  5544. Dump after duplicating the computed gotos.
  5545. @item -fdump-rtl-ce1
  5546. @itemx -fdump-rtl-ce2
  5547. @itemx -fdump-rtl-ce3
  5548. @opindex fdump-rtl-ce1
  5549. @opindex fdump-rtl-ce2
  5550. @opindex fdump-rtl-ce3
  5551. @option{-fdump-rtl-ce1}, @option{-fdump-rtl-ce2}, and
  5552. @option{-fdump-rtl-ce3} enable dumping after the three
  5553. if conversion passes.
  5554. @item -fdump-rtl-cprop_hardreg
  5555. @opindex fdump-rtl-cprop_hardreg
  5556. Dump after hard register copy propagation.
  5557. @item -fdump-rtl-csa
  5558. @opindex fdump-rtl-csa
  5559. Dump after combining stack adjustments.
  5560. @item -fdump-rtl-cse1
  5561. @itemx -fdump-rtl-cse2
  5562. @opindex fdump-rtl-cse1
  5563. @opindex fdump-rtl-cse2
  5564. @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after
  5565. the two common subexpression elimination passes.
  5566. @item -fdump-rtl-dce
  5567. @opindex fdump-rtl-dce
  5568. Dump after the standalone dead code elimination passes.
  5569. @item -fdump-rtl-dbr
  5570. @opindex fdump-rtl-dbr
  5571. Dump after delayed branch scheduling.
  5572. @item -fdump-rtl-dce1
  5573. @itemx -fdump-rtl-dce2
  5574. @opindex fdump-rtl-dce1
  5575. @opindex fdump-rtl-dce2
  5576. @option{-fdump-rtl-dce1} and @option{-fdump-rtl-dce2} enable dumping after
  5577. the two dead store elimination passes.
  5578. @item -fdump-rtl-eh
  5579. @opindex fdump-rtl-eh
  5580. Dump after finalization of EH handling code.
  5581. @item -fdump-rtl-eh_ranges
  5582. @opindex fdump-rtl-eh_ranges
  5583. Dump after conversion of EH handling range regions.
  5584. @item -fdump-rtl-expand
  5585. @opindex fdump-rtl-expand
  5586. Dump after RTL generation.
  5587. @item -fdump-rtl-fwprop1
  5588. @itemx -fdump-rtl-fwprop2
  5589. @opindex fdump-rtl-fwprop1
  5590. @opindex fdump-rtl-fwprop2
  5591. @option{-fdump-rtl-fwprop1} and @option{-fdump-rtl-fwprop2} enable
  5592. dumping after the two forward propagation passes.
  5593. @item -fdump-rtl-gcse1
  5594. @itemx -fdump-rtl-gcse2
  5595. @opindex fdump-rtl-gcse1
  5596. @opindex fdump-rtl-gcse2
  5597. @option{-fdump-rtl-gcse1} and @option{-fdump-rtl-gcse2} enable dumping
  5598. after global common subexpression elimination.
  5599. @item -fdump-rtl-init-regs
  5600. @opindex fdump-rtl-init-regs
  5601. Dump after the initialization of the registers.
  5602. @item -fdump-rtl-initvals
  5603. @opindex fdump-rtl-initvals
  5604. Dump after the computation of the initial value sets.
  5605. @item -fdump-rtl-into_cfglayout
  5606. @opindex fdump-rtl-into_cfglayout
  5607. Dump after converting to cfglayout mode.
  5608. @item -fdump-rtl-ira
  5609. @opindex fdump-rtl-ira
  5610. Dump after iterated register allocation.
  5611. @item -fdump-rtl-jump
  5612. @opindex fdump-rtl-jump
  5613. Dump after the second jump optimization.
  5614. @item -fdump-rtl-loop2
  5615. @opindex fdump-rtl-loop2
  5616. @option{-fdump-rtl-loop2} enables dumping after the rtl
  5617. loop optimization passes.
  5618. @item -fdump-rtl-mach
  5619. @opindex fdump-rtl-mach
  5620. Dump after performing the machine dependent reorganization pass, if that
  5621. pass exists.
  5622. @item -fdump-rtl-mode_sw
  5623. @opindex fdump-rtl-mode_sw
  5624. Dump after removing redundant mode switches.
  5625. @item -fdump-rtl-rnreg
  5626. @opindex fdump-rtl-rnreg
  5627. Dump after register renumbering.
  5628. @item -fdump-rtl-outof_cfglayout
  5629. @opindex fdump-rtl-outof_cfglayout
  5630. Dump after converting from cfglayout mode.
  5631. @item -fdump-rtl-peephole2
  5632. @opindex fdump-rtl-peephole2
  5633. Dump after the peephole pass.
  5634. @item -fdump-rtl-postreload
  5635. @opindex fdump-rtl-postreload
  5636. Dump after post-reload optimizations.
  5637. @item -fdump-rtl-pro_and_epilogue
  5638. @opindex fdump-rtl-pro_and_epilogue
  5639. Dump after generating the function prologues and epilogues.
  5640. @item -fdump-rtl-sched1
  5641. @itemx -fdump-rtl-sched2
  5642. @opindex fdump-rtl-sched1
  5643. @opindex fdump-rtl-sched2
  5644. @option{-fdump-rtl-sched1} and @option{-fdump-rtl-sched2} enable dumping
  5645. after the basic block scheduling passes.
  5646. @item -fdump-rtl-ree
  5647. @opindex fdump-rtl-ree
  5648. Dump after sign/zero extension elimination.
  5649. @item -fdump-rtl-seqabstr
  5650. @opindex fdump-rtl-seqabstr
  5651. Dump after common sequence discovery.
  5652. @item -fdump-rtl-shorten
  5653. @opindex fdump-rtl-shorten
  5654. Dump after shortening branches.
  5655. @item -fdump-rtl-sibling
  5656. @opindex fdump-rtl-sibling
  5657. Dump after sibling call optimizations.
  5658. @item -fdump-rtl-split1
  5659. @itemx -fdump-rtl-split2
  5660. @itemx -fdump-rtl-split3
  5661. @itemx -fdump-rtl-split4
  5662. @itemx -fdump-rtl-split5
  5663. @opindex fdump-rtl-split1
  5664. @opindex fdump-rtl-split2
  5665. @opindex fdump-rtl-split3
  5666. @opindex fdump-rtl-split4
  5667. @opindex fdump-rtl-split5
  5668. These options enable dumping after five rounds of
  5669. instruction splitting.
  5670. @item -fdump-rtl-sms
  5671. @opindex fdump-rtl-sms
  5672. Dump after modulo scheduling. This pass is only run on some
  5673. architectures.
  5674. @item -fdump-rtl-stack
  5675. @opindex fdump-rtl-stack
  5676. Dump after conversion from GCC's ``flat register file'' registers to the
  5677. x87's stack-like registers. This pass is only run on x86 variants.
  5678. @item -fdump-rtl-subreg1
  5679. @itemx -fdump-rtl-subreg2
  5680. @opindex fdump-rtl-subreg1
  5681. @opindex fdump-rtl-subreg2
  5682. @option{-fdump-rtl-subreg1} and @option{-fdump-rtl-subreg2} enable dumping after
  5683. the two subreg expansion passes.
  5684. @item -fdump-rtl-unshare
  5685. @opindex fdump-rtl-unshare
  5686. Dump after all rtl has been unshared.
  5687. @item -fdump-rtl-vartrack
  5688. @opindex fdump-rtl-vartrack
  5689. Dump after variable tracking.
  5690. @item -fdump-rtl-vregs
  5691. @opindex fdump-rtl-vregs
  5692. Dump after converting virtual registers to hard registers.
  5693. @item -fdump-rtl-web
  5694. @opindex fdump-rtl-web
  5695. Dump after live range splitting.
  5696. @item -fdump-rtl-regclass
  5697. @itemx -fdump-rtl-subregs_of_mode_init
  5698. @itemx -fdump-rtl-subregs_of_mode_finish
  5699. @itemx -fdump-rtl-dfinit
  5700. @itemx -fdump-rtl-dfinish
  5701. @opindex fdump-rtl-regclass
  5702. @opindex fdump-rtl-subregs_of_mode_init
  5703. @opindex fdump-rtl-subregs_of_mode_finish
  5704. @opindex fdump-rtl-dfinit
  5705. @opindex fdump-rtl-dfinish
  5706. These dumps are defined but always produce empty files.
  5707. @item -da
  5708. @itemx -fdump-rtl-all
  5709. @opindex da
  5710. @opindex fdump-rtl-all
  5711. Produce all the dumps listed above.
  5712. @item -dA
  5713. @opindex dA
  5714. Annotate the assembler output with miscellaneous debugging information.
  5715. @item -dD
  5716. @opindex dD
  5717. Dump all macro definitions, at the end of preprocessing, in addition to
  5718. normal output.
  5719. @item -dH
  5720. @opindex dH
  5721. Produce a core dump whenever an error occurs.
  5722. @item -dp
  5723. @opindex dp
  5724. Annotate the assembler output with a comment indicating which
  5725. pattern and alternative is used. The length of each instruction is
  5726. also printed.
  5727. @item -dP
  5728. @opindex dP
  5729. Dump the RTL in the assembler output as a comment before each instruction.
  5730. Also turns on @option{-dp} annotation.
  5731. @item -dx
  5732. @opindex dx
  5733. Just generate RTL for a function instead of compiling it. Usually used
  5734. with @option{-fdump-rtl-expand}.
  5735. @end table
  5736. @item -fdump-noaddr
  5737. @opindex fdump-noaddr
  5738. When doing debugging dumps, suppress address output. This makes it more
  5739. feasible to use diff on debugging dumps for compiler invocations with
  5740. different compiler binaries and/or different
  5741. text / bss / data / heap / stack / dso start locations.
  5742. @item -freport-bug
  5743. @opindex freport-bug
  5744. Collect and dump debug information into temporary file if ICE in C/C++
  5745. compiler occured.
  5746. @item -fdump-unnumbered
  5747. @opindex fdump-unnumbered
  5748. When doing debugging dumps, suppress instruction numbers and address output.
  5749. This makes it more feasible to use diff on debugging dumps for compiler
  5750. invocations with different options, in particular with and without
  5751. @option{-g}.
  5752. @item -fdump-unnumbered-links
  5753. @opindex fdump-unnumbered-links
  5754. When doing debugging dumps (see @option{-d} option above), suppress
  5755. instruction numbers for the links to the previous and next instructions
  5756. in a sequence.
  5757. @item -fdump-translation-unit @r{(C++ only)}
  5758. @itemx -fdump-translation-unit-@var{options} @r{(C++ only)}
  5759. @opindex fdump-translation-unit
  5760. Dump a representation of the tree structure for the entire translation
  5761. unit to a file. The file name is made by appending @file{.tu} to the
  5762. source file name, and the file is created in the same directory as the
  5763. output file. If the @samp{-@var{options}} form is used, @var{options}
  5764. controls the details of the dump as described for the
  5765. @option{-fdump-tree} options.
  5766. @item -fdump-class-hierarchy @r{(C++ only)}
  5767. @itemx -fdump-class-hierarchy-@var{options} @r{(C++ only)}
  5768. @opindex fdump-class-hierarchy
  5769. Dump a representation of each class's hierarchy and virtual function
  5770. table layout to a file. The file name is made by appending
  5771. @file{.class} to the source file name, and the file is created in the
  5772. same directory as the output file. If the @samp{-@var{options}} form
  5773. is used, @var{options} controls the details of the dump as described
  5774. for the @option{-fdump-tree} options.
  5775. @item -fdump-ipa-@var{switch}
  5776. @opindex fdump-ipa
  5777. Control the dumping at various stages of inter-procedural analysis
  5778. language tree to a file. The file name is generated by appending a
  5779. switch specific suffix to the source file name, and the file is created
  5780. in the same directory as the output file. The following dumps are
  5781. possible:
  5782. @table @samp
  5783. @item all
  5784. Enables all inter-procedural analysis dumps.
  5785. @item cgraph
  5786. Dumps information about call-graph optimization, unused function removal,
  5787. and inlining decisions.
  5788. @item inline
  5789. Dump after function inlining.
  5790. @end table
  5791. @item -fdump-passes
  5792. @opindex fdump-passes
  5793. Dump the list of optimization passes that are turned on and off by
  5794. the current command-line options.
  5795. @item -fdump-statistics-@var{option}
  5796. @opindex fdump-statistics
  5797. Enable and control dumping of pass statistics in a separate file. The
  5798. file name is generated by appending a suffix ending in
  5799. @samp{.statistics} to the source file name, and the file is created in
  5800. the same directory as the output file. If the @samp{-@var{option}}
  5801. form is used, @samp{-stats} causes counters to be summed over the
  5802. whole compilation unit while @samp{-details} dumps every event as
  5803. the passes generate them. The default with no option is to sum
  5804. counters for each function compiled.
  5805. @item -fdump-tree-@var{switch}
  5806. @itemx -fdump-tree-@var{switch}-@var{options}
  5807. @itemx -fdump-tree-@var{switch}-@var{options}=@var{filename}
  5808. @opindex fdump-tree
  5809. Control the dumping at various stages of processing the intermediate
  5810. language tree to a file. The file name is generated by appending a
  5811. switch-specific suffix to the source file name, and the file is
  5812. created in the same directory as the output file. In case of
  5813. @option{=@var{filename}} option, the dump is output on the given file
  5814. instead of the auto named dump files. If the @samp{-@var{options}}
  5815. form is used, @var{options} is a list of @samp{-} separated options
  5816. which control the details of the dump. Not all options are applicable
  5817. to all dumps; those that are not meaningful are ignored. The
  5818. following options are available
  5819. @table @samp
  5820. @item address
  5821. Print the address of each node. Usually this is not meaningful as it
  5822. changes according to the environment and source file. Its primary use
  5823. is for tying up a dump file with a debug environment.
  5824. @item asmname
  5825. If @code{DECL_ASSEMBLER_NAME} has been set for a given decl, use that
  5826. in the dump instead of @code{DECL_NAME}. Its primary use is ease of
  5827. use working backward from mangled names in the assembly file.
  5828. @item slim
  5829. When dumping front-end intermediate representations, inhibit dumping
  5830. of members of a scope or body of a function merely because that scope
  5831. has been reached. Only dump such items when they are directly reachable
  5832. by some other path.
  5833. When dumping pretty-printed trees, this option inhibits dumping the
  5834. bodies of control structures.
  5835. When dumping RTL, print the RTL in slim (condensed) form instead of
  5836. the default LISP-like representation.
  5837. @item raw
  5838. Print a raw representation of the tree. By default, trees are
  5839. pretty-printed into a C-like representation.
  5840. @item details
  5841. Enable more detailed dumps (not honored by every dump option). Also
  5842. include information from the optimization passes.
  5843. @item stats
  5844. Enable dumping various statistics about the pass (not honored by every dump
  5845. option).
  5846. @item blocks
  5847. Enable showing basic block boundaries (disabled in raw dumps).
  5848. @item graph
  5849. For each of the other indicated dump files (@option{-fdump-rtl-@var{pass}}),
  5850. dump a representation of the control flow graph suitable for viewing with
  5851. GraphViz to @file{@var{file}.@var{passid}.@var{pass}.dot}. Each function in
  5852. the file is pretty-printed as a subgraph, so that GraphViz can render them
  5853. all in a single plot.
  5854. This option currently only works for RTL dumps, and the RTL is always
  5855. dumped in slim form.
  5856. @item vops
  5857. Enable showing virtual operands for every statement.
  5858. @item lineno
  5859. Enable showing line numbers for statements.
  5860. @item uid
  5861. Enable showing the unique ID (@code{DECL_UID}) for each variable.
  5862. @item verbose
  5863. Enable showing the tree dump for each statement.
  5864. @item eh
  5865. Enable showing the EH region number holding each statement.
  5866. @item scev
  5867. Enable showing scalar evolution analysis details.
  5868. @item optimized
  5869. Enable showing optimization information (only available in certain
  5870. passes).
  5871. @item missed
  5872. Enable showing missed optimization information (only available in certain
  5873. passes).
  5874. @item note
  5875. Enable other detailed optimization information (only available in
  5876. certain passes).
  5877. @item =@var{filename}
  5878. Instead of an auto named dump file, output into the given file
  5879. name. The file names @file{stdout} and @file{stderr} are treated
  5880. specially and are considered already open standard streams. For
  5881. example,
  5882. @smallexample
  5883. gcc -O2 -ftree-vectorize -fdump-tree-vect-blocks=foo.dump
  5884. -fdump-tree-pre=stderr file.c
  5885. @end smallexample
  5886. outputs vectorizer dump into @file{foo.dump}, while the PRE dump is
  5887. output on to @file{stderr}. If two conflicting dump filenames are
  5888. given for the same pass, then the latter option overrides the earlier
  5889. one.
  5890. @item all
  5891. Turn on all options, except @option{raw}, @option{slim}, @option{verbose}
  5892. and @option{lineno}.
  5893. @item optall
  5894. Turn on all optimization options, i.e., @option{optimized},
  5895. @option{missed}, and @option{note}.
  5896. @end table
  5897. The following tree dumps are possible:
  5898. @table @samp
  5899. @item original
  5900. @opindex fdump-tree-original
  5901. Dump before any tree based optimization, to @file{@var{file}.original}.
  5902. @item optimized
  5903. @opindex fdump-tree-optimized
  5904. Dump after all tree based optimization, to @file{@var{file}.optimized}.
  5905. @item gimple
  5906. @opindex fdump-tree-gimple
  5907. Dump each function before and after the gimplification pass to a file. The
  5908. file name is made by appending @file{.gimple} to the source file name.
  5909. @item cfg
  5910. @opindex fdump-tree-cfg
  5911. Dump the control flow graph of each function to a file. The file name is
  5912. made by appending @file{.cfg} to the source file name.
  5913. @item ch
  5914. @opindex fdump-tree-ch
  5915. Dump each function after copying loop headers. The file name is made by
  5916. appending @file{.ch} to the source file name.
  5917. @item ssa
  5918. @opindex fdump-tree-ssa
  5919. Dump SSA related information to a file. The file name is made by appending
  5920. @file{.ssa} to the source file name.
  5921. @item alias
  5922. @opindex fdump-tree-alias
  5923. Dump aliasing information for each function. The file name is made by
  5924. appending @file{.alias} to the source file name.
  5925. @item ccp
  5926. @opindex fdump-tree-ccp
  5927. Dump each function after CCP@. The file name is made by appending
  5928. @file{.ccp} to the source file name.
  5929. @item storeccp
  5930. @opindex fdump-tree-storeccp
  5931. Dump each function after STORE-CCP@. The file name is made by appending
  5932. @file{.storeccp} to the source file name.
  5933. @item pre
  5934. @opindex fdump-tree-pre
  5935. Dump trees after partial redundancy elimination. The file name is made
  5936. by appending @file{.pre} to the source file name.
  5937. @item fre
  5938. @opindex fdump-tree-fre
  5939. Dump trees after full redundancy elimination. The file name is made
  5940. by appending @file{.fre} to the source file name.
  5941. @item copyprop
  5942. @opindex fdump-tree-copyprop
  5943. Dump trees after copy propagation. The file name is made
  5944. by appending @file{.copyprop} to the source file name.
  5945. @item store_copyprop
  5946. @opindex fdump-tree-store_copyprop
  5947. Dump trees after store copy-propagation. The file name is made
  5948. by appending @file{.store_copyprop} to the source file name.
  5949. @item dce
  5950. @opindex fdump-tree-dce
  5951. Dump each function after dead code elimination. The file name is made by
  5952. appending @file{.dce} to the source file name.
  5953. @item sra
  5954. @opindex fdump-tree-sra
  5955. Dump each function after performing scalar replacement of aggregates. The
  5956. file name is made by appending @file{.sra} to the source file name.
  5957. @item sink
  5958. @opindex fdump-tree-sink
  5959. Dump each function after performing code sinking. The file name is made
  5960. by appending @file{.sink} to the source file name.
  5961. @item dom
  5962. @opindex fdump-tree-dom
  5963. Dump each function after applying dominator tree optimizations. The file
  5964. name is made by appending @file{.dom} to the source file name.
  5965. @item dse
  5966. @opindex fdump-tree-dse
  5967. Dump each function after applying dead store elimination. The file
  5968. name is made by appending @file{.dse} to the source file name.
  5969. @item phiopt
  5970. @opindex fdump-tree-phiopt
  5971. Dump each function after optimizing PHI nodes into straightline code. The file
  5972. name is made by appending @file{.phiopt} to the source file name.
  5973. @item forwprop
  5974. @opindex fdump-tree-forwprop
  5975. Dump each function after forward propagating single use variables. The file
  5976. name is made by appending @file{.forwprop} to the source file name.
  5977. @item copyrename
  5978. @opindex fdump-tree-copyrename
  5979. Dump each function after applying the copy rename optimization. The file
  5980. name is made by appending @file{.copyrename} to the source file name.
  5981. @item nrv
  5982. @opindex fdump-tree-nrv
  5983. Dump each function after applying the named return value optimization on
  5984. generic trees. The file name is made by appending @file{.nrv} to the source
  5985. file name.
  5986. @item vect
  5987. @opindex fdump-tree-vect
  5988. Dump each function after applying vectorization of loops. The file name is
  5989. made by appending @file{.vect} to the source file name.
  5990. @item slp
  5991. @opindex fdump-tree-slp
  5992. Dump each function after applying vectorization of basic blocks. The file name
  5993. is made by appending @file{.slp} to the source file name.
  5994. @item vrp
  5995. @opindex fdump-tree-vrp
  5996. Dump each function after Value Range Propagation (VRP). The file name
  5997. is made by appending @file{.vrp} to the source file name.
  5998. @item all
  5999. @opindex fdump-tree-all
  6000. Enable all the available tree dumps with the flags provided in this option.
  6001. @end table
  6002. @item -fopt-info
  6003. @itemx -fopt-info-@var{options}
  6004. @itemx -fopt-info-@var{options}=@var{filename}
  6005. @opindex fopt-info
  6006. Controls optimization dumps from various optimization passes. If the
  6007. @samp{-@var{options}} form is used, @var{options} is a list of
  6008. @samp{-} separated option keywords to select the dump details and
  6009. optimizations.
  6010. The @var{options} can be divided into two groups: options describing the
  6011. verbosity of the dump, and options describing which optimizations
  6012. should be included. The options from both the groups can be freely
  6013. mixed as they are non-overlapping. However, in case of any conflicts,
  6014. the later options override the earlier options on the command
  6015. line.
  6016. The following options control the dump verbosity:
  6017. @table @samp
  6018. @item optimized
  6019. Print information when an optimization is successfully applied. It is
  6020. up to a pass to decide which information is relevant. For example, the
  6021. vectorizer passes print the source location of loops which are
  6022. successfully vectorized.
  6023. @item missed
  6024. Print information about missed optimizations. Individual passes
  6025. control which information to include in the output.
  6026. @item note
  6027. Print verbose information about optimizations, such as certain
  6028. transformations, more detailed messages about decisions etc.
  6029. @item all
  6030. Print detailed optimization information. This includes
  6031. @samp{optimized}, @samp{missed}, and @samp{note}.
  6032. @end table
  6033. One or more of the following option keywords can be used to describe a
  6034. group of optimizations:
  6035. @table @samp
  6036. @item ipa
  6037. Enable dumps from all interprocedural optimizations.
  6038. @item loop
  6039. Enable dumps from all loop optimizations.
  6040. @item inline
  6041. Enable dumps from all inlining optimizations.
  6042. @item vec
  6043. Enable dumps from all vectorization optimizations.
  6044. @item optall
  6045. Enable dumps from all optimizations. This is a superset of
  6046. the optimization groups listed above.
  6047. @end table
  6048. If @var{options} is
  6049. omitted, it defaults to @samp{optimized-optall}, which means to dump all
  6050. info about successful optimizations from all the passes.
  6051. If the @var{filename} is provided, then the dumps from all the
  6052. applicable optimizations are concatenated into the @var{filename}.
  6053. Otherwise the dump is output onto @file{stderr}. Though multiple
  6054. @option{-fopt-info} options are accepted, only one of them can include
  6055. a @var{filename}. If other filenames are provided then all but the
  6056. first such option are ignored.
  6057. Note that the output @var{filename} is overwritten
  6058. in case of multiple translation units. If a combined output from
  6059. multiple translation units is desired, @file{stderr} should be used
  6060. instead.
  6061. In the following example, the optimization info is output to
  6062. @file{stderr}:
  6063. @smallexample
  6064. gcc -O3 -fopt-info
  6065. @end smallexample
  6066. This example:
  6067. @smallexample
  6068. gcc -O3 -fopt-info-missed=missed.all
  6069. @end smallexample
  6070. @noindent
  6071. outputs missed optimization report from all the passes into
  6072. @file{missed.all}, and this one:
  6073. @smallexample
  6074. gcc -O2 -ftree-vectorize -fopt-info-vec-missed
  6075. @end smallexample
  6076. @noindent
  6077. prints information about missed optimization opportunities from
  6078. vectorization passes on @file{stderr}.
  6079. Note that @option{-fopt-info-vec-missed} is equivalent to
  6080. @option{-fopt-info-missed-vec}.
  6081. As another example,
  6082. @smallexample
  6083. gcc -O3 -fopt-info-inline-optimized-missed=inline.txt
  6084. @end smallexample
  6085. @noindent
  6086. outputs information about missed optimizations as well as
  6087. optimized locations from all the inlining passes into
  6088. @file{inline.txt}.
  6089. Finally, consider:
  6090. @smallexample
  6091. gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt
  6092. @end smallexample
  6093. @noindent
  6094. Here the two output filenames @file{vec.miss} and @file{loop.opt} are
  6095. in conflict since only one output file is allowed. In this case, only
  6096. the first option takes effect and the subsequent options are
  6097. ignored. Thus only @file{vec.miss} is produced which contains
  6098. dumps from the vectorizer about missed opportunities.
  6099. @item -frandom-seed=@var{number}
  6100. @opindex frandom-seed
  6101. This option provides a seed that GCC uses in place of
  6102. random numbers in generating certain symbol names
  6103. that have to be different in every compiled file. It is also used to
  6104. place unique stamps in coverage data files and the object files that
  6105. produce them. You can use the @option{-frandom-seed} option to produce
  6106. reproducibly identical object files.
  6107. The @var{number} should be different for every file you compile.
  6108. @item -fsched-verbose=@var{n}
  6109. @opindex fsched-verbose
  6110. On targets that use instruction scheduling, this option controls the
  6111. amount of debugging output the scheduler prints. This information is
  6112. written to standard error, unless @option{-fdump-rtl-sched1} or
  6113. @option{-fdump-rtl-sched2} is specified, in which case it is output
  6114. to the usual dump listing file, @file{.sched1} or @file{.sched2}
  6115. respectively. However for @var{n} greater than nine, the output is
  6116. always printed to standard error.
  6117. For @var{n} greater than zero, @option{-fsched-verbose} outputs the
  6118. same information as @option{-fdump-rtl-sched1} and @option{-fdump-rtl-sched2}.
  6119. For @var{n} greater than one, it also output basic block probabilities,
  6120. detailed ready list information and unit/insn info. For @var{n} greater
  6121. than two, it includes RTL at abort point, control-flow and regions info.
  6122. And for @var{n} over four, @option{-fsched-verbose} also includes
  6123. dependence info.
  6124. @item -save-temps
  6125. @itemx -save-temps=cwd
  6126. @opindex save-temps
  6127. Store the usual ``temporary'' intermediate files permanently; place them
  6128. in the current directory and name them based on the source file. Thus,
  6129. compiling @file{foo.c} with @option{-c -save-temps} produces files
  6130. @file{foo.i} and @file{foo.s}, as well as @file{foo.o}. This creates a
  6131. preprocessed @file{foo.i} output file even though the compiler now
  6132. normally uses an integrated preprocessor.
  6133. When used in combination with the @option{-x} command-line option,
  6134. @option{-save-temps} is sensible enough to avoid over writing an
  6135. input source file with the same extension as an intermediate file.
  6136. The corresponding intermediate file may be obtained by renaming the
  6137. source file before using @option{-save-temps}.
  6138. If you invoke GCC in parallel, compiling several different source
  6139. files that share a common base name in different subdirectories or the
  6140. same source file compiled for multiple output destinations, it is
  6141. likely that the different parallel compilers will interfere with each
  6142. other, and overwrite the temporary files. For instance:
  6143. @smallexample
  6144. gcc -save-temps -o outdir1/foo.o indir1/foo.c&
  6145. gcc -save-temps -o outdir2/foo.o indir2/foo.c&
  6146. @end smallexample
  6147. may result in @file{foo.i} and @file{foo.o} being written to
  6148. simultaneously by both compilers.
  6149. @item -save-temps=obj
  6150. @opindex save-temps=obj
  6151. Store the usual ``temporary'' intermediate files permanently. If the
  6152. @option{-o} option is used, the temporary files are based on the
  6153. object file. If the @option{-o} option is not used, the
  6154. @option{-save-temps=obj} switch behaves like @option{-save-temps}.
  6155. For example:
  6156. @smallexample
  6157. gcc -save-temps=obj -c foo.c
  6158. gcc -save-temps=obj -c bar.c -o dir/xbar.o
  6159. gcc -save-temps=obj foobar.c -o dir2/yfoobar
  6160. @end smallexample
  6161. @noindent
  6162. creates @file{foo.i}, @file{foo.s}, @file{dir/xbar.i},
  6163. @file{dir/xbar.s}, @file{dir2/yfoobar.i}, @file{dir2/yfoobar.s}, and
  6164. @file{dir2/yfoobar.o}.
  6165. @item -time@r{[}=@var{file}@r{]}
  6166. @opindex time
  6167. Report the CPU time taken by each subprocess in the compilation
  6168. sequence. For C source files, this is the compiler proper and assembler
  6169. (plus the linker if linking is done).
  6170. Without the specification of an output file, the output looks like this:
  6171. @smallexample
  6172. # cc1 0.12 0.01
  6173. # as 0.00 0.01
  6174. @end smallexample
  6175. The first number on each line is the ``user time'', that is time spent
  6176. executing the program itself. The second number is ``system time'',
  6177. time spent executing operating system routines on behalf of the program.
  6178. Both numbers are in seconds.
  6179. With the specification of an output file, the output is appended to the
  6180. named file, and it looks like this:
  6181. @smallexample
  6182. 0.12 0.01 cc1 @var{options}
  6183. 0.00 0.01 as @var{options}
  6184. @end smallexample
  6185. The ``user time'' and the ``system time'' are moved before the program
  6186. name, and the options passed to the program are displayed, so that one
  6187. can later tell what file was being compiled, and with which options.
  6188. @item -fvar-tracking
  6189. @opindex fvar-tracking
  6190. Run variable tracking pass. It computes where variables are stored at each
  6191. position in code. Better debugging information is then generated
  6192. (if the debugging information format supports this information).
  6193. It is enabled by default when compiling with optimization (@option{-Os},
  6194. @option{-O}, @option{-O2}, @dots{}), debugging information (@option{-g}) and
  6195. the debug info format supports it.
  6196. @item -fvar-tracking-assignments
  6197. @opindex fvar-tracking-assignments
  6198. @opindex fno-var-tracking-assignments
  6199. Annotate assignments to user variables early in the compilation and
  6200. attempt to carry the annotations over throughout the compilation all the
  6201. way to the end, in an attempt to improve debug information while
  6202. optimizing. Use of @option{-gdwarf-4} is recommended along with it.
  6203. It can be enabled even if var-tracking is disabled, in which case
  6204. annotations are created and maintained, but discarded at the end.
  6205. By default, this flag is enabled together with @option{-fvar-tracking},
  6206. except when selective scheduling is enabled.
  6207. @item -fvar-tracking-assignments-toggle
  6208. @opindex fvar-tracking-assignments-toggle
  6209. @opindex fno-var-tracking-assignments-toggle
  6210. Toggle @option{-fvar-tracking-assignments}, in the same way that
  6211. @option{-gtoggle} toggles @option{-g}.
  6212. @item -print-file-name=@var{library}
  6213. @opindex print-file-name
  6214. Print the full absolute name of the library file @var{library} that
  6215. would be used when linking---and don't do anything else. With this
  6216. option, GCC does not compile or link anything; it just prints the
  6217. file name.
  6218. @item -print-multi-directory
  6219. @opindex print-multi-directory
  6220. Print the directory name corresponding to the multilib selected by any
  6221. other switches present in the command line. This directory is supposed
  6222. to exist in @env{GCC_EXEC_PREFIX}.
  6223. @item -print-multi-lib
  6224. @opindex print-multi-lib
  6225. Print the mapping from multilib directory names to compiler switches
  6226. that enable them. The directory name is separated from the switches by
  6227. @samp{;}, and each switch starts with an @samp{@@} instead of the
  6228. @samp{-}, without spaces between multiple switches. This is supposed to
  6229. ease shell processing.
  6230. @item -print-multi-os-directory
  6231. @opindex print-multi-os-directory
  6232. Print the path to OS libraries for the selected
  6233. multilib, relative to some @file{lib} subdirectory. If OS libraries are
  6234. present in the @file{lib} subdirectory and no multilibs are used, this is
  6235. usually just @file{.}, if OS libraries are present in @file{lib@var{suffix}}
  6236. sibling directories this prints e.g.@: @file{../lib64}, @file{../lib} or
  6237. @file{../lib32}, or if OS libraries are present in @file{lib/@var{subdir}}
  6238. subdirectories it prints e.g.@: @file{amd64}, @file{sparcv9} or @file{ev6}.
  6239. @item -print-multiarch
  6240. @opindex print-multiarch
  6241. Print the path to OS libraries for the selected multiarch,
  6242. relative to some @file{lib} subdirectory.
  6243. @item -print-prog-name=@var{program}
  6244. @opindex print-prog-name
  6245. Like @option{-print-file-name}, but searches for a program such as @command{cpp}.
  6246. @item -print-libgcc-file-name
  6247. @opindex print-libgcc-file-name
  6248. Same as @option{-print-file-name=libgcc.a}.
  6249. This is useful when you use @option{-nostdlib} or @option{-nodefaultlibs}
  6250. but you do want to link with @file{libgcc.a}. You can do:
  6251. @smallexample
  6252. gcc -nostdlib @var{files}@dots{} `gcc -print-libgcc-file-name`
  6253. @end smallexample
  6254. @item -print-search-dirs
  6255. @opindex print-search-dirs
  6256. Print the name of the configured installation directory and a list of
  6257. program and library directories @command{gcc} searches---and don't do anything else.
  6258. This is useful when @command{gcc} prints the error message
  6259. @samp{installation problem, cannot exec cpp0: No such file or directory}.
  6260. To resolve this you either need to put @file{cpp0} and the other compiler
  6261. components where @command{gcc} expects to find them, or you can set the environment
  6262. variable @env{GCC_EXEC_PREFIX} to the directory where you installed them.
  6263. Don't forget the trailing @samp{/}.
  6264. @xref{Environment Variables}.
  6265. @item -print-sysroot
  6266. @opindex print-sysroot
  6267. Print the target sysroot directory that is used during
  6268. compilation. This is the target sysroot specified either at configure
  6269. time or using the @option{--sysroot} option, possibly with an extra
  6270. suffix that depends on compilation options. If no target sysroot is
  6271. specified, the option prints nothing.
  6272. @item -print-sysroot-headers-suffix
  6273. @opindex print-sysroot-headers-suffix
  6274. Print the suffix added to the target sysroot when searching for
  6275. headers, or give an error if the compiler is not configured with such
  6276. a suffix---and don't do anything else.
  6277. @item -dumpmachine
  6278. @opindex dumpmachine
  6279. Print the compiler's target machine (for example,
  6280. @samp{i686-pc-linux-gnu})---and don't do anything else.
  6281. @item -dumpversion
  6282. @opindex dumpversion
  6283. Print the compiler version (for example, @code{3.0})---and don't do
  6284. anything else.
  6285. @item -dumpspecs
  6286. @opindex dumpspecs
  6287. Print the compiler's built-in specs---and don't do anything else. (This
  6288. is used when GCC itself is being built.) @xref{Spec Files}.
  6289. @item -fno-eliminate-unused-debug-types
  6290. @opindex feliminate-unused-debug-types
  6291. @opindex fno-eliminate-unused-debug-types
  6292. Normally, when producing DWARF 2 output, GCC avoids producing debug symbol
  6293. output for types that are nowhere used in the source file being compiled.
  6294. Sometimes it is useful to have GCC emit debugging
  6295. information for all types declared in a compilation
  6296. unit, regardless of whether or not they are actually used
  6297. in that compilation unit, for example
  6298. if, in the debugger, you want to cast a value to a type that is
  6299. not actually used in your program (but is declared). More often,
  6300. however, this results in a significant amount of wasted space.
  6301. @end table
  6302. @node Optimize Options
  6303. @section Options That Control Optimization
  6304. @cindex optimize options
  6305. @cindex options, optimization
  6306. These options control various sorts of optimizations.
  6307. Without any optimization option, the compiler's goal is to reduce the
  6308. cost of compilation and to make debugging produce the expected
  6309. results. Statements are independent: if you stop the program with a
  6310. breakpoint between statements, you can then assign a new value to any
  6311. variable or change the program counter to any other statement in the
  6312. function and get exactly the results you expect from the source
  6313. code.
  6314. Turning on optimization flags makes the compiler attempt to improve
  6315. the performance and/or code size at the expense of compilation time
  6316. and possibly the ability to debug the program.
  6317. The compiler performs optimization based on the knowledge it has of the
  6318. program. Compiling multiple files at once to a single output file mode allows
  6319. the compiler to use information gained from all of the files when compiling
  6320. each of them.
  6321. Not all optimizations are controlled directly by a flag. Only
  6322. optimizations that have a flag are listed in this section.
  6323. Most optimizations are only enabled if an @option{-O} level is set on
  6324. the command line. Otherwise they are disabled, even if individual
  6325. optimization flags are specified.
  6326. Depending on the target and how GCC was configured, a slightly different
  6327. set of optimizations may be enabled at each @option{-O} level than
  6328. those listed here. You can invoke GCC with @option{-Q --help=optimizers}
  6329. to find out the exact set of optimizations that are enabled at each level.
  6330. @xref{Overall Options}, for examples.
  6331. @table @gcctabopt
  6332. @item -O
  6333. @itemx -O1
  6334. @opindex O
  6335. @opindex O1
  6336. Optimize. Optimizing compilation takes somewhat more time, and a lot
  6337. more memory for a large function.
  6338. With @option{-O}, the compiler tries to reduce code size and execution
  6339. time, without performing any optimizations that take a great deal of
  6340. compilation time.
  6341. @option{-O} turns on the following optimization flags:
  6342. @gccoptlist{
  6343. -fauto-inc-dec @gol
  6344. -fbranch-count-reg @gol
  6345. -fcombine-stack-adjustments @gol
  6346. -fcompare-elim @gol
  6347. -fcprop-registers @gol
  6348. -fdce @gol
  6349. -fdefer-pop @gol
  6350. -fdelayed-branch @gol
  6351. -fdse @gol
  6352. -fforward-propagate @gol
  6353. -fguess-branch-probability @gol
  6354. -fif-conversion2 @gol
  6355. -fif-conversion @gol
  6356. -finline-functions-called-once @gol
  6357. -fipa-pure-const @gol
  6358. -fipa-profile @gol
  6359. -fipa-reference @gol
  6360. -fmerge-constants @gol
  6361. -fmove-loop-invariants @gol
  6362. -fshrink-wrap @gol
  6363. -fsplit-wide-types @gol
  6364. -ftree-bit-ccp @gol
  6365. -ftree-ccp @gol
  6366. -fssa-phiopt @gol
  6367. -ftree-ch @gol
  6368. -ftree-copy-prop @gol
  6369. -ftree-copyrename @gol
  6370. -ftree-dce @gol
  6371. -ftree-dominator-opts @gol
  6372. -ftree-dse @gol
  6373. -ftree-forwprop @gol
  6374. -ftree-fre @gol
  6375. -ftree-phiprop @gol
  6376. -ftree-sink @gol
  6377. -ftree-slsr @gol
  6378. -ftree-sra @gol
  6379. -ftree-pta @gol
  6380. -ftree-ter @gol
  6381. -funit-at-a-time}
  6382. @option{-O} also turns on @option{-fomit-frame-pointer} on machines
  6383. where doing so does not interfere with debugging.
  6384. @item -O2
  6385. @opindex O2
  6386. Optimize even more. GCC performs nearly all supported optimizations
  6387. that do not involve a space-speed tradeoff.
  6388. As compared to @option{-O}, this option increases both compilation time
  6389. and the performance of the generated code.
  6390. @option{-O2} turns on all optimization flags specified by @option{-O}. It
  6391. also turns on the following optimization flags:
  6392. @gccoptlist{-fthread-jumps @gol
  6393. -falign-functions -falign-jumps @gol
  6394. -falign-loops -falign-labels @gol
  6395. -fcaller-saves @gol
  6396. -fcrossjumping @gol
  6397. -fcse-follow-jumps -fcse-skip-blocks @gol
  6398. -fdelete-null-pointer-checks @gol
  6399. -fdevirtualize -fdevirtualize-speculatively @gol
  6400. -fexpensive-optimizations @gol
  6401. -fgcse -fgcse-lm @gol
  6402. -fhoist-adjacent-loads @gol
  6403. -finline-small-functions @gol
  6404. -findirect-inlining @gol
  6405. -fipa-cp @gol
  6406. -fipa-cp-alignment @gol
  6407. -fipa-sra @gol
  6408. -fipa-icf @gol
  6409. -fisolate-erroneous-paths-dereference @gol
  6410. -flra-remat @gol
  6411. -foptimize-sibling-calls @gol
  6412. -foptimize-strlen @gol
  6413. -fpartial-inlining @gol
  6414. -fpeephole2 @gol
  6415. -freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol
  6416. -frerun-cse-after-loop @gol
  6417. -fsched-interblock -fsched-spec @gol
  6418. -fschedule-insns -fschedule-insns2 @gol
  6419. -fstrict-aliasing -fstrict-overflow @gol
  6420. -ftree-builtin-call-dce @gol
  6421. -ftree-switch-conversion -ftree-tail-merge @gol
  6422. -ftree-pre @gol
  6423. -ftree-vrp @gol
  6424. -fipa-ra}
  6425. Please note the warning under @option{-fgcse} about
  6426. invoking @option{-O2} on programs that use computed gotos.
  6427. @item -O3
  6428. @opindex O3
  6429. Optimize yet more. @option{-O3} turns on all optimizations specified
  6430. by @option{-O2} and also turns on the @option{-finline-functions},
  6431. @option{-funswitch-loops}, @option{-fpredictive-commoning},
  6432. @option{-fgcse-after-reload}, @option{-ftree-loop-vectorize},
  6433. @option{-ftree-loop-distribute-patterns},
  6434. @option{-ftree-slp-vectorize}, @option{-fvect-cost-model},
  6435. @option{-ftree-partial-pre} and @option{-fipa-cp-clone} options.
  6436. @item -O0
  6437. @opindex O0
  6438. Reduce compilation time and make debugging produce the expected
  6439. results. This is the default.
  6440. @item -Os
  6441. @opindex Os
  6442. Optimize for size. @option{-Os} enables all @option{-O2} optimizations that
  6443. do not typically increase code size. It also performs further
  6444. optimizations designed to reduce code size.
  6445. @option{-Os} disables the following optimization flags:
  6446. @gccoptlist{-falign-functions -falign-jumps -falign-loops @gol
  6447. -falign-labels -freorder-blocks -freorder-blocks-and-partition @gol
  6448. -fprefetch-loop-arrays}
  6449. @item -Ofast
  6450. @opindex Ofast
  6451. Disregard strict standards compliance. @option{-Ofast} enables all
  6452. @option{-O3} optimizations. It also enables optimizations that are not
  6453. valid for all standard-compliant programs.
  6454. It turns on @option{-ffast-math} and the Fortran-specific
  6455. @option{-fno-protect-parens} and @option{-fstack-arrays}.
  6456. @item -Og
  6457. @opindex Og
  6458. Optimize debugging experience. @option{-Og} enables optimizations
  6459. that do not interfere with debugging. It should be the optimization
  6460. level of choice for the standard edit-compile-debug cycle, offering
  6461. a reasonable level of optimization while maintaining fast compilation
  6462. and a good debugging experience.
  6463. If you use multiple @option{-O} options, with or without level numbers,
  6464. the last such option is the one that is effective.
  6465. @end table
  6466. Options of the form @option{-f@var{flag}} specify machine-independent
  6467. flags. Most flags have both positive and negative forms; the negative
  6468. form of @option{-ffoo} is @option{-fno-foo}. In the table
  6469. below, only one of the forms is listed---the one you typically
  6470. use. You can figure out the other form by either removing @samp{no-}
  6471. or adding it.
  6472. The following options control specific optimizations. They are either
  6473. activated by @option{-O} options or are related to ones that are. You
  6474. can use the following flags in the rare cases when ``fine-tuning'' of
  6475. optimizations to be performed is desired.
  6476. @table @gcctabopt
  6477. @item -fno-defer-pop
  6478. @opindex fno-defer-pop
  6479. Always pop the arguments to each function call as soon as that function
  6480. returns. For machines that must pop arguments after a function call,
  6481. the compiler normally lets arguments accumulate on the stack for several
  6482. function calls and pops them all at once.
  6483. Disabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  6484. @item -fforward-propagate
  6485. @opindex fforward-propagate
  6486. Perform a forward propagation pass on RTL@. The pass tries to combine two
  6487. instructions and checks if the result can be simplified. If loop unrolling
  6488. is active, two passes are performed and the second is scheduled after
  6489. loop unrolling.
  6490. This option is enabled by default at optimization levels @option{-O},
  6491. @option{-O2}, @option{-O3}, @option{-Os}.
  6492. @item -ffp-contract=@var{style}
  6493. @opindex ffp-contract
  6494. @option{-ffp-contract=off} disables floating-point expression contraction.
  6495. @option{-ffp-contract=fast} enables floating-point expression contraction
  6496. such as forming of fused multiply-add operations if the target has
  6497. native support for them.
  6498. @option{-ffp-contract=on} enables floating-point expression contraction
  6499. if allowed by the language standard. This is currently not implemented
  6500. and treated equal to @option{-ffp-contract=off}.
  6501. The default is @option{-ffp-contract=fast}.
  6502. @item -fomit-frame-pointer
  6503. @opindex fomit-frame-pointer
  6504. Don't keep the frame pointer in a register for functions that
  6505. don't need one. This avoids the instructions to save, set up and
  6506. restore frame pointers; it also makes an extra register available
  6507. in many functions. @strong{It also makes debugging impossible on
  6508. some machines.}
  6509. On some machines, such as the VAX, this flag has no effect, because
  6510. the standard calling sequence automatically handles the frame pointer
  6511. and nothing is saved by pretending it doesn't exist. The
  6512. machine-description macro @code{FRAME_POINTER_REQUIRED} controls
  6513. whether a target machine supports this flag. @xref{Registers,,Register
  6514. Usage, gccint, GNU Compiler Collection (GCC) Internals}.
  6515. The default setting (when not optimizing for
  6516. size) for 32-bit GNU/Linux x86 and 32-bit Darwin x86 targets is
  6517. @option{-fomit-frame-pointer}. You can configure GCC with the
  6518. @option{--enable-frame-pointer} configure option to change the default.
  6519. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  6520. @item -foptimize-sibling-calls
  6521. @opindex foptimize-sibling-calls
  6522. Optimize sibling and tail recursive calls.
  6523. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6524. @item -foptimize-strlen
  6525. @opindex foptimize-strlen
  6526. Optimize various standard C string functions (e.g. @code{strlen},
  6527. @code{strchr} or @code{strcpy}) and
  6528. their @code{_FORTIFY_SOURCE} counterparts into faster alternatives.
  6529. Enabled at levels @option{-O2}, @option{-O3}.
  6530. @item -fno-inline
  6531. @opindex fno-inline
  6532. Do not expand any functions inline apart from those marked with
  6533. the @code{always_inline} attribute. This is the default when not
  6534. optimizing.
  6535. Single functions can be exempted from inlining by marking them
  6536. with the @code{noinline} attribute.
  6537. @item -finline-small-functions
  6538. @opindex finline-small-functions
  6539. Integrate functions into their callers when their body is smaller than expected
  6540. function call code (so overall size of program gets smaller). The compiler
  6541. heuristically decides which functions are simple enough to be worth integrating
  6542. in this way. This inlining applies to all functions, even those not declared
  6543. inline.
  6544. Enabled at level @option{-O2}.
  6545. @item -findirect-inlining
  6546. @opindex findirect-inlining
  6547. Inline also indirect calls that are discovered to be known at compile
  6548. time thanks to previous inlining. This option has any effect only
  6549. when inlining itself is turned on by the @option{-finline-functions}
  6550. or @option{-finline-small-functions} options.
  6551. Enabled at level @option{-O2}.
  6552. @item -finline-functions
  6553. @opindex finline-functions
  6554. Consider all functions for inlining, even if they are not declared inline.
  6555. The compiler heuristically decides which functions are worth integrating
  6556. in this way.
  6557. If all calls to a given function are integrated, and the function is
  6558. declared @code{static}, then the function is normally not output as
  6559. assembler code in its own right.
  6560. Enabled at level @option{-O3}.
  6561. @item -finline-functions-called-once
  6562. @opindex finline-functions-called-once
  6563. Consider all @code{static} functions called once for inlining into their
  6564. caller even if they are not marked @code{inline}. If a call to a given
  6565. function is integrated, then the function is not output as assembler code
  6566. in its own right.
  6567. Enabled at levels @option{-O1}, @option{-O2}, @option{-O3} and @option{-Os}.
  6568. @item -fearly-inlining
  6569. @opindex fearly-inlining
  6570. Inline functions marked by @code{always_inline} and functions whose body seems
  6571. smaller than the function call overhead early before doing
  6572. @option{-fprofile-generate} instrumentation and real inlining pass. Doing so
  6573. makes profiling significantly cheaper and usually inlining faster on programs
  6574. having large chains of nested wrapper functions.
  6575. Enabled by default.
  6576. @item -fipa-sra
  6577. @opindex fipa-sra
  6578. Perform interprocedural scalar replacement of aggregates, removal of
  6579. unused parameters and replacement of parameters passed by reference
  6580. by parameters passed by value.
  6581. Enabled at levels @option{-O2}, @option{-O3} and @option{-Os}.
  6582. @item -finline-limit=@var{n}
  6583. @opindex finline-limit
  6584. By default, GCC limits the size of functions that can be inlined. This flag
  6585. allows coarse control of this limit. @var{n} is the size of functions that
  6586. can be inlined in number of pseudo instructions.
  6587. Inlining is actually controlled by a number of parameters, which may be
  6588. specified individually by using @option{--param @var{name}=@var{value}}.
  6589. The @option{-finline-limit=@var{n}} option sets some of these parameters
  6590. as follows:
  6591. @table @gcctabopt
  6592. @item max-inline-insns-single
  6593. is set to @var{n}/2.
  6594. @item max-inline-insns-auto
  6595. is set to @var{n}/2.
  6596. @end table
  6597. See below for a documentation of the individual
  6598. parameters controlling inlining and for the defaults of these parameters.
  6599. @emph{Note:} there may be no value to @option{-finline-limit} that results
  6600. in default behavior.
  6601. @emph{Note:} pseudo instruction represents, in this particular context, an
  6602. abstract measurement of function's size. In no way does it represent a count
  6603. of assembly instructions and as such its exact meaning might change from one
  6604. release to an another.
  6605. @item -fno-keep-inline-dllexport
  6606. @opindex fno-keep-inline-dllexport
  6607. This is a more fine-grained version of @option{-fkeep-inline-functions},
  6608. which applies only to functions that are declared using the @code{dllexport}
  6609. attribute or declspec (@xref{Function Attributes,,Declaring Attributes of
  6610. Functions}.)
  6611. @item -fkeep-inline-functions
  6612. @opindex fkeep-inline-functions
  6613. In C, emit @code{static} functions that are declared @code{inline}
  6614. into the object file, even if the function has been inlined into all
  6615. of its callers. This switch does not affect functions using the
  6616. @code{extern inline} extension in GNU C90@. In C++, emit any and all
  6617. inline functions into the object file.
  6618. @item -fkeep-static-consts
  6619. @opindex fkeep-static-consts
  6620. Emit variables declared @code{static const} when optimization isn't turned
  6621. on, even if the variables aren't referenced.
  6622. GCC enables this option by default. If you want to force the compiler to
  6623. check if a variable is referenced, regardless of whether or not
  6624. optimization is turned on, use the @option{-fno-keep-static-consts} option.
  6625. @item -fmerge-constants
  6626. @opindex fmerge-constants
  6627. Attempt to merge identical constants (string constants and floating-point
  6628. constants) across compilation units.
  6629. This option is the default for optimized compilation if the assembler and
  6630. linker support it. Use @option{-fno-merge-constants} to inhibit this
  6631. behavior.
  6632. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  6633. @item -fmerge-all-constants
  6634. @opindex fmerge-all-constants
  6635. Attempt to merge identical constants and identical variables.
  6636. This option implies @option{-fmerge-constants}. In addition to
  6637. @option{-fmerge-constants} this considers e.g.@: even constant initialized
  6638. arrays or initialized constant variables with integral or floating-point
  6639. types. Languages like C or C++ require each variable, including multiple
  6640. instances of the same variable in recursive calls, to have distinct locations,
  6641. so using this option results in non-conforming
  6642. behavior.
  6643. @item -fmodulo-sched
  6644. @opindex fmodulo-sched
  6645. Perform swing modulo scheduling immediately before the first scheduling
  6646. pass. This pass looks at innermost loops and reorders their
  6647. instructions by overlapping different iterations.
  6648. @item -fmodulo-sched-allow-regmoves
  6649. @opindex fmodulo-sched-allow-regmoves
  6650. Perform more aggressive SMS-based modulo scheduling with register moves
  6651. allowed. By setting this flag certain anti-dependences edges are
  6652. deleted, which triggers the generation of reg-moves based on the
  6653. life-range analysis. This option is effective only with
  6654. @option{-fmodulo-sched} enabled.
  6655. @item -fno-branch-count-reg
  6656. @opindex fno-branch-count-reg
  6657. Do not use ``decrement and branch'' instructions on a count register,
  6658. but instead generate a sequence of instructions that decrement a
  6659. register, compare it against zero, then branch based upon the result.
  6660. This option is only meaningful on architectures that support such
  6661. instructions, which include x86, PowerPC, IA-64 and S/390.
  6662. Enabled by default at @option{-O1} and higher.
  6663. The default is @option{-fbranch-count-reg}.
  6664. @item -fno-function-cse
  6665. @opindex fno-function-cse
  6666. Do not put function addresses in registers; make each instruction that
  6667. calls a constant function contain the function's address explicitly.
  6668. This option results in less efficient code, but some strange hacks
  6669. that alter the assembler output may be confused by the optimizations
  6670. performed when this option is not used.
  6671. The default is @option{-ffunction-cse}
  6672. @item -fno-zero-initialized-in-bss
  6673. @opindex fno-zero-initialized-in-bss
  6674. If the target supports a BSS section, GCC by default puts variables that
  6675. are initialized to zero into BSS@. This can save space in the resulting
  6676. code.
  6677. This option turns off this behavior because some programs explicitly
  6678. rely on variables going to the data section---e.g., so that the
  6679. resulting executable can find the beginning of that section and/or make
  6680. assumptions based on that.
  6681. The default is @option{-fzero-initialized-in-bss}.
  6682. @item -fthread-jumps
  6683. @opindex fthread-jumps
  6684. Perform optimizations that check to see if a jump branches to a
  6685. location where another comparison subsumed by the first is found. If
  6686. so, the first branch is redirected to either the destination of the
  6687. second branch or a point immediately following it, depending on whether
  6688. the condition is known to be true or false.
  6689. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6690. @item -fsplit-wide-types
  6691. @opindex fsplit-wide-types
  6692. When using a type that occupies multiple registers, such as @code{long
  6693. long} on a 32-bit system, split the registers apart and allocate them
  6694. independently. This normally generates better code for those types,
  6695. but may make debugging more difficult.
  6696. Enabled at levels @option{-O}, @option{-O2}, @option{-O3},
  6697. @option{-Os}.
  6698. @item -fcse-follow-jumps
  6699. @opindex fcse-follow-jumps
  6700. In common subexpression elimination (CSE), scan through jump instructions
  6701. when the target of the jump is not reached by any other path. For
  6702. example, when CSE encounters an @code{if} statement with an
  6703. @code{else} clause, CSE follows the jump when the condition
  6704. tested is false.
  6705. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6706. @item -fcse-skip-blocks
  6707. @opindex fcse-skip-blocks
  6708. This is similar to @option{-fcse-follow-jumps}, but causes CSE to
  6709. follow jumps that conditionally skip over blocks. When CSE
  6710. encounters a simple @code{if} statement with no else clause,
  6711. @option{-fcse-skip-blocks} causes CSE to follow the jump around the
  6712. body of the @code{if}.
  6713. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6714. @item -frerun-cse-after-loop
  6715. @opindex frerun-cse-after-loop
  6716. Re-run common subexpression elimination after loop optimizations are
  6717. performed.
  6718. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6719. @item -fgcse
  6720. @opindex fgcse
  6721. Perform a global common subexpression elimination pass.
  6722. This pass also performs global constant and copy propagation.
  6723. @emph{Note:} When compiling a program using computed gotos, a GCC
  6724. extension, you may get better run-time performance if you disable
  6725. the global common subexpression elimination pass by adding
  6726. @option{-fno-gcse} to the command line.
  6727. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6728. @item -fgcse-lm
  6729. @opindex fgcse-lm
  6730. When @option{-fgcse-lm} is enabled, global common subexpression elimination
  6731. attempts to move loads that are only killed by stores into themselves. This
  6732. allows a loop containing a load/store sequence to be changed to a load outside
  6733. the loop, and a copy/store within the loop.
  6734. Enabled by default when @option{-fgcse} is enabled.
  6735. @item -fgcse-sm
  6736. @opindex fgcse-sm
  6737. When @option{-fgcse-sm} is enabled, a store motion pass is run after
  6738. global common subexpression elimination. This pass attempts to move
  6739. stores out of loops. When used in conjunction with @option{-fgcse-lm},
  6740. loops containing a load/store sequence can be changed to a load before
  6741. the loop and a store after the loop.
  6742. Not enabled at any optimization level.
  6743. @item -fgcse-las
  6744. @opindex fgcse-las
  6745. When @option{-fgcse-las} is enabled, the global common subexpression
  6746. elimination pass eliminates redundant loads that come after stores to the
  6747. same memory location (both partial and full redundancies).
  6748. Not enabled at any optimization level.
  6749. @item -fgcse-after-reload
  6750. @opindex fgcse-after-reload
  6751. When @option{-fgcse-after-reload} is enabled, a redundant load elimination
  6752. pass is performed after reload. The purpose of this pass is to clean up
  6753. redundant spilling.
  6754. @item -faggressive-loop-optimizations
  6755. @opindex faggressive-loop-optimizations
  6756. This option tells the loop optimizer to use language constraints to
  6757. derive bounds for the number of iterations of a loop. This assumes that
  6758. loop code does not invoke undefined behavior by for example causing signed
  6759. integer overflows or out-of-bound array accesses. The bounds for the
  6760. number of iterations of a loop are used to guide loop unrolling and peeling
  6761. and loop exit test optimizations.
  6762. This option is enabled by default.
  6763. @item -funsafe-loop-optimizations
  6764. @opindex funsafe-loop-optimizations
  6765. This option tells the loop optimizer to assume that loop indices do not
  6766. overflow, and that loops with nontrivial exit condition are not
  6767. infinite. This enables a wider range of loop optimizations even if
  6768. the loop optimizer itself cannot prove that these assumptions are valid.
  6769. If you use @option{-Wunsafe-loop-optimizations}, the compiler warns you
  6770. if it finds this kind of loop.
  6771. @item -fcrossjumping
  6772. @opindex fcrossjumping
  6773. Perform cross-jumping transformation.
  6774. This transformation unifies equivalent code and saves code size. The
  6775. resulting code may or may not perform better than without cross-jumping.
  6776. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6777. @item -fauto-inc-dec
  6778. @opindex fauto-inc-dec
  6779. Combine increments or decrements of addresses with memory accesses.
  6780. This pass is always skipped on architectures that do not have
  6781. instructions to support this. Enabled by default at @option{-O} and
  6782. higher on architectures that support this.
  6783. @item -fdce
  6784. @opindex fdce
  6785. Perform dead code elimination (DCE) on RTL@.
  6786. Enabled by default at @option{-O} and higher.
  6787. @item -fdse
  6788. @opindex fdse
  6789. Perform dead store elimination (DSE) on RTL@.
  6790. Enabled by default at @option{-O} and higher.
  6791. @item -fif-conversion
  6792. @opindex fif-conversion
  6793. Attempt to transform conditional jumps into branch-less equivalents. This
  6794. includes use of conditional moves, min, max, set flags and abs instructions, and
  6795. some tricks doable by standard arithmetics. The use of conditional execution
  6796. on chips where it is available is controlled by @option{-fif-conversion2}.
  6797. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  6798. @item -fif-conversion2
  6799. @opindex fif-conversion2
  6800. Use conditional execution (where available) to transform conditional jumps into
  6801. branch-less equivalents.
  6802. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  6803. @item -fdeclone-ctor-dtor
  6804. @opindex fdeclone-ctor-dtor
  6805. The C++ ABI requires multiple entry points for constructors and
  6806. destructors: one for a base subobject, one for a complete object, and
  6807. one for a virtual destructor that calls operator delete afterwards.
  6808. For a hierarchy with virtual bases, the base and complete variants are
  6809. clones, which means two copies of the function. With this option, the
  6810. base and complete variants are changed to be thunks that call a common
  6811. implementation.
  6812. Enabled by @option{-Os}.
  6813. @item -fdelete-null-pointer-checks
  6814. @opindex fdelete-null-pointer-checks
  6815. Assume that programs cannot safely dereference null pointers, and that
  6816. no code or data element resides there. This enables simple constant
  6817. folding optimizations at all optimization levels. In addition, other
  6818. optimization passes in GCC use this flag to control global dataflow
  6819. analyses that eliminate useless checks for null pointers; these assume
  6820. that if a pointer is checked after it has already been dereferenced,
  6821. it cannot be null.
  6822. Note however that in some environments this assumption is not true.
  6823. Use @option{-fno-delete-null-pointer-checks} to disable this optimization
  6824. for programs that depend on that behavior.
  6825. Some targets, especially embedded ones, disable this option at all levels.
  6826. Otherwise it is enabled at all levels: @option{-O0}, @option{-O1},
  6827. @option{-O2}, @option{-O3}, @option{-Os}. Passes that use the information
  6828. are enabled independently at different optimization levels.
  6829. @item -fdevirtualize
  6830. @opindex fdevirtualize
  6831. Attempt to convert calls to virtual functions to direct calls. This
  6832. is done both within a procedure and interprocedurally as part of
  6833. indirect inlining (@option{-findirect-inlining}) and interprocedural constant
  6834. propagation (@option{-fipa-cp}).
  6835. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6836. @item -fdevirtualize-speculatively
  6837. @opindex fdevirtualize-speculatively
  6838. Attempt to convert calls to virtual functions to speculative direct calls.
  6839. Based on the analysis of the type inheritance graph, determine for a given call
  6840. the set of likely targets. If the set is small, preferably of size 1, change
  6841. the call into a conditional deciding between direct and indirect calls. The
  6842. speculative calls enable more optimizations, such as inlining. When they seem
  6843. useless after further optimization, they are converted back into original form.
  6844. @item -fdevirtualize-at-ltrans
  6845. @opindex fdevirtualize-at-ltrans
  6846. Stream extra information needed for aggressive devirtualization when running
  6847. the link-time optimizer in local transformation mode.
  6848. This option enables more devirtualization but
  6849. significantly increases the size of streamed data. For this reason it is
  6850. disabled by default.
  6851. @item -fexpensive-optimizations
  6852. @opindex fexpensive-optimizations
  6853. Perform a number of minor optimizations that are relatively expensive.
  6854. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6855. @item -free
  6856. @opindex free
  6857. Attempt to remove redundant extension instructions. This is especially
  6858. helpful for the x86-64 architecture, which implicitly zero-extends in 64-bit
  6859. registers after writing to their lower 32-bit half.
  6860. Enabled for Alpha, AArch64 and x86 at levels @option{-O2},
  6861. @option{-O3}, @option{-Os}.
  6862. @item -fno-lifetime-dse
  6863. @opindex fno-lifetime-dse
  6864. In C++ the value of an object is only affected by changes within its
  6865. lifetime: when the constructor begins, the object has an indeterminate
  6866. value, and any changes during the lifetime of the object are dead when
  6867. the object is destroyed. Normally dead store elimination will take
  6868. advantage of this; if your code relies on the value of the object
  6869. storage persisting beyond the lifetime of the object, you can use this
  6870. flag to disable this optimization.
  6871. @item -flive-range-shrinkage
  6872. @opindex flive-range-shrinkage
  6873. Attempt to decrease register pressure through register live range
  6874. shrinkage. This is helpful for fast processors with small or moderate
  6875. size register sets.
  6876. @item -fira-algorithm=@var{algorithm}
  6877. @opindex fira-algorithm
  6878. Use the specified coloring algorithm for the integrated register
  6879. allocator. The @var{algorithm} argument can be @samp{priority}, which
  6880. specifies Chow's priority coloring, or @samp{CB}, which specifies
  6881. Chaitin-Briggs coloring. Chaitin-Briggs coloring is not implemented
  6882. for all architectures, but for those targets that do support it, it is
  6883. the default because it generates better code.
  6884. @item -fira-region=@var{region}
  6885. @opindex fira-region
  6886. Use specified regions for the integrated register allocator. The
  6887. @var{region} argument should be one of the following:
  6888. @table @samp
  6889. @item all
  6890. Use all loops as register allocation regions.
  6891. This can give the best results for machines with a small and/or
  6892. irregular register set.
  6893. @item mixed
  6894. Use all loops except for loops with small register pressure
  6895. as the regions. This value usually gives
  6896. the best results in most cases and for most architectures,
  6897. and is enabled by default when compiling with optimization for speed
  6898. (@option{-O}, @option{-O2}, @dots{}).
  6899. @item one
  6900. Use all functions as a single region.
  6901. This typically results in the smallest code size, and is enabled by default for
  6902. @option{-Os} or @option{-O0}.
  6903. @end table
  6904. @item -fira-hoist-pressure
  6905. @opindex fira-hoist-pressure
  6906. Use IRA to evaluate register pressure in the code hoisting pass for
  6907. decisions to hoist expressions. This option usually results in smaller
  6908. code, but it can slow the compiler down.
  6909. This option is enabled at level @option{-Os} for all targets.
  6910. @item -fira-loop-pressure
  6911. @opindex fira-loop-pressure
  6912. Use IRA to evaluate register pressure in loops for decisions to move
  6913. loop invariants. This option usually results in generation
  6914. of faster and smaller code on machines with large register files (>= 32
  6915. registers), but it can slow the compiler down.
  6916. This option is enabled at level @option{-O3} for some targets.
  6917. @item -fno-ira-share-save-slots
  6918. @opindex fno-ira-share-save-slots
  6919. Disable sharing of stack slots used for saving call-used hard
  6920. registers living through a call. Each hard register gets a
  6921. separate stack slot, and as a result function stack frames are
  6922. larger.
  6923. @item -fno-ira-share-spill-slots
  6924. @opindex fno-ira-share-spill-slots
  6925. Disable sharing of stack slots allocated for pseudo-registers. Each
  6926. pseudo-register that does not get a hard register gets a separate
  6927. stack slot, and as a result function stack frames are larger.
  6928. @item -fira-verbose=@var{n}
  6929. @opindex fira-verbose
  6930. Control the verbosity of the dump file for the integrated register allocator.
  6931. The default value is 5. If the value @var{n} is greater or equal to 10,
  6932. the dump output is sent to stderr using the same format as @var{n} minus 10.
  6933. @item -flra-remat
  6934. @opindex flra-remat
  6935. Enable CFG-sensitive rematerialization in LRA. Instead of loading
  6936. values of spilled pseudos, LRA tries to rematerialize (recalculate)
  6937. values if it is profitable.
  6938. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6939. @item -fdelayed-branch
  6940. @opindex fdelayed-branch
  6941. If supported for the target machine, attempt to reorder instructions
  6942. to exploit instruction slots available after delayed branch
  6943. instructions.
  6944. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  6945. @item -fschedule-insns
  6946. @opindex fschedule-insns
  6947. If supported for the target machine, attempt to reorder instructions to
  6948. eliminate execution stalls due to required data being unavailable. This
  6949. helps machines that have slow floating point or memory load instructions
  6950. by allowing other instructions to be issued until the result of the load
  6951. or floating-point instruction is required.
  6952. Enabled at levels @option{-O2}, @option{-O3}.
  6953. @item -fschedule-insns2
  6954. @opindex fschedule-insns2
  6955. Similar to @option{-fschedule-insns}, but requests an additional pass of
  6956. instruction scheduling after register allocation has been done. This is
  6957. especially useful on machines with a relatively small number of
  6958. registers and where memory load instructions take more than one cycle.
  6959. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  6960. @item -fno-sched-interblock
  6961. @opindex fno-sched-interblock
  6962. Don't schedule instructions across basic blocks. This is normally
  6963. enabled by default when scheduling before register allocation, i.e.@:
  6964. with @option{-fschedule-insns} or at @option{-O2} or higher.
  6965. @item -fno-sched-spec
  6966. @opindex fno-sched-spec
  6967. Don't allow speculative motion of non-load instructions. This is normally
  6968. enabled by default when scheduling before register allocation, i.e.@:
  6969. with @option{-fschedule-insns} or at @option{-O2} or higher.
  6970. @item -fsched-pressure
  6971. @opindex fsched-pressure
  6972. Enable register pressure sensitive insn scheduling before register
  6973. allocation. This only makes sense when scheduling before register
  6974. allocation is enabled, i.e.@: with @option{-fschedule-insns} or at
  6975. @option{-O2} or higher. Usage of this option can improve the
  6976. generated code and decrease its size by preventing register pressure
  6977. increase above the number of available hard registers and subsequent
  6978. spills in register allocation.
  6979. @item -fsched-spec-load
  6980. @opindex fsched-spec-load
  6981. Allow speculative motion of some load instructions. This only makes
  6982. sense when scheduling before register allocation, i.e.@: with
  6983. @option{-fschedule-insns} or at @option{-O2} or higher.
  6984. @item -fsched-spec-load-dangerous
  6985. @opindex fsched-spec-load-dangerous
  6986. Allow speculative motion of more load instructions. This only makes
  6987. sense when scheduling before register allocation, i.e.@: with
  6988. @option{-fschedule-insns} or at @option{-O2} or higher.
  6989. @item -fsched-stalled-insns
  6990. @itemx -fsched-stalled-insns=@var{n}
  6991. @opindex fsched-stalled-insns
  6992. Define how many insns (if any) can be moved prematurely from the queue
  6993. of stalled insns into the ready list during the second scheduling pass.
  6994. @option{-fno-sched-stalled-insns} means that no insns are moved
  6995. prematurely, @option{-fsched-stalled-insns=0} means there is no limit
  6996. on how many queued insns can be moved prematurely.
  6997. @option{-fsched-stalled-insns} without a value is equivalent to
  6998. @option{-fsched-stalled-insns=1}.
  6999. @item -fsched-stalled-insns-dep
  7000. @itemx -fsched-stalled-insns-dep=@var{n}
  7001. @opindex fsched-stalled-insns-dep
  7002. Define how many insn groups (cycles) are examined for a dependency
  7003. on a stalled insn that is a candidate for premature removal from the queue
  7004. of stalled insns. This has an effect only during the second scheduling pass,
  7005. and only if @option{-fsched-stalled-insns} is used.
  7006. @option{-fno-sched-stalled-insns-dep} is equivalent to
  7007. @option{-fsched-stalled-insns-dep=0}.
  7008. @option{-fsched-stalled-insns-dep} without a value is equivalent to
  7009. @option{-fsched-stalled-insns-dep=1}.
  7010. @item -fsched2-use-superblocks
  7011. @opindex fsched2-use-superblocks
  7012. When scheduling after register allocation, use superblock scheduling.
  7013. This allows motion across basic block boundaries,
  7014. resulting in faster schedules. This option is experimental, as not all machine
  7015. descriptions used by GCC model the CPU closely enough to avoid unreliable
  7016. results from the algorithm.
  7017. This only makes sense when scheduling after register allocation, i.e.@: with
  7018. @option{-fschedule-insns2} or at @option{-O2} or higher.
  7019. @item -fsched-group-heuristic
  7020. @opindex fsched-group-heuristic
  7021. Enable the group heuristic in the scheduler. This heuristic favors
  7022. the instruction that belongs to a schedule group. This is enabled
  7023. by default when scheduling is enabled, i.e.@: with @option{-fschedule-insns}
  7024. or @option{-fschedule-insns2} or at @option{-O2} or higher.
  7025. @item -fsched-critical-path-heuristic
  7026. @opindex fsched-critical-path-heuristic
  7027. Enable the critical-path heuristic in the scheduler. This heuristic favors
  7028. instructions on the critical path. This is enabled by default when
  7029. scheduling is enabled, i.e.@: with @option{-fschedule-insns}
  7030. or @option{-fschedule-insns2} or at @option{-O2} or higher.
  7031. @item -fsched-spec-insn-heuristic
  7032. @opindex fsched-spec-insn-heuristic
  7033. Enable the speculative instruction heuristic in the scheduler. This
  7034. heuristic favors speculative instructions with greater dependency weakness.
  7035. This is enabled by default when scheduling is enabled, i.e.@:
  7036. with @option{-fschedule-insns} or @option{-fschedule-insns2}
  7037. or at @option{-O2} or higher.
  7038. @item -fsched-rank-heuristic
  7039. @opindex fsched-rank-heuristic
  7040. Enable the rank heuristic in the scheduler. This heuristic favors
  7041. the instruction belonging to a basic block with greater size or frequency.
  7042. This is enabled by default when scheduling is enabled, i.e.@:
  7043. with @option{-fschedule-insns} or @option{-fschedule-insns2} or
  7044. at @option{-O2} or higher.
  7045. @item -fsched-last-insn-heuristic
  7046. @opindex fsched-last-insn-heuristic
  7047. Enable the last-instruction heuristic in the scheduler. This heuristic
  7048. favors the instruction that is less dependent on the last instruction
  7049. scheduled. This is enabled by default when scheduling is enabled,
  7050. i.e.@: with @option{-fschedule-insns} or @option{-fschedule-insns2} or
  7051. at @option{-O2} or higher.
  7052. @item -fsched-dep-count-heuristic
  7053. @opindex fsched-dep-count-heuristic
  7054. Enable the dependent-count heuristic in the scheduler. This heuristic
  7055. favors the instruction that has more instructions depending on it.
  7056. This is enabled by default when scheduling is enabled, i.e.@:
  7057. with @option{-fschedule-insns} or @option{-fschedule-insns2} or
  7058. at @option{-O2} or higher.
  7059. @item -freschedule-modulo-scheduled-loops
  7060. @opindex freschedule-modulo-scheduled-loops
  7061. Modulo scheduling is performed before traditional scheduling. If a loop
  7062. is modulo scheduled, later scheduling passes may change its schedule.
  7063. Use this option to control that behavior.
  7064. @item -fselective-scheduling
  7065. @opindex fselective-scheduling
  7066. Schedule instructions using selective scheduling algorithm. Selective
  7067. scheduling runs instead of the first scheduler pass.
  7068. @item -fselective-scheduling2
  7069. @opindex fselective-scheduling2
  7070. Schedule instructions using selective scheduling algorithm. Selective
  7071. scheduling runs instead of the second scheduler pass.
  7072. @item -fsel-sched-pipelining
  7073. @opindex fsel-sched-pipelining
  7074. Enable software pipelining of innermost loops during selective scheduling.
  7075. This option has no effect unless one of @option{-fselective-scheduling} or
  7076. @option{-fselective-scheduling2} is turned on.
  7077. @item -fsel-sched-pipelining-outer-loops
  7078. @opindex fsel-sched-pipelining-outer-loops
  7079. When pipelining loops during selective scheduling, also pipeline outer loops.
  7080. This option has no effect unless @option{-fsel-sched-pipelining} is turned on.
  7081. @item -fsemantic-interposition
  7082. @opindex fsemantic-interposition
  7083. Some object formats, like ELF, allow interposing of symbols by the
  7084. dynamic linker.
  7085. This means that for symbols exported from the DSO, the compiler cannot perform
  7086. interprocedural propagation, inlining and other optimizations in anticipation
  7087. that the function or variable in question may change. While this feature is
  7088. useful, for example, to rewrite memory allocation functions by a debugging
  7089. implementation, it is expensive in the terms of code quality.
  7090. With @option{-fno-semantic-interposition} the compiler assumes that
  7091. if interposition happens for functions the overwriting function will have
  7092. precisely the same semantics (and side effects).
  7093. Similarly if interposition happens
  7094. for variables, the constructor of the variable will be the same. The flag
  7095. has no effect for functions explicitly declared inline
  7096. (where it is never allowed for interposition to change semantics)
  7097. and for symbols explicitly declared weak.
  7098. @item -fshrink-wrap
  7099. @opindex fshrink-wrap
  7100. Emit function prologues only before parts of the function that need it,
  7101. rather than at the top of the function. This flag is enabled by default at
  7102. @option{-O} and higher.
  7103. @item -fcaller-saves
  7104. @opindex fcaller-saves
  7105. Enable allocation of values to registers that are clobbered by
  7106. function calls, by emitting extra instructions to save and restore the
  7107. registers around such calls. Such allocation is done only when it
  7108. seems to result in better code.
  7109. This option is always enabled by default on certain machines, usually
  7110. those which have no call-preserved registers to use instead.
  7111. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  7112. @item -fcombine-stack-adjustments
  7113. @opindex fcombine-stack-adjustments
  7114. Tracks stack adjustments (pushes and pops) and stack memory references
  7115. and then tries to find ways to combine them.
  7116. Enabled by default at @option{-O1} and higher.
  7117. @item -fipa-ra
  7118. @opindex fipa-ra
  7119. Use caller save registers for allocation if those registers are not used by
  7120. any called function. In that case it is not necessary to save and restore
  7121. them around calls. This is only possible if called functions are part of
  7122. same compilation unit as current function and they are compiled before it.
  7123. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  7124. @item -fconserve-stack
  7125. @opindex fconserve-stack
  7126. Attempt to minimize stack usage. The compiler attempts to use less
  7127. stack space, even if that makes the program slower. This option
  7128. implies setting the @option{large-stack-frame} parameter to 100
  7129. and the @option{large-stack-frame-growth} parameter to 400.
  7130. @item -ftree-reassoc
  7131. @opindex ftree-reassoc
  7132. Perform reassociation on trees. This flag is enabled by default
  7133. at @option{-O} and higher.
  7134. @item -ftree-pre
  7135. @opindex ftree-pre
  7136. Perform partial redundancy elimination (PRE) on trees. This flag is
  7137. enabled by default at @option{-O2} and @option{-O3}.
  7138. @item -ftree-partial-pre
  7139. @opindex ftree-partial-pre
  7140. Make partial redundancy elimination (PRE) more aggressive. This flag is
  7141. enabled by default at @option{-O3}.
  7142. @item -ftree-forwprop
  7143. @opindex ftree-forwprop
  7144. Perform forward propagation on trees. This flag is enabled by default
  7145. at @option{-O} and higher.
  7146. @item -ftree-fre
  7147. @opindex ftree-fre
  7148. Perform full redundancy elimination (FRE) on trees. The difference
  7149. between FRE and PRE is that FRE only considers expressions
  7150. that are computed on all paths leading to the redundant computation.
  7151. This analysis is faster than PRE, though it exposes fewer redundancies.
  7152. This flag is enabled by default at @option{-O} and higher.
  7153. @item -ftree-phiprop
  7154. @opindex ftree-phiprop
  7155. Perform hoisting of loads from conditional pointers on trees. This
  7156. pass is enabled by default at @option{-O} and higher.
  7157. @item -fhoist-adjacent-loads
  7158. @opindex fhoist-adjacent-loads
  7159. Speculatively hoist loads from both branches of an if-then-else if the
  7160. loads are from adjacent locations in the same structure and the target
  7161. architecture has a conditional move instruction. This flag is enabled
  7162. by default at @option{-O2} and higher.
  7163. @item -ftree-copy-prop
  7164. @opindex ftree-copy-prop
  7165. Perform copy propagation on trees. This pass eliminates unnecessary
  7166. copy operations. This flag is enabled by default at @option{-O} and
  7167. higher.
  7168. @item -fipa-pure-const
  7169. @opindex fipa-pure-const
  7170. Discover which functions are pure or constant.
  7171. Enabled by default at @option{-O} and higher.
  7172. @item -fipa-reference
  7173. @opindex fipa-reference
  7174. Discover which static variables do not escape the
  7175. compilation unit.
  7176. Enabled by default at @option{-O} and higher.
  7177. @item -fipa-pta
  7178. @opindex fipa-pta
  7179. Perform interprocedural pointer analysis and interprocedural modification
  7180. and reference analysis. This option can cause excessive memory and
  7181. compile-time usage on large compilation units. It is not enabled by
  7182. default at any optimization level.
  7183. @item -fipa-profile
  7184. @opindex fipa-profile
  7185. Perform interprocedural profile propagation. The functions called only from
  7186. cold functions are marked as cold. Also functions executed once (such as
  7187. @code{cold}, @code{noreturn}, static constructors or destructors) are identified. Cold
  7188. functions and loop less parts of functions executed once are then optimized for
  7189. size.
  7190. Enabled by default at @option{-O} and higher.
  7191. @item -fipa-cp
  7192. @opindex fipa-cp
  7193. Perform interprocedural constant propagation.
  7194. This optimization analyzes the program to determine when values passed
  7195. to functions are constants and then optimizes accordingly.
  7196. This optimization can substantially increase performance
  7197. if the application has constants passed to functions.
  7198. This flag is enabled by default at @option{-O2}, @option{-Os} and @option{-O3}.
  7199. @item -fipa-cp-clone
  7200. @opindex fipa-cp-clone
  7201. Perform function cloning to make interprocedural constant propagation stronger.
  7202. When enabled, interprocedural constant propagation performs function cloning
  7203. when externally visible function can be called with constant arguments.
  7204. Because this optimization can create multiple copies of functions,
  7205. it may significantly increase code size
  7206. (see @option{--param ipcp-unit-growth=@var{value}}).
  7207. This flag is enabled by default at @option{-O3}.
  7208. @item -fipa-cp-alignment
  7209. @opindex -fipa-cp-alignment
  7210. When enabled, this optimization propagates alignment of function
  7211. parameters to support better vectorization and string operations.
  7212. This flag is enabled by default at @option{-O2} and @option{-Os}. It
  7213. requires that @option{-fipa-cp} is enabled.
  7214. @item -fipa-icf
  7215. @opindex fipa-icf
  7216. Perform Identical Code Folding for functions and read-only variables.
  7217. The optimization reduces code size and may disturb unwind stacks by replacing
  7218. a function by equivalent one with a different name. The optimization works
  7219. more effectively with link time optimization enabled.
  7220. Nevertheless the behavior is similar to Gold Linker ICF optimization, GCC ICF
  7221. works on different levels and thus the optimizations are not same - there are
  7222. equivalences that are found only by GCC and equivalences found only by Gold.
  7223. This flag is enabled by default at @option{-O2} and @option{-Os}.
  7224. @item -fisolate-erroneous-paths-dereference
  7225. @opindex fisolate-erroneous-paths-dereference
  7226. Detect paths that trigger erroneous or undefined behavior due to
  7227. dereferencing a null pointer. Isolate those paths from the main control
  7228. flow and turn the statement with erroneous or undefined behavior into a trap.
  7229. This flag is enabled by default at @option{-O2} and higher.
  7230. @item -fisolate-erroneous-paths-attribute
  7231. @opindex fisolate-erroneous-paths-attribute
  7232. Detect paths that trigger erroneous or undefined behavior due a null value
  7233. being used in a way forbidden by a @code{returns_nonnull} or @code{nonnull}
  7234. attribute. Isolate those paths from the main control flow and turn the
  7235. statement with erroneous or undefined behavior into a trap. This is not
  7236. currently enabled, but may be enabled by @option{-O2} in the future.
  7237. @item -ftree-sink
  7238. @opindex ftree-sink
  7239. Perform forward store motion on trees. This flag is
  7240. enabled by default at @option{-O} and higher.
  7241. @item -ftree-bit-ccp
  7242. @opindex ftree-bit-ccp
  7243. Perform sparse conditional bit constant propagation on trees and propagate
  7244. pointer alignment information.
  7245. This pass only operates on local scalar variables and is enabled by default
  7246. at @option{-O} and higher. It requires that @option{-ftree-ccp} is enabled.
  7247. @item -ftree-ccp
  7248. @opindex ftree-ccp
  7249. Perform sparse conditional constant propagation (CCP) on trees. This
  7250. pass only operates on local scalar variables and is enabled by default
  7251. at @option{-O} and higher.
  7252. @item -fssa-phiopt
  7253. @opindex fssa-phiopt
  7254. Perform pattern matching on SSA PHI nodes to optimize conditional
  7255. code. This pass is enabled by default at @option{-O} and higher.
  7256. @item -ftree-switch-conversion
  7257. @opindex ftree-switch-conversion
  7258. Perform conversion of simple initializations in a switch to
  7259. initializations from a scalar array. This flag is enabled by default
  7260. at @option{-O2} and higher.
  7261. @item -ftree-tail-merge
  7262. @opindex ftree-tail-merge
  7263. Look for identical code sequences. When found, replace one with a jump to the
  7264. other. This optimization is known as tail merging or cross jumping. This flag
  7265. is enabled by default at @option{-O2} and higher. The compilation time
  7266. in this pass can
  7267. be limited using @option{max-tail-merge-comparisons} parameter and
  7268. @option{max-tail-merge-iterations} parameter.
  7269. @item -ftree-dce
  7270. @opindex ftree-dce
  7271. Perform dead code elimination (DCE) on trees. This flag is enabled by
  7272. default at @option{-O} and higher.
  7273. @item -ftree-builtin-call-dce
  7274. @opindex ftree-builtin-call-dce
  7275. Perform conditional dead code elimination (DCE) for calls to built-in functions
  7276. that may set @code{errno} but are otherwise side-effect free. This flag is
  7277. enabled by default at @option{-O2} and higher if @option{-Os} is not also
  7278. specified.
  7279. @item -ftree-dominator-opts
  7280. @opindex ftree-dominator-opts
  7281. Perform a variety of simple scalar cleanups (constant/copy
  7282. propagation, redundancy elimination, range propagation and expression
  7283. simplification) based on a dominator tree traversal. This also
  7284. performs jump threading (to reduce jumps to jumps). This flag is
  7285. enabled by default at @option{-O} and higher.
  7286. @item -ftree-dse
  7287. @opindex ftree-dse
  7288. Perform dead store elimination (DSE) on trees. A dead store is a store into
  7289. a memory location that is later overwritten by another store without
  7290. any intervening loads. In this case the earlier store can be deleted. This
  7291. flag is enabled by default at @option{-O} and higher.
  7292. @item -ftree-ch
  7293. @opindex ftree-ch
  7294. Perform loop header copying on trees. This is beneficial since it increases
  7295. effectiveness of code motion optimizations. It also saves one jump. This flag
  7296. is enabled by default at @option{-O} and higher. It is not enabled
  7297. for @option{-Os}, since it usually increases code size.
  7298. @item -ftree-loop-optimize
  7299. @opindex ftree-loop-optimize
  7300. Perform loop optimizations on trees. This flag is enabled by default
  7301. at @option{-O} and higher.
  7302. @item -ftree-loop-linear
  7303. @opindex ftree-loop-linear
  7304. Perform loop interchange transformations on tree. Same as
  7305. @option{-floop-interchange}. To use this code transformation, GCC has
  7306. to be configured with @option{--with-isl} to enable the Graphite loop
  7307. transformation infrastructure.
  7308. @item -floop-interchange
  7309. @opindex floop-interchange
  7310. Perform loop interchange transformations on loops. Interchanging two
  7311. nested loops switches the inner and outer loops. For example, given a
  7312. loop like:
  7313. @smallexample
  7314. DO J = 1, M
  7315. DO I = 1, N
  7316. A(J, I) = A(J, I) * C
  7317. ENDDO
  7318. ENDDO
  7319. @end smallexample
  7320. @noindent
  7321. loop interchange transforms the loop as if it were written:
  7322. @smallexample
  7323. DO I = 1, N
  7324. DO J = 1, M
  7325. A(J, I) = A(J, I) * C
  7326. ENDDO
  7327. ENDDO
  7328. @end smallexample
  7329. which can be beneficial when @code{N} is larger than the caches,
  7330. because in Fortran, the elements of an array are stored in memory
  7331. contiguously by column, and the original loop iterates over rows,
  7332. potentially creating at each access a cache miss. This optimization
  7333. applies to all the languages supported by GCC and is not limited to
  7334. Fortran. To use this code transformation, GCC has to be configured
  7335. with @option{--with-isl} to enable the Graphite loop transformation
  7336. infrastructure.
  7337. @item -floop-strip-mine
  7338. @opindex floop-strip-mine
  7339. Perform loop strip mining transformations on loops. Strip mining
  7340. splits a loop into two nested loops. The outer loop has strides
  7341. equal to the strip size and the inner loop has strides of the
  7342. original loop within a strip. The strip length can be changed
  7343. using the @option{loop-block-tile-size} parameter. For example,
  7344. given a loop like:
  7345. @smallexample
  7346. DO I = 1, N
  7347. A(I) = A(I) + C
  7348. ENDDO
  7349. @end smallexample
  7350. @noindent
  7351. loop strip mining transforms the loop as if it were written:
  7352. @smallexample
  7353. DO II = 1, N, 51
  7354. DO I = II, min (II + 50, N)
  7355. A(I) = A(I) + C
  7356. ENDDO
  7357. ENDDO
  7358. @end smallexample
  7359. This optimization applies to all the languages supported by GCC and is
  7360. not limited to Fortran. To use this code transformation, GCC has to
  7361. be configured with @option{--with-isl} to enable the Graphite loop
  7362. transformation infrastructure.
  7363. @item -floop-block
  7364. @opindex floop-block
  7365. Perform loop blocking transformations on loops. Blocking strip mines
  7366. each loop in the loop nest such that the memory accesses of the
  7367. element loops fit inside caches. The strip length can be changed
  7368. using the @option{loop-block-tile-size} parameter. For example, given
  7369. a loop like:
  7370. @smallexample
  7371. DO I = 1, N
  7372. DO J = 1, M
  7373. A(J, I) = B(I) + C(J)
  7374. ENDDO
  7375. ENDDO
  7376. @end smallexample
  7377. @noindent
  7378. loop blocking transforms the loop as if it were written:
  7379. @smallexample
  7380. DO II = 1, N, 51
  7381. DO JJ = 1, M, 51
  7382. DO I = II, min (II + 50, N)
  7383. DO J = JJ, min (JJ + 50, M)
  7384. A(J, I) = B(I) + C(J)
  7385. ENDDO
  7386. ENDDO
  7387. ENDDO
  7388. ENDDO
  7389. @end smallexample
  7390. which can be beneficial when @code{M} is larger than the caches,
  7391. because the innermost loop iterates over a smaller amount of data
  7392. which can be kept in the caches. This optimization applies to all the
  7393. languages supported by GCC and is not limited to Fortran. To use this
  7394. code transformation, GCC has to be configured with @option{--with-isl}
  7395. to enable the Graphite loop transformation infrastructure.
  7396. @item -fgraphite-identity
  7397. @opindex fgraphite-identity
  7398. Enable the identity transformation for graphite. For every SCoP we generate
  7399. the polyhedral representation and transform it back to gimple. Using
  7400. @option{-fgraphite-identity} we can check the costs or benefits of the
  7401. GIMPLE -> GRAPHITE -> GIMPLE transformation. Some minimal optimizations
  7402. are also performed by the code generator ISL, like index splitting and
  7403. dead code elimination in loops.
  7404. @item -floop-nest-optimize
  7405. @opindex floop-nest-optimize
  7406. Enable the ISL based loop nest optimizer. This is a generic loop nest
  7407. optimizer based on the Pluto optimization algorithms. It calculates a loop
  7408. structure optimized for data-locality and parallelism. This option
  7409. is experimental.
  7410. @item -floop-unroll-and-jam
  7411. @opindex floop-unroll-and-jam
  7412. Enable unroll and jam for the ISL based loop nest optimizer. The unroll
  7413. factor can be changed using the @option{loop-unroll-jam-size} parameter.
  7414. The unrolled dimension (counting from the most inner one) can be changed
  7415. using the @option{loop-unroll-jam-depth} parameter. .
  7416. @item -floop-parallelize-all
  7417. @opindex floop-parallelize-all
  7418. Use the Graphite data dependence analysis to identify loops that can
  7419. be parallelized. Parallelize all the loops that can be analyzed to
  7420. not contain loop carried dependences without checking that it is
  7421. profitable to parallelize the loops.
  7422. @item -fcheck-data-deps
  7423. @opindex fcheck-data-deps
  7424. Compare the results of several data dependence analyzers. This option
  7425. is used for debugging the data dependence analyzers.
  7426. @item -ftree-loop-if-convert
  7427. @opindex ftree-loop-if-convert
  7428. Attempt to transform conditional jumps in the innermost loops to
  7429. branch-less equivalents. The intent is to remove control-flow from
  7430. the innermost loops in order to improve the ability of the
  7431. vectorization pass to handle these loops. This is enabled by default
  7432. if vectorization is enabled.
  7433. @item -ftree-loop-if-convert-stores
  7434. @opindex ftree-loop-if-convert-stores
  7435. Attempt to also if-convert conditional jumps containing memory writes.
  7436. This transformation can be unsafe for multi-threaded programs as it
  7437. transforms conditional memory writes into unconditional memory writes.
  7438. For example,
  7439. @smallexample
  7440. for (i = 0; i < N; i++)
  7441. if (cond)
  7442. A[i] = expr;
  7443. @end smallexample
  7444. is transformed to
  7445. @smallexample
  7446. for (i = 0; i < N; i++)
  7447. A[i] = cond ? expr : A[i];
  7448. @end smallexample
  7449. potentially producing data races.
  7450. @item -ftree-loop-distribution
  7451. @opindex ftree-loop-distribution
  7452. Perform loop distribution. This flag can improve cache performance on
  7453. big loop bodies and allow further loop optimizations, like
  7454. parallelization or vectorization, to take place. For example, the loop
  7455. @smallexample
  7456. DO I = 1, N
  7457. A(I) = B(I) + C
  7458. D(I) = E(I) * F
  7459. ENDDO
  7460. @end smallexample
  7461. is transformed to
  7462. @smallexample
  7463. DO I = 1, N
  7464. A(I) = B(I) + C
  7465. ENDDO
  7466. DO I = 1, N
  7467. D(I) = E(I) * F
  7468. ENDDO
  7469. @end smallexample
  7470. @item -ftree-loop-distribute-patterns
  7471. @opindex ftree-loop-distribute-patterns
  7472. Perform loop distribution of patterns that can be code generated with
  7473. calls to a library. This flag is enabled by default at @option{-O3}.
  7474. This pass distributes the initialization loops and generates a call to
  7475. memset zero. For example, the loop
  7476. @smallexample
  7477. DO I = 1, N
  7478. A(I) = 0
  7479. B(I) = A(I) + I
  7480. ENDDO
  7481. @end smallexample
  7482. is transformed to
  7483. @smallexample
  7484. DO I = 1, N
  7485. A(I) = 0
  7486. ENDDO
  7487. DO I = 1, N
  7488. B(I) = A(I) + I
  7489. ENDDO
  7490. @end smallexample
  7491. and the initialization loop is transformed into a call to memset zero.
  7492. @item -ftree-loop-im
  7493. @opindex ftree-loop-im
  7494. Perform loop invariant motion on trees. This pass moves only invariants that
  7495. are hard to handle at RTL level (function calls, operations that expand to
  7496. nontrivial sequences of insns). With @option{-funswitch-loops} it also moves
  7497. operands of conditions that are invariant out of the loop, so that we can use
  7498. just trivial invariantness analysis in loop unswitching. The pass also includes
  7499. store motion.
  7500. @item -ftree-loop-ivcanon
  7501. @opindex ftree-loop-ivcanon
  7502. Create a canonical counter for number of iterations in loops for which
  7503. determining number of iterations requires complicated analysis. Later
  7504. optimizations then may determine the number easily. Useful especially
  7505. in connection with unrolling.
  7506. @item -fivopts
  7507. @opindex fivopts
  7508. Perform induction variable optimizations (strength reduction, induction
  7509. variable merging and induction variable elimination) on trees.
  7510. @item -ftree-parallelize-loops=n
  7511. @opindex ftree-parallelize-loops
  7512. Parallelize loops, i.e., split their iteration space to run in n threads.
  7513. This is only possible for loops whose iterations are independent
  7514. and can be arbitrarily reordered. The optimization is only
  7515. profitable on multiprocessor machines, for loops that are CPU-intensive,
  7516. rather than constrained e.g.@: by memory bandwidth. This option
  7517. implies @option{-pthread}, and thus is only supported on targets
  7518. that have support for @option{-pthread}.
  7519. @item -ftree-pta
  7520. @opindex ftree-pta
  7521. Perform function-local points-to analysis on trees. This flag is
  7522. enabled by default at @option{-O} and higher.
  7523. @item -ftree-sra
  7524. @opindex ftree-sra
  7525. Perform scalar replacement of aggregates. This pass replaces structure
  7526. references with scalars to prevent committing structures to memory too
  7527. early. This flag is enabled by default at @option{-O} and higher.
  7528. @item -ftree-copyrename
  7529. @opindex ftree-copyrename
  7530. Perform copy renaming on trees. This pass attempts to rename compiler
  7531. temporaries to other variables at copy locations, usually resulting in
  7532. variable names which more closely resemble the original variables. This flag
  7533. is enabled by default at @option{-O} and higher.
  7534. @item -ftree-coalesce-inlined-vars
  7535. @opindex ftree-coalesce-inlined-vars
  7536. Tell the copyrename pass (see @option{-ftree-copyrename}) to attempt to
  7537. combine small user-defined variables too, but only if they are inlined
  7538. from other functions. It is a more limited form of
  7539. @option{-ftree-coalesce-vars}. This may harm debug information of such
  7540. inlined variables, but it keeps variables of the inlined-into
  7541. function apart from each other, such that they are more likely to
  7542. contain the expected values in a debugging session.
  7543. @item -ftree-coalesce-vars
  7544. @opindex ftree-coalesce-vars
  7545. Tell the copyrename pass (see @option{-ftree-copyrename}) to attempt to
  7546. combine small user-defined variables too, instead of just compiler
  7547. temporaries. This may severely limit the ability to debug an optimized
  7548. program compiled with @option{-fno-var-tracking-assignments}. In the
  7549. negated form, this flag prevents SSA coalescing of user variables,
  7550. including inlined ones. This option is enabled by default.
  7551. @item -ftree-ter
  7552. @opindex ftree-ter
  7553. Perform temporary expression replacement during the SSA->normal phase. Single
  7554. use/single def temporaries are replaced at their use location with their
  7555. defining expression. This results in non-GIMPLE code, but gives the expanders
  7556. much more complex trees to work on resulting in better RTL generation. This is
  7557. enabled by default at @option{-O} and higher.
  7558. @item -ftree-slsr
  7559. @opindex ftree-slsr
  7560. Perform straight-line strength reduction on trees. This recognizes related
  7561. expressions involving multiplications and replaces them by less expensive
  7562. calculations when possible. This is enabled by default at @option{-O} and
  7563. higher.
  7564. @item -ftree-vectorize
  7565. @opindex ftree-vectorize
  7566. Perform vectorization on trees. This flag enables @option{-ftree-loop-vectorize}
  7567. and @option{-ftree-slp-vectorize} if not explicitly specified.
  7568. @item -ftree-loop-vectorize
  7569. @opindex ftree-loop-vectorize
  7570. Perform loop vectorization on trees. This flag is enabled by default at
  7571. @option{-O3} and when @option{-ftree-vectorize} is enabled.
  7572. @item -ftree-slp-vectorize
  7573. @opindex ftree-slp-vectorize
  7574. Perform basic block vectorization on trees. This flag is enabled by default at
  7575. @option{-O3} and when @option{-ftree-vectorize} is enabled.
  7576. @item -fvect-cost-model=@var{model}
  7577. @opindex fvect-cost-model
  7578. Alter the cost model used for vectorization. The @var{model} argument
  7579. should be one of @samp{unlimited}, @samp{dynamic} or @samp{cheap}.
  7580. With the @samp{unlimited} model the vectorized code-path is assumed
  7581. to be profitable while with the @samp{dynamic} model a runtime check
  7582. guards the vectorized code-path to enable it only for iteration
  7583. counts that will likely execute faster than when executing the original
  7584. scalar loop. The @samp{cheap} model disables vectorization of
  7585. loops where doing so would be cost prohibitive for example due to
  7586. required runtime checks for data dependence or alignment but otherwise
  7587. is equal to the @samp{dynamic} model.
  7588. The default cost model depends on other optimization flags and is
  7589. either @samp{dynamic} or @samp{cheap}.
  7590. @item -fsimd-cost-model=@var{model}
  7591. @opindex fsimd-cost-model
  7592. Alter the cost model used for vectorization of loops marked with the OpenMP
  7593. or Cilk Plus simd directive. The @var{model} argument should be one of
  7594. @samp{unlimited}, @samp{dynamic}, @samp{cheap}. All values of @var{model}
  7595. have the same meaning as described in @option{-fvect-cost-model} and by
  7596. default a cost model defined with @option{-fvect-cost-model} is used.
  7597. @item -ftree-vrp
  7598. @opindex ftree-vrp
  7599. Perform Value Range Propagation on trees. This is similar to the
  7600. constant propagation pass, but instead of values, ranges of values are
  7601. propagated. This allows the optimizers to remove unnecessary range
  7602. checks like array bound checks and null pointer checks. This is
  7603. enabled by default at @option{-O2} and higher. Null pointer check
  7604. elimination is only done if @option{-fdelete-null-pointer-checks} is
  7605. enabled.
  7606. @item -fsplit-ivs-in-unroller
  7607. @opindex fsplit-ivs-in-unroller
  7608. Enables expression of values of induction variables in later iterations
  7609. of the unrolled loop using the value in the first iteration. This breaks
  7610. long dependency chains, thus improving efficiency of the scheduling passes.
  7611. A combination of @option{-fweb} and CSE is often sufficient to obtain the
  7612. same effect. However, that is not reliable in cases where the loop body
  7613. is more complicated than a single basic block. It also does not work at all
  7614. on some architectures due to restrictions in the CSE pass.
  7615. This optimization is enabled by default.
  7616. @item -fvariable-expansion-in-unroller
  7617. @opindex fvariable-expansion-in-unroller
  7618. With this option, the compiler creates multiple copies of some
  7619. local variables when unrolling a loop, which can result in superior code.
  7620. @item -fpartial-inlining
  7621. @opindex fpartial-inlining
  7622. Inline parts of functions. This option has any effect only
  7623. when inlining itself is turned on by the @option{-finline-functions}
  7624. or @option{-finline-small-functions} options.
  7625. Enabled at level @option{-O2}.
  7626. @item -fpredictive-commoning
  7627. @opindex fpredictive-commoning
  7628. Perform predictive commoning optimization, i.e., reusing computations
  7629. (especially memory loads and stores) performed in previous
  7630. iterations of loops.
  7631. This option is enabled at level @option{-O3}.
  7632. @item -fprefetch-loop-arrays
  7633. @opindex fprefetch-loop-arrays
  7634. If supported by the target machine, generate instructions to prefetch
  7635. memory to improve the performance of loops that access large arrays.
  7636. This option may generate better or worse code; results are highly
  7637. dependent on the structure of loops within the source code.
  7638. Disabled at level @option{-Os}.
  7639. @item -fno-peephole
  7640. @itemx -fno-peephole2
  7641. @opindex fno-peephole
  7642. @opindex fno-peephole2
  7643. Disable any machine-specific peephole optimizations. The difference
  7644. between @option{-fno-peephole} and @option{-fno-peephole2} is in how they
  7645. are implemented in the compiler; some targets use one, some use the
  7646. other, a few use both.
  7647. @option{-fpeephole} is enabled by default.
  7648. @option{-fpeephole2} enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  7649. @item -fno-guess-branch-probability
  7650. @opindex fno-guess-branch-probability
  7651. Do not guess branch probabilities using heuristics.
  7652. GCC uses heuristics to guess branch probabilities if they are
  7653. not provided by profiling feedback (@option{-fprofile-arcs}). These
  7654. heuristics are based on the control flow graph. If some branch probabilities
  7655. are specified by @code{__builtin_expect}, then the heuristics are
  7656. used to guess branch probabilities for the rest of the control flow graph,
  7657. taking the @code{__builtin_expect} info into account. The interactions
  7658. between the heuristics and @code{__builtin_expect} can be complex, and in
  7659. some cases, it may be useful to disable the heuristics so that the effects
  7660. of @code{__builtin_expect} are easier to understand.
  7661. The default is @option{-fguess-branch-probability} at levels
  7662. @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  7663. @item -freorder-blocks
  7664. @opindex freorder-blocks
  7665. Reorder basic blocks in the compiled function in order to reduce number of
  7666. taken branches and improve code locality.
  7667. Enabled at levels @option{-O2}, @option{-O3}.
  7668. @item -freorder-blocks-and-partition
  7669. @opindex freorder-blocks-and-partition
  7670. In addition to reordering basic blocks in the compiled function, in order
  7671. to reduce number of taken branches, partitions hot and cold basic blocks
  7672. into separate sections of the assembly and .o files, to improve
  7673. paging and cache locality performance.
  7674. This optimization is automatically turned off in the presence of
  7675. exception handling, for linkonce sections, for functions with a user-defined
  7676. section attribute and on any architecture that does not support named
  7677. sections.
  7678. Enabled for x86 at levels @option{-O2}, @option{-O3}.
  7679. @item -freorder-functions
  7680. @opindex freorder-functions
  7681. Reorder functions in the object file in order to
  7682. improve code locality. This is implemented by using special
  7683. subsections @code{.text.hot} for most frequently executed functions and
  7684. @code{.text.unlikely} for unlikely executed functions. Reordering is done by
  7685. the linker so object file format must support named sections and linker must
  7686. place them in a reasonable way.
  7687. Also profile feedback must be available to make this option effective. See
  7688. @option{-fprofile-arcs} for details.
  7689. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  7690. @item -fstrict-aliasing
  7691. @opindex fstrict-aliasing
  7692. Allow the compiler to assume the strictest aliasing rules applicable to
  7693. the language being compiled. For C (and C++), this activates
  7694. optimizations based on the type of expressions. In particular, an
  7695. object of one type is assumed never to reside at the same address as an
  7696. object of a different type, unless the types are almost the same. For
  7697. example, an @code{unsigned int} can alias an @code{int}, but not a
  7698. @code{void*} or a @code{double}. A character type may alias any other
  7699. type.
  7700. @anchor{Type-punning}Pay special attention to code like this:
  7701. @smallexample
  7702. union a_union @{
  7703. int i;
  7704. double d;
  7705. @};
  7706. int f() @{
  7707. union a_union t;
  7708. t.d = 3.0;
  7709. return t.i;
  7710. @}
  7711. @end smallexample
  7712. The practice of reading from a different union member than the one most
  7713. recently written to (called ``type-punning'') is common. Even with
  7714. @option{-fstrict-aliasing}, type-punning is allowed, provided the memory
  7715. is accessed through the union type. So, the code above works as
  7716. expected. @xref{Structures unions enumerations and bit-fields
  7717. implementation}. However, this code might not:
  7718. @smallexample
  7719. int f() @{
  7720. union a_union t;
  7721. int* ip;
  7722. t.d = 3.0;
  7723. ip = &t.i;
  7724. return *ip;
  7725. @}
  7726. @end smallexample
  7727. Similarly, access by taking the address, casting the resulting pointer
  7728. and dereferencing the result has undefined behavior, even if the cast
  7729. uses a union type, e.g.:
  7730. @smallexample
  7731. int f() @{
  7732. double d = 3.0;
  7733. return ((union a_union *) &d)->i;
  7734. @}
  7735. @end smallexample
  7736. The @option{-fstrict-aliasing} option is enabled at levels
  7737. @option{-O2}, @option{-O3}, @option{-Os}.
  7738. @item -fstrict-overflow
  7739. @opindex fstrict-overflow
  7740. Allow the compiler to assume strict signed overflow rules, depending
  7741. on the language being compiled. For C (and C++) this means that
  7742. overflow when doing arithmetic with signed numbers is undefined, which
  7743. means that the compiler may assume that it does not happen. This
  7744. permits various optimizations. For example, the compiler assumes
  7745. that an expression like @code{i + 10 > i} is always true for
  7746. signed @code{i}. This assumption is only valid if signed overflow is
  7747. undefined, as the expression is false if @code{i + 10} overflows when
  7748. using twos complement arithmetic. When this option is in effect any
  7749. attempt to determine whether an operation on signed numbers
  7750. overflows must be written carefully to not actually involve overflow.
  7751. This option also allows the compiler to assume strict pointer
  7752. semantics: given a pointer to an object, if adding an offset to that
  7753. pointer does not produce a pointer to the same object, the addition is
  7754. undefined. This permits the compiler to conclude that @code{p + u >
  7755. p} is always true for a pointer @code{p} and unsigned integer
  7756. @code{u}. This assumption is only valid because pointer wraparound is
  7757. undefined, as the expression is false if @code{p + u} overflows using
  7758. twos complement arithmetic.
  7759. See also the @option{-fwrapv} option. Using @option{-fwrapv} means
  7760. that integer signed overflow is fully defined: it wraps. When
  7761. @option{-fwrapv} is used, there is no difference between
  7762. @option{-fstrict-overflow} and @option{-fno-strict-overflow} for
  7763. integers. With @option{-fwrapv} certain types of overflow are
  7764. permitted. For example, if the compiler gets an overflow when doing
  7765. arithmetic on constants, the overflowed value can still be used with
  7766. @option{-fwrapv}, but not otherwise.
  7767. The @option{-fstrict-overflow} option is enabled at levels
  7768. @option{-O2}, @option{-O3}, @option{-Os}.
  7769. @item -falign-functions
  7770. @itemx -falign-functions=@var{n}
  7771. @opindex falign-functions
  7772. Align the start of functions to the next power-of-two greater than
  7773. @var{n}, skipping up to @var{n} bytes. For instance,
  7774. @option{-falign-functions=32} aligns functions to the next 32-byte
  7775. boundary, but @option{-falign-functions=24} aligns to the next
  7776. 32-byte boundary only if this can be done by skipping 23 bytes or less.
  7777. @option{-fno-align-functions} and @option{-falign-functions=1} are
  7778. equivalent and mean that functions are not aligned.
  7779. Some assemblers only support this flag when @var{n} is a power of two;
  7780. in that case, it is rounded up.
  7781. If @var{n} is not specified or is zero, use a machine-dependent default.
  7782. Enabled at levels @option{-O2}, @option{-O3}.
  7783. @item -falign-labels
  7784. @itemx -falign-labels=@var{n}
  7785. @opindex falign-labels
  7786. Align all branch targets to a power-of-two boundary, skipping up to
  7787. @var{n} bytes like @option{-falign-functions}. This option can easily
  7788. make code slower, because it must insert dummy operations for when the
  7789. branch target is reached in the usual flow of the code.
  7790. @option{-fno-align-labels} and @option{-falign-labels=1} are
  7791. equivalent and mean that labels are not aligned.
  7792. If @option{-falign-loops} or @option{-falign-jumps} are applicable and
  7793. are greater than this value, then their values are used instead.
  7794. If @var{n} is not specified or is zero, use a machine-dependent default
  7795. which is very likely to be @samp{1}, meaning no alignment.
  7796. Enabled at levels @option{-O2}, @option{-O3}.
  7797. @item -falign-loops
  7798. @itemx -falign-loops=@var{n}
  7799. @opindex falign-loops
  7800. Align loops to a power-of-two boundary, skipping up to @var{n} bytes
  7801. like @option{-falign-functions}. If the loops are
  7802. executed many times, this makes up for any execution of the dummy
  7803. operations.
  7804. @option{-fno-align-loops} and @option{-falign-loops=1} are
  7805. equivalent and mean that loops are not aligned.
  7806. If @var{n} is not specified or is zero, use a machine-dependent default.
  7807. Enabled at levels @option{-O2}, @option{-O3}.
  7808. @item -falign-jumps
  7809. @itemx -falign-jumps=@var{n}
  7810. @opindex falign-jumps
  7811. Align branch targets to a power-of-two boundary, for branch targets
  7812. where the targets can only be reached by jumping, skipping up to @var{n}
  7813. bytes like @option{-falign-functions}. In this case, no dummy operations
  7814. need be executed.
  7815. @option{-fno-align-jumps} and @option{-falign-jumps=1} are
  7816. equivalent and mean that loops are not aligned.
  7817. If @var{n} is not specified or is zero, use a machine-dependent default.
  7818. Enabled at levels @option{-O2}, @option{-O3}.
  7819. @item -funit-at-a-time
  7820. @opindex funit-at-a-time
  7821. This option is left for compatibility reasons. @option{-funit-at-a-time}
  7822. has no effect, while @option{-fno-unit-at-a-time} implies
  7823. @option{-fno-toplevel-reorder} and @option{-fno-section-anchors}.
  7824. Enabled by default.
  7825. @item -fno-toplevel-reorder
  7826. @opindex fno-toplevel-reorder
  7827. Do not reorder top-level functions, variables, and @code{asm}
  7828. statements. Output them in the same order that they appear in the
  7829. input file. When this option is used, unreferenced static variables
  7830. are not removed. This option is intended to support existing code
  7831. that relies on a particular ordering. For new code, it is better to
  7832. use attributes when possible.
  7833. Enabled at level @option{-O0}. When disabled explicitly, it also implies
  7834. @option{-fno-section-anchors}, which is otherwise enabled at @option{-O0} on some
  7835. targets.
  7836. @item -fweb
  7837. @opindex fweb
  7838. Constructs webs as commonly used for register allocation purposes and assign
  7839. each web individual pseudo register. This allows the register allocation pass
  7840. to operate on pseudos directly, but also strengthens several other optimization
  7841. passes, such as CSE, loop optimizer and trivial dead code remover. It can,
  7842. however, make debugging impossible, since variables no longer stay in a
  7843. ``home register''.
  7844. Enabled by default with @option{-funroll-loops}.
  7845. @item -fwhole-program
  7846. @opindex fwhole-program
  7847. Assume that the current compilation unit represents the whole program being
  7848. compiled. All public functions and variables with the exception of @code{main}
  7849. and those merged by attribute @code{externally_visible} become static functions
  7850. and in effect are optimized more aggressively by interprocedural optimizers.
  7851. This option should not be used in combination with @option{-flto}.
  7852. Instead relying on a linker plugin should provide safer and more precise
  7853. information.
  7854. @item -flto[=@var{n}]
  7855. @opindex flto
  7856. This option runs the standard link-time optimizer. When invoked
  7857. with source code, it generates GIMPLE (one of GCC's internal
  7858. representations) and writes it to special ELF sections in the object
  7859. file. When the object files are linked together, all the function
  7860. bodies are read from these ELF sections and instantiated as if they
  7861. had been part of the same translation unit.
  7862. To use the link-time optimizer, @option{-flto} and optimization
  7863. options should be specified at compile time and during the final link.
  7864. For example:
  7865. @smallexample
  7866. gcc -c -O2 -flto foo.c
  7867. gcc -c -O2 -flto bar.c
  7868. gcc -o myprog -flto -O2 foo.o bar.o
  7869. @end smallexample
  7870. The first two invocations to GCC save a bytecode representation
  7871. of GIMPLE into special ELF sections inside @file{foo.o} and
  7872. @file{bar.o}. The final invocation reads the GIMPLE bytecode from
  7873. @file{foo.o} and @file{bar.o}, merges the two files into a single
  7874. internal image, and compiles the result as usual. Since both
  7875. @file{foo.o} and @file{bar.o} are merged into a single image, this
  7876. causes all the interprocedural analyses and optimizations in GCC to
  7877. work across the two files as if they were a single one. This means,
  7878. for example, that the inliner is able to inline functions in
  7879. @file{bar.o} into functions in @file{foo.o} and vice-versa.
  7880. Another (simpler) way to enable link-time optimization is:
  7881. @smallexample
  7882. gcc -o myprog -flto -O2 foo.c bar.c
  7883. @end smallexample
  7884. The above generates bytecode for @file{foo.c} and @file{bar.c},
  7885. merges them together into a single GIMPLE representation and optimizes
  7886. them as usual to produce @file{myprog}.
  7887. The only important thing to keep in mind is that to enable link-time
  7888. optimizations you need to use the GCC driver to perform the link-step.
  7889. GCC then automatically performs link-time optimization if any of the
  7890. objects involved were compiled with the @option{-flto} command-line option.
  7891. You generally
  7892. should specify the optimization options to be used for link-time
  7893. optimization though GCC tries to be clever at guessing an
  7894. optimization level to use from the options used at compile-time
  7895. if you fail to specify one at link-time. You can always override
  7896. the automatic decision to do link-time optimization at link-time
  7897. by passing @option{-fno-lto} to the link command.
  7898. To make whole program optimization effective, it is necessary to make
  7899. certain whole program assumptions. The compiler needs to know
  7900. what functions and variables can be accessed by libraries and runtime
  7901. outside of the link-time optimized unit. When supported by the linker,
  7902. the linker plugin (see @option{-fuse-linker-plugin}) passes information
  7903. to the compiler about used and externally visible symbols. When
  7904. the linker plugin is not available, @option{-fwhole-program} should be
  7905. used to allow the compiler to make these assumptions, which leads
  7906. to more aggressive optimization decisions.
  7907. When @option{-fuse-linker-plugin} is not enabled then, when a file is
  7908. compiled with @option{-flto}, the generated object file is larger than
  7909. a regular object file because it contains GIMPLE bytecodes and the usual
  7910. final code (see @option{-ffat-lto-objects}. This means that
  7911. object files with LTO information can be linked as normal object
  7912. files; if @option{-fno-lto} is passed to the linker, no
  7913. interprocedural optimizations are applied. Note that when
  7914. @option{-fno-fat-lto-objects} is enabled the compile-stage is faster
  7915. but you cannot perform a regular, non-LTO link on them.
  7916. Additionally, the optimization flags used to compile individual files
  7917. are not necessarily related to those used at link time. For instance,
  7918. @smallexample
  7919. gcc -c -O0 -ffat-lto-objects -flto foo.c
  7920. gcc -c -O0 -ffat-lto-objects -flto bar.c
  7921. gcc -o myprog -O3 foo.o bar.o
  7922. @end smallexample
  7923. This produces individual object files with unoptimized assembler
  7924. code, but the resulting binary @file{myprog} is optimized at
  7925. @option{-O3}. If, instead, the final binary is generated with
  7926. @option{-fno-lto}, then @file{myprog} is not optimized.
  7927. When producing the final binary, GCC only
  7928. applies link-time optimizations to those files that contain bytecode.
  7929. Therefore, you can mix and match object files and libraries with
  7930. GIMPLE bytecodes and final object code. GCC automatically selects
  7931. which files to optimize in LTO mode and which files to link without
  7932. further processing.
  7933. There are some code generation flags preserved by GCC when
  7934. generating bytecodes, as they need to be used during the final link
  7935. stage. Generally options specified at link-time override those
  7936. specified at compile-time.
  7937. If you do not specify an optimization level option @option{-O} at
  7938. link-time then GCC computes one based on the optimization levels
  7939. used when compiling the object files. The highest optimization
  7940. level wins here.
  7941. Currently, the following options and their setting are take from
  7942. the first object file that explicitely specified it:
  7943. @option{-fPIC}, @option{-fpic}, @option{-fpie}, @option{-fcommon},
  7944. @option{-fexceptions}, @option{-fnon-call-exceptions}, @option{-fgnu-tm}
  7945. and all the @option{-m} target flags.
  7946. Certain ABI changing flags are required to match in all compilation-units
  7947. and trying to override this at link-time with a conflicting value
  7948. is ignored. This includes options such as @option{-freg-struct-return}
  7949. and @option{-fpcc-struct-return}.
  7950. Other options such as @option{-ffp-contract}, @option{-fno-strict-overflow},
  7951. @option{-fwrapv}, @option{-fno-trapv} or @option{-fno-strict-aliasing}
  7952. are passed through to the link stage and merged conservatively for
  7953. conflicting translation units. Specifically
  7954. @option{-fno-strict-overflow}, @option{-fwrapv} and @option{-fno-trapv} take
  7955. precedence and for example @option{-ffp-contract=off} takes precedence
  7956. over @option{-ffp-contract=fast}. You can override them at linke-time.
  7957. It is recommended that you compile all the files participating in the
  7958. same link with the same options and also specify those options at
  7959. link time.
  7960. If LTO encounters objects with C linkage declared with incompatible
  7961. types in separate translation units to be linked together (undefined
  7962. behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
  7963. issued. The behavior is still undefined at run time. Similar
  7964. diagnostics may be raised for other languages.
  7965. Another feature of LTO is that it is possible to apply interprocedural
  7966. optimizations on files written in different languages:
  7967. @smallexample
  7968. gcc -c -flto foo.c
  7969. g++ -c -flto bar.cc
  7970. gfortran -c -flto baz.f90
  7971. g++ -o myprog -flto -O3 foo.o bar.o baz.o -lgfortran
  7972. @end smallexample
  7973. Notice that the final link is done with @command{g++} to get the C++
  7974. runtime libraries and @option{-lgfortran} is added to get the Fortran
  7975. runtime libraries. In general, when mixing languages in LTO mode, you
  7976. should use the same link command options as when mixing languages in a
  7977. regular (non-LTO) compilation.
  7978. If object files containing GIMPLE bytecode are stored in a library archive, say
  7979. @file{libfoo.a}, it is possible to extract and use them in an LTO link if you
  7980. are using a linker with plugin support. To create static libraries suitable
  7981. for LTO, use @command{gcc-ar} and @command{gcc-ranlib} instead of @command{ar}
  7982. and @command{ranlib};
  7983. to show the symbols of object files with GIMPLE bytecode, use
  7984. @command{gcc-nm}. Those commands require that @command{ar}, @command{ranlib}
  7985. and @command{nm} have been compiled with plugin support. At link time, use the the
  7986. flag @option{-fuse-linker-plugin} to ensure that the library participates in
  7987. the LTO optimization process:
  7988. @smallexample
  7989. gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo
  7990. @end smallexample
  7991. With the linker plugin enabled, the linker extracts the needed
  7992. GIMPLE files from @file{libfoo.a} and passes them on to the running GCC
  7993. to make them part of the aggregated GIMPLE image to be optimized.
  7994. If you are not using a linker with plugin support and/or do not
  7995. enable the linker plugin, then the objects inside @file{libfoo.a}
  7996. are extracted and linked as usual, but they do not participate
  7997. in the LTO optimization process. In order to make a static library suitable
  7998. for both LTO optimization and usual linkage, compile its object files with
  7999. @option{-flto} @option{-ffat-lto-objects}.
  8000. Link-time optimizations do not require the presence of the whole program to
  8001. operate. If the program does not require any symbols to be exported, it is
  8002. possible to combine @option{-flto} and @option{-fwhole-program} to allow
  8003. the interprocedural optimizers to use more aggressive assumptions which may
  8004. lead to improved optimization opportunities.
  8005. Use of @option{-fwhole-program} is not needed when linker plugin is
  8006. active (see @option{-fuse-linker-plugin}).
  8007. The current implementation of LTO makes no
  8008. attempt to generate bytecode that is portable between different
  8009. types of hosts. The bytecode files are versioned and there is a
  8010. strict version check, so bytecode files generated in one version of
  8011. GCC do not work with an older or newer version of GCC.
  8012. Link-time optimization does not work well with generation of debugging
  8013. information. Combining @option{-flto} with
  8014. @option{-g} is currently experimental and expected to produce unexpected
  8015. results.
  8016. If you specify the optional @var{n}, the optimization and code
  8017. generation done at link time is executed in parallel using @var{n}
  8018. parallel jobs by utilizing an installed @command{make} program. The
  8019. environment variable @env{MAKE} may be used to override the program
  8020. used. The default value for @var{n} is 1.
  8021. You can also specify @option{-flto=jobserver} to use GNU make's
  8022. job server mode to determine the number of parallel jobs. This
  8023. is useful when the Makefile calling GCC is already executing in parallel.
  8024. You must prepend a @samp{+} to the command recipe in the parent Makefile
  8025. for this to work. This option likely only works if @env{MAKE} is
  8026. GNU make.
  8027. @item -flto-partition=@var{alg}
  8028. @opindex flto-partition
  8029. Specify the partitioning algorithm used by the link-time optimizer.
  8030. The value is either @samp{1to1} to specify a partitioning mirroring
  8031. the original source files or @samp{balanced} to specify partitioning
  8032. into equally sized chunks (whenever possible) or @samp{max} to create
  8033. new partition for every symbol where possible. Specifying @samp{none}
  8034. as an algorithm disables partitioning and streaming completely.
  8035. The default value is @samp{balanced}. While @samp{1to1} can be used
  8036. as an workaround for various code ordering issues, the @samp{max}
  8037. partitioning is intended for internal testing only.
  8038. The value @samp{one} specifies that exactly one partition should be
  8039. used while the value @samp{none} bypasses partitioning and executes
  8040. the link-time optimization step directly from the WPA phase.
  8041. @item -flto-odr-type-merging
  8042. @opindex flto-odr-type-merging
  8043. Enable streaming of mangled types names of C++ types and their unification
  8044. at linktime. This increases size of LTO object files, but enable
  8045. diagnostics about One Definition Rule violations.
  8046. @item -flto-compression-level=@var{n}
  8047. @opindex flto-compression-level
  8048. This option specifies the level of compression used for intermediate
  8049. language written to LTO object files, and is only meaningful in
  8050. conjunction with LTO mode (@option{-flto}). Valid
  8051. values are 0 (no compression) to 9 (maximum compression). Values
  8052. outside this range are clamped to either 0 or 9. If the option is not
  8053. given, a default balanced compression setting is used.
  8054. @item -flto-report
  8055. @opindex flto-report
  8056. Prints a report with internal details on the workings of the link-time
  8057. optimizer. The contents of this report vary from version to version.
  8058. It is meant to be useful to GCC developers when processing object
  8059. files in LTO mode (via @option{-flto}).
  8060. Disabled by default.
  8061. @item -flto-report-wpa
  8062. @opindex flto-report-wpa
  8063. Like @option{-flto-report}, but only print for the WPA phase of Link
  8064. Time Optimization.
  8065. @item -fuse-linker-plugin
  8066. @opindex fuse-linker-plugin
  8067. Enables the use of a linker plugin during link-time optimization. This
  8068. option relies on plugin support in the linker, which is available in gold
  8069. or in GNU ld 2.21 or newer.
  8070. This option enables the extraction of object files with GIMPLE bytecode out
  8071. of library archives. This improves the quality of optimization by exposing
  8072. more code to the link-time optimizer. This information specifies what
  8073. symbols can be accessed externally (by non-LTO object or during dynamic
  8074. linking). Resulting code quality improvements on binaries (and shared
  8075. libraries that use hidden visibility) are similar to @option{-fwhole-program}.
  8076. See @option{-flto} for a description of the effect of this flag and how to
  8077. use it.
  8078. This option is enabled by default when LTO support in GCC is enabled
  8079. and GCC was configured for use with
  8080. a linker supporting plugins (GNU ld 2.21 or newer or gold).
  8081. @item -ffat-lto-objects
  8082. @opindex ffat-lto-objects
  8083. Fat LTO objects are object files that contain both the intermediate language
  8084. and the object code. This makes them usable for both LTO linking and normal
  8085. linking. This option is effective only when compiling with @option{-flto}
  8086. and is ignored at link time.
  8087. @option{-fno-fat-lto-objects} improves compilation time over plain LTO, but
  8088. requires the complete toolchain to be aware of LTO. It requires a linker with
  8089. linker plugin support for basic functionality. Additionally,
  8090. @command{nm}, @command{ar} and @command{ranlib}
  8091. need to support linker plugins to allow a full-featured build environment
  8092. (capable of building static libraries etc). GCC provides the @command{gcc-ar},
  8093. @command{gcc-nm}, @command{gcc-ranlib} wrappers to pass the right options
  8094. to these tools. With non fat LTO makefiles need to be modified to use them.
  8095. The default is @option{-fno-fat-lto-objects} on targets with linker plugin
  8096. support.
  8097. @item -fcompare-elim
  8098. @opindex fcompare-elim
  8099. After register allocation and post-register allocation instruction splitting,
  8100. identify arithmetic instructions that compute processor flags similar to a
  8101. comparison operation based on that arithmetic. If possible, eliminate the
  8102. explicit comparison operation.
  8103. This pass only applies to certain targets that cannot explicitly represent
  8104. the comparison operation before register allocation is complete.
  8105. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  8106. @item -fcprop-registers
  8107. @opindex fcprop-registers
  8108. After register allocation and post-register allocation instruction splitting,
  8109. perform a copy-propagation pass to try to reduce scheduling dependencies
  8110. and occasionally eliminate the copy.
  8111. Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}.
  8112. @item -fprofile-correction
  8113. @opindex fprofile-correction
  8114. Profiles collected using an instrumented binary for multi-threaded programs may
  8115. be inconsistent due to missed counter updates. When this option is specified,
  8116. GCC uses heuristics to correct or smooth out such inconsistencies. By
  8117. default, GCC emits an error message when an inconsistent profile is detected.
  8118. @item -fprofile-dir=@var{path}
  8119. @opindex fprofile-dir
  8120. Set the directory to search for the profile data files in to @var{path}.
  8121. This option affects only the profile data generated by
  8122. @option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs}
  8123. and used by @option{-fprofile-use} and @option{-fbranch-probabilities}
  8124. and its related options. Both absolute and relative paths can be used.
  8125. By default, GCC uses the current directory as @var{path}, thus the
  8126. profile data file appears in the same directory as the object file.
  8127. @item -fprofile-generate
  8128. @itemx -fprofile-generate=@var{path}
  8129. @opindex fprofile-generate
  8130. Enable options usually used for instrumenting application to produce
  8131. profile useful for later recompilation with profile feedback based
  8132. optimization. You must use @option{-fprofile-generate} both when
  8133. compiling and when linking your program.
  8134. The following options are enabled: @option{-fprofile-arcs}, @option{-fprofile-values}, @option{-fvpt}.
  8135. If @var{path} is specified, GCC looks at the @var{path} to find
  8136. the profile feedback data files. See @option{-fprofile-dir}.
  8137. @item -fprofile-use
  8138. @itemx -fprofile-use=@var{path}
  8139. @opindex fprofile-use
  8140. Enable profile feedback-directed optimizations,
  8141. and the following optimizations
  8142. which are generally profitable only with profile feedback available:
  8143. @option{-fbranch-probabilities}, @option{-fvpt},
  8144. @option{-funroll-loops}, @option{-fpeel-loops}, @option{-ftracer},
  8145. @option{-ftree-vectorize}, and @option{ftree-loop-distribute-patterns}.
  8146. By default, GCC emits an error message if the feedback profiles do not
  8147. match the source code. This error can be turned into a warning by using
  8148. @option{-Wcoverage-mismatch}. Note this may result in poorly optimized
  8149. code.
  8150. If @var{path} is specified, GCC looks at the @var{path} to find
  8151. the profile feedback data files. See @option{-fprofile-dir}.
  8152. @item -fauto-profile
  8153. @itemx -fauto-profile=@var{path}
  8154. @opindex fauto-profile
  8155. Enable sampling-based feedback-directed optimizations,
  8156. and the following optimizations
  8157. which are generally profitable only with profile feedback available:
  8158. @option{-fbranch-probabilities}, @option{-fvpt},
  8159. @option{-funroll-loops}, @option{-fpeel-loops}, @option{-ftracer},
  8160. @option{-ftree-vectorize},
  8161. @option{-finline-functions}, @option{-fipa-cp}, @option{-fipa-cp-clone},
  8162. @option{-fpredictive-commoning}, @option{-funswitch-loops},
  8163. @option{-fgcse-after-reload}, and @option{-ftree-loop-distribute-patterns}.
  8164. @var{path} is the name of a file containing AutoFDO profile information.
  8165. If omitted, it defaults to @file{fbdata.afdo} in the current directory.
  8166. Producing an AutoFDO profile data file requires running your program
  8167. with the @command{perf} utility on a supported GNU/Linux target system.
  8168. For more information, see @uref{https://perf.wiki.kernel.org/}.
  8169. E.g.
  8170. @smallexample
  8171. perf record -e br_inst_retired:near_taken -b -o perf.data \
  8172. -- your_program
  8173. @end smallexample
  8174. Then use the @command{create_gcov} tool to convert the raw profile data
  8175. to a format that can be used by GCC.@ You must also supply the
  8176. unstripped binary for your program to this tool.
  8177. See @uref{https://github.com/google/autofdo}.
  8178. E.g.
  8179. @smallexample
  8180. create_gcov --binary=your_program.unstripped --profile=perf.data \
  8181. --gcov=profile.afdo
  8182. @end smallexample
  8183. @end table
  8184. The following options control compiler behavior regarding floating-point
  8185. arithmetic. These options trade off between speed and
  8186. correctness. All must be specifically enabled.
  8187. @table @gcctabopt
  8188. @item -ffloat-store
  8189. @opindex ffloat-store
  8190. Do not store floating-point variables in registers, and inhibit other
  8191. options that might change whether a floating-point value is taken from a
  8192. register or memory.
  8193. @cindex floating-point precision
  8194. This option prevents undesirable excess precision on machines such as
  8195. the 68000 where the floating registers (of the 68881) keep more
  8196. precision than a @code{double} is supposed to have. Similarly for the
  8197. x86 architecture. For most programs, the excess precision does only
  8198. good, but a few programs rely on the precise definition of IEEE floating
  8199. point. Use @option{-ffloat-store} for such programs, after modifying
  8200. them to store all pertinent intermediate computations into variables.
  8201. @item -fexcess-precision=@var{style}
  8202. @opindex fexcess-precision
  8203. This option allows further control over excess precision on machines
  8204. where floating-point registers have more precision than the IEEE
  8205. @code{float} and @code{double} types and the processor does not
  8206. support operations rounding to those types. By default,
  8207. @option{-fexcess-precision=fast} is in effect; this means that
  8208. operations are carried out in the precision of the registers and that
  8209. it is unpredictable when rounding to the types specified in the source
  8210. code takes place. When compiling C, if
  8211. @option{-fexcess-precision=standard} is specified then excess
  8212. precision follows the rules specified in ISO C99; in particular,
  8213. both casts and assignments cause values to be rounded to their
  8214. semantic types (whereas @option{-ffloat-store} only affects
  8215. assignments). This option is enabled by default for C if a strict
  8216. conformance option such as @option{-std=c99} is used.
  8217. @opindex mfpmath
  8218. @option{-fexcess-precision=standard} is not implemented for languages
  8219. other than C, and has no effect if
  8220. @option{-funsafe-math-optimizations} or @option{-ffast-math} is
  8221. specified. On the x86, it also has no effect if @option{-mfpmath=sse}
  8222. or @option{-mfpmath=sse+387} is specified; in the former case, IEEE
  8223. semantics apply without excess precision, and in the latter, rounding
  8224. is unpredictable.
  8225. @item -ffast-math
  8226. @opindex ffast-math
  8227. Sets the options @option{-fno-math-errno}, @option{-funsafe-math-optimizations},
  8228. @option{-ffinite-math-only}, @option{-fno-rounding-math},
  8229. @option{-fno-signaling-nans} and @option{-fcx-limited-range}.
  8230. This option causes the preprocessor macro @code{__FAST_MATH__} to be defined.
  8231. This option is not turned on by any @option{-O} option besides
  8232. @option{-Ofast} since it can result in incorrect output for programs
  8233. that depend on an exact implementation of IEEE or ISO rules/specifications
  8234. for math functions. It may, however, yield faster code for programs
  8235. that do not require the guarantees of these specifications.
  8236. @item -fno-math-errno
  8237. @opindex fno-math-errno
  8238. Do not set @code{errno} after calling math functions that are executed
  8239. with a single instruction, e.g., @code{sqrt}. A program that relies on
  8240. IEEE exceptions for math error handling may want to use this flag
  8241. for speed while maintaining IEEE arithmetic compatibility.
  8242. This option is not turned on by any @option{-O} option since
  8243. it can result in incorrect output for programs that depend on
  8244. an exact implementation of IEEE or ISO rules/specifications for
  8245. math functions. It may, however, yield faster code for programs
  8246. that do not require the guarantees of these specifications.
  8247. The default is @option{-fmath-errno}.
  8248. On Darwin systems, the math library never sets @code{errno}. There is
  8249. therefore no reason for the compiler to consider the possibility that
  8250. it might, and @option{-fno-math-errno} is the default.
  8251. @item -funsafe-math-optimizations
  8252. @opindex funsafe-math-optimizations
  8253. Allow optimizations for floating-point arithmetic that (a) assume
  8254. that arguments and results are valid and (b) may violate IEEE or
  8255. ANSI standards. When used at link-time, it may include libraries
  8256. or startup files that change the default FPU control word or other
  8257. similar optimizations.
  8258. This option is not turned on by any @option{-O} option since
  8259. it can result in incorrect output for programs that depend on
  8260. an exact implementation of IEEE or ISO rules/specifications for
  8261. math functions. It may, however, yield faster code for programs
  8262. that do not require the guarantees of these specifications.
  8263. Enables @option{-fno-signed-zeros}, @option{-fno-trapping-math},
  8264. @option{-fassociative-math} and @option{-freciprocal-math}.
  8265. The default is @option{-fno-unsafe-math-optimizations}.
  8266. @item -fassociative-math
  8267. @opindex fassociative-math
  8268. Allow re-association of operands in series of floating-point operations.
  8269. This violates the ISO C and C++ language standard by possibly changing
  8270. computation result. NOTE: re-ordering may change the sign of zero as
  8271. well as ignore NaNs and inhibit or create underflow or overflow (and
  8272. thus cannot be used on code that relies on rounding behavior like
  8273. @code{(x + 2**52) - 2**52}. May also reorder floating-point comparisons
  8274. and thus may not be used when ordered comparisons are required.
  8275. This option requires that both @option{-fno-signed-zeros} and
  8276. @option{-fno-trapping-math} be in effect. Moreover, it doesn't make
  8277. much sense with @option{-frounding-math}. For Fortran the option
  8278. is automatically enabled when both @option{-fno-signed-zeros} and
  8279. @option{-fno-trapping-math} are in effect.
  8280. The default is @option{-fno-associative-math}.
  8281. @item -freciprocal-math
  8282. @opindex freciprocal-math
  8283. Allow the reciprocal of a value to be used instead of dividing by
  8284. the value if this enables optimizations. For example @code{x / y}
  8285. can be replaced with @code{x * (1/y)}, which is useful if @code{(1/y)}
  8286. is subject to common subexpression elimination. Note that this loses
  8287. precision and increases the number of flops operating on the value.
  8288. The default is @option{-fno-reciprocal-math}.
  8289. @item -ffinite-math-only
  8290. @opindex ffinite-math-only
  8291. Allow optimizations for floating-point arithmetic that assume
  8292. that arguments and results are not NaNs or +-Infs.
  8293. This option is not turned on by any @option{-O} option since
  8294. it can result in incorrect output for programs that depend on
  8295. an exact implementation of IEEE or ISO rules/specifications for
  8296. math functions. It may, however, yield faster code for programs
  8297. that do not require the guarantees of these specifications.
  8298. The default is @option{-fno-finite-math-only}.
  8299. @item -fno-signed-zeros
  8300. @opindex fno-signed-zeros
  8301. Allow optimizations for floating-point arithmetic that ignore the
  8302. signedness of zero. IEEE arithmetic specifies the behavior of
  8303. distinct +0.0 and @minus{}0.0 values, which then prohibits simplification
  8304. of expressions such as x+0.0 or 0.0*x (even with @option{-ffinite-math-only}).
  8305. This option implies that the sign of a zero result isn't significant.
  8306. The default is @option{-fsigned-zeros}.
  8307. @item -fno-trapping-math
  8308. @opindex fno-trapping-math
  8309. Compile code assuming that floating-point operations cannot generate
  8310. user-visible traps. These traps include division by zero, overflow,
  8311. underflow, inexact result and invalid operation. This option requires
  8312. that @option{-fno-signaling-nans} be in effect. Setting this option may
  8313. allow faster code if one relies on ``non-stop'' IEEE arithmetic, for example.
  8314. This option should never be turned on by any @option{-O} option since
  8315. it can result in incorrect output for programs that depend on
  8316. an exact implementation of IEEE or ISO rules/specifications for
  8317. math functions.
  8318. The default is @option{-ftrapping-math}.
  8319. @item -frounding-math
  8320. @opindex frounding-math
  8321. Disable transformations and optimizations that assume default floating-point
  8322. rounding behavior. This is round-to-zero for all floating point
  8323. to integer conversions, and round-to-nearest for all other arithmetic
  8324. truncations. This option should be specified for programs that change
  8325. the FP rounding mode dynamically, or that may be executed with a
  8326. non-default rounding mode. This option disables constant folding of
  8327. floating-point expressions at compile time (which may be affected by
  8328. rounding mode) and arithmetic transformations that are unsafe in the
  8329. presence of sign-dependent rounding modes.
  8330. The default is @option{-fno-rounding-math}.
  8331. This option is experimental and does not currently guarantee to
  8332. disable all GCC optimizations that are affected by rounding mode.
  8333. Future versions of GCC may provide finer control of this setting
  8334. using C99's @code{FENV_ACCESS} pragma. This command-line option
  8335. will be used to specify the default state for @code{FENV_ACCESS}.
  8336. @item -fsignaling-nans
  8337. @opindex fsignaling-nans
  8338. Compile code assuming that IEEE signaling NaNs may generate user-visible
  8339. traps during floating-point operations. Setting this option disables
  8340. optimizations that may change the number of exceptions visible with
  8341. signaling NaNs. This option implies @option{-ftrapping-math}.
  8342. This option causes the preprocessor macro @code{__SUPPORT_SNAN__} to
  8343. be defined.
  8344. The default is @option{-fno-signaling-nans}.
  8345. This option is experimental and does not currently guarantee to
  8346. disable all GCC optimizations that affect signaling NaN behavior.
  8347. @item -fsingle-precision-constant
  8348. @opindex fsingle-precision-constant
  8349. Treat floating-point constants as single precision instead of
  8350. implicitly converting them to double-precision constants.
  8351. @item -fcx-limited-range
  8352. @opindex fcx-limited-range
  8353. When enabled, this option states that a range reduction step is not
  8354. needed when performing complex division. Also, there is no checking
  8355. whether the result of a complex multiplication or division is @code{NaN
  8356. + I*NaN}, with an attempt to rescue the situation in that case. The
  8357. default is @option{-fno-cx-limited-range}, but is enabled by
  8358. @option{-ffast-math}.
  8359. This option controls the default setting of the ISO C99
  8360. @code{CX_LIMITED_RANGE} pragma. Nevertheless, the option applies to
  8361. all languages.
  8362. @item -fcx-fortran-rules
  8363. @opindex fcx-fortran-rules
  8364. Complex multiplication and division follow Fortran rules. Range
  8365. reduction is done as part of complex division, but there is no checking
  8366. whether the result of a complex multiplication or division is @code{NaN
  8367. + I*NaN}, with an attempt to rescue the situation in that case.
  8368. The default is @option{-fno-cx-fortran-rules}.
  8369. @end table
  8370. The following options control optimizations that may improve
  8371. performance, but are not enabled by any @option{-O} options. This
  8372. section includes experimental options that may produce broken code.
  8373. @table @gcctabopt
  8374. @item -fbranch-probabilities
  8375. @opindex fbranch-probabilities
  8376. After running a program compiled with @option{-fprofile-arcs}
  8377. (@pxref{Debugging Options,, Options for Debugging Your Program or
  8378. @command{gcc}}), you can compile it a second time using
  8379. @option{-fbranch-probabilities}, to improve optimizations based on
  8380. the number of times each branch was taken. When a program
  8381. compiled with @option{-fprofile-arcs} exits, it saves arc execution
  8382. counts to a file called @file{@var{sourcename}.gcda} for each source
  8383. file. The information in this data file is very dependent on the
  8384. structure of the generated code, so you must use the same source code
  8385. and the same optimization options for both compilations.
  8386. With @option{-fbranch-probabilities}, GCC puts a
  8387. @samp{REG_BR_PROB} note on each @samp{JUMP_INSN} and @samp{CALL_INSN}.
  8388. These can be used to improve optimization. Currently, they are only
  8389. used in one place: in @file{reorg.c}, instead of guessing which path a
  8390. branch is most likely to take, the @samp{REG_BR_PROB} values are used to
  8391. exactly determine which path is taken more often.
  8392. @item -fprofile-values
  8393. @opindex fprofile-values
  8394. If combined with @option{-fprofile-arcs}, it adds code so that some
  8395. data about values of expressions in the program is gathered.
  8396. With @option{-fbranch-probabilities}, it reads back the data gathered
  8397. from profiling values of expressions for usage in optimizations.
  8398. Enabled with @option{-fprofile-generate} and @option{-fprofile-use}.
  8399. @item -fprofile-reorder-functions
  8400. @opindex fprofile-reorder-functions
  8401. Function reordering based on profile instrumentation collects
  8402. first time of execution of a function and orders these functions
  8403. in ascending order.
  8404. Enabled with @option{-fprofile-use}.
  8405. @item -fvpt
  8406. @opindex fvpt
  8407. If combined with @option{-fprofile-arcs}, this option instructs the compiler
  8408. to add code to gather information about values of expressions.
  8409. With @option{-fbranch-probabilities}, it reads back the data gathered
  8410. and actually performs the optimizations based on them.
  8411. Currently the optimizations include specialization of division operations
  8412. using the knowledge about the value of the denominator.
  8413. @item -frename-registers
  8414. @opindex frename-registers
  8415. Attempt to avoid false dependencies in scheduled code by making use
  8416. of registers left over after register allocation. This optimization
  8417. most benefits processors with lots of registers. Depending on the
  8418. debug information format adopted by the target, however, it can
  8419. make debugging impossible, since variables no longer stay in
  8420. a ``home register''.
  8421. Enabled by default with @option{-funroll-loops} and @option{-fpeel-loops}.
  8422. @item -fschedule-fusion
  8423. @opindex fschedule-fusion
  8424. Performs a target dependent pass over the instruction stream to schedule
  8425. instructions of same type together because target machine can execute them
  8426. more efficiently if they are adjacent to each other in the instruction flow.
  8427. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.
  8428. @item -ftracer
  8429. @opindex ftracer
  8430. Perform tail duplication to enlarge superblock size. This transformation
  8431. simplifies the control flow of the function allowing other optimizations to do
  8432. a better job.
  8433. Enabled with @option{-fprofile-use}.
  8434. @item -funroll-loops
  8435. @opindex funroll-loops
  8436. Unroll loops whose number of iterations can be determined at compile time or
  8437. upon entry to the loop. @option{-funroll-loops} implies
  8438. @option{-frerun-cse-after-loop}, @option{-fweb} and @option{-frename-registers}.
  8439. It also turns on complete loop peeling (i.e.@: complete removal of loops with
  8440. a small constant number of iterations). This option makes code larger, and may
  8441. or may not make it run faster.
  8442. Enabled with @option{-fprofile-use}.
  8443. @item -funroll-all-loops
  8444. @opindex funroll-all-loops
  8445. Unroll all loops, even if their number of iterations is uncertain when
  8446. the loop is entered. This usually makes programs run more slowly.
  8447. @option{-funroll-all-loops} implies the same options as
  8448. @option{-funroll-loops}.
  8449. @item -fpeel-loops
  8450. @opindex fpeel-loops
  8451. Peels loops for which there is enough information that they do not
  8452. roll much (from profile feedback). It also turns on complete loop peeling
  8453. (i.e.@: complete removal of loops with small constant number of iterations).
  8454. Enabled with @option{-fprofile-use}.
  8455. @item -fmove-loop-invariants
  8456. @opindex fmove-loop-invariants
  8457. Enables the loop invariant motion pass in the RTL loop optimizer. Enabled
  8458. at level @option{-O1}
  8459. @item -funswitch-loops
  8460. @opindex funswitch-loops
  8461. Move branches with loop invariant conditions out of the loop, with duplicates
  8462. of the loop on both branches (modified according to result of the condition).
  8463. @item -ffunction-sections
  8464. @itemx -fdata-sections
  8465. @opindex ffunction-sections
  8466. @opindex fdata-sections
  8467. Place each function or data item into its own section in the output
  8468. file if the target supports arbitrary sections. The name of the
  8469. function or the name of the data item determines the section's name
  8470. in the output file.
  8471. Use these options on systems where the linker can perform optimizations
  8472. to improve locality of reference in the instruction space. Most systems
  8473. using the ELF object format and SPARC processors running Solaris 2 have
  8474. linkers with such optimizations. AIX may have these optimizations in
  8475. the future.
  8476. Only use these options when there are significant benefits from doing
  8477. so. When you specify these options, the assembler and linker
  8478. create larger object and executable files and are also slower.
  8479. You cannot use @command{gprof} on all systems if you
  8480. specify this option, and you may have problems with debugging if
  8481. you specify both this option and @option{-g}.
  8482. @item -fbranch-target-load-optimize
  8483. @opindex fbranch-target-load-optimize
  8484. Perform branch target register load optimization before prologue / epilogue
  8485. threading.
  8486. The use of target registers can typically be exposed only during reload,
  8487. thus hoisting loads out of loops and doing inter-block scheduling needs
  8488. a separate optimization pass.
  8489. @item -fbranch-target-load-optimize2
  8490. @opindex fbranch-target-load-optimize2
  8491. Perform branch target register load optimization after prologue / epilogue
  8492. threading.
  8493. @item -fbtr-bb-exclusive
  8494. @opindex fbtr-bb-exclusive
  8495. When performing branch target register load optimization, don't reuse
  8496. branch target registers within any basic block.
  8497. @item -fstack-protector
  8498. @opindex fstack-protector
  8499. Emit extra code to check for buffer overflows, such as stack smashing
  8500. attacks. This is done by adding a guard variable to functions with
  8501. vulnerable objects. This includes functions that call @code{alloca}, and
  8502. functions with buffers larger than 8 bytes. The guards are initialized
  8503. when a function is entered and then checked when the function exits.
  8504. If a guard check fails, an error message is printed and the program exits.
  8505. @item -fstack-protector-all
  8506. @opindex fstack-protector-all
  8507. Like @option{-fstack-protector} except that all functions are protected.
  8508. @item -fstack-protector-strong
  8509. @opindex fstack-protector-strong
  8510. Like @option{-fstack-protector} but includes additional functions to
  8511. be protected --- those that have local array definitions, or have
  8512. references to local frame addresses.
  8513. @item -fstack-protector-explicit
  8514. @opindex fstack-protector-explicit
  8515. Like @option{-fstack-protector} but only protects those functions which
  8516. have the @code{stack_protect} attribute
  8517. @item -fstdarg-opt
  8518. @opindex fstdarg-opt
  8519. Optimize the prologue of variadic argument functions with respect to usage of
  8520. those arguments.
  8521. @item -fsection-anchors
  8522. @opindex fsection-anchors
  8523. Try to reduce the number of symbolic address calculations by using
  8524. shared ``anchor'' symbols to address nearby objects. This transformation
  8525. can help to reduce the number of GOT entries and GOT accesses on some
  8526. targets.
  8527. For example, the implementation of the following function @code{foo}:
  8528. @smallexample
  8529. static int a, b, c;
  8530. int foo (void) @{ return a + b + c; @}
  8531. @end smallexample
  8532. @noindent
  8533. usually calculates the addresses of all three variables, but if you
  8534. compile it with @option{-fsection-anchors}, it accesses the variables
  8535. from a common anchor point instead. The effect is similar to the
  8536. following pseudocode (which isn't valid C):
  8537. @smallexample
  8538. int foo (void)
  8539. @{
  8540. register int *xr = &x;
  8541. return xr[&a - &x] + xr[&b - &x] + xr[&c - &x];
  8542. @}
  8543. @end smallexample
  8544. Not all targets support this option.
  8545. @item --param @var{name}=@var{value}
  8546. @opindex param
  8547. In some places, GCC uses various constants to control the amount of
  8548. optimization that is done. For example, GCC does not inline functions
  8549. that contain more than a certain number of instructions. You can
  8550. control some of these constants on the command line using the
  8551. @option{--param} option.
  8552. The names of specific parameters, and the meaning of the values, are
  8553. tied to the internals of the compiler, and are subject to change
  8554. without notice in future releases.
  8555. In each case, the @var{value} is an integer. The allowable choices for
  8556. @var{name} are:
  8557. @table @gcctabopt
  8558. @item predictable-branch-outcome
  8559. When branch is predicted to be taken with probability lower than this threshold
  8560. (in percent), then it is considered well predictable. The default is 10.
  8561. @item max-crossjump-edges
  8562. The maximum number of incoming edges to consider for cross-jumping.
  8563. The algorithm used by @option{-fcrossjumping} is @math{O(N^2)} in
  8564. the number of edges incoming to each block. Increasing values mean
  8565. more aggressive optimization, making the compilation time increase with
  8566. probably small improvement in executable size.
  8567. @item min-crossjump-insns
  8568. The minimum number of instructions that must be matched at the end
  8569. of two blocks before cross-jumping is performed on them. This
  8570. value is ignored in the case where all instructions in the block being
  8571. cross-jumped from are matched. The default value is 5.
  8572. @item max-grow-copy-bb-insns
  8573. The maximum code size expansion factor when copying basic blocks
  8574. instead of jumping. The expansion is relative to a jump instruction.
  8575. The default value is 8.
  8576. @item max-goto-duplication-insns
  8577. The maximum number of instructions to duplicate to a block that jumps
  8578. to a computed goto. To avoid @math{O(N^2)} behavior in a number of
  8579. passes, GCC factors computed gotos early in the compilation process,
  8580. and unfactors them as late as possible. Only computed jumps at the
  8581. end of a basic blocks with no more than max-goto-duplication-insns are
  8582. unfactored. The default value is 8.
  8583. @item max-delay-slot-insn-search
  8584. The maximum number of instructions to consider when looking for an
  8585. instruction to fill a delay slot. If more than this arbitrary number of
  8586. instructions are searched, the time savings from filling the delay slot
  8587. are minimal, so stop searching. Increasing values mean more
  8588. aggressive optimization, making the compilation time increase with probably
  8589. small improvement in execution time.
  8590. @item max-delay-slot-live-search
  8591. When trying to fill delay slots, the maximum number of instructions to
  8592. consider when searching for a block with valid live register
  8593. information. Increasing this arbitrarily chosen value means more
  8594. aggressive optimization, increasing the compilation time. This parameter
  8595. should be removed when the delay slot code is rewritten to maintain the
  8596. control-flow graph.
  8597. @item max-gcse-memory
  8598. The approximate maximum amount of memory that can be allocated in
  8599. order to perform the global common subexpression elimination
  8600. optimization. If more memory than specified is required, the
  8601. optimization is not done.
  8602. @item max-gcse-insertion-ratio
  8603. If the ratio of expression insertions to deletions is larger than this value
  8604. for any expression, then RTL PRE inserts or removes the expression and thus
  8605. leaves partially redundant computations in the instruction stream. The default value is 20.
  8606. @item max-pending-list-length
  8607. The maximum number of pending dependencies scheduling allows
  8608. before flushing the current state and starting over. Large functions
  8609. with few branches or calls can create excessively large lists which
  8610. needlessly consume memory and resources.
  8611. @item max-modulo-backtrack-attempts
  8612. The maximum number of backtrack attempts the scheduler should make
  8613. when modulo scheduling a loop. Larger values can exponentially increase
  8614. compilation time.
  8615. @item max-inline-insns-single
  8616. Several parameters control the tree inliner used in GCC@.
  8617. This number sets the maximum number of instructions (counted in GCC's
  8618. internal representation) in a single function that the tree inliner
  8619. considers for inlining. This only affects functions declared
  8620. inline and methods implemented in a class declaration (C++).
  8621. The default value is 400.
  8622. @item max-inline-insns-auto
  8623. When you use @option{-finline-functions} (included in @option{-O3}),
  8624. a lot of functions that would otherwise not be considered for inlining
  8625. by the compiler are investigated. To those functions, a different
  8626. (more restrictive) limit compared to functions declared inline can
  8627. be applied.
  8628. The default value is 40.
  8629. @item inline-min-speedup
  8630. When estimated performance improvement of caller + callee runtime exceeds this
  8631. threshold (in precent), the function can be inlined regardless the limit on
  8632. @option{--param max-inline-insns-single} and @option{--param
  8633. max-inline-insns-auto}.
  8634. @item large-function-insns
  8635. The limit specifying really large functions. For functions larger than this
  8636. limit after inlining, inlining is constrained by
  8637. @option{--param large-function-growth}. This parameter is useful primarily
  8638. to avoid extreme compilation time caused by non-linear algorithms used by the
  8639. back end.
  8640. The default value is 2700.
  8641. @item large-function-growth
  8642. Specifies maximal growth of large function caused by inlining in percents.
  8643. The default value is 100 which limits large function growth to 2.0 times
  8644. the original size.
  8645. @item large-unit-insns
  8646. The limit specifying large translation unit. Growth caused by inlining of
  8647. units larger than this limit is limited by @option{--param inline-unit-growth}.
  8648. For small units this might be too tight.
  8649. For example, consider a unit consisting of function A
  8650. that is inline and B that just calls A three times. If B is small relative to
  8651. A, the growth of unit is 300\% and yet such inlining is very sane. For very
  8652. large units consisting of small inlineable functions, however, the overall unit
  8653. growth limit is needed to avoid exponential explosion of code size. Thus for
  8654. smaller units, the size is increased to @option{--param large-unit-insns}
  8655. before applying @option{--param inline-unit-growth}. The default is 10000.
  8656. @item inline-unit-growth
  8657. Specifies maximal overall growth of the compilation unit caused by inlining.
  8658. The default value is 20 which limits unit growth to 1.2 times the original
  8659. size. Cold functions (either marked cold via an attribute or by profile
  8660. feedback) are not accounted into the unit size.
  8661. @item ipcp-unit-growth
  8662. Specifies maximal overall growth of the compilation unit caused by
  8663. interprocedural constant propagation. The default value is 10 which limits
  8664. unit growth to 1.1 times the original size.
  8665. @item large-stack-frame
  8666. The limit specifying large stack frames. While inlining the algorithm is trying
  8667. to not grow past this limit too much. The default value is 256 bytes.
  8668. @item large-stack-frame-growth
  8669. Specifies maximal growth of large stack frames caused by inlining in percents.
  8670. The default value is 1000 which limits large stack frame growth to 11 times
  8671. the original size.
  8672. @item max-inline-insns-recursive
  8673. @itemx max-inline-insns-recursive-auto
  8674. Specifies the maximum number of instructions an out-of-line copy of a
  8675. self-recursive inline
  8676. function can grow into by performing recursive inlining.
  8677. @option{--param max-inline-insns-recursive} applies to functions
  8678. declared inline.
  8679. For functions not declared inline, recursive inlining
  8680. happens only when @option{-finline-functions} (included in @option{-O3}) is
  8681. enabled; @option{--param max-inline-insns-recursive-auto} applies instead. The
  8682. default value is 450.
  8683. @item max-inline-recursive-depth
  8684. @itemx max-inline-recursive-depth-auto
  8685. Specifies the maximum recursion depth used for recursive inlining.
  8686. @option{--param max-inline-recursive-depth} applies to functions
  8687. declared inline. For functions not declared inline, recursive inlining
  8688. happens only when @option{-finline-functions} (included in @option{-O3}) is
  8689. enabled; @option{--param max-inline-recursive-depth-auto} applies instead. The
  8690. default value is 8.
  8691. @item min-inline-recursive-probability
  8692. Recursive inlining is profitable only for function having deep recursion
  8693. in average and can hurt for function having little recursion depth by
  8694. increasing the prologue size or complexity of function body to other
  8695. optimizers.
  8696. When profile feedback is available (see @option{-fprofile-generate}) the actual
  8697. recursion depth can be guessed from probability that function recurses via a
  8698. given call expression. This parameter limits inlining only to call expressions
  8699. whose probability exceeds the given threshold (in percents).
  8700. The default value is 10.
  8701. @item early-inlining-insns
  8702. Specify growth that the early inliner can make. In effect it increases
  8703. the amount of inlining for code having a large abstraction penalty.
  8704. The default value is 14.
  8705. @item max-early-inliner-iterations
  8706. Limit of iterations of the early inliner. This basically bounds
  8707. the number of nested indirect calls the early inliner can resolve.
  8708. Deeper chains are still handled by late inlining.
  8709. @item comdat-sharing-probability
  8710. Probability (in percent) that C++ inline function with comdat visibility
  8711. are shared across multiple compilation units. The default value is 20.
  8712. @item profile-func-internal-id
  8713. A parameter to control whether to use function internal id in profile
  8714. database lookup. If the value is 0, the compiler uses an id that
  8715. is based on function assembler name and filename, which makes old profile
  8716. data more tolerant to source changes such as function reordering etc.
  8717. The default value is 0.
  8718. @item min-vect-loop-bound
  8719. The minimum number of iterations under which loops are not vectorized
  8720. when @option{-ftree-vectorize} is used. The number of iterations after
  8721. vectorization needs to be greater than the value specified by this option
  8722. to allow vectorization. The default value is 0.
  8723. @item gcse-cost-distance-ratio
  8724. Scaling factor in calculation of maximum distance an expression
  8725. can be moved by GCSE optimizations. This is currently supported only in the
  8726. code hoisting pass. The bigger the ratio, the more aggressive code hoisting
  8727. is with simple expressions, i.e., the expressions that have cost
  8728. less than @option{gcse-unrestricted-cost}. Specifying 0 disables
  8729. hoisting of simple expressions. The default value is 10.
  8730. @item gcse-unrestricted-cost
  8731. Cost, roughly measured as the cost of a single typical machine
  8732. instruction, at which GCSE optimizations do not constrain
  8733. the distance an expression can travel. This is currently
  8734. supported only in the code hoisting pass. The lesser the cost,
  8735. the more aggressive code hoisting is. Specifying 0
  8736. allows all expressions to travel unrestricted distances.
  8737. The default value is 3.
  8738. @item max-hoist-depth
  8739. The depth of search in the dominator tree for expressions to hoist.
  8740. This is used to avoid quadratic behavior in hoisting algorithm.
  8741. The value of 0 does not limit on the search, but may slow down compilation
  8742. of huge functions. The default value is 30.
  8743. @item max-tail-merge-comparisons
  8744. The maximum amount of similar bbs to compare a bb with. This is used to
  8745. avoid quadratic behavior in tree tail merging. The default value is 10.
  8746. @item max-tail-merge-iterations
  8747. The maximum amount of iterations of the pass over the function. This is used to
  8748. limit compilation time in tree tail merging. The default value is 2.
  8749. @item max-unrolled-insns
  8750. The maximum number of instructions that a loop may have to be unrolled.
  8751. If a loop is unrolled, this parameter also determines how many times
  8752. the loop code is unrolled.
  8753. @item max-average-unrolled-insns
  8754. The maximum number of instructions biased by probabilities of their execution
  8755. that a loop may have to be unrolled. If a loop is unrolled,
  8756. this parameter also determines how many times the loop code is unrolled.
  8757. @item max-unroll-times
  8758. The maximum number of unrollings of a single loop.
  8759. @item max-peeled-insns
  8760. The maximum number of instructions that a loop may have to be peeled.
  8761. If a loop is peeled, this parameter also determines how many times
  8762. the loop code is peeled.
  8763. @item max-peel-times
  8764. The maximum number of peelings of a single loop.
  8765. @item max-peel-branches
  8766. The maximum number of branches on the hot path through the peeled sequence.
  8767. @item max-completely-peeled-insns
  8768. The maximum number of insns of a completely peeled loop.
  8769. @item max-completely-peel-times
  8770. The maximum number of iterations of a loop to be suitable for complete peeling.
  8771. @item max-completely-peel-loop-nest-depth
  8772. The maximum depth of a loop nest suitable for complete peeling.
  8773. @item max-unswitch-insns
  8774. The maximum number of insns of an unswitched loop.
  8775. @item max-unswitch-level
  8776. The maximum number of branches unswitched in a single loop.
  8777. @item lim-expensive
  8778. The minimum cost of an expensive expression in the loop invariant motion.
  8779. @item iv-consider-all-candidates-bound
  8780. Bound on number of candidates for induction variables, below which
  8781. all candidates are considered for each use in induction variable
  8782. optimizations. If there are more candidates than this,
  8783. only the most relevant ones are considered to avoid quadratic time complexity.
  8784. @item iv-max-considered-uses
  8785. The induction variable optimizations give up on loops that contain more
  8786. induction variable uses.
  8787. @item iv-always-prune-cand-set-bound
  8788. If the number of candidates in the set is smaller than this value,
  8789. always try to remove unnecessary ivs from the set
  8790. when adding a new one.
  8791. @item scev-max-expr-size
  8792. Bound on size of expressions used in the scalar evolutions analyzer.
  8793. Large expressions slow the analyzer.
  8794. @item scev-max-expr-complexity
  8795. Bound on the complexity of the expressions in the scalar evolutions analyzer.
  8796. Complex expressions slow the analyzer.
  8797. @item omega-max-vars
  8798. The maximum number of variables in an Omega constraint system.
  8799. The default value is 128.
  8800. @item omega-max-geqs
  8801. The maximum number of inequalities in an Omega constraint system.
  8802. The default value is 256.
  8803. @item omega-max-eqs
  8804. The maximum number of equalities in an Omega constraint system.
  8805. The default value is 128.
  8806. @item omega-max-wild-cards
  8807. The maximum number of wildcard variables that the Omega solver is
  8808. able to insert. The default value is 18.
  8809. @item omega-hash-table-size
  8810. The size of the hash table in the Omega solver. The default value is
  8811. 550.
  8812. @item omega-max-keys
  8813. The maximal number of keys used by the Omega solver. The default
  8814. value is 500.
  8815. @item omega-eliminate-redundant-constraints
  8816. When set to 1, use expensive methods to eliminate all redundant
  8817. constraints. The default value is 0.
  8818. @item vect-max-version-for-alignment-checks
  8819. The maximum number of run-time checks that can be performed when
  8820. doing loop versioning for alignment in the vectorizer.
  8821. @item vect-max-version-for-alias-checks
  8822. The maximum number of run-time checks that can be performed when
  8823. doing loop versioning for alias in the vectorizer.
  8824. @item vect-max-peeling-for-alignment
  8825. The maximum number of loop peels to enhance access alignment
  8826. for vectorizer. Value -1 means 'no limit'.
  8827. @item max-iterations-to-track
  8828. The maximum number of iterations of a loop the brute-force algorithm
  8829. for analysis of the number of iterations of the loop tries to evaluate.
  8830. @item hot-bb-count-ws-permille
  8831. A basic block profile count is considered hot if it contributes to
  8832. the given permillage (i.e. 0...1000) of the entire profiled execution.
  8833. @item hot-bb-frequency-fraction
  8834. Select fraction of the entry block frequency of executions of basic block in
  8835. function given basic block needs to have to be considered hot.
  8836. @item max-predicted-iterations
  8837. The maximum number of loop iterations we predict statically. This is useful
  8838. in cases where a function contains a single loop with known bound and
  8839. another loop with unknown bound.
  8840. The known number of iterations is predicted correctly, while
  8841. the unknown number of iterations average to roughly 10. This means that the
  8842. loop without bounds appears artificially cold relative to the other one.
  8843. @item builtin-expect-probability
  8844. Control the probability of the expression having the specified value. This
  8845. parameter takes a percentage (i.e. 0 ... 100) as input.
  8846. The default probability of 90 is obtained empirically.
  8847. @item align-threshold
  8848. Select fraction of the maximal frequency of executions of a basic block in
  8849. a function to align the basic block.
  8850. @item align-loop-iterations
  8851. A loop expected to iterate at least the selected number of iterations is
  8852. aligned.
  8853. @item tracer-dynamic-coverage
  8854. @itemx tracer-dynamic-coverage-feedback
  8855. This value is used to limit superblock formation once the given percentage of
  8856. executed instructions is covered. This limits unnecessary code size
  8857. expansion.
  8858. The @option{tracer-dynamic-coverage-feedback} parameter
  8859. is used only when profile
  8860. feedback is available. The real profiles (as opposed to statically estimated
  8861. ones) are much less balanced allowing the threshold to be larger value.
  8862. @item tracer-max-code-growth
  8863. Stop tail duplication once code growth has reached given percentage. This is
  8864. a rather artificial limit, as most of the duplicates are eliminated later in
  8865. cross jumping, so it may be set to much higher values than is the desired code
  8866. growth.
  8867. @item tracer-min-branch-ratio
  8868. Stop reverse growth when the reverse probability of best edge is less than this
  8869. threshold (in percent).
  8870. @item tracer-min-branch-ratio
  8871. @itemx tracer-min-branch-ratio-feedback
  8872. Stop forward growth if the best edge has probability lower than this
  8873. threshold.
  8874. Similarly to @option{tracer-dynamic-coverage} two values are present, one for
  8875. compilation for profile feedback and one for compilation without. The value
  8876. for compilation with profile feedback needs to be more conservative (higher) in
  8877. order to make tracer effective.
  8878. @item max-cse-path-length
  8879. The maximum number of basic blocks on path that CSE considers.
  8880. The default is 10.
  8881. @item max-cse-insns
  8882. The maximum number of instructions CSE processes before flushing.
  8883. The default is 1000.
  8884. @item ggc-min-expand
  8885. GCC uses a garbage collector to manage its own memory allocation. This
  8886. parameter specifies the minimum percentage by which the garbage
  8887. collector's heap should be allowed to expand between collections.
  8888. Tuning this may improve compilation speed; it has no effect on code
  8889. generation.
  8890. The default is 30% + 70% * (RAM/1GB) with an upper bound of 100% when
  8891. RAM >= 1GB@. If @code{getrlimit} is available, the notion of ``RAM'' is
  8892. the smallest of actual RAM and @code{RLIMIT_DATA} or @code{RLIMIT_AS}. If
  8893. GCC is not able to calculate RAM on a particular platform, the lower
  8894. bound of 30% is used. Setting this parameter and
  8895. @option{ggc-min-heapsize} to zero causes a full collection to occur at
  8896. every opportunity. This is extremely slow, but can be useful for
  8897. debugging.
  8898. @item ggc-min-heapsize
  8899. Minimum size of the garbage collector's heap before it begins bothering
  8900. to collect garbage. The first collection occurs after the heap expands
  8901. by @option{ggc-min-expand}% beyond @option{ggc-min-heapsize}. Again,
  8902. tuning this may improve compilation speed, and has no effect on code
  8903. generation.
  8904. The default is the smaller of RAM/8, RLIMIT_RSS, or a limit that
  8905. tries to ensure that RLIMIT_DATA or RLIMIT_AS are not exceeded, but
  8906. with a lower bound of 4096 (four megabytes) and an upper bound of
  8907. 131072 (128 megabytes). If GCC is not able to calculate RAM on a
  8908. particular platform, the lower bound is used. Setting this parameter
  8909. very large effectively disables garbage collection. Setting this
  8910. parameter and @option{ggc-min-expand} to zero causes a full collection
  8911. to occur at every opportunity.
  8912. @item max-reload-search-insns
  8913. The maximum number of instruction reload should look backward for equivalent
  8914. register. Increasing values mean more aggressive optimization, making the
  8915. compilation time increase with probably slightly better performance.
  8916. The default value is 100.
  8917. @item max-cselib-memory-locations
  8918. The maximum number of memory locations cselib should take into account.
  8919. Increasing values mean more aggressive optimization, making the compilation time
  8920. increase with probably slightly better performance. The default value is 500.
  8921. @item reorder-blocks-duplicate
  8922. @itemx reorder-blocks-duplicate-feedback
  8923. Used by the basic block reordering pass to decide whether to use unconditional
  8924. branch or duplicate the code on its destination. Code is duplicated when its
  8925. estimated size is smaller than this value multiplied by the estimated size of
  8926. unconditional jump in the hot spots of the program.
  8927. The @option{reorder-block-duplicate-feedback} parameter
  8928. is used only when profile
  8929. feedback is available. It may be set to higher values than
  8930. @option{reorder-block-duplicate} since information about the hot spots is more
  8931. accurate.
  8932. @item max-sched-ready-insns
  8933. The maximum number of instructions ready to be issued the scheduler should
  8934. consider at any given time during the first scheduling pass. Increasing
  8935. values mean more thorough searches, making the compilation time increase
  8936. with probably little benefit. The default value is 100.
  8937. @item max-sched-region-blocks
  8938. The maximum number of blocks in a region to be considered for
  8939. interblock scheduling. The default value is 10.
  8940. @item max-pipeline-region-blocks
  8941. The maximum number of blocks in a region to be considered for
  8942. pipelining in the selective scheduler. The default value is 15.
  8943. @item max-sched-region-insns
  8944. The maximum number of insns in a region to be considered for
  8945. interblock scheduling. The default value is 100.
  8946. @item max-pipeline-region-insns
  8947. The maximum number of insns in a region to be considered for
  8948. pipelining in the selective scheduler. The default value is 200.
  8949. @item min-spec-prob
  8950. The minimum probability (in percents) of reaching a source block
  8951. for interblock speculative scheduling. The default value is 40.
  8952. @item max-sched-extend-regions-iters
  8953. The maximum number of iterations through CFG to extend regions.
  8954. A value of 0 (the default) disables region extensions.
  8955. @item max-sched-insn-conflict-delay
  8956. The maximum conflict delay for an insn to be considered for speculative motion.
  8957. The default value is 3.
  8958. @item sched-spec-prob-cutoff
  8959. The minimal probability of speculation success (in percents), so that
  8960. speculative insns are scheduled.
  8961. The default value is 40.
  8962. @item sched-spec-state-edge-prob-cutoff
  8963. The minimum probability an edge must have for the scheduler to save its
  8964. state across it.
  8965. The default value is 10.
  8966. @item sched-mem-true-dep-cost
  8967. Minimal distance (in CPU cycles) between store and load targeting same
  8968. memory locations. The default value is 1.
  8969. @item selsched-max-lookahead
  8970. The maximum size of the lookahead window of selective scheduling. It is a
  8971. depth of search for available instructions.
  8972. The default value is 50.
  8973. @item selsched-max-sched-times
  8974. The maximum number of times that an instruction is scheduled during
  8975. selective scheduling. This is the limit on the number of iterations
  8976. through which the instruction may be pipelined. The default value is 2.
  8977. @item selsched-max-insns-to-rename
  8978. The maximum number of best instructions in the ready list that are considered
  8979. for renaming in the selective scheduler. The default value is 2.
  8980. @item sms-min-sc
  8981. The minimum value of stage count that swing modulo scheduler
  8982. generates. The default value is 2.
  8983. @item max-last-value-rtl
  8984. The maximum size measured as number of RTLs that can be recorded in an expression
  8985. in combiner for a pseudo register as last known value of that register. The default
  8986. is 10000.
  8987. @item max-combine-insns
  8988. The maximum number of instructions the RTL combiner tries to combine.
  8989. The default value is 2 at @option{-Og} and 4 otherwise.
  8990. @item integer-share-limit
  8991. Small integer constants can use a shared data structure, reducing the
  8992. compiler's memory usage and increasing its speed. This sets the maximum
  8993. value of a shared integer constant. The default value is 256.
  8994. @item ssp-buffer-size
  8995. The minimum size of buffers (i.e.@: arrays) that receive stack smashing
  8996. protection when @option{-fstack-protection} is used.
  8997. @item min-size-for-stack-sharing
  8998. The minimum size of variables taking part in stack slot sharing when not
  8999. optimizing. The default value is 32.
  9000. @item max-jump-thread-duplication-stmts
  9001. Maximum number of statements allowed in a block that needs to be
  9002. duplicated when threading jumps.
  9003. @item max-fields-for-field-sensitive
  9004. Maximum number of fields in a structure treated in
  9005. a field sensitive manner during pointer analysis. The default is zero
  9006. for @option{-O0} and @option{-O1},
  9007. and 100 for @option{-Os}, @option{-O2}, and @option{-O3}.
  9008. @item prefetch-latency
  9009. Estimate on average number of instructions that are executed before
  9010. prefetch finishes. The distance prefetched ahead is proportional
  9011. to this constant. Increasing this number may also lead to less
  9012. streams being prefetched (see @option{simultaneous-prefetches}).
  9013. @item simultaneous-prefetches
  9014. Maximum number of prefetches that can run at the same time.
  9015. @item l1-cache-line-size
  9016. The size of cache line in L1 cache, in bytes.
  9017. @item l1-cache-size
  9018. The size of L1 cache, in kilobytes.
  9019. @item l2-cache-size
  9020. The size of L2 cache, in kilobytes.
  9021. @item min-insn-to-prefetch-ratio
  9022. The minimum ratio between the number of instructions and the
  9023. number of prefetches to enable prefetching in a loop.
  9024. @item prefetch-min-insn-to-mem-ratio
  9025. The minimum ratio between the number of instructions and the
  9026. number of memory references to enable prefetching in a loop.
  9027. @item use-canonical-types
  9028. Whether the compiler should use the ``canonical'' type system. By
  9029. default, this should always be 1, which uses a more efficient internal
  9030. mechanism for comparing types in C++ and Objective-C++. However, if
  9031. bugs in the canonical type system are causing compilation failures,
  9032. set this value to 0 to disable canonical types.
  9033. @item switch-conversion-max-branch-ratio
  9034. Switch initialization conversion refuses to create arrays that are
  9035. bigger than @option{switch-conversion-max-branch-ratio} times the number of
  9036. branches in the switch.
  9037. @item max-partial-antic-length
  9038. Maximum length of the partial antic set computed during the tree
  9039. partial redundancy elimination optimization (@option{-ftree-pre}) when
  9040. optimizing at @option{-O3} and above. For some sorts of source code
  9041. the enhanced partial redundancy elimination optimization can run away,
  9042. consuming all of the memory available on the host machine. This
  9043. parameter sets a limit on the length of the sets that are computed,
  9044. which prevents the runaway behavior. Setting a value of 0 for
  9045. this parameter allows an unlimited set length.
  9046. @item sccvn-max-scc-size
  9047. Maximum size of a strongly connected component (SCC) during SCCVN
  9048. processing. If this limit is hit, SCCVN processing for the whole
  9049. function is not done and optimizations depending on it are
  9050. disabled. The default maximum SCC size is 10000.
  9051. @item sccvn-max-alias-queries-per-access
  9052. Maximum number of alias-oracle queries we perform when looking for
  9053. redundancies for loads and stores. If this limit is hit the search
  9054. is aborted and the load or store is not considered redundant. The
  9055. number of queries is algorithmically limited to the number of
  9056. stores on all paths from the load to the function entry.
  9057. The default maxmimum number of queries is 1000.
  9058. @item ira-max-loops-num
  9059. IRA uses regional register allocation by default. If a function
  9060. contains more loops than the number given by this parameter, only at most
  9061. the given number of the most frequently-executed loops form regions
  9062. for regional register allocation. The default value of the
  9063. parameter is 100.
  9064. @item ira-max-conflict-table-size
  9065. Although IRA uses a sophisticated algorithm to compress the conflict
  9066. table, the table can still require excessive amounts of memory for
  9067. huge functions. If the conflict table for a function could be more
  9068. than the size in MB given by this parameter, the register allocator
  9069. instead uses a faster, simpler, and lower-quality
  9070. algorithm that does not require building a pseudo-register conflict table.
  9071. The default value of the parameter is 2000.
  9072. @item ira-loop-reserved-regs
  9073. IRA can be used to evaluate more accurate register pressure in loops
  9074. for decisions to move loop invariants (see @option{-O3}). The number
  9075. of available registers reserved for some other purposes is given
  9076. by this parameter. The default value of the parameter is 2, which is
  9077. the minimal number of registers needed by typical instructions.
  9078. This value is the best found from numerous experiments.
  9079. @item lra-inheritance-ebb-probability-cutoff
  9080. LRA tries to reuse values reloaded in registers in subsequent insns.
  9081. This optimization is called inheritance. EBB is used as a region to
  9082. do this optimization. The parameter defines a minimal fall-through
  9083. edge probability in percentage used to add BB to inheritance EBB in
  9084. LRA. The default value of the parameter is 40. The value was chosen
  9085. from numerous runs of SPEC2000 on x86-64.
  9086. @item loop-invariant-max-bbs-in-loop
  9087. Loop invariant motion can be very expensive, both in compilation time and
  9088. in amount of needed compile-time memory, with very large loops. Loops
  9089. with more basic blocks than this parameter won't have loop invariant
  9090. motion optimization performed on them. The default value of the
  9091. parameter is 1000 for @option{-O1} and 10000 for @option{-O2} and above.
  9092. @item loop-max-datarefs-for-datadeps
  9093. Building data dapendencies is expensive for very large loops. This
  9094. parameter limits the number of data references in loops that are
  9095. considered for data dependence analysis. These large loops are no
  9096. handled by the optimizations using loop data dependencies.
  9097. The default value is 1000.
  9098. @item max-vartrack-size
  9099. Sets a maximum number of hash table slots to use during variable
  9100. tracking dataflow analysis of any function. If this limit is exceeded
  9101. with variable tracking at assignments enabled, analysis for that
  9102. function is retried without it, after removing all debug insns from
  9103. the function. If the limit is exceeded even without debug insns, var
  9104. tracking analysis is completely disabled for the function. Setting
  9105. the parameter to zero makes it unlimited.
  9106. @item max-vartrack-expr-depth
  9107. Sets a maximum number of recursion levels when attempting to map
  9108. variable names or debug temporaries to value expressions. This trades
  9109. compilation time for more complete debug information. If this is set too
  9110. low, value expressions that are available and could be represented in
  9111. debug information may end up not being used; setting this higher may
  9112. enable the compiler to find more complex debug expressions, but compile
  9113. time and memory use may grow. The default is 12.
  9114. @item min-nondebug-insn-uid
  9115. Use uids starting at this parameter for nondebug insns. The range below
  9116. the parameter is reserved exclusively for debug insns created by
  9117. @option{-fvar-tracking-assignments}, but debug insns may get
  9118. (non-overlapping) uids above it if the reserved range is exhausted.
  9119. @item ipa-sra-ptr-growth-factor
  9120. IPA-SRA replaces a pointer to an aggregate with one or more new
  9121. parameters only when their cumulative size is less or equal to
  9122. @option{ipa-sra-ptr-growth-factor} times the size of the original
  9123. pointer parameter.
  9124. @item sra-max-scalarization-size-Ospeed
  9125. @item sra-max-scalarization-size-Osize
  9126. The two Scalar Reduction of Aggregates passes (SRA and IPA-SRA) aim to
  9127. replace scalar parts of aggregates with uses of independent scalar
  9128. variables. These parameters control the maximum size, in storage units,
  9129. of aggregate which is considered for replacement when compiling for
  9130. speed
  9131. (@option{sra-max-scalarization-size-Ospeed}) or size
  9132. (@option{sra-max-scalarization-size-Osize}) respectively.
  9133. @item tm-max-aggregate-size
  9134. When making copies of thread-local variables in a transaction, this
  9135. parameter specifies the size in bytes after which variables are
  9136. saved with the logging functions as opposed to save/restore code
  9137. sequence pairs. This option only applies when using
  9138. @option{-fgnu-tm}.
  9139. @item graphite-max-nb-scop-params
  9140. To avoid exponential effects in the Graphite loop transforms, the
  9141. number of parameters in a Static Control Part (SCoP) is bounded. The
  9142. default value is 10 parameters. A variable whose value is unknown at
  9143. compilation time and defined outside a SCoP is a parameter of the SCoP.
  9144. @item graphite-max-bbs-per-function
  9145. To avoid exponential effects in the detection of SCoPs, the size of
  9146. the functions analyzed by Graphite is bounded. The default value is
  9147. 100 basic blocks.
  9148. @item loop-block-tile-size
  9149. Loop blocking or strip mining transforms, enabled with
  9150. @option{-floop-block} or @option{-floop-strip-mine}, strip mine each
  9151. loop in the loop nest by a given number of iterations. The strip
  9152. length can be changed using the @option{loop-block-tile-size}
  9153. parameter. The default value is 51 iterations.
  9154. @item loop-unroll-jam-size
  9155. Specify the unroll factor for the @option{-floop-unroll-and-jam} option. The
  9156. default value is 4.
  9157. @item loop-unroll-jam-depth
  9158. Specify the dimension to be unrolled (counting from the most inner loop)
  9159. for the @option{-floop-unroll-and-jam}. The default value is 2.
  9160. @item ipa-cp-value-list-size
  9161. IPA-CP attempts to track all possible values and types passed to a function's
  9162. parameter in order to propagate them and perform devirtualization.
  9163. @option{ipa-cp-value-list-size} is the maximum number of values and types it
  9164. stores per one formal parameter of a function.
  9165. @item ipa-cp-eval-threshold
  9166. IPA-CP calculates its own score of cloning profitability heuristics
  9167. and performs those cloning opportunities with scores that exceed
  9168. @option{ipa-cp-eval-threshold}.
  9169. @item ipa-cp-recursion-penalty
  9170. Percentage penalty the recursive functions will receive when they
  9171. are evaluated for cloning.
  9172. @item ipa-cp-single-call-penalty
  9173. Percentage penalty functions containg a single call to another
  9174. function will receive when they are evaluated for cloning.
  9175. @item ipa-max-agg-items
  9176. IPA-CP is also capable to propagate a number of scalar values passed
  9177. in an aggregate. @option{ipa-max-agg-items} controls the maximum
  9178. number of such values per one parameter.
  9179. @item ipa-cp-loop-hint-bonus
  9180. When IPA-CP determines that a cloning candidate would make the number
  9181. of iterations of a loop known, it adds a bonus of
  9182. @option{ipa-cp-loop-hint-bonus} to the profitability score of
  9183. the candidate.
  9184. @item ipa-cp-array-index-hint-bonus
  9185. When IPA-CP determines that a cloning candidate would make the index of
  9186. an array access known, it adds a bonus of
  9187. @option{ipa-cp-array-index-hint-bonus} to the profitability
  9188. score of the candidate.
  9189. @item ipa-max-aa-steps
  9190. During its analysis of function bodies, IPA-CP employs alias analysis
  9191. in order to track values pointed to by function parameters. In order
  9192. not spend too much time analyzing huge functions, it gives up and
  9193. consider all memory clobbered after examining
  9194. @option{ipa-max-aa-steps} statements modifying memory.
  9195. @item lto-partitions
  9196. Specify desired number of partitions produced during WHOPR compilation.
  9197. The number of partitions should exceed the number of CPUs used for compilation.
  9198. The default value is 32.
  9199. @item lto-minpartition
  9200. Size of minimal partition for WHOPR (in estimated instructions).
  9201. This prevents expenses of splitting very small programs into too many
  9202. partitions.
  9203. @item cxx-max-namespaces-for-diagnostic-help
  9204. The maximum number of namespaces to consult for suggestions when C++
  9205. name lookup fails for an identifier. The default is 1000.
  9206. @item sink-frequency-threshold
  9207. The maximum relative execution frequency (in percents) of the target block
  9208. relative to a statement's original block to allow statement sinking of a
  9209. statement. Larger numbers result in more aggressive statement sinking.
  9210. The default value is 75. A small positive adjustment is applied for
  9211. statements with memory operands as those are even more profitable so sink.
  9212. @item max-stores-to-sink
  9213. The maximum number of conditional stores paires that can be sunk. Set to 0
  9214. if either vectorization (@option{-ftree-vectorize}) or if-conversion
  9215. (@option{-ftree-loop-if-convert}) is disabled. The default is 2.
  9216. @item allow-store-data-races
  9217. Allow optimizers to introduce new data races on stores.
  9218. Set to 1 to allow, otherwise to 0. This option is enabled by default
  9219. at optimization level @option{-Ofast}.
  9220. @item case-values-threshold
  9221. The smallest number of different values for which it is best to use a
  9222. jump-table instead of a tree of conditional branches. If the value is
  9223. 0, use the default for the machine. The default is 0.
  9224. @item tree-reassoc-width
  9225. Set the maximum number of instructions executed in parallel in
  9226. reassociated tree. This parameter overrides target dependent
  9227. heuristics used by default if has non zero value.
  9228. @item sched-pressure-algorithm
  9229. Choose between the two available implementations of
  9230. @option{-fsched-pressure}. Algorithm 1 is the original implementation
  9231. and is the more likely to prevent instructions from being reordered.
  9232. Algorithm 2 was designed to be a compromise between the relatively
  9233. conservative approach taken by algorithm 1 and the rather aggressive
  9234. approach taken by the default scheduler. It relies more heavily on
  9235. having a regular register file and accurate register pressure classes.
  9236. See @file{haifa-sched.c} in the GCC sources for more details.
  9237. The default choice depends on the target.
  9238. @item max-slsr-cand-scan
  9239. Set the maximum number of existing candidates that are considered when
  9240. seeking a basis for a new straight-line strength reduction candidate.
  9241. @item asan-globals
  9242. Enable buffer overflow detection for global objects. This kind
  9243. of protection is enabled by default if you are using
  9244. @option{-fsanitize=address} option.
  9245. To disable global objects protection use @option{--param asan-globals=0}.
  9246. @item asan-stack
  9247. Enable buffer overflow detection for stack objects. This kind of
  9248. protection is enabled by default when using@option{-fsanitize=address}.
  9249. To disable stack protection use @option{--param asan-stack=0} option.
  9250. @item asan-instrument-reads
  9251. Enable buffer overflow detection for memory reads. This kind of
  9252. protection is enabled by default when using @option{-fsanitize=address}.
  9253. To disable memory reads protection use
  9254. @option{--param asan-instrument-reads=0}.
  9255. @item asan-instrument-writes
  9256. Enable buffer overflow detection for memory writes. This kind of
  9257. protection is enabled by default when using @option{-fsanitize=address}.
  9258. To disable memory writes protection use
  9259. @option{--param asan-instrument-writes=0} option.
  9260. @item asan-memintrin
  9261. Enable detection for built-in functions. This kind of protection
  9262. is enabled by default when using @option{-fsanitize=address}.
  9263. To disable built-in functions protection use
  9264. @option{--param asan-memintrin=0}.
  9265. @item asan-use-after-return
  9266. Enable detection of use-after-return. This kind of protection
  9267. is enabled by default when using @option{-fsanitize=address} option.
  9268. To disable use-after-return detection use
  9269. @option{--param asan-use-after-return=0}.
  9270. @item asan-instrumentation-with-call-threshold
  9271. If number of memory accesses in function being instrumented
  9272. is greater or equal to this number, use callbacks instead of inline checks.
  9273. E.g. to disable inline code use
  9274. @option{--param asan-instrumentation-with-call-threshold=0}.
  9275. @item chkp-max-ctor-size
  9276. Static constructors generated by Pointer Bounds Checker may become very
  9277. large and significantly increase compile time at optimization level
  9278. @option{-O1} and higher. This parameter is a maximum nubmer of statements
  9279. in a single generated constructor. Default value is 5000.
  9280. @item max-fsm-thread-path-insns
  9281. Maximum number of instructions to copy when duplicating blocks on a
  9282. finite state automaton jump thread path. The default is 100.
  9283. @item max-fsm-thread-length
  9284. Maximum number of basic blocks on a finite state automaton jump thread
  9285. path. The default is 10.
  9286. @item max-fsm-thread-paths
  9287. Maximum number of new jump thread paths to create for a finite state
  9288. automaton. The default is 50.
  9289. @end table
  9290. @end table
  9291. @node Preprocessor Options
  9292. @section Options Controlling the Preprocessor
  9293. @cindex preprocessor options
  9294. @cindex options, preprocessor
  9295. These options control the C preprocessor, which is run on each C source
  9296. file before actual compilation.
  9297. If you use the @option{-E} option, nothing is done except preprocessing.
  9298. Some of these options make sense only together with @option{-E} because
  9299. they cause the preprocessor output to be unsuitable for actual
  9300. compilation.
  9301. @table @gcctabopt
  9302. @item -Wp,@var{option}
  9303. @opindex Wp
  9304. You can use @option{-Wp,@var{option}} to bypass the compiler driver
  9305. and pass @var{option} directly through to the preprocessor. If
  9306. @var{option} contains commas, it is split into multiple options at the
  9307. commas. However, many options are modified, translated or interpreted
  9308. by the compiler driver before being passed to the preprocessor, and
  9309. @option{-Wp} forcibly bypasses this phase. The preprocessor's direct
  9310. interface is undocumented and subject to change, so whenever possible
  9311. you should avoid using @option{-Wp} and let the driver handle the
  9312. options instead.
  9313. @item -Xpreprocessor @var{option}
  9314. @opindex Xpreprocessor
  9315. Pass @var{option} as an option to the preprocessor. You can use this to
  9316. supply system-specific preprocessor options that GCC does not
  9317. recognize.
  9318. If you want to pass an option that takes an argument, you must use
  9319. @option{-Xpreprocessor} twice, once for the option and once for the argument.
  9320. @item -no-integrated-cpp
  9321. @opindex no-integrated-cpp
  9322. Perform preprocessing as a separate pass before compilation.
  9323. By default, GCC performs preprocessing as an integrated part of
  9324. input tokenization and parsing.
  9325. If this option is provided, the appropriate language front end
  9326. (@command{cc1}, @command{cc1plus}, or @command{cc1obj} for C, C++,
  9327. and Objective-C, respectively) is instead invoked twice,
  9328. once for preprocessing only and once for actual compilation
  9329. of the preprocessed input.
  9330. This option may be useful in conjunction with the @option{-B} or
  9331. @option{-wrapper} options to specify an alternate preprocessor or
  9332. perform additional processing of the program source between
  9333. normal preprocessing and compilation.
  9334. @end table
  9335. @include cppopts.texi
  9336. @node Assembler Options
  9337. @section Passing Options to the Assembler
  9338. @c prevent bad page break with this line
  9339. You can pass options to the assembler.
  9340. @table @gcctabopt
  9341. @item -Wa,@var{option}
  9342. @opindex Wa
  9343. Pass @var{option} as an option to the assembler. If @var{option}
  9344. contains commas, it is split into multiple options at the commas.
  9345. @item -Xassembler @var{option}
  9346. @opindex Xassembler
  9347. Pass @var{option} as an option to the assembler. You can use this to
  9348. supply system-specific assembler options that GCC does not
  9349. recognize.
  9350. If you want to pass an option that takes an argument, you must use
  9351. @option{-Xassembler} twice, once for the option and once for the argument.
  9352. @end table
  9353. @node Link Options
  9354. @section Options for Linking
  9355. @cindex link options
  9356. @cindex options, linking
  9357. These options come into play when the compiler links object files into
  9358. an executable output file. They are meaningless if the compiler is
  9359. not doing a link step.
  9360. @table @gcctabopt
  9361. @cindex file names
  9362. @item @var{object-file-name}
  9363. A file name that does not end in a special recognized suffix is
  9364. considered to name an object file or library. (Object files are
  9365. distinguished from libraries by the linker according to the file
  9366. contents.) If linking is done, these object files are used as input
  9367. to the linker.
  9368. @item -c
  9369. @itemx -S
  9370. @itemx -E
  9371. @opindex c
  9372. @opindex S
  9373. @opindex E
  9374. If any of these options is used, then the linker is not run, and
  9375. object file names should not be used as arguments. @xref{Overall
  9376. Options}.
  9377. @item -fuse-ld=bfd
  9378. @opindex fuse-ld=bfd
  9379. Use the @command{bfd} linker instead of the default linker.
  9380. @item -fuse-ld=gold
  9381. @opindex fuse-ld=gold
  9382. Use the @command{gold} linker instead of the default linker.
  9383. @cindex Libraries
  9384. @item -l@var{library}
  9385. @itemx -l @var{library}
  9386. @opindex l
  9387. Search the library named @var{library} when linking. (The second
  9388. alternative with the library as a separate argument is only for
  9389. POSIX compliance and is not recommended.)
  9390. It makes a difference where in the command you write this option; the
  9391. linker searches and processes libraries and object files in the order they
  9392. are specified. Thus, @samp{foo.o -lz bar.o} searches library @samp{z}
  9393. after file @file{foo.o} but before @file{bar.o}. If @file{bar.o} refers
  9394. to functions in @samp{z}, those functions may not be loaded.
  9395. The linker searches a standard list of directories for the library,
  9396. which is actually a file named @file{lib@var{library}.a}. The linker
  9397. then uses this file as if it had been specified precisely by name.
  9398. The directories searched include several standard system directories
  9399. plus any that you specify with @option{-L}.
  9400. Normally the files found this way are library files---archive files
  9401. whose members are object files. The linker handles an archive file by
  9402. scanning through it for members which define symbols that have so far
  9403. been referenced but not defined. But if the file that is found is an
  9404. ordinary object file, it is linked in the usual fashion. The only
  9405. difference between using an @option{-l} option and specifying a file name
  9406. is that @option{-l} surrounds @var{library} with @samp{lib} and @samp{.a}
  9407. and searches several directories.
  9408. @item -lobjc
  9409. @opindex lobjc
  9410. You need this special case of the @option{-l} option in order to
  9411. link an Objective-C or Objective-C++ program.
  9412. @item -nostartfiles
  9413. @opindex nostartfiles
  9414. Do not use the standard system startup files when linking.
  9415. The standard system libraries are used normally, unless @option{-nostdlib}
  9416. or @option{-nodefaultlibs} is used.
  9417. @item -nodefaultlibs
  9418. @opindex nodefaultlibs
  9419. Do not use the standard system libraries when linking.
  9420. Only the libraries you specify are passed to the linker, and options
  9421. specifying linkage of the system libraries, such as @option{-static-libgcc}
  9422. or @option{-shared-libgcc}, are ignored.
  9423. The standard startup files are used normally, unless @option{-nostartfiles}
  9424. is used.
  9425. The compiler may generate calls to @code{memcmp},
  9426. @code{memset}, @code{memcpy} and @code{memmove}.
  9427. These entries are usually resolved by entries in
  9428. libc. These entry points should be supplied through some other
  9429. mechanism when this option is specified.
  9430. @item -nostdlib
  9431. @opindex nostdlib
  9432. Do not use the standard system startup files or libraries when linking.
  9433. No startup files and only the libraries you specify are passed to
  9434. the linker, and options specifying linkage of the system libraries, such as
  9435. @option{-static-libgcc} or @option{-shared-libgcc}, are ignored.
  9436. The compiler may generate calls to @code{memcmp}, @code{memset},
  9437. @code{memcpy} and @code{memmove}.
  9438. These entries are usually resolved by entries in
  9439. libc. These entry points should be supplied through some other
  9440. mechanism when this option is specified.
  9441. @cindex @option{-lgcc}, use with @option{-nostdlib}
  9442. @cindex @option{-nostdlib} and unresolved references
  9443. @cindex unresolved references and @option{-nostdlib}
  9444. @cindex @option{-lgcc}, use with @option{-nodefaultlibs}
  9445. @cindex @option{-nodefaultlibs} and unresolved references
  9446. @cindex unresolved references and @option{-nodefaultlibs}
  9447. One of the standard libraries bypassed by @option{-nostdlib} and
  9448. @option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
  9449. which GCC uses to overcome shortcomings of particular machines, or special
  9450. needs for some languages.
  9451. (@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
  9452. Collection (GCC) Internals},
  9453. for more discussion of @file{libgcc.a}.)
  9454. In most cases, you need @file{libgcc.a} even when you want to avoid
  9455. other standard libraries. In other words, when you specify @option{-nostdlib}
  9456. or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
  9457. This ensures that you have no unresolved references to internal GCC
  9458. library subroutines.
  9459. (An example of such an internal subroutine is @code{__main}, used to ensure C++
  9460. constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
  9461. GNU Compiler Collection (GCC) Internals}.)
  9462. @item -pie
  9463. @opindex pie
  9464. Produce a position independent executable on targets that support it.
  9465. For predictable results, you must also specify the same set of options
  9466. used for compilation (@option{-fpie}, @option{-fPIE},
  9467. or model suboptions) when you specify this linker option.
  9468. @item -rdynamic
  9469. @opindex rdynamic
  9470. Pass the flag @option{-export-dynamic} to the ELF linker, on targets
  9471. that support it. This instructs the linker to add all symbols, not
  9472. only used ones, to the dynamic symbol table. This option is needed
  9473. for some uses of @code{dlopen} or to allow obtaining backtraces
  9474. from within a program.
  9475. @item -s
  9476. @opindex s
  9477. Remove all symbol table and relocation information from the executable.
  9478. @item -static
  9479. @opindex static
  9480. On systems that support dynamic linking, this prevents linking with the shared
  9481. libraries. On other systems, this option has no effect.
  9482. @item -shared
  9483. @opindex shared
  9484. Produce a shared object which can then be linked with other objects to
  9485. form an executable. Not all systems support this option. For predictable
  9486. results, you must also specify the same set of options used for compilation
  9487. (@option{-fpic}, @option{-fPIC}, or model suboptions) when
  9488. you specify this linker option.@footnote{On some systems, @samp{gcc -shared}
  9489. needs to build supplementary stub code for constructors to work. On
  9490. multi-libbed systems, @samp{gcc -shared} must select the correct support
  9491. libraries to link against. Failing to supply the correct flags may lead
  9492. to subtle defects. Supplying them in cases where they are not necessary
  9493. is innocuous.}
  9494. @item -shared-libgcc
  9495. @itemx -static-libgcc
  9496. @opindex shared-libgcc
  9497. @opindex static-libgcc
  9498. On systems that provide @file{libgcc} as a shared library, these options
  9499. force the use of either the shared or static version, respectively.
  9500. If no shared version of @file{libgcc} was built when the compiler was
  9501. configured, these options have no effect.
  9502. There are several situations in which an application should use the
  9503. shared @file{libgcc} instead of the static version. The most common
  9504. of these is when the application wishes to throw and catch exceptions
  9505. across different shared libraries. In that case, each of the libraries
  9506. as well as the application itself should use the shared @file{libgcc}.
  9507. Therefore, the G++ and GCJ drivers automatically add
  9508. @option{-shared-libgcc} whenever you build a shared library or a main
  9509. executable, because C++ and Java programs typically use exceptions, so
  9510. this is the right thing to do.
  9511. If, instead, you use the GCC driver to create shared libraries, you may
  9512. find that they are not always linked with the shared @file{libgcc}.
  9513. If GCC finds, at its configuration time, that you have a non-GNU linker
  9514. or a GNU linker that does not support option @option{--eh-frame-hdr},
  9515. it links the shared version of @file{libgcc} into shared libraries
  9516. by default. Otherwise, it takes advantage of the linker and optimizes
  9517. away the linking with the shared version of @file{libgcc}, linking with
  9518. the static version of libgcc by default. This allows exceptions to
  9519. propagate through such shared libraries, without incurring relocation
  9520. costs at library load time.
  9521. However, if a library or main executable is supposed to throw or catch
  9522. exceptions, you must link it using the G++ or GCJ driver, as appropriate
  9523. for the languages used in the program, or using the option
  9524. @option{-shared-libgcc}, such that it is linked with the shared
  9525. @file{libgcc}.
  9526. @item -static-libasan
  9527. @opindex static-libasan
  9528. When the @option{-fsanitize=address} option is used to link a program,
  9529. the GCC driver automatically links against @option{libasan}. If
  9530. @file{libasan} is available as a shared library, and the @option{-static}
  9531. option is not used, then this links against the shared version of
  9532. @file{libasan}. The @option{-static-libasan} option directs the GCC
  9533. driver to link @file{libasan} statically, without necessarily linking
  9534. other libraries statically.
  9535. @item -static-libtsan
  9536. @opindex static-libtsan
  9537. When the @option{-fsanitize=thread} option is used to link a program,
  9538. the GCC driver automatically links against @option{libtsan}. If
  9539. @file{libtsan} is available as a shared library, and the @option{-static}
  9540. option is not used, then this links against the shared version of
  9541. @file{libtsan}. The @option{-static-libtsan} option directs the GCC
  9542. driver to link @file{libtsan} statically, without necessarily linking
  9543. other libraries statically.
  9544. @item -static-liblsan
  9545. @opindex static-liblsan
  9546. When the @option{-fsanitize=leak} option is used to link a program,
  9547. the GCC driver automatically links against @option{liblsan}. If
  9548. @file{liblsan} is available as a shared library, and the @option{-static}
  9549. option is not used, then this links against the shared version of
  9550. @file{liblsan}. The @option{-static-liblsan} option directs the GCC
  9551. driver to link @file{liblsan} statically, without necessarily linking
  9552. other libraries statically.
  9553. @item -static-libubsan
  9554. @opindex static-libubsan
  9555. When the @option{-fsanitize=undefined} option is used to link a program,
  9556. the GCC driver automatically links against @option{libubsan}. If
  9557. @file{libubsan} is available as a shared library, and the @option{-static}
  9558. option is not used, then this links against the shared version of
  9559. @file{libubsan}. The @option{-static-libubsan} option directs the GCC
  9560. driver to link @file{libubsan} statically, without necessarily linking
  9561. other libraries statically.
  9562. @item -static-libmpx
  9563. @opindex static-libmpx
  9564. When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are
  9565. used to link a program, the GCC driver automatically links against
  9566. @file{libmpx}. If @file{libmpx} is available as a shared library,
  9567. and the @option{-static} option is not used, then this links against
  9568. the shared version of @file{libmpx}. The @option{-static-libmpx}
  9569. option directs the GCC driver to link @file{libmpx} statically,
  9570. without necessarily linking other libraries statically.
  9571. @item -static-libmpxwrappers
  9572. @opindex static-libmpxwrappers
  9573. When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are used
  9574. to link a program without also using @option{-fno-chkp-use-wrappers}, the
  9575. GCC driver automatically links against @file{libmpxwrappers}. If
  9576. @file{libmpxwrappers} is available as a shared library, and the
  9577. @option{-static} option is not used, then this links against the shared
  9578. version of @file{libmpxwrappers}. The @option{-static-libmpxwrappers}
  9579. option directs the GCC driver to link @file{libmpxwrappers} statically,
  9580. without necessarily linking other libraries statically.
  9581. @item -static-libstdc++
  9582. @opindex static-libstdc++
  9583. When the @command{g++} program is used to link a C++ program, it
  9584. normally automatically links against @option{libstdc++}. If
  9585. @file{libstdc++} is available as a shared library, and the
  9586. @option{-static} option is not used, then this links against the
  9587. shared version of @file{libstdc++}. That is normally fine. However, it
  9588. is sometimes useful to freeze the version of @file{libstdc++} used by
  9589. the program without going all the way to a fully static link. The
  9590. @option{-static-libstdc++} option directs the @command{g++} driver to
  9591. link @file{libstdc++} statically, without necessarily linking other
  9592. libraries statically.
  9593. @item -symbolic
  9594. @opindex symbolic
  9595. Bind references to global symbols when building a shared object. Warn
  9596. about any unresolved references (unless overridden by the link editor
  9597. option @option{-Xlinker -z -Xlinker defs}). Only a few systems support
  9598. this option.
  9599. @item -T @var{script}
  9600. @opindex T
  9601. @cindex linker script
  9602. Use @var{script} as the linker script. This option is supported by most
  9603. systems using the GNU linker. On some targets, such as bare-board
  9604. targets without an operating system, the @option{-T} option may be required
  9605. when linking to avoid references to undefined symbols.
  9606. @item -Xlinker @var{option}
  9607. @opindex Xlinker
  9608. Pass @var{option} as an option to the linker. You can use this to
  9609. supply system-specific linker options that GCC does not recognize.
  9610. If you want to pass an option that takes a separate argument, you must use
  9611. @option{-Xlinker} twice, once for the option and once for the argument.
  9612. For example, to pass @option{-assert definitions}, you must write
  9613. @option{-Xlinker -assert -Xlinker definitions}. It does not work to write
  9614. @option{-Xlinker "-assert definitions"}, because this passes the entire
  9615. string as a single argument, which is not what the linker expects.
  9616. When using the GNU linker, it is usually more convenient to pass
  9617. arguments to linker options using the @option{@var{option}=@var{value}}
  9618. syntax than as separate arguments. For example, you can specify
  9619. @option{-Xlinker -Map=output.map} rather than
  9620. @option{-Xlinker -Map -Xlinker output.map}. Other linkers may not support
  9621. this syntax for command-line options.
  9622. @item -Wl,@var{option}
  9623. @opindex Wl
  9624. Pass @var{option} as an option to the linker. If @var{option} contains
  9625. commas, it is split into multiple options at the commas. You can use this
  9626. syntax to pass an argument to the option.
  9627. For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
  9628. linker. When using the GNU linker, you can also get the same effect with
  9629. @option{-Wl,-Map=output.map}.
  9630. @item -u @var{symbol}
  9631. @opindex u
  9632. Pretend the symbol @var{symbol} is undefined, to force linking of
  9633. library modules to define it. You can use @option{-u} multiple times with
  9634. different symbols to force loading of additional library modules.
  9635. @item -z @var{keyword}
  9636. @opindex z
  9637. @option{-z} is passed directly on to the linker along with the keyword
  9638. @var{keyword}. See the section in the documentation of your linker for
  9639. permitted values and their meanings.
  9640. @end table
  9641. @node Directory Options
  9642. @section Options for Directory Search
  9643. @cindex directory options
  9644. @cindex options, directory search
  9645. @cindex search path
  9646. These options specify directories to search for header files, for
  9647. libraries and for parts of the compiler:
  9648. @table @gcctabopt
  9649. @item -I@var{dir}
  9650. @opindex I
  9651. Add the directory @var{dir} to the head of the list of directories to be
  9652. searched for header files. This can be used to override a system header
  9653. file, substituting your own version, since these directories are
  9654. searched before the system header file directories. However, you should
  9655. not use this option to add directories that contain vendor-supplied
  9656. system header files (use @option{-isystem} for that). If you use more than
  9657. one @option{-I} option, the directories are scanned in left-to-right
  9658. order; the standard system directories come after.
  9659. If a standard system include directory, or a directory specified with
  9660. @option{-isystem}, is also specified with @option{-I}, the @option{-I}
  9661. option is ignored. The directory is still searched but as a
  9662. system directory at its normal position in the system include chain.
  9663. This is to ensure that GCC's procedure to fix buggy system headers and
  9664. the ordering for the @code{include_next} directive are not inadvertently changed.
  9665. If you really need to change the search order for system directories,
  9666. use the @option{-nostdinc} and/or @option{-isystem} options.
  9667. @item -iplugindir=@var{dir}
  9668. @opindex iplugindir=
  9669. Set the directory to search for plugins that are passed
  9670. by @option{-fplugin=@var{name}} instead of
  9671. @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant
  9672. to be used by the user, but only passed by the driver.
  9673. @item -iquote@var{dir}
  9674. @opindex iquote
  9675. Add the directory @var{dir} to the head of the list of directories to
  9676. be searched for header files only for the case of @code{#include
  9677. "@var{file}"}; they are not searched for @code{#include <@var{file}>},
  9678. otherwise just like @option{-I}.
  9679. @item -L@var{dir}
  9680. @opindex L
  9681. Add directory @var{dir} to the list of directories to be searched
  9682. for @option{-l}.
  9683. @item -B@var{prefix}
  9684. @opindex B
  9685. This option specifies where to find the executables, libraries,
  9686. include files, and data files of the compiler itself.
  9687. The compiler driver program runs one or more of the subprograms
  9688. @command{cpp}, @command{cc1}, @command{as} and @command{ld}. It tries
  9689. @var{prefix} as a prefix for each program it tries to run, both with and
  9690. without @samp{@var{machine}/@var{version}/} (@pxref{Target Options}).
  9691. For each subprogram to be run, the compiler driver first tries the
  9692. @option{-B} prefix, if any. If that name is not found, or if @option{-B}
  9693. is not specified, the driver tries two standard prefixes,
  9694. @file{/usr/lib/gcc/} and @file{/usr/local/lib/gcc/}. If neither of
  9695. those results in a file name that is found, the unmodified program
  9696. name is searched for using the directories specified in your
  9697. @env{PATH} environment variable.
  9698. The compiler checks to see if the path provided by @option{-B}
  9699. refers to a directory, and if necessary it adds a directory
  9700. separator character at the end of the path.
  9701. @option{-B} prefixes that effectively specify directory names also apply
  9702. to libraries in the linker, because the compiler translates these
  9703. options into @option{-L} options for the linker. They also apply to
  9704. include files in the preprocessor, because the compiler translates these
  9705. options into @option{-isystem} options for the preprocessor. In this case,
  9706. the compiler appends @samp{include} to the prefix.
  9707. The runtime support file @file{libgcc.a} can also be searched for using
  9708. the @option{-B} prefix, if needed. If it is not found there, the two
  9709. standard prefixes above are tried, and that is all. The file is left
  9710. out of the link if it is not found by those means.
  9711. Another way to specify a prefix much like the @option{-B} prefix is to use
  9712. the environment variable @env{GCC_EXEC_PREFIX}. @xref{Environment
  9713. Variables}.
  9714. As a special kludge, if the path provided by @option{-B} is
  9715. @file{[dir/]stage@var{N}/}, where @var{N} is a number in the range 0 to
  9716. 9, then it is replaced by @file{[dir/]include}. This is to help
  9717. with boot-strapping the compiler.
  9718. @item -specs=@var{file}
  9719. @opindex specs
  9720. Process @var{file} after the compiler reads in the standard @file{specs}
  9721. file, in order to override the defaults which the @command{gcc} driver
  9722. program uses when determining what switches to pass to @command{cc1},
  9723. @command{cc1plus}, @command{as}, @command{ld}, etc. More than one
  9724. @option{-specs=@var{file}} can be specified on the command line, and they
  9725. are processed in order, from left to right.
  9726. @item --sysroot=@var{dir}
  9727. @opindex sysroot
  9728. Use @var{dir} as the logical root directory for headers and libraries.
  9729. For example, if the compiler normally searches for headers in
  9730. @file{/usr/include} and libraries in @file{/usr/lib}, it instead
  9731. searches @file{@var{dir}/usr/include} and @file{@var{dir}/usr/lib}.
  9732. If you use both this option and the @option{-isysroot} option, then
  9733. the @option{--sysroot} option applies to libraries, but the
  9734. @option{-isysroot} option applies to header files.
  9735. The GNU linker (beginning with version 2.16) has the necessary support
  9736. for this option. If your linker does not support this option, the
  9737. header file aspect of @option{--sysroot} still works, but the
  9738. library aspect does not.
  9739. @item --no-sysroot-suffix
  9740. @opindex no-sysroot-suffix
  9741. For some targets, a suffix is added to the root directory specified
  9742. with @option{--sysroot}, depending on the other options used, so that
  9743. headers may for example be found in
  9744. @file{@var{dir}/@var{suffix}/usr/include} instead of
  9745. @file{@var{dir}/usr/include}. This option disables the addition of
  9746. such a suffix.
  9747. @item -I-
  9748. @opindex I-
  9749. This option has been deprecated. Please use @option{-iquote} instead for
  9750. @option{-I} directories before the @option{-I-} and remove the @option{-I-}
  9751. option.
  9752. Any directories you specify with @option{-I} options before the @option{-I-}
  9753. option are searched only for the case of @code{#include "@var{file}"};
  9754. they are not searched for @code{#include <@var{file}>}.
  9755. If additional directories are specified with @option{-I} options after
  9756. the @option{-I-} option, these directories are searched for all @code{#include}
  9757. directives. (Ordinarily @emph{all} @option{-I} directories are used
  9758. this way.)
  9759. In addition, the @option{-I-} option inhibits the use of the current
  9760. directory (where the current input file came from) as the first search
  9761. directory for @code{#include "@var{file}"}. There is no way to
  9762. override this effect of @option{-I-}. With @option{-I.} you can specify
  9763. searching the directory that is current when the compiler is
  9764. invoked. That is not exactly the same as what the preprocessor does
  9765. by default, but it is often satisfactory.
  9766. @option{-I-} does not inhibit the use of the standard system directories
  9767. for header files. Thus, @option{-I-} and @option{-nostdinc} are
  9768. independent.
  9769. @end table
  9770. @c man end
  9771. @node Spec Files
  9772. @section Specifying Subprocesses and the Switches to Pass to Them
  9773. @cindex Spec Files
  9774. @command{gcc} is a driver program. It performs its job by invoking a
  9775. sequence of other programs to do the work of compiling, assembling and
  9776. linking. GCC interprets its command-line parameters and uses these to
  9777. deduce which programs it should invoke, and which command-line options
  9778. it ought to place on their command lines. This behavior is controlled
  9779. by @dfn{spec strings}. In most cases there is one spec string for each
  9780. program that GCC can invoke, but a few programs have multiple spec
  9781. strings to control their behavior. The spec strings built into GCC can
  9782. be overridden by using the @option{-specs=} command-line switch to specify
  9783. a spec file.
  9784. @dfn{Spec files} are plaintext files that are used to construct spec
  9785. strings. They consist of a sequence of directives separated by blank
  9786. lines. The type of directive is determined by the first non-whitespace
  9787. character on the line, which can be one of the following:
  9788. @table @code
  9789. @item %@var{command}
  9790. Issues a @var{command} to the spec file processor. The commands that can
  9791. appear here are:
  9792. @table @code
  9793. @item %include <@var{file}>
  9794. @cindex @code{%include}
  9795. Search for @var{file} and insert its text at the current point in the
  9796. specs file.
  9797. @item %include_noerr <@var{file}>
  9798. @cindex @code{%include_noerr}
  9799. Just like @samp{%include}, but do not generate an error message if the include
  9800. file cannot be found.
  9801. @item %rename @var{old_name} @var{new_name}
  9802. @cindex @code{%rename}
  9803. Rename the spec string @var{old_name} to @var{new_name}.
  9804. @end table
  9805. @item *[@var{spec_name}]:
  9806. This tells the compiler to create, override or delete the named spec
  9807. string. All lines after this directive up to the next directive or
  9808. blank line are considered to be the text for the spec string. If this
  9809. results in an empty string then the spec is deleted. (Or, if the
  9810. spec did not exist, then nothing happens.) Otherwise, if the spec
  9811. does not currently exist a new spec is created. If the spec does
  9812. exist then its contents are overridden by the text of this
  9813. directive, unless the first character of that text is the @samp{+}
  9814. character, in which case the text is appended to the spec.
  9815. @item [@var{suffix}]:
  9816. Creates a new @samp{[@var{suffix}] spec} pair. All lines after this directive
  9817. and up to the next directive or blank line are considered to make up the
  9818. spec string for the indicated suffix. When the compiler encounters an
  9819. input file with the named suffix, it processes the spec string in
  9820. order to work out how to compile that file. For example:
  9821. @smallexample
  9822. .ZZ:
  9823. z-compile -input %i
  9824. @end smallexample
  9825. This says that any input file whose name ends in @samp{.ZZ} should be
  9826. passed to the program @samp{z-compile}, which should be invoked with the
  9827. command-line switch @option{-input} and with the result of performing the
  9828. @samp{%i} substitution. (See below.)
  9829. As an alternative to providing a spec string, the text following a
  9830. suffix directive can be one of the following:
  9831. @table @code
  9832. @item @@@var{language}
  9833. This says that the suffix is an alias for a known @var{language}. This is
  9834. similar to using the @option{-x} command-line switch to GCC to specify a
  9835. language explicitly. For example:
  9836. @smallexample
  9837. .ZZ:
  9838. @@c++
  9839. @end smallexample
  9840. Says that .ZZ files are, in fact, C++ source files.
  9841. @item #@var{name}
  9842. This causes an error messages saying:
  9843. @smallexample
  9844. @var{name} compiler not installed on this system.
  9845. @end smallexample
  9846. @end table
  9847. GCC already has an extensive list of suffixes built into it.
  9848. This directive adds an entry to the end of the list of suffixes, but
  9849. since the list is searched from the end backwards, it is effectively
  9850. possible to override earlier entries using this technique.
  9851. @end table
  9852. GCC has the following spec strings built into it. Spec files can
  9853. override these strings or create their own. Note that individual
  9854. targets can also add their own spec strings to this list.
  9855. @smallexample
  9856. asm Options to pass to the assembler
  9857. asm_final Options to pass to the assembler post-processor
  9858. cpp Options to pass to the C preprocessor
  9859. cc1 Options to pass to the C compiler
  9860. cc1plus Options to pass to the C++ compiler
  9861. endfile Object files to include at the end of the link
  9862. link Options to pass to the linker
  9863. lib Libraries to include on the command line to the linker
  9864. libgcc Decides which GCC support library to pass to the linker
  9865. linker Sets the name of the linker
  9866. predefines Defines to be passed to the C preprocessor
  9867. signed_char Defines to pass to CPP to say whether @code{char} is signed
  9868. by default
  9869. startfile Object files to include at the start of the link
  9870. @end smallexample
  9871. Here is a small example of a spec file:
  9872. @smallexample
  9873. %rename lib old_lib
  9874. *lib:
  9875. --start-group -lgcc -lc -leval1 --end-group %(old_lib)
  9876. @end smallexample
  9877. This example renames the spec called @samp{lib} to @samp{old_lib} and
  9878. then overrides the previous definition of @samp{lib} with a new one.
  9879. The new definition adds in some extra command-line options before
  9880. including the text of the old definition.
  9881. @dfn{Spec strings} are a list of command-line options to be passed to their
  9882. corresponding program. In addition, the spec strings can contain
  9883. @samp{%}-prefixed sequences to substitute variable text or to
  9884. conditionally insert text into the command line. Using these constructs
  9885. it is possible to generate quite complex command lines.
  9886. Here is a table of all defined @samp{%}-sequences for spec
  9887. strings. Note that spaces are not generated automatically around the
  9888. results of expanding these sequences. Therefore you can concatenate them
  9889. together or combine them with constant text in a single argument.
  9890. @table @code
  9891. @item %%
  9892. Substitute one @samp{%} into the program name or argument.
  9893. @item %i
  9894. Substitute the name of the input file being processed.
  9895. @item %b
  9896. Substitute the basename of the input file being processed.
  9897. This is the substring up to (and not including) the last period
  9898. and not including the directory.
  9899. @item %B
  9900. This is the same as @samp{%b}, but include the file suffix (text after
  9901. the last period).
  9902. @item %d
  9903. Marks the argument containing or following the @samp{%d} as a
  9904. temporary file name, so that that file is deleted if GCC exits
  9905. successfully. Unlike @samp{%g}, this contributes no text to the
  9906. argument.
  9907. @item %g@var{suffix}
  9908. Substitute a file name that has suffix @var{suffix} and is chosen
  9909. once per compilation, and mark the argument in the same way as
  9910. @samp{%d}. To reduce exposure to denial-of-service attacks, the file
  9911. name is now chosen in a way that is hard to predict even when previously
  9912. chosen file names are known. For example, @samp{%g.s @dots{} %g.o @dots{} %g.s}
  9913. might turn into @samp{ccUVUUAU.s ccXYAXZ12.o ccUVUUAU.s}. @var{suffix} matches
  9914. the regexp @samp{[.A-Za-z]*} or the special string @samp{%O}, which is
  9915. treated exactly as if @samp{%O} had been preprocessed. Previously, @samp{%g}
  9916. was simply substituted with a file name chosen once per compilation,
  9917. without regard to any appended suffix (which was therefore treated
  9918. just like ordinary text), making such attacks more likely to succeed.
  9919. @item %u@var{suffix}
  9920. Like @samp{%g}, but generates a new temporary file name
  9921. each time it appears instead of once per compilation.
  9922. @item %U@var{suffix}
  9923. Substitutes the last file name generated with @samp{%u@var{suffix}}, generating a
  9924. new one if there is no such last file name. In the absence of any
  9925. @samp{%u@var{suffix}}, this is just like @samp{%g@var{suffix}}, except they don't share
  9926. the same suffix @emph{space}, so @samp{%g.s @dots{} %U.s @dots{} %g.s @dots{} %U.s}
  9927. involves the generation of two distinct file names, one
  9928. for each @samp{%g.s} and another for each @samp{%U.s}. Previously, @samp{%U} was
  9929. simply substituted with a file name chosen for the previous @samp{%u},
  9930. without regard to any appended suffix.
  9931. @item %j@var{suffix}
  9932. Substitutes the name of the @code{HOST_BIT_BUCKET}, if any, and if it is
  9933. writable, and if @option{-save-temps} is not used;
  9934. otherwise, substitute the name
  9935. of a temporary file, just like @samp{%u}. This temporary file is not
  9936. meant for communication between processes, but rather as a junk
  9937. disposal mechanism.
  9938. @item %|@var{suffix}
  9939. @itemx %m@var{suffix}
  9940. Like @samp{%g}, except if @option{-pipe} is in effect. In that case
  9941. @samp{%|} substitutes a single dash and @samp{%m} substitutes nothing at
  9942. all. These are the two most common ways to instruct a program that it
  9943. should read from standard input or write to standard output. If you
  9944. need something more elaborate you can use an @samp{%@{pipe:@code{X}@}}
  9945. construct: see for example @file{f/lang-specs.h}.
  9946. @item %.@var{SUFFIX}
  9947. Substitutes @var{.SUFFIX} for the suffixes of a matched switch's args
  9948. when it is subsequently output with @samp{%*}. @var{SUFFIX} is
  9949. terminated by the next space or %.
  9950. @item %w
  9951. Marks the argument containing or following the @samp{%w} as the
  9952. designated output file of this compilation. This puts the argument
  9953. into the sequence of arguments that @samp{%o} substitutes.
  9954. @item %o
  9955. Substitutes the names of all the output files, with spaces
  9956. automatically placed around them. You should write spaces
  9957. around the @samp{%o} as well or the results are undefined.
  9958. @samp{%o} is for use in the specs for running the linker.
  9959. Input files whose names have no recognized suffix are not compiled
  9960. at all, but they are included among the output files, so they are
  9961. linked.
  9962. @item %O
  9963. Substitutes the suffix for object files. Note that this is
  9964. handled specially when it immediately follows @samp{%g, %u, or %U},
  9965. because of the need for those to form complete file names. The
  9966. handling is such that @samp{%O} is treated exactly as if it had already
  9967. been substituted, except that @samp{%g, %u, and %U} do not currently
  9968. support additional @var{suffix} characters following @samp{%O} as they do
  9969. following, for example, @samp{.o}.
  9970. @item %p
  9971. Substitutes the standard macro predefinitions for the
  9972. current target machine. Use this when running @command{cpp}.
  9973. @item %P
  9974. Like @samp{%p}, but puts @samp{__} before and after the name of each
  9975. predefined macro, except for macros that start with @samp{__} or with
  9976. @samp{_@var{L}}, where @var{L} is an uppercase letter. This is for ISO
  9977. C@.
  9978. @item %I
  9979. Substitute any of @option{-iprefix} (made from @env{GCC_EXEC_PREFIX}),
  9980. @option{-isysroot} (made from @env{TARGET_SYSTEM_ROOT}),
  9981. @option{-isystem} (made from @env{COMPILER_PATH} and @option{-B} options)
  9982. and @option{-imultilib} as necessary.
  9983. @item %s
  9984. Current argument is the name of a library or startup file of some sort.
  9985. Search for that file in a standard list of directories and substitute
  9986. the full name found. The current working directory is included in the
  9987. list of directories scanned.
  9988. @item %T
  9989. Current argument is the name of a linker script. Search for that file
  9990. in the current list of directories to scan for libraries. If the file
  9991. is located insert a @option{--script} option into the command line
  9992. followed by the full path name found. If the file is not found then
  9993. generate an error message. Note: the current working directory is not
  9994. searched.
  9995. @item %e@var{str}
  9996. Print @var{str} as an error message. @var{str} is terminated by a newline.
  9997. Use this when inconsistent options are detected.
  9998. @item %(@var{name})
  9999. Substitute the contents of spec string @var{name} at this point.
  10000. @item %x@{@var{option}@}
  10001. Accumulate an option for @samp{%X}.
  10002. @item %X
  10003. Output the accumulated linker options specified by @option{-Wl} or a @samp{%x}
  10004. spec string.
  10005. @item %Y
  10006. Output the accumulated assembler options specified by @option{-Wa}.
  10007. @item %Z
  10008. Output the accumulated preprocessor options specified by @option{-Wp}.
  10009. @item %a
  10010. Process the @code{asm} spec. This is used to compute the
  10011. switches to be passed to the assembler.
  10012. @item %A
  10013. Process the @code{asm_final} spec. This is a spec string for
  10014. passing switches to an assembler post-processor, if such a program is
  10015. needed.
  10016. @item %l
  10017. Process the @code{link} spec. This is the spec for computing the
  10018. command line passed to the linker. Typically it makes use of the
  10019. @samp{%L %G %S %D and %E} sequences.
  10020. @item %D
  10021. Dump out a @option{-L} option for each directory that GCC believes might
  10022. contain startup files. If the target supports multilibs then the
  10023. current multilib directory is prepended to each of these paths.
  10024. @item %L
  10025. Process the @code{lib} spec. This is a spec string for deciding which
  10026. libraries are included on the command line to the linker.
  10027. @item %G
  10028. Process the @code{libgcc} spec. This is a spec string for deciding
  10029. which GCC support library is included on the command line to the linker.
  10030. @item %S
  10031. Process the @code{startfile} spec. This is a spec for deciding which
  10032. object files are the first ones passed to the linker. Typically
  10033. this might be a file named @file{crt0.o}.
  10034. @item %E
  10035. Process the @code{endfile} spec. This is a spec string that specifies
  10036. the last object files that are passed to the linker.
  10037. @item %C
  10038. Process the @code{cpp} spec. This is used to construct the arguments
  10039. to be passed to the C preprocessor.
  10040. @item %1
  10041. Process the @code{cc1} spec. This is used to construct the options to be
  10042. passed to the actual C compiler (@command{cc1}).
  10043. @item %2
  10044. Process the @code{cc1plus} spec. This is used to construct the options to be
  10045. passed to the actual C++ compiler (@command{cc1plus}).
  10046. @item %*
  10047. Substitute the variable part of a matched option. See below.
  10048. Note that each comma in the substituted string is replaced by
  10049. a single space.
  10050. @item %<@code{S}
  10051. Remove all occurrences of @code{-S} from the command line. Note---this
  10052. command is position dependent. @samp{%} commands in the spec string
  10053. before this one see @code{-S}, @samp{%} commands in the spec string
  10054. after this one do not.
  10055. @item %:@var{function}(@var{args})
  10056. Call the named function @var{function}, passing it @var{args}.
  10057. @var{args} is first processed as a nested spec string, then split
  10058. into an argument vector in the usual fashion. The function returns
  10059. a string which is processed as if it had appeared literally as part
  10060. of the current spec.
  10061. The following built-in spec functions are provided:
  10062. @table @code
  10063. @item @code{getenv}
  10064. The @code{getenv} spec function takes two arguments: an environment
  10065. variable name and a string. If the environment variable is not
  10066. defined, a fatal error is issued. Otherwise, the return value is the
  10067. value of the environment variable concatenated with the string. For
  10068. example, if @env{TOPDIR} is defined as @file{/path/to/top}, then:
  10069. @smallexample
  10070. %:getenv(TOPDIR /include)
  10071. @end smallexample
  10072. expands to @file{/path/to/top/include}.
  10073. @item @code{if-exists}
  10074. The @code{if-exists} spec function takes one argument, an absolute
  10075. pathname to a file. If the file exists, @code{if-exists} returns the
  10076. pathname. Here is a small example of its usage:
  10077. @smallexample
  10078. *startfile:
  10079. crt0%O%s %:if-exists(crti%O%s) crtbegin%O%s
  10080. @end smallexample
  10081. @item @code{if-exists-else}
  10082. The @code{if-exists-else} spec function is similar to the @code{if-exists}
  10083. spec function, except that it takes two arguments. The first argument is
  10084. an absolute pathname to a file. If the file exists, @code{if-exists-else}
  10085. returns the pathname. If it does not exist, it returns the second argument.
  10086. This way, @code{if-exists-else} can be used to select one file or another,
  10087. based on the existence of the first. Here is a small example of its usage:
  10088. @smallexample
  10089. *startfile:
  10090. crt0%O%s %:if-exists(crti%O%s) \
  10091. %:if-exists-else(crtbeginT%O%s crtbegin%O%s)
  10092. @end smallexample
  10093. @item @code{replace-outfile}
  10094. The @code{replace-outfile} spec function takes two arguments. It looks for the
  10095. first argument in the outfiles array and replaces it with the second argument. Here
  10096. is a small example of its usage:
  10097. @smallexample
  10098. %@{fgnu-runtime:%:replace-outfile(-lobjc -lobjc-gnu)@}
  10099. @end smallexample
  10100. @item @code{remove-outfile}
  10101. The @code{remove-outfile} spec function takes one argument. It looks for the
  10102. first argument in the outfiles array and removes it. Here is a small example
  10103. its usage:
  10104. @smallexample
  10105. %:remove-outfile(-lm)
  10106. @end smallexample
  10107. @item @code{pass-through-libs}
  10108. The @code{pass-through-libs} spec function takes any number of arguments. It
  10109. finds any @option{-l} options and any non-options ending in @file{.a} (which it
  10110. assumes are the names of linker input library archive files) and returns a
  10111. result containing all the found arguments each prepended by
  10112. @option{-plugin-opt=-pass-through=} and joined by spaces. This list is
  10113. intended to be passed to the LTO linker plugin.
  10114. @smallexample
  10115. %:pass-through-libs(%G %L %G)
  10116. @end smallexample
  10117. @item @code{print-asm-header}
  10118. The @code{print-asm-header} function takes no arguments and simply
  10119. prints a banner like:
  10120. @smallexample
  10121. Assembler options
  10122. =================
  10123. Use "-Wa,OPTION" to pass "OPTION" to the assembler.
  10124. @end smallexample
  10125. It is used to separate compiler options from assembler options
  10126. in the @option{--target-help} output.
  10127. @end table
  10128. @item %@{@code{S}@}
  10129. Substitutes the @code{-S} switch, if that switch is given to GCC@.
  10130. If that switch is not specified, this substitutes nothing. Note that
  10131. the leading dash is omitted when specifying this option, and it is
  10132. automatically inserted if the substitution is performed. Thus the spec
  10133. string @samp{%@{foo@}} matches the command-line option @option{-foo}
  10134. and outputs the command-line option @option{-foo}.
  10135. @item %W@{@code{S}@}
  10136. Like %@{@code{S}@} but mark last argument supplied within as a file to be
  10137. deleted on failure.
  10138. @item %@{@code{S}*@}
  10139. Substitutes all the switches specified to GCC whose names start
  10140. with @code{-S}, but which also take an argument. This is used for
  10141. switches like @option{-o}, @option{-D}, @option{-I}, etc.
  10142. GCC considers @option{-o foo} as being
  10143. one switch whose name starts with @samp{o}. %@{o*@} substitutes this
  10144. text, including the space. Thus two arguments are generated.
  10145. @item %@{@code{S}*&@code{T}*@}
  10146. Like %@{@code{S}*@}, but preserve order of @code{S} and @code{T} options
  10147. (the order of @code{S} and @code{T} in the spec is not significant).
  10148. There can be any number of ampersand-separated variables; for each the
  10149. wild card is optional. Useful for CPP as @samp{%@{D*&U*&A*@}}.
  10150. @item %@{@code{S}:@code{X}@}
  10151. Substitutes @code{X}, if the @option{-S} switch is given to GCC@.
  10152. @item %@{!@code{S}:@code{X}@}
  10153. Substitutes @code{X}, if the @option{-S} switch is @emph{not} given to GCC@.
  10154. @item %@{@code{S}*:@code{X}@}
  10155. Substitutes @code{X} if one or more switches whose names start with
  10156. @code{-S} are specified to GCC@. Normally @code{X} is substituted only
  10157. once, no matter how many such switches appeared. However, if @code{%*}
  10158. appears somewhere in @code{X}, then @code{X} is substituted once
  10159. for each matching switch, with the @code{%*} replaced by the part of
  10160. that switch matching the @code{*}.
  10161. If @code{%*} appears as the last part of a spec sequence then a space
  10162. is added after the end of the last substitution. If there is more
  10163. text in the sequence, however, then a space is not generated. This
  10164. allows the @code{%*} substitution to be used as part of a larger
  10165. string. For example, a spec string like this:
  10166. @smallexample
  10167. %@{mcu=*:--script=%*/memory.ld@}
  10168. @end smallexample
  10169. @noindent
  10170. when matching an option like @option{-mcu=newchip} produces:
  10171. @smallexample
  10172. --script=newchip/memory.ld
  10173. @end smallexample
  10174. @item %@{.@code{S}:@code{X}@}
  10175. Substitutes @code{X}, if processing a file with suffix @code{S}.
  10176. @item %@{!.@code{S}:@code{X}@}
  10177. Substitutes @code{X}, if @emph{not} processing a file with suffix @code{S}.
  10178. @item %@{,@code{S}:@code{X}@}
  10179. Substitutes @code{X}, if processing a file for language @code{S}.
  10180. @item %@{!,@code{S}:@code{X}@}
  10181. Substitutes @code{X}, if not processing a file for language @code{S}.
  10182. @item %@{@code{S}|@code{P}:@code{X}@}
  10183. Substitutes @code{X} if either @code{-S} or @code{-P} is given to
  10184. GCC@. This may be combined with @samp{!}, @samp{.}, @samp{,}, and
  10185. @code{*} sequences as well, although they have a stronger binding than
  10186. the @samp{|}. If @code{%*} appears in @code{X}, all of the
  10187. alternatives must be starred, and only the first matching alternative
  10188. is substituted.
  10189. For example, a spec string like this:
  10190. @smallexample
  10191. %@{.c:-foo@} %@{!.c:-bar@} %@{.c|d:-baz@} %@{!.c|d:-boggle@}
  10192. @end smallexample
  10193. @noindent
  10194. outputs the following command-line options from the following input
  10195. command-line options:
  10196. @smallexample
  10197. fred.c -foo -baz
  10198. jim.d -bar -boggle
  10199. -d fred.c -foo -baz -boggle
  10200. -d jim.d -bar -baz -boggle
  10201. @end smallexample
  10202. @item %@{S:X; T:Y; :D@}
  10203. If @code{S} is given to GCC, substitutes @code{X}; else if @code{T} is
  10204. given to GCC, substitutes @code{Y}; else substitutes @code{D}. There can
  10205. be as many clauses as you need. This may be combined with @code{.},
  10206. @code{,}, @code{!}, @code{|}, and @code{*} as needed.
  10207. @end table
  10208. The conditional text @code{X} in a %@{@code{S}:@code{X}@} or similar
  10209. construct may contain other nested @samp{%} constructs or spaces, or
  10210. even newlines. They are processed as usual, as described above.
  10211. Trailing white space in @code{X} is ignored. White space may also
  10212. appear anywhere on the left side of the colon in these constructs,
  10213. except between @code{.} or @code{*} and the corresponding word.
  10214. The @option{-O}, @option{-f}, @option{-m}, and @option{-W} switches are
  10215. handled specifically in these constructs. If another value of
  10216. @option{-O} or the negated form of a @option{-f}, @option{-m}, or
  10217. @option{-W} switch is found later in the command line, the earlier
  10218. switch value is ignored, except with @{@code{S}*@} where @code{S} is
  10219. just one letter, which passes all matching options.
  10220. The character @samp{|} at the beginning of the predicate text is used to
  10221. indicate that a command should be piped to the following command, but
  10222. only if @option{-pipe} is specified.
  10223. It is built into GCC which switches take arguments and which do not.
  10224. (You might think it would be useful to generalize this to allow each
  10225. compiler's spec to say which switches take arguments. But this cannot
  10226. be done in a consistent fashion. GCC cannot even decide which input
  10227. files have been specified without knowing which switches take arguments,
  10228. and it must know which input files to compile in order to tell which
  10229. compilers to run).
  10230. GCC also knows implicitly that arguments starting in @option{-l} are to be
  10231. treated as compiler output files, and passed to the linker in their
  10232. proper position among the other output files.
  10233. @c man begin OPTIONS
  10234. @node Target Options
  10235. @section Specifying Target Machine and Compiler Version
  10236. @cindex target options
  10237. @cindex cross compiling
  10238. @cindex specifying machine version
  10239. @cindex specifying compiler version and target machine
  10240. @cindex compiler version, specifying
  10241. @cindex target machine, specifying
  10242. The usual way to run GCC is to run the executable called @command{gcc}, or
  10243. @command{@var{machine}-gcc} when cross-compiling, or
  10244. @command{@var{machine}-gcc-@var{version}} to run a version other than the
  10245. one that was installed last.
  10246. @node Submodel Options
  10247. @section Hardware Models and Configurations
  10248. @cindex submodel options
  10249. @cindex specifying hardware config
  10250. @cindex hardware models and configurations, specifying
  10251. @cindex machine dependent options
  10252. Each target machine types can have its own
  10253. special options, starting with @samp{-m}, to choose among various
  10254. hardware models or configurations---for example, 68010 vs 68020,
  10255. floating coprocessor or none. A single installed version of the
  10256. compiler can compile for any model or configuration, according to the
  10257. options specified.
  10258. Some configurations of the compiler also support additional special
  10259. options, usually for compatibility with other compilers on the same
  10260. platform.
  10261. @c This list is ordered alphanumerically by subsection name.
  10262. @c It should be the same order and spelling as these options are listed
  10263. @c in Machine Dependent Options
  10264. @menu
  10265. * AArch64 Options::
  10266. * Adapteva Epiphany Options::
  10267. * ARC Options::
  10268. * ARM Options::
  10269. * AVR Options::
  10270. * Blackfin Options::
  10271. * C6X Options::
  10272. * CRIS Options::
  10273. * CR16 Options::
  10274. * Darwin Options::
  10275. * DEC Alpha Options::
  10276. * FR30 Options::
  10277. * FRV Options::
  10278. * GNU/Linux Options::
  10279. * H8/300 Options::
  10280. * HPPA Options::
  10281. * IA-64 Options::
  10282. * LM32 Options::
  10283. * M32C Options::
  10284. * M32R/D Options::
  10285. * M680x0 Options::
  10286. * MCore Options::
  10287. * MeP Options::
  10288. * MicroBlaze Options::
  10289. * MIPS Options::
  10290. * MMIX Options::
  10291. * MN10300 Options::
  10292. * Moxie Options::
  10293. * MSP430 Options::
  10294. * NDS32 Options::
  10295. * Nios II Options::
  10296. * Nvidia PTX Options::
  10297. * PDP-11 Options::
  10298. * picoChip Options::
  10299. * PowerPC Options::
  10300. * RL78 Options::
  10301. * RS/6000 and PowerPC Options::
  10302. * RX Options::
  10303. * S/390 and zSeries Options::
  10304. * Score Options::
  10305. * SH Options::
  10306. * Solaris 2 Options::
  10307. * SPARC Options::
  10308. * SPU Options::
  10309. * System V Options::
  10310. * TILE-Gx Options::
  10311. * TILEPro Options::
  10312. * V850 Options::
  10313. * VAX Options::
  10314. * Visium Options::
  10315. * VMS Options::
  10316. * VxWorks Options::
  10317. * x86 Options::
  10318. * x86 Windows Options::
  10319. * Xstormy16 Options::
  10320. * Xtensa Options::
  10321. * zSeries Options::
  10322. @end menu
  10323. @node AArch64 Options
  10324. @subsection AArch64 Options
  10325. @cindex AArch64 Options
  10326. These options are defined for AArch64 implementations:
  10327. @table @gcctabopt
  10328. @item -mabi=@var{name}
  10329. @opindex mabi
  10330. Generate code for the specified data model. Permissible values
  10331. are @samp{ilp32} for SysV-like data model where int, long int and pointer
  10332. are 32-bit, and @samp{lp64} for SysV-like data model where int is 32-bit,
  10333. but long int and pointer are 64-bit.
  10334. The default depends on the specific target configuration. Note that
  10335. the LP64 and ILP32 ABIs are not link-compatible; you must compile your
  10336. entire program with the same ABI, and link with a compatible set of libraries.
  10337. @item -mbig-endian
  10338. @opindex mbig-endian
  10339. Generate big-endian code. This is the default when GCC is configured for an
  10340. @samp{aarch64_be-*-*} target.
  10341. @item -mgeneral-regs-only
  10342. @opindex mgeneral-regs-only
  10343. Generate code which uses only the general registers.
  10344. @item -mlittle-endian
  10345. @opindex mlittle-endian
  10346. Generate little-endian code. This is the default when GCC is configured for an
  10347. @samp{aarch64-*-*} but not an @samp{aarch64_be-*-*} target.
  10348. @item -mcmodel=tiny
  10349. @opindex mcmodel=tiny
  10350. Generate code for the tiny code model. The program and its statically defined
  10351. symbols must be within 1GB of each other. Pointers are 64 bits. Programs can
  10352. be statically or dynamically linked. This model is not fully implemented and
  10353. mostly treated as @samp{small}.
  10354. @item -mcmodel=small
  10355. @opindex mcmodel=small
  10356. Generate code for the small code model. The program and its statically defined
  10357. symbols must be within 4GB of each other. Pointers are 64 bits. Programs can
  10358. be statically or dynamically linked. This is the default code model.
  10359. @item -mcmodel=large
  10360. @opindex mcmodel=large
  10361. Generate code for the large code model. This makes no assumptions about
  10362. addresses and sizes of sections. Pointers are 64 bits. Programs can be
  10363. statically linked only.
  10364. @item -mstrict-align
  10365. @opindex mstrict-align
  10366. Do not assume that unaligned memory references are handled by the system.
  10367. @item -momit-leaf-frame-pointer
  10368. @itemx -mno-omit-leaf-frame-pointer
  10369. @opindex momit-leaf-frame-pointer
  10370. @opindex mno-omit-leaf-frame-pointer
  10371. Omit or keep the frame pointer in leaf functions. The former behaviour is the
  10372. default.
  10373. @item -mtls-dialect=desc
  10374. @opindex mtls-dialect=desc
  10375. Use TLS descriptors as the thread-local storage mechanism for dynamic accesses
  10376. of TLS variables. This is the default.
  10377. @item -mtls-dialect=traditional
  10378. @opindex mtls-dialect=traditional
  10379. Use traditional TLS as the thread-local storage mechanism for dynamic accesses
  10380. of TLS variables.
  10381. @item -mfix-cortex-a53-835769
  10382. @itemx -mno-fix-cortex-a53-835769
  10383. @opindex mfix-cortex-a53-835769
  10384. @opindex mno-fix-cortex-a53-835769
  10385. Enable or disable the workaround for the ARM Cortex-A53 erratum number 835769.
  10386. This involves inserting a NOP instruction between memory instructions and
  10387. 64-bit integer multiply-accumulate instructions.
  10388. @item -mfix-cortex-a53-843419
  10389. @itemx -mno-fix-cortex-a53-843419
  10390. @opindex mfix-cortex-a53-843419
  10391. @opindex mno-fix-cortex-a53-843419
  10392. Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419.
  10393. This erratum workaround is made at link time and this will only pass the
  10394. corresponding flag to the linker.
  10395. @item -march=@var{name}
  10396. @opindex march
  10397. Specify the name of the target architecture, optionally suffixed by one or
  10398. more feature modifiers. This option has the form
  10399. @option{-march=@var{arch}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}, where the
  10400. only permissible value for @var{arch} is @samp{armv8-a}. The permissible
  10401. values for @var{feature} are documented in the sub-section below.
  10402. Where conflicting feature modifiers are specified, the right-most feature is
  10403. used.
  10404. GCC uses this name to determine what kind of instructions it can emit when
  10405. generating assembly code.
  10406. Where @option{-march} is specified without either of @option{-mtune}
  10407. or @option{-mcpu} also being specified, the code is tuned to perform
  10408. well across a range of target processors implementing the target
  10409. architecture.
  10410. @item -mtune=@var{name}
  10411. @opindex mtune
  10412. Specify the name of the target processor for which GCC should tune the
  10413. performance of the code. Permissible values for this option are:
  10414. @samp{generic}, @samp{cortex-a53}, @samp{cortex-a57}, @samp{cortex-a72},
  10415. @samp{exynos-m1}, @samp{thunderx}, @samp{xgene1}.
  10416. Additionally, this option can specify that GCC should tune the performance
  10417. of the code for a big.LITTLE system. Permissible values for this
  10418. option are: @samp{cortex-a57.cortex-a53}, @samp{cortex-a72.cortex-a53}.
  10419. Where none of @option{-mtune=}, @option{-mcpu=} or @option{-march=}
  10420. are specified, the code is tuned to perform well across a range
  10421. of target processors.
  10422. This option cannot be suffixed by feature modifiers.
  10423. @item -mcpu=@var{name}
  10424. @opindex mcpu
  10425. Specify the name of the target processor, optionally suffixed by one or more
  10426. feature modifiers. This option has the form
  10427. @option{-mcpu=@var{cpu}@r{@{}+@r{[}no@r{]}@var{feature}@r{@}*}}, where the
  10428. permissible values for @var{cpu} are the same as those available for
  10429. @option{-mtune}.
  10430. The permissible values for @var{feature} are documented in the sub-section
  10431. below.
  10432. Where conflicting feature modifiers are specified, the right-most feature is
  10433. used.
  10434. GCC uses this name to determine what kind of instructions it can emit when
  10435. generating assembly code (as if by @option{-march}) and to determine
  10436. the target processor for which to tune for performance (as if
  10437. by @option{-mtune}). Where this option is used in conjunction
  10438. with @option{-march} or @option{-mtune}, those options take precedence
  10439. over the appropriate part of this option.
  10440. @end table
  10441. @subsubsection @option{-march} and @option{-mcpu} Feature Modifiers
  10442. @cindex @option{-march} feature modifiers
  10443. @cindex @option{-mcpu} feature modifiers
  10444. Feature modifiers used with @option{-march} and @option{-mcpu} can be one
  10445. the following:
  10446. @table @samp
  10447. @item crc
  10448. Enable CRC extension.
  10449. @item crypto
  10450. Enable Crypto extension. This implies Advanced SIMD is enabled.
  10451. @item fp
  10452. Enable floating-point instructions.
  10453. @item simd
  10454. Enable Advanced SIMD instructions. This implies floating-point instructions
  10455. are enabled. This is the default for all current possible values for options
  10456. @option{-march} and @option{-mcpu=}.
  10457. @end table
  10458. @node Adapteva Epiphany Options
  10459. @subsection Adapteva Epiphany Options
  10460. These @samp{-m} options are defined for Adapteva Epiphany:
  10461. @table @gcctabopt
  10462. @item -mhalf-reg-file
  10463. @opindex mhalf-reg-file
  10464. Don't allocate any register in the range @code{r32}@dots{}@code{r63}.
  10465. That allows code to run on hardware variants that lack these registers.
  10466. @item -mprefer-short-insn-regs
  10467. @opindex mprefer-short-insn-regs
  10468. Preferrentially allocate registers that allow short instruction generation.
  10469. This can result in increased instruction count, so this may either reduce or
  10470. increase overall code size.
  10471. @item -mbranch-cost=@var{num}
  10472. @opindex mbranch-cost
  10473. Set the cost of branches to roughly @var{num} ``simple'' instructions.
  10474. This cost is only a heuristic and is not guaranteed to produce
  10475. consistent results across releases.
  10476. @item -mcmove
  10477. @opindex mcmove
  10478. Enable the generation of conditional moves.
  10479. @item -mnops=@var{num}
  10480. @opindex mnops
  10481. Emit @var{num} NOPs before every other generated instruction.
  10482. @item -mno-soft-cmpsf
  10483. @opindex mno-soft-cmpsf
  10484. For single-precision floating-point comparisons, emit an @code{fsub} instruction
  10485. and test the flags. This is faster than a software comparison, but can
  10486. get incorrect results in the presence of NaNs, or when two different small
  10487. numbers are compared such that their difference is calculated as zero.
  10488. The default is @option{-msoft-cmpsf}, which uses slower, but IEEE-compliant,
  10489. software comparisons.
  10490. @item -mstack-offset=@var{num}
  10491. @opindex mstack-offset
  10492. Set the offset between the top of the stack and the stack pointer.
  10493. E.g., a value of 8 means that the eight bytes in the range @code{sp+0@dots{}sp+7}
  10494. can be used by leaf functions without stack allocation.
  10495. Values other than @samp{8} or @samp{16} are untested and unlikely to work.
  10496. Note also that this option changes the ABI; compiling a program with a
  10497. different stack offset than the libraries have been compiled with
  10498. generally does not work.
  10499. This option can be useful if you want to evaluate if a different stack
  10500. offset would give you better code, but to actually use a different stack
  10501. offset to build working programs, it is recommended to configure the
  10502. toolchain with the appropriate @option{--with-stack-offset=@var{num}} option.
  10503. @item -mno-round-nearest
  10504. @opindex mno-round-nearest
  10505. Make the scheduler assume that the rounding mode has been set to
  10506. truncating. The default is @option{-mround-nearest}.
  10507. @item -mlong-calls
  10508. @opindex mlong-calls
  10509. If not otherwise specified by an attribute, assume all calls might be beyond
  10510. the offset range of the @code{b} / @code{bl} instructions, and therefore load the
  10511. function address into a register before performing a (otherwise direct) call.
  10512. This is the default.
  10513. @item -mshort-calls
  10514. @opindex short-calls
  10515. If not otherwise specified by an attribute, assume all direct calls are
  10516. in the range of the @code{b} / @code{bl} instructions, so use these instructions
  10517. for direct calls. The default is @option{-mlong-calls}.
  10518. @item -msmall16
  10519. @opindex msmall16
  10520. Assume addresses can be loaded as 16-bit unsigned values. This does not
  10521. apply to function addresses for which @option{-mlong-calls} semantics
  10522. are in effect.
  10523. @item -mfp-mode=@var{mode}
  10524. @opindex mfp-mode
  10525. Set the prevailing mode of the floating-point unit.
  10526. This determines the floating-point mode that is provided and expected
  10527. at function call and return time. Making this mode match the mode you
  10528. predominantly need at function start can make your programs smaller and
  10529. faster by avoiding unnecessary mode switches.
  10530. @var{mode} can be set to one the following values:
  10531. @table @samp
  10532. @item caller
  10533. Any mode at function entry is valid, and retained or restored when
  10534. the function returns, and when it calls other functions.
  10535. This mode is useful for compiling libraries or other compilation units
  10536. you might want to incorporate into different programs with different
  10537. prevailing FPU modes, and the convenience of being able to use a single
  10538. object file outweighs the size and speed overhead for any extra
  10539. mode switching that might be needed, compared with what would be needed
  10540. with a more specific choice of prevailing FPU mode.
  10541. @item truncate
  10542. This is the mode used for floating-point calculations with
  10543. truncating (i.e.@: round towards zero) rounding mode. That includes
  10544. conversion from floating point to integer.
  10545. @item round-nearest
  10546. This is the mode used for floating-point calculations with
  10547. round-to-nearest-or-even rounding mode.
  10548. @item int
  10549. This is the mode used to perform integer calculations in the FPU, e.g.@:
  10550. integer multiply, or integer multiply-and-accumulate.
  10551. @end table
  10552. The default is @option{-mfp-mode=caller}
  10553. @item -mnosplit-lohi
  10554. @itemx -mno-postinc
  10555. @itemx -mno-postmodify
  10556. @opindex mnosplit-lohi
  10557. @opindex mno-postinc
  10558. @opindex mno-postmodify
  10559. Code generation tweaks that disable, respectively, splitting of 32-bit
  10560. loads, generation of post-increment addresses, and generation of
  10561. post-modify addresses. The defaults are @option{msplit-lohi},
  10562. @option{-mpost-inc}, and @option{-mpost-modify}.
  10563. @item -mnovect-double
  10564. @opindex mno-vect-double
  10565. Change the preferred SIMD mode to SImode. The default is
  10566. @option{-mvect-double}, which uses DImode as preferred SIMD mode.
  10567. @item -max-vect-align=@var{num}
  10568. @opindex max-vect-align
  10569. The maximum alignment for SIMD vector mode types.
  10570. @var{num} may be 4 or 8. The default is 8.
  10571. Note that this is an ABI change, even though many library function
  10572. interfaces are unaffected if they don't use SIMD vector modes
  10573. in places that affect size and/or alignment of relevant types.
  10574. @item -msplit-vecmove-early
  10575. @opindex msplit-vecmove-early
  10576. Split vector moves into single word moves before reload. In theory this
  10577. can give better register allocation, but so far the reverse seems to be
  10578. generally the case.
  10579. @item -m1reg-@var{reg}
  10580. @opindex m1reg-
  10581. Specify a register to hold the constant @minus{}1, which makes loading small negative
  10582. constants and certain bitmasks faster.
  10583. Allowable values for @var{reg} are @samp{r43} and @samp{r63},
  10584. which specify use of that register as a fixed register,
  10585. and @samp{none}, which means that no register is used for this
  10586. purpose. The default is @option{-m1reg-none}.
  10587. @end table
  10588. @node ARC Options
  10589. @subsection ARC Options
  10590. @cindex ARC options
  10591. The following options control the architecture variant for which code
  10592. is being compiled:
  10593. @c architecture variants
  10594. @table @gcctabopt
  10595. @item -mbarrel-shifter
  10596. @opindex mbarrel-shifter
  10597. Generate instructions supported by barrel shifter. This is the default
  10598. unless @option{-mcpu=ARC601} is in effect.
  10599. @item -mcpu=@var{cpu}
  10600. @opindex mcpu
  10601. Set architecture type, register usage, and instruction scheduling
  10602. parameters for @var{cpu}. There are also shortcut alias options
  10603. available for backward compatibility and convenience. Supported
  10604. values for @var{cpu} are
  10605. @table @samp
  10606. @opindex mA6
  10607. @opindex mARC600
  10608. @item ARC600
  10609. Compile for ARC600. Aliases: @option{-mA6}, @option{-mARC600}.
  10610. @item ARC601
  10611. @opindex mARC601
  10612. Compile for ARC601. Alias: @option{-mARC601}.
  10613. @item ARC700
  10614. @opindex mA7
  10615. @opindex mARC700
  10616. Compile for ARC700. Aliases: @option{-mA7}, @option{-mARC700}.
  10617. This is the default when configured with @option{--with-cpu=arc700}@.
  10618. @end table
  10619. @item -mdpfp
  10620. @opindex mdpfp
  10621. @itemx -mdpfp-compact
  10622. @opindex mdpfp-compact
  10623. FPX: Generate Double Precision FPX instructions, tuned for the compact
  10624. implementation.
  10625. @item -mdpfp-fast
  10626. @opindex mdpfp-fast
  10627. FPX: Generate Double Precision FPX instructions, tuned for the fast
  10628. implementation.
  10629. @item -mno-dpfp-lrsr
  10630. @opindex mno-dpfp-lrsr
  10631. Disable LR and SR instructions from using FPX extension aux registers.
  10632. @item -mea
  10633. @opindex mea
  10634. Generate Extended arithmetic instructions. Currently only
  10635. @code{divaw}, @code{adds}, @code{subs}, and @code{sat16} are
  10636. supported. This is always enabled for @option{-mcpu=ARC700}.
  10637. @item -mno-mpy
  10638. @opindex mno-mpy
  10639. Do not generate mpy instructions for ARC700.
  10640. @item -mmul32x16
  10641. @opindex mmul32x16
  10642. Generate 32x16 bit multiply and mac instructions.
  10643. @item -mmul64
  10644. @opindex mmul64
  10645. Generate mul64 and mulu64 instructions. Only valid for @option{-mcpu=ARC600}.
  10646. @item -mnorm
  10647. @opindex mnorm
  10648. Generate norm instruction. This is the default if @option{-mcpu=ARC700}
  10649. is in effect.
  10650. @item -mspfp
  10651. @opindex mspfp
  10652. @itemx -mspfp-compact
  10653. @opindex mspfp-compact
  10654. FPX: Generate Single Precision FPX instructions, tuned for the compact
  10655. implementation.
  10656. @item -mspfp-fast
  10657. @opindex mspfp-fast
  10658. FPX: Generate Single Precision FPX instructions, tuned for the fast
  10659. implementation.
  10660. @item -msimd
  10661. @opindex msimd
  10662. Enable generation of ARC SIMD instructions via target-specific
  10663. builtins. Only valid for @option{-mcpu=ARC700}.
  10664. @item -msoft-float
  10665. @opindex msoft-float
  10666. This option ignored; it is provided for compatibility purposes only.
  10667. Software floating point code is emitted by default, and this default
  10668. can overridden by FPX options; @samp{mspfp}, @samp{mspfp-compact}, or
  10669. @samp{mspfp-fast} for single precision, and @samp{mdpfp},
  10670. @samp{mdpfp-compact}, or @samp{mdpfp-fast} for double precision.
  10671. @item -mswap
  10672. @opindex mswap
  10673. Generate swap instructions.
  10674. @end table
  10675. The following options are passed through to the assembler, and also
  10676. define preprocessor macro symbols.
  10677. @c Flags used by the assembler, but for which we define preprocessor
  10678. @c macro symbols as well.
  10679. @table @gcctabopt
  10680. @item -mdsp-packa
  10681. @opindex mdsp-packa
  10682. Passed down to the assembler to enable the DSP Pack A extensions.
  10683. Also sets the preprocessor symbol @code{__Xdsp_packa}.
  10684. @item -mdvbf
  10685. @opindex mdvbf
  10686. Passed down to the assembler to enable the dual viterbi butterfly
  10687. extension. Also sets the preprocessor symbol @code{__Xdvbf}.
  10688. @c ARC700 4.10 extension instruction
  10689. @item -mlock
  10690. @opindex mlock
  10691. Passed down to the assembler to enable the Locked Load/Store
  10692. Conditional extension. Also sets the preprocessor symbol
  10693. @code{__Xlock}.
  10694. @item -mmac-d16
  10695. @opindex mmac-d16
  10696. Passed down to the assembler. Also sets the preprocessor symbol
  10697. @code{__Xxmac_d16}.
  10698. @item -mmac-24
  10699. @opindex mmac-24
  10700. Passed down to the assembler. Also sets the preprocessor symbol
  10701. @code{__Xxmac_24}.
  10702. @c ARC700 4.10 extension instruction
  10703. @item -mrtsc
  10704. @opindex mrtsc
  10705. Passed down to the assembler to enable the 64-bit Time-Stamp Counter
  10706. extension instruction. Also sets the preprocessor symbol
  10707. @code{__Xrtsc}.
  10708. @c ARC700 4.10 extension instruction
  10709. @item -mswape
  10710. @opindex mswape
  10711. Passed down to the assembler to enable the swap byte ordering
  10712. extension instruction. Also sets the preprocessor symbol
  10713. @code{__Xswape}.
  10714. @item -mtelephony
  10715. @opindex mtelephony
  10716. Passed down to the assembler to enable dual and single operand
  10717. instructions for telephony. Also sets the preprocessor symbol
  10718. @code{__Xtelephony}.
  10719. @item -mxy
  10720. @opindex mxy
  10721. Passed down to the assembler to enable the XY Memory extension. Also
  10722. sets the preprocessor symbol @code{__Xxy}.
  10723. @end table
  10724. The following options control how the assembly code is annotated:
  10725. @c Assembly annotation options
  10726. @table @gcctabopt
  10727. @item -misize
  10728. @opindex misize
  10729. Annotate assembler instructions with estimated addresses.
  10730. @item -mannotate-align
  10731. @opindex mannotate-align
  10732. Explain what alignment considerations lead to the decision to make an
  10733. instruction short or long.
  10734. @end table
  10735. The following options are passed through to the linker:
  10736. @c options passed through to the linker
  10737. @table @gcctabopt
  10738. @item -marclinux
  10739. @opindex marclinux
  10740. Passed through to the linker, to specify use of the @code{arclinux} emulation.
  10741. This option is enabled by default in tool chains built for
  10742. @w{@code{arc-linux-uclibc}} and @w{@code{arceb-linux-uclibc}} targets
  10743. when profiling is not requested.
  10744. @item -marclinux_prof
  10745. @opindex marclinux_prof
  10746. Passed through to the linker, to specify use of the
  10747. @code{arclinux_prof} emulation. This option is enabled by default in
  10748. tool chains built for @w{@code{arc-linux-uclibc}} and
  10749. @w{@code{arceb-linux-uclibc}} targets when profiling is requested.
  10750. @end table
  10751. The following options control the semantics of generated code:
  10752. @c semantically relevant code generation options
  10753. @table @gcctabopt
  10754. @item -mepilogue-cfi
  10755. @opindex mepilogue-cfi
  10756. Enable generation of call frame information for epilogues.
  10757. @item -mno-epilogue-cfi
  10758. @opindex mno-epilogue-cfi
  10759. Disable generation of call frame information for epilogues.
  10760. @item -mlong-calls
  10761. @opindex mlong-calls
  10762. Generate call insns as register indirect calls, thus providing access
  10763. to the full 32-bit address range.
  10764. @item -mmedium-calls
  10765. @opindex mmedium-calls
  10766. Don't use less than 25 bit addressing range for calls, which is the
  10767. offset available for an unconditional branch-and-link
  10768. instruction. Conditional execution of function calls is suppressed, to
  10769. allow use of the 25-bit range, rather than the 21-bit range with
  10770. conditional branch-and-link. This is the default for tool chains built
  10771. for @w{@code{arc-linux-uclibc}} and @w{@code{arceb-linux-uclibc}} targets.
  10772. @item -mno-sdata
  10773. @opindex mno-sdata
  10774. Do not generate sdata references. This is the default for tool chains
  10775. built for @w{@code{arc-linux-uclibc}} and @w{@code{arceb-linux-uclibc}}
  10776. targets.
  10777. @item -mucb-mcount
  10778. @opindex mucb-mcount
  10779. Instrument with mcount calls as used in UCB code. I.e. do the
  10780. counting in the callee, not the caller. By default ARC instrumentation
  10781. counts in the caller.
  10782. @item -mvolatile-cache
  10783. @opindex mvolatile-cache
  10784. Use ordinarily cached memory accesses for volatile references. This is the
  10785. default.
  10786. @item -mno-volatile-cache
  10787. @opindex mno-volatile-cache
  10788. Enable cache bypass for volatile references.
  10789. @end table
  10790. The following options fine tune code generation:
  10791. @c code generation tuning options
  10792. @table @gcctabopt
  10793. @item -malign-call
  10794. @opindex malign-call
  10795. Do alignment optimizations for call instructions.
  10796. @item -mauto-modify-reg
  10797. @opindex mauto-modify-reg
  10798. Enable the use of pre/post modify with register displacement.
  10799. @item -mbbit-peephole
  10800. @opindex mbbit-peephole
  10801. Enable bbit peephole2.
  10802. @item -mno-brcc
  10803. @opindex mno-brcc
  10804. This option disables a target-specific pass in @file{arc_reorg} to
  10805. generate @code{BRcc} instructions. It has no effect on @code{BRcc}
  10806. generation driven by the combiner pass.
  10807. @item -mcase-vector-pcrel
  10808. @opindex mcase-vector-pcrel
  10809. Use pc-relative switch case tables - this enables case table shortening.
  10810. This is the default for @option{-Os}.
  10811. @item -mcompact-casesi
  10812. @opindex mcompact-casesi
  10813. Enable compact casesi pattern.
  10814. This is the default for @option{-Os}.
  10815. @item -mno-cond-exec
  10816. @opindex mno-cond-exec
  10817. Disable ARCompact specific pass to generate conditional execution instructions.
  10818. Due to delay slot scheduling and interactions between operand numbers,
  10819. literal sizes, instruction lengths, and the support for conditional execution,
  10820. the target-independent pass to generate conditional execution is often lacking,
  10821. so the ARC port has kept a special pass around that tries to find more
  10822. conditional execution generating opportunities after register allocation,
  10823. branch shortening, and delay slot scheduling have been done. This pass
  10824. generally, but not always, improves performance and code size, at the cost of
  10825. extra compilation time, which is why there is an option to switch it off.
  10826. If you have a problem with call instructions exceeding their allowable
  10827. offset range because they are conditionalized, you should consider using
  10828. @option{-mmedium-calls} instead.
  10829. @item -mearly-cbranchsi
  10830. @opindex mearly-cbranchsi
  10831. Enable pre-reload use of the cbranchsi pattern.
  10832. @item -mexpand-adddi
  10833. @opindex mexpand-adddi
  10834. Expand @code{adddi3} and @code{subdi3} at rtl generation time into
  10835. @code{add.f}, @code{adc} etc.
  10836. @item -mindexed-loads
  10837. @opindex mindexed-loads
  10838. Enable the use of indexed loads. This can be problematic because some
  10839. optimizers then assume that indexed stores exist, which is not
  10840. the case.
  10841. @item -mlra
  10842. @opindex mlra
  10843. Enable Local Register Allocation. This is still experimental for ARC,
  10844. so by default the compiler uses standard reload
  10845. (i.e. @option{-mno-lra}).
  10846. @item -mlra-priority-none
  10847. @opindex mlra-priority-none
  10848. Don't indicate any priority for target registers.
  10849. @item -mlra-priority-compact
  10850. @opindex mlra-priority-compact
  10851. Indicate target register priority for r0..r3 / r12..r15.
  10852. @item -mlra-priority-noncompact
  10853. @opindex mlra-priority-noncompact
  10854. Reduce target regsiter priority for r0..r3 / r12..r15.
  10855. @item -mno-millicode
  10856. @opindex mno-millicode
  10857. When optimizing for size (using @option{-Os}), prologues and epilogues
  10858. that have to save or restore a large number of registers are often
  10859. shortened by using call to a special function in libgcc; this is
  10860. referred to as a @emph{millicode} call. As these calls can pose
  10861. performance issues, and/or cause linking issues when linking in a
  10862. nonstandard way, this option is provided to turn off millicode call
  10863. generation.
  10864. @item -mmixed-code
  10865. @opindex mmixed-code
  10866. Tweak register allocation to help 16-bit instruction generation.
  10867. This generally has the effect of decreasing the average instruction size
  10868. while increasing the instruction count.
  10869. @item -mq-class
  10870. @opindex mq-class
  10871. Enable 'q' instruction alternatives.
  10872. This is the default for @option{-Os}.
  10873. @item -mRcq
  10874. @opindex mRcq
  10875. Enable Rcq constraint handling - most short code generation depends on this.
  10876. This is the default.
  10877. @item -mRcw
  10878. @opindex mRcw
  10879. Enable Rcw constraint handling - ccfsm condexec mostly depends on this.
  10880. This is the default.
  10881. @item -msize-level=@var{level}
  10882. @opindex msize-level
  10883. Fine-tune size optimization with regards to instruction lengths and alignment.
  10884. The recognized values for @var{level} are:
  10885. @table @samp
  10886. @item 0
  10887. No size optimization. This level is deprecated and treated like @samp{1}.
  10888. @item 1
  10889. Short instructions are used opportunistically.
  10890. @item 2
  10891. In addition, alignment of loops and of code after barriers are dropped.
  10892. @item 3
  10893. In addition, optional data alignment is dropped, and the option @option{Os} is enabled.
  10894. @end table
  10895. This defaults to @samp{3} when @option{-Os} is in effect. Otherwise,
  10896. the behavior when this is not set is equivalent to level @samp{1}.
  10897. @item -mtune=@var{cpu}
  10898. @opindex mtune
  10899. Set instruction scheduling parameters for @var{cpu}, overriding any implied
  10900. by @option{-mcpu=}.
  10901. Supported values for @var{cpu} are
  10902. @table @samp
  10903. @item ARC600
  10904. Tune for ARC600 cpu.
  10905. @item ARC601
  10906. Tune for ARC601 cpu.
  10907. @item ARC700
  10908. Tune for ARC700 cpu with standard multiplier block.
  10909. @item ARC700-xmac
  10910. Tune for ARC700 cpu with XMAC block.
  10911. @item ARC725D
  10912. Tune for ARC725D cpu.
  10913. @item ARC750D
  10914. Tune for ARC750D cpu.
  10915. @end table
  10916. @item -mmultcost=@var{num}
  10917. @opindex mmultcost
  10918. Cost to assume for a multiply instruction, with @samp{4} being equal to a
  10919. normal instruction.
  10920. @item -munalign-prob-threshold=@var{probability}
  10921. @opindex munalign-prob-threshold
  10922. Set probability threshold for unaligning branches.
  10923. When tuning for @samp{ARC700} and optimizing for speed, branches without
  10924. filled delay slot are preferably emitted unaligned and long, unless
  10925. profiling indicates that the probability for the branch to be taken
  10926. is below @var{probability}. @xref{Cross-profiling}.
  10927. The default is (REG_BR_PROB_BASE/2), i.e.@: 5000.
  10928. @end table
  10929. The following options are maintained for backward compatibility, but
  10930. are now deprecated and will be removed in a future release:
  10931. @c Deprecated options
  10932. @table @gcctabopt
  10933. @item -margonaut
  10934. @opindex margonaut
  10935. Obsolete FPX.
  10936. @item -mbig-endian
  10937. @opindex mbig-endian
  10938. @itemx -EB
  10939. @opindex EB
  10940. Compile code for big endian targets. Use of these options is now
  10941. deprecated. Users wanting big-endian code, should use the
  10942. @w{@code{arceb-elf32}} and @w{@code{arceb-linux-uclibc}} targets when
  10943. building the tool chain, for which big-endian is the default.
  10944. @item -mlittle-endian
  10945. @opindex mlittle-endian
  10946. @itemx -EL
  10947. @opindex EL
  10948. Compile code for little endian targets. Use of these options is now
  10949. deprecated. Users wanting little-endian code should use the
  10950. @w{@code{arc-elf32}} and @w{@code{arc-linux-uclibc}} targets when
  10951. building the tool chain, for which little-endian is the default.
  10952. @item -mbarrel_shifter
  10953. @opindex mbarrel_shifter
  10954. Replaced by @option{-mbarrel-shifter}.
  10955. @item -mdpfp_compact
  10956. @opindex mdpfp_compact
  10957. Replaced by @option{-mdpfp-compact}.
  10958. @item -mdpfp_fast
  10959. @opindex mdpfp_fast
  10960. Replaced by @option{-mdpfp-fast}.
  10961. @item -mdsp_packa
  10962. @opindex mdsp_packa
  10963. Replaced by @option{-mdsp-packa}.
  10964. @item -mEA
  10965. @opindex mEA
  10966. Replaced by @option{-mea}.
  10967. @item -mmac_24
  10968. @opindex mmac_24
  10969. Replaced by @option{-mmac-24}.
  10970. @item -mmac_d16
  10971. @opindex mmac_d16
  10972. Replaced by @option{-mmac-d16}.
  10973. @item -mspfp_compact
  10974. @opindex mspfp_compact
  10975. Replaced by @option{-mspfp-compact}.
  10976. @item -mspfp_fast
  10977. @opindex mspfp_fast
  10978. Replaced by @option{-mspfp-fast}.
  10979. @item -mtune=@var{cpu}
  10980. @opindex mtune
  10981. Values @samp{arc600}, @samp{arc601}, @samp{arc700} and
  10982. @samp{arc700-xmac} for @var{cpu} are replaced by @samp{ARC600},
  10983. @samp{ARC601}, @samp{ARC700} and @samp{ARC700-xmac} respectively
  10984. @item -multcost=@var{num}
  10985. @opindex multcost
  10986. Replaced by @option{-mmultcost}.
  10987. @end table
  10988. @node ARM Options
  10989. @subsection ARM Options
  10990. @cindex ARM options
  10991. These @samp{-m} options are defined for the ARM port:
  10992. @table @gcctabopt
  10993. @item -mabi=@var{name}
  10994. @opindex mabi
  10995. Generate code for the specified ABI@. Permissible values are: @samp{apcs-gnu},
  10996. @samp{atpcs}, @samp{aapcs}, @samp{aapcs-linux} and @samp{iwmmxt}.
  10997. @item -mapcs-frame
  10998. @opindex mapcs-frame
  10999. Generate a stack frame that is compliant with the ARM Procedure Call
  11000. Standard for all functions, even if this is not strictly necessary for
  11001. correct execution of the code. Specifying @option{-fomit-frame-pointer}
  11002. with this option causes the stack frames not to be generated for
  11003. leaf functions. The default is @option{-mno-apcs-frame}.
  11004. This option is deprecated.
  11005. @item -mapcs
  11006. @opindex mapcs
  11007. This is a synonym for @option{-mapcs-frame} and is deprecated.
  11008. @ignore
  11009. @c not currently implemented
  11010. @item -mapcs-stack-check
  11011. @opindex mapcs-stack-check
  11012. Generate code to check the amount of stack space available upon entry to
  11013. every function (that actually uses some stack space). If there is
  11014. insufficient space available then either the function
  11015. @code{__rt_stkovf_split_small} or @code{__rt_stkovf_split_big} is
  11016. called, depending upon the amount of stack space required. The runtime
  11017. system is required to provide these functions. The default is
  11018. @option{-mno-apcs-stack-check}, since this produces smaller code.
  11019. @c not currently implemented
  11020. @item -mapcs-float
  11021. @opindex mapcs-float
  11022. Pass floating-point arguments using the floating-point registers. This is
  11023. one of the variants of the APCS@. This option is recommended if the
  11024. target hardware has a floating-point unit or if a lot of floating-point
  11025. arithmetic is going to be performed by the code. The default is
  11026. @option{-mno-apcs-float}, since the size of integer-only code is
  11027. slightly increased if @option{-mapcs-float} is used.
  11028. @c not currently implemented
  11029. @item -mapcs-reentrant
  11030. @opindex mapcs-reentrant
  11031. Generate reentrant, position-independent code. The default is
  11032. @option{-mno-apcs-reentrant}.
  11033. @end ignore
  11034. @item -mthumb-interwork
  11035. @opindex mthumb-interwork
  11036. Generate code that supports calling between the ARM and Thumb
  11037. instruction sets. Without this option, on pre-v5 architectures, the
  11038. two instruction sets cannot be reliably used inside one program. The
  11039. default is @option{-mno-thumb-interwork}, since slightly larger code
  11040. is generated when @option{-mthumb-interwork} is specified. In AAPCS
  11041. configurations this option is meaningless.
  11042. @item -mno-sched-prolog
  11043. @opindex mno-sched-prolog
  11044. Prevent the reordering of instructions in the function prologue, or the
  11045. merging of those instruction with the instructions in the function's
  11046. body. This means that all functions start with a recognizable set
  11047. of instructions (or in fact one of a choice from a small set of
  11048. different function prologues), and this information can be used to
  11049. locate the start of functions inside an executable piece of code. The
  11050. default is @option{-msched-prolog}.
  11051. @item -mfloat-abi=@var{name}
  11052. @opindex mfloat-abi
  11053. Specifies which floating-point ABI to use. Permissible values
  11054. are: @samp{soft}, @samp{softfp} and @samp{hard}.
  11055. Specifying @samp{soft} causes GCC to generate output containing
  11056. library calls for floating-point operations.
  11057. @samp{softfp} allows the generation of code using hardware floating-point
  11058. instructions, but still uses the soft-float calling conventions.
  11059. @samp{hard} allows generation of floating-point instructions
  11060. and uses FPU-specific calling conventions.
  11061. The default depends on the specific target configuration. Note that
  11062. the hard-float and soft-float ABIs are not link-compatible; you must
  11063. compile your entire program with the same ABI, and link with a
  11064. compatible set of libraries.
  11065. @item -mlittle-endian
  11066. @opindex mlittle-endian
  11067. Generate code for a processor running in little-endian mode. This is
  11068. the default for all standard configurations.
  11069. @item -mbig-endian
  11070. @opindex mbig-endian
  11071. Generate code for a processor running in big-endian mode; the default is
  11072. to compile code for a little-endian processor.
  11073. @item -march=@var{name}
  11074. @opindex march
  11075. This specifies the name of the target ARM architecture. GCC uses this
  11076. name to determine what kind of instructions it can emit when generating
  11077. assembly code. This option can be used in conjunction with or instead
  11078. of the @option{-mcpu=} option. Permissible names are: @samp{armv2},
  11079. @samp{armv2a}, @samp{armv3}, @samp{armv3m}, @samp{armv4}, @samp{armv4t},
  11080. @samp{armv5}, @samp{armv5t}, @samp{armv5e}, @samp{armv5te},
  11081. @samp{armv6}, @samp{armv6j},
  11082. @samp{armv6t2}, @samp{armv6z}, @samp{armv6zk}, @samp{armv6-m},
  11083. @samp{armv7}, @samp{armv7-a}, @samp{armv7-r}, @samp{armv7-m}, @samp{armv7e-m},
  11084. @samp{armv7ve}, @samp{armv8-a}, @samp{armv8-a+crc},
  11085. @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}.
  11086. @option{-march=armv7ve} is the armv7-a architecture with virtualization
  11087. extensions.
  11088. @option{-march=armv8-a+crc} enables code generation for the ARMv8-A
  11089. architecture together with the optional CRC32 extensions.
  11090. @option{-march=native} causes the compiler to auto-detect the architecture
  11091. of the build computer. At present, this feature is only supported on
  11092. GNU/Linux, and not all architectures are recognized. If the auto-detect
  11093. is unsuccessful the option has no effect.
  11094. @item -mtune=@var{name}
  11095. @opindex mtune
  11096. This option specifies the name of the target ARM processor for
  11097. which GCC should tune the performance of the code.
  11098. For some ARM implementations better performance can be obtained by using
  11099. this option.
  11100. Permissible names are: @samp{arm2}, @samp{arm250},
  11101. @samp{arm3}, @samp{arm6}, @samp{arm60}, @samp{arm600}, @samp{arm610},
  11102. @samp{arm620}, @samp{arm7}, @samp{arm7m}, @samp{arm7d}, @samp{arm7dm},
  11103. @samp{arm7di}, @samp{arm7dmi}, @samp{arm70}, @samp{arm700},
  11104. @samp{arm700i}, @samp{arm710}, @samp{arm710c}, @samp{arm7100},
  11105. @samp{arm720},
  11106. @samp{arm7500}, @samp{arm7500fe}, @samp{arm7tdmi}, @samp{arm7tdmi-s},
  11107. @samp{arm710t}, @samp{arm720t}, @samp{arm740t},
  11108. @samp{strongarm}, @samp{strongarm110}, @samp{strongarm1100},
  11109. @samp{strongarm1110},
  11110. @samp{arm8}, @samp{arm810}, @samp{arm9}, @samp{arm9e}, @samp{arm920},
  11111. @samp{arm920t}, @samp{arm922t}, @samp{arm946e-s}, @samp{arm966e-s},
  11112. @samp{arm968e-s}, @samp{arm926ej-s}, @samp{arm940t}, @samp{arm9tdmi},
  11113. @samp{arm10tdmi}, @samp{arm1020t}, @samp{arm1026ej-s},
  11114. @samp{arm10e}, @samp{arm1020e}, @samp{arm1022e},
  11115. @samp{arm1136j-s}, @samp{arm1136jf-s}, @samp{mpcore}, @samp{mpcorenovfp},
  11116. @samp{arm1156t2-s}, @samp{arm1156t2f-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s},
  11117. @samp{cortex-a5}, @samp{cortex-a7}, @samp{cortex-a8}, @samp{cortex-a9},
  11118. @samp{cortex-a12}, @samp{cortex-a15}, @samp{cortex-a53},
  11119. @samp{cortex-a57}, @samp{cortex-a72},
  11120. @samp{cortex-r4},
  11121. @samp{cortex-r4f}, @samp{cortex-r5}, @samp{cortex-r7}, @samp{cortex-m7},
  11122. @samp{cortex-m4},
  11123. @samp{cortex-m3},
  11124. @samp{cortex-m1},
  11125. @samp{cortex-m0},
  11126. @samp{cortex-m0plus},
  11127. @samp{cortex-m1.small-multiply},
  11128. @samp{cortex-m0.small-multiply},
  11129. @samp{cortex-m0plus.small-multiply},
  11130. @samp{exynos-m1},
  11131. @samp{marvell-pj4},
  11132. @samp{xscale}, @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312},
  11133. @samp{fa526}, @samp{fa626},
  11134. @samp{fa606te}, @samp{fa626te}, @samp{fmp626}, @samp{fa726te},
  11135. @samp{xgene1}.
  11136. Additionally, this option can specify that GCC should tune the performance
  11137. of the code for a big.LITTLE system. Permissible names are:
  11138. @samp{cortex-a15.cortex-a7}, @samp{cortex-a57.cortex-a53},
  11139. @samp{cortex-a72.cortex-a53}.
  11140. @option{-mtune=generic-@var{arch}} specifies that GCC should tune the
  11141. performance for a blend of processors within architecture @var{arch}.
  11142. The aim is to generate code that run well on the current most popular
  11143. processors, balancing between optimizations that benefit some CPUs in the
  11144. range, and avoiding performance pitfalls of other CPUs. The effects of
  11145. this option may change in future GCC versions as CPU models come and go.
  11146. @option{-mtune=native} causes the compiler to auto-detect the CPU
  11147. of the build computer. At present, this feature is only supported on
  11148. GNU/Linux, and not all architectures are recognized. If the auto-detect is
  11149. unsuccessful the option has no effect.
  11150. @item -mcpu=@var{name}
  11151. @opindex mcpu
  11152. This specifies the name of the target ARM processor. GCC uses this name
  11153. to derive the name of the target ARM architecture (as if specified
  11154. by @option{-march}) and the ARM processor type for which to tune for
  11155. performance (as if specified by @option{-mtune}). Where this option
  11156. is used in conjunction with @option{-march} or @option{-mtune},
  11157. those options take precedence over the appropriate part of this option.
  11158. Permissible names for this option are the same as those for
  11159. @option{-mtune}.
  11160. @option{-mcpu=generic-@var{arch}} is also permissible, and is
  11161. equivalent to @option{-march=@var{arch} -mtune=generic-@var{arch}}.
  11162. See @option{-mtune} for more information.
  11163. @option{-mcpu=native} causes the compiler to auto-detect the CPU
  11164. of the build computer. At present, this feature is only supported on
  11165. GNU/Linux, and not all architectures are recognized. If the auto-detect
  11166. is unsuccessful the option has no effect.
  11167. @item -mfpu=@var{name}
  11168. @opindex mfpu
  11169. This specifies what floating-point hardware (or hardware emulation) is
  11170. available on the target. Permissible names are: @samp{vfp}, @samp{vfpv3},
  11171. @samp{vfpv3-fp16}, @samp{vfpv3-d16}, @samp{vfpv3-d16-fp16}, @samp{vfpv3xd},
  11172. @samp{vfpv3xd-fp16}, @samp{neon}, @samp{neon-fp16}, @samp{vfpv4},
  11173. @samp{vfpv4-d16}, @samp{fpv4-sp-d16}, @samp{neon-vfpv4},
  11174. @samp{fpv5-d16}, @samp{fpv5-sp-d16},
  11175. @samp{fp-armv8}, @samp{neon-fp-armv8}, and @samp{crypto-neon-fp-armv8}.
  11176. If @option{-msoft-float} is specified this specifies the format of
  11177. floating-point values.
  11178. If the selected floating-point hardware includes the NEON extension
  11179. (e.g. @option{-mfpu}=@samp{neon}), note that floating-point
  11180. operations are not generated by GCC's auto-vectorization pass unless
  11181. @option{-funsafe-math-optimizations} is also specified. This is
  11182. because NEON hardware does not fully implement the IEEE 754 standard for
  11183. floating-point arithmetic (in particular denormal values are treated as
  11184. zero), so the use of NEON instructions may lead to a loss of precision.
  11185. @item -mfp16-format=@var{name}
  11186. @opindex mfp16-format
  11187. Specify the format of the @code{__fp16} half-precision floating-point type.
  11188. Permissible names are @samp{none}, @samp{ieee}, and @samp{alternative};
  11189. the default is @samp{none}, in which case the @code{__fp16} type is not
  11190. defined. @xref{Half-Precision}, for more information.
  11191. @item -mstructure-size-boundary=@var{n}
  11192. @opindex mstructure-size-boundary
  11193. The sizes of all structures and unions are rounded up to a multiple
  11194. of the number of bits set by this option. Permissible values are 8, 32
  11195. and 64. The default value varies for different toolchains. For the COFF
  11196. targeted toolchain the default value is 8. A value of 64 is only allowed
  11197. if the underlying ABI supports it.
  11198. Specifying a larger number can produce faster, more efficient code, but
  11199. can also increase the size of the program. Different values are potentially
  11200. incompatible. Code compiled with one value cannot necessarily expect to
  11201. work with code or libraries compiled with another value, if they exchange
  11202. information using structures or unions.
  11203. @item -mabort-on-noreturn
  11204. @opindex mabort-on-noreturn
  11205. Generate a call to the function @code{abort} at the end of a
  11206. @code{noreturn} function. It is executed if the function tries to
  11207. return.
  11208. @item -mlong-calls
  11209. @itemx -mno-long-calls
  11210. @opindex mlong-calls
  11211. @opindex mno-long-calls
  11212. Tells the compiler to perform function calls by first loading the
  11213. address of the function into a register and then performing a subroutine
  11214. call on this register. This switch is needed if the target function
  11215. lies outside of the 64-megabyte addressing range of the offset-based
  11216. version of subroutine call instruction.
  11217. Even if this switch is enabled, not all function calls are turned
  11218. into long calls. The heuristic is that static functions, functions
  11219. that have the @code{short_call} attribute, functions that are inside
  11220. the scope of a @code{#pragma no_long_calls} directive, and functions whose
  11221. definitions have already been compiled within the current compilation
  11222. unit are not turned into long calls. The exceptions to this rule are
  11223. that weak function definitions, functions with the @code{long_call}
  11224. attribute or the @code{section} attribute, and functions that are within
  11225. the scope of a @code{#pragma long_calls} directive are always
  11226. turned into long calls.
  11227. This feature is not enabled by default. Specifying
  11228. @option{-mno-long-calls} restores the default behavior, as does
  11229. placing the function calls within the scope of a @code{#pragma
  11230. long_calls_off} directive. Note these switches have no effect on how
  11231. the compiler generates code to handle function calls via function
  11232. pointers.
  11233. @item -msingle-pic-base
  11234. @opindex msingle-pic-base
  11235. Treat the register used for PIC addressing as read-only, rather than
  11236. loading it in the prologue for each function. The runtime system is
  11237. responsible for initializing this register with an appropriate value
  11238. before execution begins.
  11239. @item -mpic-register=@var{reg}
  11240. @opindex mpic-register
  11241. Specify the register to be used for PIC addressing.
  11242. For standard PIC base case, the default is any suitable register
  11243. determined by compiler. For single PIC base case, the default is
  11244. @samp{R9} if target is EABI based or stack-checking is enabled,
  11245. otherwise the default is @samp{R10}.
  11246. @item -mpic-data-is-text-relative
  11247. @opindex mpic-data-is-text-relative
  11248. Assume that each data segments are relative to text segment at load time.
  11249. Therefore, it permits addressing data using PC-relative operations.
  11250. This option is on by default for targets other than VxWorks RTP.
  11251. @item -mpoke-function-name
  11252. @opindex mpoke-function-name
  11253. Write the name of each function into the text section, directly
  11254. preceding the function prologue. The generated code is similar to this:
  11255. @smallexample
  11256. t0
  11257. .ascii "arm_poke_function_name", 0
  11258. .align
  11259. t1
  11260. .word 0xff000000 + (t1 - t0)
  11261. arm_poke_function_name
  11262. mov ip, sp
  11263. stmfd sp!, @{fp, ip, lr, pc@}
  11264. sub fp, ip, #4
  11265. @end smallexample
  11266. When performing a stack backtrace, code can inspect the value of
  11267. @code{pc} stored at @code{fp + 0}. If the trace function then looks at
  11268. location @code{pc - 12} and the top 8 bits are set, then we know that
  11269. there is a function name embedded immediately preceding this location
  11270. and has length @code{((pc[-3]) & 0xff000000)}.
  11271. @item -mthumb
  11272. @itemx -marm
  11273. @opindex marm
  11274. @opindex mthumb
  11275. Select between generating code that executes in ARM and Thumb
  11276. states. The default for most configurations is to generate code
  11277. that executes in ARM state, but the default can be changed by
  11278. configuring GCC with the @option{--with-mode=}@var{state}
  11279. configure option.
  11280. @item -mtpcs-frame
  11281. @opindex mtpcs-frame
  11282. Generate a stack frame that is compliant with the Thumb Procedure Call
  11283. Standard for all non-leaf functions. (A leaf function is one that does
  11284. not call any other functions.) The default is @option{-mno-tpcs-frame}.
  11285. @item -mtpcs-leaf-frame
  11286. @opindex mtpcs-leaf-frame
  11287. Generate a stack frame that is compliant with the Thumb Procedure Call
  11288. Standard for all leaf functions. (A leaf function is one that does
  11289. not call any other functions.) The default is @option{-mno-apcs-leaf-frame}.
  11290. @item -mcallee-super-interworking
  11291. @opindex mcallee-super-interworking
  11292. Gives all externally visible functions in the file being compiled an ARM
  11293. instruction set header which switches to Thumb mode before executing the
  11294. rest of the function. This allows these functions to be called from
  11295. non-interworking code. This option is not valid in AAPCS configurations
  11296. because interworking is enabled by default.
  11297. @item -mcaller-super-interworking
  11298. @opindex mcaller-super-interworking
  11299. Allows calls via function pointers (including virtual functions) to
  11300. execute correctly regardless of whether the target code has been
  11301. compiled for interworking or not. There is a small overhead in the cost
  11302. of executing a function pointer if this option is enabled. This option
  11303. is not valid in AAPCS configurations because interworking is enabled
  11304. by default.
  11305. @item -mtp=@var{name}
  11306. @opindex mtp
  11307. Specify the access model for the thread local storage pointer. The valid
  11308. models are @samp{soft}, which generates calls to @code{__aeabi_read_tp},
  11309. @samp{cp15}, which fetches the thread pointer from @code{cp15} directly
  11310. (supported in the arm6k architecture), and @samp{auto}, which uses the
  11311. best available method for the selected processor. The default setting is
  11312. @samp{auto}.
  11313. @item -mtls-dialect=@var{dialect}
  11314. @opindex mtls-dialect
  11315. Specify the dialect to use for accessing thread local storage. Two
  11316. @var{dialect}s are supported---@samp{gnu} and @samp{gnu2}. The
  11317. @samp{gnu} dialect selects the original GNU scheme for supporting
  11318. local and global dynamic TLS models. The @samp{gnu2} dialect
  11319. selects the GNU descriptor scheme, which provides better performance
  11320. for shared libraries. The GNU descriptor scheme is compatible with
  11321. the original scheme, but does require new assembler, linker and
  11322. library support. Initial and local exec TLS models are unaffected by
  11323. this option and always use the original scheme.
  11324. @item -mword-relocations
  11325. @opindex mword-relocations
  11326. Only generate absolute relocations on word-sized values (i.e. R_ARM_ABS32).
  11327. This is enabled by default on targets (uClinux, SymbianOS) where the runtime
  11328. loader imposes this restriction, and when @option{-fpic} or @option{-fPIC}
  11329. is specified.
  11330. @item -mfix-cortex-m3-ldrd
  11331. @opindex mfix-cortex-m3-ldrd
  11332. Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions
  11333. with overlapping destination and base registers are used. This option avoids
  11334. generating these instructions. This option is enabled by default when
  11335. @option{-mcpu=cortex-m3} is specified.
  11336. @item -munaligned-access
  11337. @itemx -mno-unaligned-access
  11338. @opindex munaligned-access
  11339. @opindex mno-unaligned-access
  11340. Enables (or disables) reading and writing of 16- and 32- bit values
  11341. from addresses that are not 16- or 32- bit aligned. By default
  11342. unaligned access is disabled for all pre-ARMv6 and all ARMv6-M
  11343. architectures, and enabled for all other architectures. If unaligned
  11344. access is not enabled then words in packed data structures are
  11345. accessed a byte at a time.
  11346. The ARM attribute @code{Tag_CPU_unaligned_access} is set in the
  11347. generated object file to either true or false, depending upon the
  11348. setting of this option. If unaligned access is enabled then the
  11349. preprocessor symbol @code{__ARM_FEATURE_UNALIGNED} is also
  11350. defined.
  11351. @item -mneon-for-64bits
  11352. @opindex mneon-for-64bits
  11353. Enables using Neon to handle scalar 64-bits operations. This is
  11354. disabled by default since the cost of moving data from core registers
  11355. to Neon is high.
  11356. @item -mslow-flash-data
  11357. @opindex mslow-flash-data
  11358. Assume loading data from flash is slower than fetching instruction.
  11359. Therefore literal load is minimized for better performance.
  11360. This option is only supported when compiling for ARMv7 M-profile and
  11361. off by default.
  11362. @item -masm-syntax-unified
  11363. @opindex masm-syntax-unified
  11364. Assume inline assembler is using unified asm syntax. The default is
  11365. currently off which implies divided syntax. Currently this option is
  11366. available only for Thumb1 and has no effect on ARM state and Thumb2.
  11367. However, this may change in future releases of GCC. Divided syntax
  11368. should be considered deprecated.
  11369. @item -mrestrict-it
  11370. @opindex mrestrict-it
  11371. Restricts generation of IT blocks to conform to the rules of ARMv8.
  11372. IT blocks can only contain a single 16-bit instruction from a select
  11373. set of instructions. This option is on by default for ARMv8 Thumb mode.
  11374. @item -mprint-tune-info
  11375. @opindex mprint-tune-info
  11376. Print CPU tuning information as comment in assembler file. This is
  11377. an option used only for regression testing of the compiler and not
  11378. intended for ordinary use in compiling code. This option is disabled
  11379. by default.
  11380. @end table
  11381. @node AVR Options
  11382. @subsection AVR Options
  11383. @cindex AVR Options
  11384. These options are defined for AVR implementations:
  11385. @table @gcctabopt
  11386. @item -mmcu=@var{mcu}
  11387. @opindex mmcu
  11388. Specify Atmel AVR instruction set architectures (ISA) or MCU type.
  11389. The default for this option is@tie{}@samp{avr2}.
  11390. GCC supports the following AVR devices and ISAs:
  11391. @include avr-mmcu.texi
  11392. @item -maccumulate-args
  11393. @opindex maccumulate-args
  11394. Accumulate outgoing function arguments and acquire/release the needed
  11395. stack space for outgoing function arguments once in function
  11396. prologue/epilogue. Without this option, outgoing arguments are pushed
  11397. before calling a function and popped afterwards.
  11398. Popping the arguments after the function call can be expensive on
  11399. AVR so that accumulating the stack space might lead to smaller
  11400. executables because arguments need not to be removed from the
  11401. stack after such a function call.
  11402. This option can lead to reduced code size for functions that perform
  11403. several calls to functions that get their arguments on the stack like
  11404. calls to printf-like functions.
  11405. @item -mbranch-cost=@var{cost}
  11406. @opindex mbranch-cost
  11407. Set the branch costs for conditional branch instructions to
  11408. @var{cost}. Reasonable values for @var{cost} are small, non-negative
  11409. integers. The default branch cost is 0.
  11410. @item -mcall-prologues
  11411. @opindex mcall-prologues
  11412. Functions prologues/epilogues are expanded as calls to appropriate
  11413. subroutines. Code size is smaller.
  11414. @item -mint8
  11415. @opindex mint8
  11416. Assume @code{int} to be 8-bit integer. This affects the sizes of all types: a
  11417. @code{char} is 1 byte, an @code{int} is 1 byte, a @code{long} is 2 bytes,
  11418. and @code{long long} is 4 bytes. Please note that this option does not
  11419. conform to the C standards, but it results in smaller code
  11420. size.
  11421. @item -mn-flash=@var{num}
  11422. @opindex mn-flash
  11423. Assume that the flash memory has a size of
  11424. @var{num} times 64@tie{}KiB.
  11425. @item -mno-interrupts
  11426. @opindex mno-interrupts
  11427. Generated code is not compatible with hardware interrupts.
  11428. Code size is smaller.
  11429. @item -mrelax
  11430. @opindex mrelax
  11431. Try to replace @code{CALL} resp.@: @code{JMP} instruction by the shorter
  11432. @code{RCALL} resp.@: @code{RJMP} instruction if applicable.
  11433. Setting @option{-mrelax} just adds the @option{--mlink-relax} option to
  11434. the assembler's command line and the @option{--relax} option to the
  11435. linker's command line.
  11436. Jump relaxing is performed by the linker because jump offsets are not
  11437. known before code is located. Therefore, the assembler code generated by the
  11438. compiler is the same, but the instructions in the executable may
  11439. differ from instructions in the assembler code.
  11440. Relaxing must be turned on if linker stubs are needed, see the
  11441. section on @code{EIND} and linker stubs below.
  11442. @item -mrmw
  11443. @opindex mrmw
  11444. Assume that the device supports the Read-Modify-Write
  11445. instructions @code{XCH}, @code{LAC}, @code{LAS} and @code{LAT}.
  11446. @item -msp8
  11447. @opindex msp8
  11448. Treat the stack pointer register as an 8-bit register,
  11449. i.e.@: assume the high byte of the stack pointer is zero.
  11450. In general, you don't need to set this option by hand.
  11451. This option is used internally by the compiler to select and
  11452. build multilibs for architectures @code{avr2} and @code{avr25}.
  11453. These architectures mix devices with and without @code{SPH}.
  11454. For any setting other than @option{-mmcu=avr2} or @option{-mmcu=avr25}
  11455. the compiler driver adds or removes this option from the compiler
  11456. proper's command line, because the compiler then knows if the device
  11457. or architecture has an 8-bit stack pointer and thus no @code{SPH}
  11458. register or not.
  11459. @item -mstrict-X
  11460. @opindex mstrict-X
  11461. Use address register @code{X} in a way proposed by the hardware. This means
  11462. that @code{X} is only used in indirect, post-increment or
  11463. pre-decrement addressing.
  11464. Without this option, the @code{X} register may be used in the same way
  11465. as @code{Y} or @code{Z} which then is emulated by additional
  11466. instructions.
  11467. For example, loading a value with @code{X+const} addressing with a
  11468. small non-negative @code{const < 64} to a register @var{Rn} is
  11469. performed as
  11470. @example
  11471. adiw r26, const ; X += const
  11472. ld @var{Rn}, X ; @var{Rn} = *X
  11473. sbiw r26, const ; X -= const
  11474. @end example
  11475. @item -mtiny-stack
  11476. @opindex mtiny-stack
  11477. Only change the lower 8@tie{}bits of the stack pointer.
  11478. @item -nodevicelib
  11479. @opindex nodevicelib
  11480. Don't link against AVR-LibC's device specific library @code{libdev.a}.
  11481. @item -Waddr-space-convert
  11482. @opindex Waddr-space-convert
  11483. Warn about conversions between address spaces in the case where the
  11484. resulting address space is not contained in the incoming address space.
  11485. @end table
  11486. @subsubsection @code{EIND} and Devices with More Than 128 Ki Bytes of Flash
  11487. @cindex @code{EIND}
  11488. Pointers in the implementation are 16@tie{}bits wide.
  11489. The address of a function or label is represented as word address so
  11490. that indirect jumps and calls can target any code address in the
  11491. range of 64@tie{}Ki words.
  11492. In order to facilitate indirect jump on devices with more than 128@tie{}Ki
  11493. bytes of program memory space, there is a special function register called
  11494. @code{EIND} that serves as most significant part of the target address
  11495. when @code{EICALL} or @code{EIJMP} instructions are used.
  11496. Indirect jumps and calls on these devices are handled as follows by
  11497. the compiler and are subject to some limitations:
  11498. @itemize @bullet
  11499. @item
  11500. The compiler never sets @code{EIND}.
  11501. @item
  11502. The compiler uses @code{EIND} implicitely in @code{EICALL}/@code{EIJMP}
  11503. instructions or might read @code{EIND} directly in order to emulate an
  11504. indirect call/jump by means of a @code{RET} instruction.
  11505. @item
  11506. The compiler assumes that @code{EIND} never changes during the startup
  11507. code or during the application. In particular, @code{EIND} is not
  11508. saved/restored in function or interrupt service routine
  11509. prologue/epilogue.
  11510. @item
  11511. For indirect calls to functions and computed goto, the linker
  11512. generates @emph{stubs}. Stubs are jump pads sometimes also called
  11513. @emph{trampolines}. Thus, the indirect call/jump jumps to such a stub.
  11514. The stub contains a direct jump to the desired address.
  11515. @item
  11516. Linker relaxation must be turned on so that the linker generates
  11517. the stubs correctly in all situations. See the compiler option
  11518. @option{-mrelax} and the linker option @option{--relax}.
  11519. There are corner cases where the linker is supposed to generate stubs
  11520. but aborts without relaxation and without a helpful error message.
  11521. @item
  11522. The default linker script is arranged for code with @code{EIND = 0}.
  11523. If code is supposed to work for a setup with @code{EIND != 0}, a custom
  11524. linker script has to be used in order to place the sections whose
  11525. name start with @code{.trampolines} into the segment where @code{EIND}
  11526. points to.
  11527. @item
  11528. The startup code from libgcc never sets @code{EIND}.
  11529. Notice that startup code is a blend of code from libgcc and AVR-LibC.
  11530. For the impact of AVR-LibC on @code{EIND}, see the
  11531. @w{@uref{http://nongnu.org/avr-libc/user-manual/,AVR-LibC user manual}}.
  11532. @item
  11533. It is legitimate for user-specific startup code to set up @code{EIND}
  11534. early, for example by means of initialization code located in
  11535. section @code{.init3}. Such code runs prior to general startup code
  11536. that initializes RAM and calls constructors, but after the bit
  11537. of startup code from AVR-LibC that sets @code{EIND} to the segment
  11538. where the vector table is located.
  11539. @example
  11540. #include <avr/io.h>
  11541. static void
  11542. __attribute__((section(".init3"),naked,used,no_instrument_function))
  11543. init3_set_eind (void)
  11544. @{
  11545. __asm volatile ("ldi r24,pm_hh8(__trampolines_start)\n\t"
  11546. "out %i0,r24" :: "n" (&EIND) : "r24","memory");
  11547. @}
  11548. @end example
  11549. @noindent
  11550. The @code{__trampolines_start} symbol is defined in the linker script.
  11551. @item
  11552. Stubs are generated automatically by the linker if
  11553. the following two conditions are met:
  11554. @itemize @minus
  11555. @item The address of a label is taken by means of the @code{gs} modifier
  11556. (short for @emph{generate stubs}) like so:
  11557. @example
  11558. LDI r24, lo8(gs(@var{func}))
  11559. LDI r25, hi8(gs(@var{func}))
  11560. @end example
  11561. @item The final location of that label is in a code segment
  11562. @emph{outside} the segment where the stubs are located.
  11563. @end itemize
  11564. @item
  11565. The compiler emits such @code{gs} modifiers for code labels in the
  11566. following situations:
  11567. @itemize @minus
  11568. @item Taking address of a function or code label.
  11569. @item Computed goto.
  11570. @item If prologue-save function is used, see @option{-mcall-prologues}
  11571. command-line option.
  11572. @item Switch/case dispatch tables. If you do not want such dispatch
  11573. tables you can specify the @option{-fno-jump-tables} command-line option.
  11574. @item C and C++ constructors/destructors called during startup/shutdown.
  11575. @item If the tools hit a @code{gs()} modifier explained above.
  11576. @end itemize
  11577. @item
  11578. Jumping to non-symbolic addresses like so is @emph{not} supported:
  11579. @example
  11580. int main (void)
  11581. @{
  11582. /* Call function at word address 0x2 */
  11583. return ((int(*)(void)) 0x2)();
  11584. @}
  11585. @end example
  11586. Instead, a stub has to be set up, i.e.@: the function has to be called
  11587. through a symbol (@code{func_4} in the example):
  11588. @example
  11589. int main (void)
  11590. @{
  11591. extern int func_4 (void);
  11592. /* Call function at byte address 0x4 */
  11593. return func_4();
  11594. @}
  11595. @end example
  11596. and the application be linked with @option{-Wl,--defsym,func_4=0x4}.
  11597. Alternatively, @code{func_4} can be defined in the linker script.
  11598. @end itemize
  11599. @subsubsection Handling of the @code{RAMPD}, @code{RAMPX}, @code{RAMPY} and @code{RAMPZ} Special Function Registers
  11600. @cindex @code{RAMPD}
  11601. @cindex @code{RAMPX}
  11602. @cindex @code{RAMPY}
  11603. @cindex @code{RAMPZ}
  11604. Some AVR devices support memories larger than the 64@tie{}KiB range
  11605. that can be accessed with 16-bit pointers. To access memory locations
  11606. outside this 64@tie{}KiB range, the contentent of a @code{RAMP}
  11607. register is used as high part of the address:
  11608. The @code{X}, @code{Y}, @code{Z} address register is concatenated
  11609. with the @code{RAMPX}, @code{RAMPY}, @code{RAMPZ} special function
  11610. register, respectively, to get a wide address. Similarly,
  11611. @code{RAMPD} is used together with direct addressing.
  11612. @itemize
  11613. @item
  11614. The startup code initializes the @code{RAMP} special function
  11615. registers with zero.
  11616. @item
  11617. If a @ref{AVR Named Address Spaces,named address space} other than
  11618. generic or @code{__flash} is used, then @code{RAMPZ} is set
  11619. as needed before the operation.
  11620. @item
  11621. If the device supports RAM larger than 64@tie{}KiB and the compiler
  11622. needs to change @code{RAMPZ} to accomplish an operation, @code{RAMPZ}
  11623. is reset to zero after the operation.
  11624. @item
  11625. If the device comes with a specific @code{RAMP} register, the ISR
  11626. prologue/epilogue saves/restores that SFR and initializes it with
  11627. zero in case the ISR code might (implicitly) use it.
  11628. @item
  11629. RAM larger than 64@tie{}KiB is not supported by GCC for AVR targets.
  11630. If you use inline assembler to read from locations outside the
  11631. 16-bit address range and change one of the @code{RAMP} registers,
  11632. you must reset it to zero after the access.
  11633. @end itemize
  11634. @subsubsection AVR Built-in Macros
  11635. GCC defines several built-in macros so that the user code can test
  11636. for the presence or absence of features. Almost any of the following
  11637. built-in macros are deduced from device capabilities and thus
  11638. triggered by the @option{-mmcu=} command-line option.
  11639. For even more AVR-specific built-in macros see
  11640. @ref{AVR Named Address Spaces} and @ref{AVR Built-in Functions}.
  11641. @table @code
  11642. @item __AVR_ARCH__
  11643. Build-in macro that resolves to a decimal number that identifies the
  11644. architecture and depends on the @option{-mmcu=@var{mcu}} option.
  11645. Possible values are:
  11646. @code{2}, @code{25}, @code{3}, @code{31}, @code{35},
  11647. @code{4}, @code{5}, @code{51}, @code{6}
  11648. for @var{mcu}=@code{avr2}, @code{avr25}, @code{avr3}, @code{avr31},
  11649. @code{avr35}, @code{avr4}, @code{avr5}, @code{avr51}, @code{avr6},
  11650. respectively and
  11651. @code{100}, @code{102}, @code{104},
  11652. @code{105}, @code{106}, @code{107}
  11653. for @var{mcu}=@code{avrtiny}, @code{avrxmega2}, @code{avrxmega4},
  11654. @code{avrxmega5}, @code{avrxmega6}, @code{avrxmega7}, respectively.
  11655. If @var{mcu} specifies a device, this built-in macro is set
  11656. accordingly. For example, with @option{-mmcu=atmega8} the macro is
  11657. defined to @code{4}.
  11658. @item __AVR_@var{Device}__
  11659. Setting @option{-mmcu=@var{device}} defines this built-in macro which reflects
  11660. the device's name. For example, @option{-mmcu=atmega8} defines the
  11661. built-in macro @code{__AVR_ATmega8__}, @option{-mmcu=attiny261a} defines
  11662. @code{__AVR_ATtiny261A__}, etc.
  11663. The built-in macros' names follow
  11664. the scheme @code{__AVR_@var{Device}__} where @var{Device} is
  11665. the device name as from the AVR user manual. The difference between
  11666. @var{Device} in the built-in macro and @var{device} in
  11667. @option{-mmcu=@var{device}} is that the latter is always lowercase.
  11668. If @var{device} is not a device but only a core architecture like
  11669. @samp{avr51}, this macro is not defined.
  11670. @item __AVR_DEVICE_NAME__
  11671. Setting @option{-mmcu=@var{device}} defines this built-in macro to
  11672. the device's name. For example, with @option{-mmcu=atmega8} the macro
  11673. is defined to @code{atmega8}.
  11674. If @var{device} is not a device but only a core architecture like
  11675. @samp{avr51}, this macro is not defined.
  11676. @item __AVR_XMEGA__
  11677. The device / architecture belongs to the XMEGA family of devices.
  11678. @item __AVR_HAVE_ELPM__
  11679. The device has the the @code{ELPM} instruction.
  11680. @item __AVR_HAVE_ELPMX__
  11681. The device has the @code{ELPM R@var{n},Z} and @code{ELPM
  11682. R@var{n},Z+} instructions.
  11683. @item __AVR_HAVE_MOVW__
  11684. The device has the @code{MOVW} instruction to perform 16-bit
  11685. register-register moves.
  11686. @item __AVR_HAVE_LPMX__
  11687. The device has the @code{LPM R@var{n},Z} and
  11688. @code{LPM R@var{n},Z+} instructions.
  11689. @item __AVR_HAVE_MUL__
  11690. The device has a hardware multiplier.
  11691. @item __AVR_HAVE_JMP_CALL__
  11692. The device has the @code{JMP} and @code{CALL} instructions.
  11693. This is the case for devices with at least 16@tie{}KiB of program
  11694. memory.
  11695. @item __AVR_HAVE_EIJMP_EICALL__
  11696. @itemx __AVR_3_BYTE_PC__
  11697. The device has the @code{EIJMP} and @code{EICALL} instructions.
  11698. This is the case for devices with more than 128@tie{}KiB of program memory.
  11699. This also means that the program counter
  11700. (PC) is 3@tie{}bytes wide.
  11701. @item __AVR_2_BYTE_PC__
  11702. The program counter (PC) is 2@tie{}bytes wide. This is the case for devices
  11703. with up to 128@tie{}KiB of program memory.
  11704. @item __AVR_HAVE_8BIT_SP__
  11705. @itemx __AVR_HAVE_16BIT_SP__
  11706. The stack pointer (SP) register is treated as 8-bit respectively
  11707. 16-bit register by the compiler.
  11708. The definition of these macros is affected by @option{-mtiny-stack}.
  11709. @item __AVR_HAVE_SPH__
  11710. @itemx __AVR_SP8__
  11711. The device has the SPH (high part of stack pointer) special function
  11712. register or has an 8-bit stack pointer, respectively.
  11713. The definition of these macros is affected by @option{-mmcu=} and
  11714. in the cases of @option{-mmcu=avr2} and @option{-mmcu=avr25} also
  11715. by @option{-msp8}.
  11716. @item __AVR_HAVE_RAMPD__
  11717. @itemx __AVR_HAVE_RAMPX__
  11718. @itemx __AVR_HAVE_RAMPY__
  11719. @itemx __AVR_HAVE_RAMPZ__
  11720. The device has the @code{RAMPD}, @code{RAMPX}, @code{RAMPY},
  11721. @code{RAMPZ} special function register, respectively.
  11722. @item __NO_INTERRUPTS__
  11723. This macro reflects the @option{-mno-interrupts} command-line option.
  11724. @item __AVR_ERRATA_SKIP__
  11725. @itemx __AVR_ERRATA_SKIP_JMP_CALL__
  11726. Some AVR devices (AT90S8515, ATmega103) must not skip 32-bit
  11727. instructions because of a hardware erratum. Skip instructions are
  11728. @code{SBRS}, @code{SBRC}, @code{SBIS}, @code{SBIC} and @code{CPSE}.
  11729. The second macro is only defined if @code{__AVR_HAVE_JMP_CALL__} is also
  11730. set.
  11731. @item __AVR_ISA_RMW__
  11732. The device has Read-Modify-Write instructions (XCH, LAC, LAS and LAT).
  11733. @item __AVR_SFR_OFFSET__=@var{offset}
  11734. Instructions that can address I/O special function registers directly
  11735. like @code{IN}, @code{OUT}, @code{SBI}, etc.@: may use a different
  11736. address as if addressed by an instruction to access RAM like @code{LD}
  11737. or @code{STS}. This offset depends on the device architecture and has
  11738. to be subtracted from the RAM address in order to get the
  11739. respective I/O@tie{}address.
  11740. @item __WITH_AVRLIBC__
  11741. The compiler is configured to be used together with AVR-Libc.
  11742. See the @option{--with-avrlibc} configure option.
  11743. @end table
  11744. @node Blackfin Options
  11745. @subsection Blackfin Options
  11746. @cindex Blackfin Options
  11747. @table @gcctabopt
  11748. @item -mcpu=@var{cpu}@r{[}-@var{sirevision}@r{]}
  11749. @opindex mcpu=
  11750. Specifies the name of the target Blackfin processor. Currently, @var{cpu}
  11751. can be one of @samp{bf512}, @samp{bf514}, @samp{bf516}, @samp{bf518},
  11752. @samp{bf522}, @samp{bf523}, @samp{bf524}, @samp{bf525}, @samp{bf526},
  11753. @samp{bf527}, @samp{bf531}, @samp{bf532}, @samp{bf533},
  11754. @samp{bf534}, @samp{bf536}, @samp{bf537}, @samp{bf538}, @samp{bf539},
  11755. @samp{bf542}, @samp{bf544}, @samp{bf547}, @samp{bf548}, @samp{bf549},
  11756. @samp{bf542m}, @samp{bf544m}, @samp{bf547m}, @samp{bf548m}, @samp{bf549m},
  11757. @samp{bf561}, @samp{bf592}.
  11758. The optional @var{sirevision} specifies the silicon revision of the target
  11759. Blackfin processor. Any workarounds available for the targeted silicon revision
  11760. are enabled. If @var{sirevision} is @samp{none}, no workarounds are enabled.
  11761. If @var{sirevision} is @samp{any}, all workarounds for the targeted processor
  11762. are enabled. The @code{__SILICON_REVISION__} macro is defined to two
  11763. hexadecimal digits representing the major and minor numbers in the silicon
  11764. revision. If @var{sirevision} is @samp{none}, the @code{__SILICON_REVISION__}
  11765. is not defined. If @var{sirevision} is @samp{any}, the
  11766. @code{__SILICON_REVISION__} is defined to be @code{0xffff}.
  11767. If this optional @var{sirevision} is not used, GCC assumes the latest known
  11768. silicon revision of the targeted Blackfin processor.
  11769. GCC defines a preprocessor macro for the specified @var{cpu}.
  11770. For the @samp{bfin-elf} toolchain, this option causes the hardware BSP
  11771. provided by libgloss to be linked in if @option{-msim} is not given.
  11772. Without this option, @samp{bf532} is used as the processor by default.
  11773. Note that support for @samp{bf561} is incomplete. For @samp{bf561},
  11774. only the preprocessor macro is defined.
  11775. @item -msim
  11776. @opindex msim
  11777. Specifies that the program will be run on the simulator. This causes
  11778. the simulator BSP provided by libgloss to be linked in. This option
  11779. has effect only for @samp{bfin-elf} toolchain.
  11780. Certain other options, such as @option{-mid-shared-library} and
  11781. @option{-mfdpic}, imply @option{-msim}.
  11782. @item -momit-leaf-frame-pointer
  11783. @opindex momit-leaf-frame-pointer
  11784. Don't keep the frame pointer in a register for leaf functions. This
  11785. avoids the instructions to save, set up and restore frame pointers and
  11786. makes an extra register available in leaf functions. The option
  11787. @option{-fomit-frame-pointer} removes the frame pointer for all functions,
  11788. which might make debugging harder.
  11789. @item -mspecld-anomaly
  11790. @opindex mspecld-anomaly
  11791. When enabled, the compiler ensures that the generated code does not
  11792. contain speculative loads after jump instructions. If this option is used,
  11793. @code{__WORKAROUND_SPECULATIVE_LOADS} is defined.
  11794. @item -mno-specld-anomaly
  11795. @opindex mno-specld-anomaly
  11796. Don't generate extra code to prevent speculative loads from occurring.
  11797. @item -mcsync-anomaly
  11798. @opindex mcsync-anomaly
  11799. When enabled, the compiler ensures that the generated code does not
  11800. contain CSYNC or SSYNC instructions too soon after conditional branches.
  11801. If this option is used, @code{__WORKAROUND_SPECULATIVE_SYNCS} is defined.
  11802. @item -mno-csync-anomaly
  11803. @opindex mno-csync-anomaly
  11804. Don't generate extra code to prevent CSYNC or SSYNC instructions from
  11805. occurring too soon after a conditional branch.
  11806. @item -mlow-64k
  11807. @opindex mlow-64k
  11808. When enabled, the compiler is free to take advantage of the knowledge that
  11809. the entire program fits into the low 64k of memory.
  11810. @item -mno-low-64k
  11811. @opindex mno-low-64k
  11812. Assume that the program is arbitrarily large. This is the default.
  11813. @item -mstack-check-l1
  11814. @opindex mstack-check-l1
  11815. Do stack checking using information placed into L1 scratchpad memory by the
  11816. uClinux kernel.
  11817. @item -mid-shared-library
  11818. @opindex mid-shared-library
  11819. Generate code that supports shared libraries via the library ID method.
  11820. This allows for execute in place and shared libraries in an environment
  11821. without virtual memory management. This option implies @option{-fPIC}.
  11822. With a @samp{bfin-elf} target, this option implies @option{-msim}.
  11823. @item -mno-id-shared-library
  11824. @opindex mno-id-shared-library
  11825. Generate code that doesn't assume ID-based shared libraries are being used.
  11826. This is the default.
  11827. @item -mleaf-id-shared-library
  11828. @opindex mleaf-id-shared-library
  11829. Generate code that supports shared libraries via the library ID method,
  11830. but assumes that this library or executable won't link against any other
  11831. ID shared libraries. That allows the compiler to use faster code for jumps
  11832. and calls.
  11833. @item -mno-leaf-id-shared-library
  11834. @opindex mno-leaf-id-shared-library
  11835. Do not assume that the code being compiled won't link against any ID shared
  11836. libraries. Slower code is generated for jump and call insns.
  11837. @item -mshared-library-id=n
  11838. @opindex mshared-library-id
  11839. Specifies the identification number of the ID-based shared library being
  11840. compiled. Specifying a value of 0 generates more compact code; specifying
  11841. other values forces the allocation of that number to the current
  11842. library but is no more space- or time-efficient than omitting this option.
  11843. @item -msep-data
  11844. @opindex msep-data
  11845. Generate code that allows the data segment to be located in a different
  11846. area of memory from the text segment. This allows for execute in place in
  11847. an environment without virtual memory management by eliminating relocations
  11848. against the text section.
  11849. @item -mno-sep-data
  11850. @opindex mno-sep-data
  11851. Generate code that assumes that the data segment follows the text segment.
  11852. This is the default.
  11853. @item -mlong-calls
  11854. @itemx -mno-long-calls
  11855. @opindex mlong-calls
  11856. @opindex mno-long-calls
  11857. Tells the compiler to perform function calls by first loading the
  11858. address of the function into a register and then performing a subroutine
  11859. call on this register. This switch is needed if the target function
  11860. lies outside of the 24-bit addressing range of the offset-based
  11861. version of subroutine call instruction.
  11862. This feature is not enabled by default. Specifying
  11863. @option{-mno-long-calls} restores the default behavior. Note these
  11864. switches have no effect on how the compiler generates code to handle
  11865. function calls via function pointers.
  11866. @item -mfast-fp
  11867. @opindex mfast-fp
  11868. Link with the fast floating-point library. This library relaxes some of
  11869. the IEEE floating-point standard's rules for checking inputs against
  11870. Not-a-Number (NAN), in the interest of performance.
  11871. @item -minline-plt
  11872. @opindex minline-plt
  11873. Enable inlining of PLT entries in function calls to functions that are
  11874. not known to bind locally. It has no effect without @option{-mfdpic}.
  11875. @item -mmulticore
  11876. @opindex mmulticore
  11877. Build a standalone application for multicore Blackfin processors.
  11878. This option causes proper start files and link scripts supporting
  11879. multicore to be used, and defines the macro @code{__BFIN_MULTICORE}.
  11880. It can only be used with @option{-mcpu=bf561@r{[}-@var{sirevision}@r{]}}.
  11881. This option can be used with @option{-mcorea} or @option{-mcoreb}, which
  11882. selects the one-application-per-core programming model. Without
  11883. @option{-mcorea} or @option{-mcoreb}, the single-application/dual-core
  11884. programming model is used. In this model, the main function of Core B
  11885. should be named as @code{coreb_main}.
  11886. If this option is not used, the single-core application programming
  11887. model is used.
  11888. @item -mcorea
  11889. @opindex mcorea
  11890. Build a standalone application for Core A of BF561 when using
  11891. the one-application-per-core programming model. Proper start files
  11892. and link scripts are used to support Core A, and the macro
  11893. @code{__BFIN_COREA} is defined.
  11894. This option can only be used in conjunction with @option{-mmulticore}.
  11895. @item -mcoreb
  11896. @opindex mcoreb
  11897. Build a standalone application for Core B of BF561 when using
  11898. the one-application-per-core programming model. Proper start files
  11899. and link scripts are used to support Core B, and the macro
  11900. @code{__BFIN_COREB} is defined. When this option is used, @code{coreb_main}
  11901. should be used instead of @code{main}.
  11902. This option can only be used in conjunction with @option{-mmulticore}.
  11903. @item -msdram
  11904. @opindex msdram
  11905. Build a standalone application for SDRAM. Proper start files and
  11906. link scripts are used to put the application into SDRAM, and the macro
  11907. @code{__BFIN_SDRAM} is defined.
  11908. The loader should initialize SDRAM before loading the application.
  11909. @item -micplb
  11910. @opindex micplb
  11911. Assume that ICPLBs are enabled at run time. This has an effect on certain
  11912. anomaly workarounds. For Linux targets, the default is to assume ICPLBs
  11913. are enabled; for standalone applications the default is off.
  11914. @end table
  11915. @node C6X Options
  11916. @subsection C6X Options
  11917. @cindex C6X Options
  11918. @table @gcctabopt
  11919. @item -march=@var{name}
  11920. @opindex march
  11921. This specifies the name of the target architecture. GCC uses this
  11922. name to determine what kind of instructions it can emit when generating
  11923. assembly code. Permissible names are: @samp{c62x},
  11924. @samp{c64x}, @samp{c64x+}, @samp{c67x}, @samp{c67x+}, @samp{c674x}.
  11925. @item -mbig-endian
  11926. @opindex mbig-endian
  11927. Generate code for a big-endian target.
  11928. @item -mlittle-endian
  11929. @opindex mlittle-endian
  11930. Generate code for a little-endian target. This is the default.
  11931. @item -msim
  11932. @opindex msim
  11933. Choose startup files and linker script suitable for the simulator.
  11934. @item -msdata=default
  11935. @opindex msdata=default
  11936. Put small global and static data in the @code{.neardata} section,
  11937. which is pointed to by register @code{B14}. Put small uninitialized
  11938. global and static data in the @code{.bss} section, which is adjacent
  11939. to the @code{.neardata} section. Put small read-only data into the
  11940. @code{.rodata} section. The corresponding sections used for large
  11941. pieces of data are @code{.fardata}, @code{.far} and @code{.const}.
  11942. @item -msdata=all
  11943. @opindex msdata=all
  11944. Put all data, not just small objects, into the sections reserved for
  11945. small data, and use addressing relative to the @code{B14} register to
  11946. access them.
  11947. @item -msdata=none
  11948. @opindex msdata=none
  11949. Make no use of the sections reserved for small data, and use absolute
  11950. addresses to access all data. Put all initialized global and static
  11951. data in the @code{.fardata} section, and all uninitialized data in the
  11952. @code{.far} section. Put all constant data into the @code{.const}
  11953. section.
  11954. @end table
  11955. @node CRIS Options
  11956. @subsection CRIS Options
  11957. @cindex CRIS Options
  11958. These options are defined specifically for the CRIS ports.
  11959. @table @gcctabopt
  11960. @item -march=@var{architecture-type}
  11961. @itemx -mcpu=@var{architecture-type}
  11962. @opindex march
  11963. @opindex mcpu
  11964. Generate code for the specified architecture. The choices for
  11965. @var{architecture-type} are @samp{v3}, @samp{v8} and @samp{v10} for
  11966. respectively ETRAX@w{ }4, ETRAX@w{ }100, and ETRAX@w{ }100@w{ }LX@.
  11967. Default is @samp{v0} except for cris-axis-linux-gnu, where the default is
  11968. @samp{v10}.
  11969. @item -mtune=@var{architecture-type}
  11970. @opindex mtune
  11971. Tune to @var{architecture-type} everything applicable about the generated
  11972. code, except for the ABI and the set of available instructions. The
  11973. choices for @var{architecture-type} are the same as for
  11974. @option{-march=@var{architecture-type}}.
  11975. @item -mmax-stack-frame=@var{n}
  11976. @opindex mmax-stack-frame
  11977. Warn when the stack frame of a function exceeds @var{n} bytes.
  11978. @item -metrax4
  11979. @itemx -metrax100
  11980. @opindex metrax4
  11981. @opindex metrax100
  11982. The options @option{-metrax4} and @option{-metrax100} are synonyms for
  11983. @option{-march=v3} and @option{-march=v8} respectively.
  11984. @item -mmul-bug-workaround
  11985. @itemx -mno-mul-bug-workaround
  11986. @opindex mmul-bug-workaround
  11987. @opindex mno-mul-bug-workaround
  11988. Work around a bug in the @code{muls} and @code{mulu} instructions for CPU
  11989. models where it applies. This option is active by default.
  11990. @item -mpdebug
  11991. @opindex mpdebug
  11992. Enable CRIS-specific verbose debug-related information in the assembly
  11993. code. This option also has the effect of turning off the @samp{#NO_APP}
  11994. formatted-code indicator to the assembler at the beginning of the
  11995. assembly file.
  11996. @item -mcc-init
  11997. @opindex mcc-init
  11998. Do not use condition-code results from previous instruction; always emit
  11999. compare and test instructions before use of condition codes.
  12000. @item -mno-side-effects
  12001. @opindex mno-side-effects
  12002. Do not emit instructions with side effects in addressing modes other than
  12003. post-increment.
  12004. @item -mstack-align
  12005. @itemx -mno-stack-align
  12006. @itemx -mdata-align
  12007. @itemx -mno-data-align
  12008. @itemx -mconst-align
  12009. @itemx -mno-const-align
  12010. @opindex mstack-align
  12011. @opindex mno-stack-align
  12012. @opindex mdata-align
  12013. @opindex mno-data-align
  12014. @opindex mconst-align
  12015. @opindex mno-const-align
  12016. These options (@samp{no-} options) arrange (eliminate arrangements) for the
  12017. stack frame, individual data and constants to be aligned for the maximum
  12018. single data access size for the chosen CPU model. The default is to
  12019. arrange for 32-bit alignment. ABI details such as structure layout are
  12020. not affected by these options.
  12021. @item -m32-bit
  12022. @itemx -m16-bit
  12023. @itemx -m8-bit
  12024. @opindex m32-bit
  12025. @opindex m16-bit
  12026. @opindex m8-bit
  12027. Similar to the stack- data- and const-align options above, these options
  12028. arrange for stack frame, writable data and constants to all be 32-bit,
  12029. 16-bit or 8-bit aligned. The default is 32-bit alignment.
  12030. @item -mno-prologue-epilogue
  12031. @itemx -mprologue-epilogue
  12032. @opindex mno-prologue-epilogue
  12033. @opindex mprologue-epilogue
  12034. With @option{-mno-prologue-epilogue}, the normal function prologue and
  12035. epilogue which set up the stack frame are omitted and no return
  12036. instructions or return sequences are generated in the code. Use this
  12037. option only together with visual inspection of the compiled code: no
  12038. warnings or errors are generated when call-saved registers must be saved,
  12039. or storage for local variables needs to be allocated.
  12040. @item -mno-gotplt
  12041. @itemx -mgotplt
  12042. @opindex mno-gotplt
  12043. @opindex mgotplt
  12044. With @option{-fpic} and @option{-fPIC}, don't generate (do generate)
  12045. instruction sequences that load addresses for functions from the PLT part
  12046. of the GOT rather than (traditional on other architectures) calls to the
  12047. PLT@. The default is @option{-mgotplt}.
  12048. @item -melf
  12049. @opindex melf
  12050. Legacy no-op option only recognized with the cris-axis-elf and
  12051. cris-axis-linux-gnu targets.
  12052. @item -mlinux
  12053. @opindex mlinux
  12054. Legacy no-op option only recognized with the cris-axis-linux-gnu target.
  12055. @item -sim
  12056. @opindex sim
  12057. This option, recognized for the cris-axis-elf, arranges
  12058. to link with input-output functions from a simulator library. Code,
  12059. initialized data and zero-initialized data are allocated consecutively.
  12060. @item -sim2
  12061. @opindex sim2
  12062. Like @option{-sim}, but pass linker options to locate initialized data at
  12063. 0x40000000 and zero-initialized data at 0x80000000.
  12064. @end table
  12065. @node CR16 Options
  12066. @subsection CR16 Options
  12067. @cindex CR16 Options
  12068. These options are defined specifically for the CR16 ports.
  12069. @table @gcctabopt
  12070. @item -mmac
  12071. @opindex mmac
  12072. Enable the use of multiply-accumulate instructions. Disabled by default.
  12073. @item -mcr16cplus
  12074. @itemx -mcr16c
  12075. @opindex mcr16cplus
  12076. @opindex mcr16c
  12077. Generate code for CR16C or CR16C+ architecture. CR16C+ architecture
  12078. is default.
  12079. @item -msim
  12080. @opindex msim
  12081. Links the library libsim.a which is in compatible with simulator. Applicable
  12082. to ELF compiler only.
  12083. @item -mint32
  12084. @opindex mint32
  12085. Choose integer type as 32-bit wide.
  12086. @item -mbit-ops
  12087. @opindex mbit-ops
  12088. Generates @code{sbit}/@code{cbit} instructions for bit manipulations.
  12089. @item -mdata-model=@var{model}
  12090. @opindex mdata-model
  12091. Choose a data model. The choices for @var{model} are @samp{near},
  12092. @samp{far} or @samp{medium}. @samp{medium} is default.
  12093. However, @samp{far} is not valid with @option{-mcr16c}, as the
  12094. CR16C architecture does not support the far data model.
  12095. @end table
  12096. @node Darwin Options
  12097. @subsection Darwin Options
  12098. @cindex Darwin options
  12099. These options are defined for all architectures running the Darwin operating
  12100. system.
  12101. FSF GCC on Darwin does not create ``fat'' object files; it creates
  12102. an object file for the single architecture that GCC was built to
  12103. target. Apple's GCC on Darwin does create ``fat'' files if multiple
  12104. @option{-arch} options are used; it does so by running the compiler or
  12105. linker multiple times and joining the results together with
  12106. @file{lipo}.
  12107. The subtype of the file created (like @samp{ppc7400} or @samp{ppc970} or
  12108. @samp{i686}) is determined by the flags that specify the ISA
  12109. that GCC is targeting, like @option{-mcpu} or @option{-march}. The
  12110. @option{-force_cpusubtype_ALL} option can be used to override this.
  12111. The Darwin tools vary in their behavior when presented with an ISA
  12112. mismatch. The assembler, @file{as}, only permits instructions to
  12113. be used that are valid for the subtype of the file it is generating,
  12114. so you cannot put 64-bit instructions in a @samp{ppc750} object file.
  12115. The linker for shared libraries, @file{/usr/bin/libtool}, fails
  12116. and prints an error if asked to create a shared library with a less
  12117. restrictive subtype than its input files (for instance, trying to put
  12118. a @samp{ppc970} object file in a @samp{ppc7400} library). The linker
  12119. for executables, @command{ld}, quietly gives the executable the most
  12120. restrictive subtype of any of its input files.
  12121. @table @gcctabopt
  12122. @item -F@var{dir}
  12123. @opindex F
  12124. Add the framework directory @var{dir} to the head of the list of
  12125. directories to be searched for header files. These directories are
  12126. interleaved with those specified by @option{-I} options and are
  12127. scanned in a left-to-right order.
  12128. A framework directory is a directory with frameworks in it. A
  12129. framework is a directory with a @file{Headers} and/or
  12130. @file{PrivateHeaders} directory contained directly in it that ends
  12131. in @file{.framework}. The name of a framework is the name of this
  12132. directory excluding the @file{.framework}. Headers associated with
  12133. the framework are found in one of those two directories, with
  12134. @file{Headers} being searched first. A subframework is a framework
  12135. directory that is in a framework's @file{Frameworks} directory.
  12136. Includes of subframework headers can only appear in a header of a
  12137. framework that contains the subframework, or in a sibling subframework
  12138. header. Two subframeworks are siblings if they occur in the same
  12139. framework. A subframework should not have the same name as a
  12140. framework; a warning is issued if this is violated. Currently a
  12141. subframework cannot have subframeworks; in the future, the mechanism
  12142. may be extended to support this. The standard frameworks can be found
  12143. in @file{/System/Library/Frameworks} and
  12144. @file{/Library/Frameworks}. An example include looks like
  12145. @code{#include <Framework/header.h>}, where @file{Framework} denotes
  12146. the name of the framework and @file{header.h} is found in the
  12147. @file{PrivateHeaders} or @file{Headers} directory.
  12148. @item -iframework@var{dir}
  12149. @opindex iframework
  12150. Like @option{-F} except the directory is a treated as a system
  12151. directory. The main difference between this @option{-iframework} and
  12152. @option{-F} is that with @option{-iframework} the compiler does not
  12153. warn about constructs contained within header files found via
  12154. @var{dir}. This option is valid only for the C family of languages.
  12155. @item -gused
  12156. @opindex gused
  12157. Emit debugging information for symbols that are used. For stabs
  12158. debugging format, this enables @option{-feliminate-unused-debug-symbols}.
  12159. This is by default ON@.
  12160. @item -gfull
  12161. @opindex gfull
  12162. Emit debugging information for all symbols and types.
  12163. @item -mmacosx-version-min=@var{version}
  12164. The earliest version of MacOS X that this executable will run on
  12165. is @var{version}. Typical values of @var{version} include @code{10.1},
  12166. @code{10.2}, and @code{10.3.9}.
  12167. If the compiler was built to use the system's headers by default,
  12168. then the default for this option is the system version on which the
  12169. compiler is running, otherwise the default is to make choices that
  12170. are compatible with as many systems and code bases as possible.
  12171. @item -mkernel
  12172. @opindex mkernel
  12173. Enable kernel development mode. The @option{-mkernel} option sets
  12174. @option{-static}, @option{-fno-common}, @option{-fno-use-cxa-atexit},
  12175. @option{-fno-exceptions}, @option{-fno-non-call-exceptions},
  12176. @option{-fapple-kext}, @option{-fno-weak} and @option{-fno-rtti} where
  12177. applicable. This mode also sets @option{-mno-altivec},
  12178. @option{-msoft-float}, @option{-fno-builtin} and
  12179. @option{-mlong-branch} for PowerPC targets.
  12180. @item -mone-byte-bool
  12181. @opindex mone-byte-bool
  12182. Override the defaults for @code{bool} so that @code{sizeof(bool)==1}.
  12183. By default @code{sizeof(bool)} is @code{4} when compiling for
  12184. Darwin/PowerPC and @code{1} when compiling for Darwin/x86, so this
  12185. option has no effect on x86.
  12186. @strong{Warning:} The @option{-mone-byte-bool} switch causes GCC
  12187. to generate code that is not binary compatible with code generated
  12188. without that switch. Using this switch may require recompiling all
  12189. other modules in a program, including system libraries. Use this
  12190. switch to conform to a non-default data model.
  12191. @item -mfix-and-continue
  12192. @itemx -ffix-and-continue
  12193. @itemx -findirect-data
  12194. @opindex mfix-and-continue
  12195. @opindex ffix-and-continue
  12196. @opindex findirect-data
  12197. Generate code suitable for fast turnaround development, such as to
  12198. allow GDB to dynamically load @file{.o} files into already-running
  12199. programs. @option{-findirect-data} and @option{-ffix-and-continue}
  12200. are provided for backwards compatibility.
  12201. @item -all_load
  12202. @opindex all_load
  12203. Loads all members of static archive libraries.
  12204. See man ld(1) for more information.
  12205. @item -arch_errors_fatal
  12206. @opindex arch_errors_fatal
  12207. Cause the errors having to do with files that have the wrong architecture
  12208. to be fatal.
  12209. @item -bind_at_load
  12210. @opindex bind_at_load
  12211. Causes the output file to be marked such that the dynamic linker will
  12212. bind all undefined references when the file is loaded or launched.
  12213. @item -bundle
  12214. @opindex bundle
  12215. Produce a Mach-o bundle format file.
  12216. See man ld(1) for more information.
  12217. @item -bundle_loader @var{executable}
  12218. @opindex bundle_loader
  12219. This option specifies the @var{executable} that will load the build
  12220. output file being linked. See man ld(1) for more information.
  12221. @item -dynamiclib
  12222. @opindex dynamiclib
  12223. When passed this option, GCC produces a dynamic library instead of
  12224. an executable when linking, using the Darwin @file{libtool} command.
  12225. @item -force_cpusubtype_ALL
  12226. @opindex force_cpusubtype_ALL
  12227. This causes GCC's output file to have the @samp{ALL} subtype, instead of
  12228. one controlled by the @option{-mcpu} or @option{-march} option.
  12229. @item -allowable_client @var{client_name}
  12230. @itemx -client_name
  12231. @itemx -compatibility_version
  12232. @itemx -current_version
  12233. @itemx -dead_strip
  12234. @itemx -dependency-file
  12235. @itemx -dylib_file
  12236. @itemx -dylinker_install_name
  12237. @itemx -dynamic
  12238. @itemx -exported_symbols_list
  12239. @itemx -filelist
  12240. @need 800
  12241. @itemx -flat_namespace
  12242. @itemx -force_flat_namespace
  12243. @itemx -headerpad_max_install_names
  12244. @itemx -image_base
  12245. @itemx -init
  12246. @itemx -install_name
  12247. @itemx -keep_private_externs
  12248. @itemx -multi_module
  12249. @itemx -multiply_defined
  12250. @itemx -multiply_defined_unused
  12251. @need 800
  12252. @itemx -noall_load
  12253. @itemx -no_dead_strip_inits_and_terms
  12254. @itemx -nofixprebinding
  12255. @itemx -nomultidefs
  12256. @itemx -noprebind
  12257. @itemx -noseglinkedit
  12258. @itemx -pagezero_size
  12259. @itemx -prebind
  12260. @itemx -prebind_all_twolevel_modules
  12261. @itemx -private_bundle
  12262. @need 800
  12263. @itemx -read_only_relocs
  12264. @itemx -sectalign
  12265. @itemx -sectobjectsymbols
  12266. @itemx -whyload
  12267. @itemx -seg1addr
  12268. @itemx -sectcreate
  12269. @itemx -sectobjectsymbols
  12270. @itemx -sectorder
  12271. @itemx -segaddr
  12272. @itemx -segs_read_only_addr
  12273. @need 800
  12274. @itemx -segs_read_write_addr
  12275. @itemx -seg_addr_table
  12276. @itemx -seg_addr_table_filename
  12277. @itemx -seglinkedit
  12278. @itemx -segprot
  12279. @itemx -segs_read_only_addr
  12280. @itemx -segs_read_write_addr
  12281. @itemx -single_module
  12282. @itemx -static
  12283. @itemx -sub_library
  12284. @need 800
  12285. @itemx -sub_umbrella
  12286. @itemx -twolevel_namespace
  12287. @itemx -umbrella
  12288. @itemx -undefined
  12289. @itemx -unexported_symbols_list
  12290. @itemx -weak_reference_mismatches
  12291. @itemx -whatsloaded
  12292. @opindex allowable_client
  12293. @opindex client_name
  12294. @opindex compatibility_version
  12295. @opindex current_version
  12296. @opindex dead_strip
  12297. @opindex dependency-file
  12298. @opindex dylib_file
  12299. @opindex dylinker_install_name
  12300. @opindex dynamic
  12301. @opindex exported_symbols_list
  12302. @opindex filelist
  12303. @opindex flat_namespace
  12304. @opindex force_flat_namespace
  12305. @opindex headerpad_max_install_names
  12306. @opindex image_base
  12307. @opindex init
  12308. @opindex install_name
  12309. @opindex keep_private_externs
  12310. @opindex multi_module
  12311. @opindex multiply_defined
  12312. @opindex multiply_defined_unused
  12313. @opindex noall_load
  12314. @opindex no_dead_strip_inits_and_terms
  12315. @opindex nofixprebinding
  12316. @opindex nomultidefs
  12317. @opindex noprebind
  12318. @opindex noseglinkedit
  12319. @opindex pagezero_size
  12320. @opindex prebind
  12321. @opindex prebind_all_twolevel_modules
  12322. @opindex private_bundle
  12323. @opindex read_only_relocs
  12324. @opindex sectalign
  12325. @opindex sectobjectsymbols
  12326. @opindex whyload
  12327. @opindex seg1addr
  12328. @opindex sectcreate
  12329. @opindex sectobjectsymbols
  12330. @opindex sectorder
  12331. @opindex segaddr
  12332. @opindex segs_read_only_addr
  12333. @opindex segs_read_write_addr
  12334. @opindex seg_addr_table
  12335. @opindex seg_addr_table_filename
  12336. @opindex seglinkedit
  12337. @opindex segprot
  12338. @opindex segs_read_only_addr
  12339. @opindex segs_read_write_addr
  12340. @opindex single_module
  12341. @opindex static
  12342. @opindex sub_library
  12343. @opindex sub_umbrella
  12344. @opindex twolevel_namespace
  12345. @opindex umbrella
  12346. @opindex undefined
  12347. @opindex unexported_symbols_list
  12348. @opindex weak_reference_mismatches
  12349. @opindex whatsloaded
  12350. These options are passed to the Darwin linker. The Darwin linker man page
  12351. describes them in detail.
  12352. @end table
  12353. @node DEC Alpha Options
  12354. @subsection DEC Alpha Options
  12355. These @samp{-m} options are defined for the DEC Alpha implementations:
  12356. @table @gcctabopt
  12357. @item -mno-soft-float
  12358. @itemx -msoft-float
  12359. @opindex mno-soft-float
  12360. @opindex msoft-float
  12361. Use (do not use) the hardware floating-point instructions for
  12362. floating-point operations. When @option{-msoft-float} is specified,
  12363. functions in @file{libgcc.a} are used to perform floating-point
  12364. operations. Unless they are replaced by routines that emulate the
  12365. floating-point operations, or compiled in such a way as to call such
  12366. emulations routines, these routines issue floating-point
  12367. operations. If you are compiling for an Alpha without floating-point
  12368. operations, you must ensure that the library is built so as not to call
  12369. them.
  12370. Note that Alpha implementations without floating-point operations are
  12371. required to have floating-point registers.
  12372. @item -mfp-reg
  12373. @itemx -mno-fp-regs
  12374. @opindex mfp-reg
  12375. @opindex mno-fp-regs
  12376. Generate code that uses (does not use) the floating-point register set.
  12377. @option{-mno-fp-regs} implies @option{-msoft-float}. If the floating-point
  12378. register set is not used, floating-point operands are passed in integer
  12379. registers as if they were integers and floating-point results are passed
  12380. in @code{$0} instead of @code{$f0}. This is a non-standard calling sequence,
  12381. so any function with a floating-point argument or return value called by code
  12382. compiled with @option{-mno-fp-regs} must also be compiled with that
  12383. option.
  12384. A typical use of this option is building a kernel that does not use,
  12385. and hence need not save and restore, any floating-point registers.
  12386. @item -mieee
  12387. @opindex mieee
  12388. The Alpha architecture implements floating-point hardware optimized for
  12389. maximum performance. It is mostly compliant with the IEEE floating-point
  12390. standard. However, for full compliance, software assistance is
  12391. required. This option generates code fully IEEE-compliant code
  12392. @emph{except} that the @var{inexact-flag} is not maintained (see below).
  12393. If this option is turned on, the preprocessor macro @code{_IEEE_FP} is
  12394. defined during compilation. The resulting code is less efficient but is
  12395. able to correctly support denormalized numbers and exceptional IEEE
  12396. values such as not-a-number and plus/minus infinity. Other Alpha
  12397. compilers call this option @option{-ieee_with_no_inexact}.
  12398. @item -mieee-with-inexact
  12399. @opindex mieee-with-inexact
  12400. This is like @option{-mieee} except the generated code also maintains
  12401. the IEEE @var{inexact-flag}. Turning on this option causes the
  12402. generated code to implement fully-compliant IEEE math. In addition to
  12403. @code{_IEEE_FP}, @code{_IEEE_FP_EXACT} is defined as a preprocessor
  12404. macro. On some Alpha implementations the resulting code may execute
  12405. significantly slower than the code generated by default. Since there is
  12406. very little code that depends on the @var{inexact-flag}, you should
  12407. normally not specify this option. Other Alpha compilers call this
  12408. option @option{-ieee_with_inexact}.
  12409. @item -mfp-trap-mode=@var{trap-mode}
  12410. @opindex mfp-trap-mode
  12411. This option controls what floating-point related traps are enabled.
  12412. Other Alpha compilers call this option @option{-fptm @var{trap-mode}}.
  12413. The trap mode can be set to one of four values:
  12414. @table @samp
  12415. @item n
  12416. This is the default (normal) setting. The only traps that are enabled
  12417. are the ones that cannot be disabled in software (e.g., division by zero
  12418. trap).
  12419. @item u
  12420. In addition to the traps enabled by @samp{n}, underflow traps are enabled
  12421. as well.
  12422. @item su
  12423. Like @samp{u}, but the instructions are marked to be safe for software
  12424. completion (see Alpha architecture manual for details).
  12425. @item sui
  12426. Like @samp{su}, but inexact traps are enabled as well.
  12427. @end table
  12428. @item -mfp-rounding-mode=@var{rounding-mode}
  12429. @opindex mfp-rounding-mode
  12430. Selects the IEEE rounding mode. Other Alpha compilers call this option
  12431. @option{-fprm @var{rounding-mode}}. The @var{rounding-mode} can be one
  12432. of:
  12433. @table @samp
  12434. @item n
  12435. Normal IEEE rounding mode. Floating-point numbers are rounded towards
  12436. the nearest machine number or towards the even machine number in case
  12437. of a tie.
  12438. @item m
  12439. Round towards minus infinity.
  12440. @item c
  12441. Chopped rounding mode. Floating-point numbers are rounded towards zero.
  12442. @item d
  12443. Dynamic rounding mode. A field in the floating-point control register
  12444. (@var{fpcr}, see Alpha architecture reference manual) controls the
  12445. rounding mode in effect. The C library initializes this register for
  12446. rounding towards plus infinity. Thus, unless your program modifies the
  12447. @var{fpcr}, @samp{d} corresponds to round towards plus infinity.
  12448. @end table
  12449. @item -mtrap-precision=@var{trap-precision}
  12450. @opindex mtrap-precision
  12451. In the Alpha architecture, floating-point traps are imprecise. This
  12452. means without software assistance it is impossible to recover from a
  12453. floating trap and program execution normally needs to be terminated.
  12454. GCC can generate code that can assist operating system trap handlers
  12455. in determining the exact location that caused a floating-point trap.
  12456. Depending on the requirements of an application, different levels of
  12457. precisions can be selected:
  12458. @table @samp
  12459. @item p
  12460. Program precision. This option is the default and means a trap handler
  12461. can only identify which program caused a floating-point exception.
  12462. @item f
  12463. Function precision. The trap handler can determine the function that
  12464. caused a floating-point exception.
  12465. @item i
  12466. Instruction precision. The trap handler can determine the exact
  12467. instruction that caused a floating-point exception.
  12468. @end table
  12469. Other Alpha compilers provide the equivalent options called
  12470. @option{-scope_safe} and @option{-resumption_safe}.
  12471. @item -mieee-conformant
  12472. @opindex mieee-conformant
  12473. This option marks the generated code as IEEE conformant. You must not
  12474. use this option unless you also specify @option{-mtrap-precision=i} and either
  12475. @option{-mfp-trap-mode=su} or @option{-mfp-trap-mode=sui}. Its only effect
  12476. is to emit the line @samp{.eflag 48} in the function prologue of the
  12477. generated assembly file.
  12478. @item -mbuild-constants
  12479. @opindex mbuild-constants
  12480. Normally GCC examines a 32- or 64-bit integer constant to
  12481. see if it can construct it from smaller constants in two or three
  12482. instructions. If it cannot, it outputs the constant as a literal and
  12483. generates code to load it from the data segment at run time.
  12484. Use this option to require GCC to construct @emph{all} integer constants
  12485. using code, even if it takes more instructions (the maximum is six).
  12486. You typically use this option to build a shared library dynamic
  12487. loader. Itself a shared library, it must relocate itself in memory
  12488. before it can find the variables and constants in its own data segment.
  12489. @item -mbwx
  12490. @itemx -mno-bwx
  12491. @itemx -mcix
  12492. @itemx -mno-cix
  12493. @itemx -mfix
  12494. @itemx -mno-fix
  12495. @itemx -mmax
  12496. @itemx -mno-max
  12497. @opindex mbwx
  12498. @opindex mno-bwx
  12499. @opindex mcix
  12500. @opindex mno-cix
  12501. @opindex mfix
  12502. @opindex mno-fix
  12503. @opindex mmax
  12504. @opindex mno-max
  12505. Indicate whether GCC should generate code to use the optional BWX,
  12506. CIX, FIX and MAX instruction sets. The default is to use the instruction
  12507. sets supported by the CPU type specified via @option{-mcpu=} option or that
  12508. of the CPU on which GCC was built if none is specified.
  12509. @item -mfloat-vax
  12510. @itemx -mfloat-ieee
  12511. @opindex mfloat-vax
  12512. @opindex mfloat-ieee
  12513. Generate code that uses (does not use) VAX F and G floating-point
  12514. arithmetic instead of IEEE single and double precision.
  12515. @item -mexplicit-relocs
  12516. @itemx -mno-explicit-relocs
  12517. @opindex mexplicit-relocs
  12518. @opindex mno-explicit-relocs
  12519. Older Alpha assemblers provided no way to generate symbol relocations
  12520. except via assembler macros. Use of these macros does not allow
  12521. optimal instruction scheduling. GNU binutils as of version 2.12
  12522. supports a new syntax that allows the compiler to explicitly mark
  12523. which relocations should apply to which instructions. This option
  12524. is mostly useful for debugging, as GCC detects the capabilities of
  12525. the assembler when it is built and sets the default accordingly.
  12526. @item -msmall-data
  12527. @itemx -mlarge-data
  12528. @opindex msmall-data
  12529. @opindex mlarge-data
  12530. When @option{-mexplicit-relocs} is in effect, static data is
  12531. accessed via @dfn{gp-relative} relocations. When @option{-msmall-data}
  12532. is used, objects 8 bytes long or smaller are placed in a @dfn{small data area}
  12533. (the @code{.sdata} and @code{.sbss} sections) and are accessed via
  12534. 16-bit relocations off of the @code{$gp} register. This limits the
  12535. size of the small data area to 64KB, but allows the variables to be
  12536. directly accessed via a single instruction.
  12537. The default is @option{-mlarge-data}. With this option the data area
  12538. is limited to just below 2GB@. Programs that require more than 2GB of
  12539. data must use @code{malloc} or @code{mmap} to allocate the data in the
  12540. heap instead of in the program's data segment.
  12541. When generating code for shared libraries, @option{-fpic} implies
  12542. @option{-msmall-data} and @option{-fPIC} implies @option{-mlarge-data}.
  12543. @item -msmall-text
  12544. @itemx -mlarge-text
  12545. @opindex msmall-text
  12546. @opindex mlarge-text
  12547. When @option{-msmall-text} is used, the compiler assumes that the
  12548. code of the entire program (or shared library) fits in 4MB, and is
  12549. thus reachable with a branch instruction. When @option{-msmall-data}
  12550. is used, the compiler can assume that all local symbols share the
  12551. same @code{$gp} value, and thus reduce the number of instructions
  12552. required for a function call from 4 to 1.
  12553. The default is @option{-mlarge-text}.
  12554. @item -mcpu=@var{cpu_type}
  12555. @opindex mcpu
  12556. Set the instruction set and instruction scheduling parameters for
  12557. machine type @var{cpu_type}. You can specify either the @samp{EV}
  12558. style name or the corresponding chip number. GCC supports scheduling
  12559. parameters for the EV4, EV5 and EV6 family of processors and
  12560. chooses the default values for the instruction set from the processor
  12561. you specify. If you do not specify a processor type, GCC defaults
  12562. to the processor on which the compiler was built.
  12563. Supported values for @var{cpu_type} are
  12564. @table @samp
  12565. @item ev4
  12566. @itemx ev45
  12567. @itemx 21064
  12568. Schedules as an EV4 and has no instruction set extensions.
  12569. @item ev5
  12570. @itemx 21164
  12571. Schedules as an EV5 and has no instruction set extensions.
  12572. @item ev56
  12573. @itemx 21164a
  12574. Schedules as an EV5 and supports the BWX extension.
  12575. @item pca56
  12576. @itemx 21164pc
  12577. @itemx 21164PC
  12578. Schedules as an EV5 and supports the BWX and MAX extensions.
  12579. @item ev6
  12580. @itemx 21264
  12581. Schedules as an EV6 and supports the BWX, FIX, and MAX extensions.
  12582. @item ev67
  12583. @itemx 21264a
  12584. Schedules as an EV6 and supports the BWX, CIX, FIX, and MAX extensions.
  12585. @end table
  12586. Native toolchains also support the value @samp{native},
  12587. which selects the best architecture option for the host processor.
  12588. @option{-mcpu=native} has no effect if GCC does not recognize
  12589. the processor.
  12590. @item -mtune=@var{cpu_type}
  12591. @opindex mtune
  12592. Set only the instruction scheduling parameters for machine type
  12593. @var{cpu_type}. The instruction set is not changed.
  12594. Native toolchains also support the value @samp{native},
  12595. which selects the best architecture option for the host processor.
  12596. @option{-mtune=native} has no effect if GCC does not recognize
  12597. the processor.
  12598. @item -mmemory-latency=@var{time}
  12599. @opindex mmemory-latency
  12600. Sets the latency the scheduler should assume for typical memory
  12601. references as seen by the application. This number is highly
  12602. dependent on the memory access patterns used by the application
  12603. and the size of the external cache on the machine.
  12604. Valid options for @var{time} are
  12605. @table @samp
  12606. @item @var{number}
  12607. A decimal number representing clock cycles.
  12608. @item L1
  12609. @itemx L2
  12610. @itemx L3
  12611. @itemx main
  12612. The compiler contains estimates of the number of clock cycles for
  12613. ``typical'' EV4 & EV5 hardware for the Level 1, 2 & 3 caches
  12614. (also called Dcache, Scache, and Bcache), as well as to main memory.
  12615. Note that L3 is only valid for EV5.
  12616. @end table
  12617. @end table
  12618. @node FR30 Options
  12619. @subsection FR30 Options
  12620. @cindex FR30 Options
  12621. These options are defined specifically for the FR30 port.
  12622. @table @gcctabopt
  12623. @item -msmall-model
  12624. @opindex msmall-model
  12625. Use the small address space model. This can produce smaller code, but
  12626. it does assume that all symbolic values and addresses fit into a
  12627. 20-bit range.
  12628. @item -mno-lsim
  12629. @opindex mno-lsim
  12630. Assume that runtime support has been provided and so there is no need
  12631. to include the simulator library (@file{libsim.a}) on the linker
  12632. command line.
  12633. @end table
  12634. @node FRV Options
  12635. @subsection FRV Options
  12636. @cindex FRV Options
  12637. @table @gcctabopt
  12638. @item -mgpr-32
  12639. @opindex mgpr-32
  12640. Only use the first 32 general-purpose registers.
  12641. @item -mgpr-64
  12642. @opindex mgpr-64
  12643. Use all 64 general-purpose registers.
  12644. @item -mfpr-32
  12645. @opindex mfpr-32
  12646. Use only the first 32 floating-point registers.
  12647. @item -mfpr-64
  12648. @opindex mfpr-64
  12649. Use all 64 floating-point registers.
  12650. @item -mhard-float
  12651. @opindex mhard-float
  12652. Use hardware instructions for floating-point operations.
  12653. @item -msoft-float
  12654. @opindex msoft-float
  12655. Use library routines for floating-point operations.
  12656. @item -malloc-cc
  12657. @opindex malloc-cc
  12658. Dynamically allocate condition code registers.
  12659. @item -mfixed-cc
  12660. @opindex mfixed-cc
  12661. Do not try to dynamically allocate condition code registers, only
  12662. use @code{icc0} and @code{fcc0}.
  12663. @item -mdword
  12664. @opindex mdword
  12665. Change ABI to use double word insns.
  12666. @item -mno-dword
  12667. @opindex mno-dword
  12668. Do not use double word instructions.
  12669. @item -mdouble
  12670. @opindex mdouble
  12671. Use floating-point double instructions.
  12672. @item -mno-double
  12673. @opindex mno-double
  12674. Do not use floating-point double instructions.
  12675. @item -mmedia
  12676. @opindex mmedia
  12677. Use media instructions.
  12678. @item -mno-media
  12679. @opindex mno-media
  12680. Do not use media instructions.
  12681. @item -mmuladd
  12682. @opindex mmuladd
  12683. Use multiply and add/subtract instructions.
  12684. @item -mno-muladd
  12685. @opindex mno-muladd
  12686. Do not use multiply and add/subtract instructions.
  12687. @item -mfdpic
  12688. @opindex mfdpic
  12689. Select the FDPIC ABI, which uses function descriptors to represent
  12690. pointers to functions. Without any PIC/PIE-related options, it
  12691. implies @option{-fPIE}. With @option{-fpic} or @option{-fpie}, it
  12692. assumes GOT entries and small data are within a 12-bit range from the
  12693. GOT base address; with @option{-fPIC} or @option{-fPIE}, GOT offsets
  12694. are computed with 32 bits.
  12695. With a @samp{bfin-elf} target, this option implies @option{-msim}.
  12696. @item -minline-plt
  12697. @opindex minline-plt
  12698. Enable inlining of PLT entries in function calls to functions that are
  12699. not known to bind locally. It has no effect without @option{-mfdpic}.
  12700. It's enabled by default if optimizing for speed and compiling for
  12701. shared libraries (i.e., @option{-fPIC} or @option{-fpic}), or when an
  12702. optimization option such as @option{-O3} or above is present in the
  12703. command line.
  12704. @item -mTLS
  12705. @opindex mTLS
  12706. Assume a large TLS segment when generating thread-local code.
  12707. @item -mtls
  12708. @opindex mtls
  12709. Do not assume a large TLS segment when generating thread-local code.
  12710. @item -mgprel-ro
  12711. @opindex mgprel-ro
  12712. Enable the use of @code{GPREL} relocations in the FDPIC ABI for data
  12713. that is known to be in read-only sections. It's enabled by default,
  12714. except for @option{-fpic} or @option{-fpie}: even though it may help
  12715. make the global offset table smaller, it trades 1 instruction for 4.
  12716. With @option{-fPIC} or @option{-fPIE}, it trades 3 instructions for 4,
  12717. one of which may be shared by multiple symbols, and it avoids the need
  12718. for a GOT entry for the referenced symbol, so it's more likely to be a
  12719. win. If it is not, @option{-mno-gprel-ro} can be used to disable it.
  12720. @item -multilib-library-pic
  12721. @opindex multilib-library-pic
  12722. Link with the (library, not FD) pic libraries. It's implied by
  12723. @option{-mlibrary-pic}, as well as by @option{-fPIC} and
  12724. @option{-fpic} without @option{-mfdpic}. You should never have to use
  12725. it explicitly.
  12726. @item -mlinked-fp
  12727. @opindex mlinked-fp
  12728. Follow the EABI requirement of always creating a frame pointer whenever
  12729. a stack frame is allocated. This option is enabled by default and can
  12730. be disabled with @option{-mno-linked-fp}.
  12731. @item -mlong-calls
  12732. @opindex mlong-calls
  12733. Use indirect addressing to call functions outside the current
  12734. compilation unit. This allows the functions to be placed anywhere
  12735. within the 32-bit address space.
  12736. @item -malign-labels
  12737. @opindex malign-labels
  12738. Try to align labels to an 8-byte boundary by inserting NOPs into the
  12739. previous packet. This option only has an effect when VLIW packing
  12740. is enabled. It doesn't create new packets; it merely adds NOPs to
  12741. existing ones.
  12742. @item -mlibrary-pic
  12743. @opindex mlibrary-pic
  12744. Generate position-independent EABI code.
  12745. @item -macc-4
  12746. @opindex macc-4
  12747. Use only the first four media accumulator registers.
  12748. @item -macc-8
  12749. @opindex macc-8
  12750. Use all eight media accumulator registers.
  12751. @item -mpack
  12752. @opindex mpack
  12753. Pack VLIW instructions.
  12754. @item -mno-pack
  12755. @opindex mno-pack
  12756. Do not pack VLIW instructions.
  12757. @item -mno-eflags
  12758. @opindex mno-eflags
  12759. Do not mark ABI switches in e_flags.
  12760. @item -mcond-move
  12761. @opindex mcond-move
  12762. Enable the use of conditional-move instructions (default).
  12763. This switch is mainly for debugging the compiler and will likely be removed
  12764. in a future version.
  12765. @item -mno-cond-move
  12766. @opindex mno-cond-move
  12767. Disable the use of conditional-move instructions.
  12768. This switch is mainly for debugging the compiler and will likely be removed
  12769. in a future version.
  12770. @item -mscc
  12771. @opindex mscc
  12772. Enable the use of conditional set instructions (default).
  12773. This switch is mainly for debugging the compiler and will likely be removed
  12774. in a future version.
  12775. @item -mno-scc
  12776. @opindex mno-scc
  12777. Disable the use of conditional set instructions.
  12778. This switch is mainly for debugging the compiler and will likely be removed
  12779. in a future version.
  12780. @item -mcond-exec
  12781. @opindex mcond-exec
  12782. Enable the use of conditional execution (default).
  12783. This switch is mainly for debugging the compiler and will likely be removed
  12784. in a future version.
  12785. @item -mno-cond-exec
  12786. @opindex mno-cond-exec
  12787. Disable the use of conditional execution.
  12788. This switch is mainly for debugging the compiler and will likely be removed
  12789. in a future version.
  12790. @item -mvliw-branch
  12791. @opindex mvliw-branch
  12792. Run a pass to pack branches into VLIW instructions (default).
  12793. This switch is mainly for debugging the compiler and will likely be removed
  12794. in a future version.
  12795. @item -mno-vliw-branch
  12796. @opindex mno-vliw-branch
  12797. Do not run a pass to pack branches into VLIW instructions.
  12798. This switch is mainly for debugging the compiler and will likely be removed
  12799. in a future version.
  12800. @item -mmulti-cond-exec
  12801. @opindex mmulti-cond-exec
  12802. Enable optimization of @code{&&} and @code{||} in conditional execution
  12803. (default).
  12804. This switch is mainly for debugging the compiler and will likely be removed
  12805. in a future version.
  12806. @item -mno-multi-cond-exec
  12807. @opindex mno-multi-cond-exec
  12808. Disable optimization of @code{&&} and @code{||} in conditional execution.
  12809. This switch is mainly for debugging the compiler and will likely be removed
  12810. in a future version.
  12811. @item -mnested-cond-exec
  12812. @opindex mnested-cond-exec
  12813. Enable nested conditional execution optimizations (default).
  12814. This switch is mainly for debugging the compiler and will likely be removed
  12815. in a future version.
  12816. @item -mno-nested-cond-exec
  12817. @opindex mno-nested-cond-exec
  12818. Disable nested conditional execution optimizations.
  12819. This switch is mainly for debugging the compiler and will likely be removed
  12820. in a future version.
  12821. @item -moptimize-membar
  12822. @opindex moptimize-membar
  12823. This switch removes redundant @code{membar} instructions from the
  12824. compiler-generated code. It is enabled by default.
  12825. @item -mno-optimize-membar
  12826. @opindex mno-optimize-membar
  12827. This switch disables the automatic removal of redundant @code{membar}
  12828. instructions from the generated code.
  12829. @item -mtomcat-stats
  12830. @opindex mtomcat-stats
  12831. Cause gas to print out tomcat statistics.
  12832. @item -mcpu=@var{cpu}
  12833. @opindex mcpu
  12834. Select the processor type for which to generate code. Possible values are
  12835. @samp{frv}, @samp{fr550}, @samp{tomcat}, @samp{fr500}, @samp{fr450},
  12836. @samp{fr405}, @samp{fr400}, @samp{fr300} and @samp{simple}.
  12837. @end table
  12838. @node GNU/Linux Options
  12839. @subsection GNU/Linux Options
  12840. These @samp{-m} options are defined for GNU/Linux targets:
  12841. @table @gcctabopt
  12842. @item -mglibc
  12843. @opindex mglibc
  12844. Use the GNU C library. This is the default except
  12845. on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets.
  12846. @item -muclibc
  12847. @opindex muclibc
  12848. Use uClibc C library. This is the default on
  12849. @samp{*-*-linux-*uclibc*} targets.
  12850. @item -mbionic
  12851. @opindex mbionic
  12852. Use Bionic C library. This is the default on
  12853. @samp{*-*-linux-*android*} targets.
  12854. @item -mandroid
  12855. @opindex mandroid
  12856. Compile code compatible with Android platform. This is the default on
  12857. @samp{*-*-linux-*android*} targets.
  12858. When compiling, this option enables @option{-mbionic}, @option{-fPIC},
  12859. @option{-fno-exceptions} and @option{-fno-rtti} by default. When linking,
  12860. this option makes the GCC driver pass Android-specific options to the linker.
  12861. Finally, this option causes the preprocessor macro @code{__ANDROID__}
  12862. to be defined.
  12863. @item -tno-android-cc
  12864. @opindex tno-android-cc
  12865. Disable compilation effects of @option{-mandroid}, i.e., do not enable
  12866. @option{-mbionic}, @option{-fPIC}, @option{-fno-exceptions} and
  12867. @option{-fno-rtti} by default.
  12868. @item -tno-android-ld
  12869. @opindex tno-android-ld
  12870. Disable linking effects of @option{-mandroid}, i.e., pass standard Linux
  12871. linking options to the linker.
  12872. @end table
  12873. @node H8/300 Options
  12874. @subsection H8/300 Options
  12875. These @samp{-m} options are defined for the H8/300 implementations:
  12876. @table @gcctabopt
  12877. @item -mrelax
  12878. @opindex mrelax
  12879. Shorten some address references at link time, when possible; uses the
  12880. linker option @option{-relax}. @xref{H8/300,, @code{ld} and the H8/300,
  12881. ld, Using ld}, for a fuller description.
  12882. @item -mh
  12883. @opindex mh
  12884. Generate code for the H8/300H@.
  12885. @item -ms
  12886. @opindex ms
  12887. Generate code for the H8S@.
  12888. @item -mn
  12889. @opindex mn
  12890. Generate code for the H8S and H8/300H in the normal mode. This switch
  12891. must be used either with @option{-mh} or @option{-ms}.
  12892. @item -ms2600
  12893. @opindex ms2600
  12894. Generate code for the H8S/2600. This switch must be used with @option{-ms}.
  12895. @item -mexr
  12896. @opindex mexr
  12897. Extended registers are stored on stack before execution of function
  12898. with monitor attribute. Default option is @option{-mexr}.
  12899. This option is valid only for H8S targets.
  12900. @item -mno-exr
  12901. @opindex mno-exr
  12902. Extended registers are not stored on stack before execution of function
  12903. with monitor attribute. Default option is @option{-mno-exr}.
  12904. This option is valid only for H8S targets.
  12905. @item -mint32
  12906. @opindex mint32
  12907. Make @code{int} data 32 bits by default.
  12908. @item -malign-300
  12909. @opindex malign-300
  12910. On the H8/300H and H8S, use the same alignment rules as for the H8/300.
  12911. The default for the H8/300H and H8S is to align longs and floats on
  12912. 4-byte boundaries.
  12913. @option{-malign-300} causes them to be aligned on 2-byte boundaries.
  12914. This option has no effect on the H8/300.
  12915. @end table
  12916. @node HPPA Options
  12917. @subsection HPPA Options
  12918. @cindex HPPA Options
  12919. These @samp{-m} options are defined for the HPPA family of computers:
  12920. @table @gcctabopt
  12921. @item -march=@var{architecture-type}
  12922. @opindex march
  12923. Generate code for the specified architecture. The choices for
  12924. @var{architecture-type} are @samp{1.0} for PA 1.0, @samp{1.1} for PA
  12925. 1.1, and @samp{2.0} for PA 2.0 processors. Refer to
  12926. @file{/usr/lib/sched.models} on an HP-UX system to determine the proper
  12927. architecture option for your machine. Code compiled for lower numbered
  12928. architectures runs on higher numbered architectures, but not the
  12929. other way around.
  12930. @item -mpa-risc-1-0
  12931. @itemx -mpa-risc-1-1
  12932. @itemx -mpa-risc-2-0
  12933. @opindex mpa-risc-1-0
  12934. @opindex mpa-risc-1-1
  12935. @opindex mpa-risc-2-0
  12936. Synonyms for @option{-march=1.0}, @option{-march=1.1}, and @option{-march=2.0} respectively.
  12937. @item -mjump-in-delay
  12938. @opindex mjump-in-delay
  12939. This option is ignored and provided for compatibility purposes only.
  12940. @item -mdisable-fpregs
  12941. @opindex mdisable-fpregs
  12942. Prevent floating-point registers from being used in any manner. This is
  12943. necessary for compiling kernels that perform lazy context switching of
  12944. floating-point registers. If you use this option and attempt to perform
  12945. floating-point operations, the compiler aborts.
  12946. @item -mdisable-indexing
  12947. @opindex mdisable-indexing
  12948. Prevent the compiler from using indexing address modes. This avoids some
  12949. rather obscure problems when compiling MIG generated code under MACH@.
  12950. @item -mno-space-regs
  12951. @opindex mno-space-regs
  12952. Generate code that assumes the target has no space registers. This allows
  12953. GCC to generate faster indirect calls and use unscaled index address modes.
  12954. Such code is suitable for level 0 PA systems and kernels.
  12955. @item -mfast-indirect-calls
  12956. @opindex mfast-indirect-calls
  12957. Generate code that assumes calls never cross space boundaries. This
  12958. allows GCC to emit code that performs faster indirect calls.
  12959. This option does not work in the presence of shared libraries or nested
  12960. functions.
  12961. @item -mfixed-range=@var{register-range}
  12962. @opindex mfixed-range
  12963. Generate code treating the given register range as fixed registers.
  12964. A fixed register is one that the register allocator cannot use. This is
  12965. useful when compiling kernel code. A register range is specified as
  12966. two registers separated by a dash. Multiple register ranges can be
  12967. specified separated by a comma.
  12968. @item -mlong-load-store
  12969. @opindex mlong-load-store
  12970. Generate 3-instruction load and store sequences as sometimes required by
  12971. the HP-UX 10 linker. This is equivalent to the @samp{+k} option to
  12972. the HP compilers.
  12973. @item -mportable-runtime
  12974. @opindex mportable-runtime
  12975. Use the portable calling conventions proposed by HP for ELF systems.
  12976. @item -mgas
  12977. @opindex mgas
  12978. Enable the use of assembler directives only GAS understands.
  12979. @item -mschedule=@var{cpu-type}
  12980. @opindex mschedule
  12981. Schedule code according to the constraints for the machine type
  12982. @var{cpu-type}. The choices for @var{cpu-type} are @samp{700}
  12983. @samp{7100}, @samp{7100LC}, @samp{7200}, @samp{7300} and @samp{8000}. Refer
  12984. to @file{/usr/lib/sched.models} on an HP-UX system to determine the
  12985. proper scheduling option for your machine. The default scheduling is
  12986. @samp{8000}.
  12987. @item -mlinker-opt
  12988. @opindex mlinker-opt
  12989. Enable the optimization pass in the HP-UX linker. Note this makes symbolic
  12990. debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
  12991. linkers in which they give bogus error messages when linking some programs.
  12992. @item -msoft-float
  12993. @opindex msoft-float
  12994. Generate output containing library calls for floating point.
  12995. @strong{Warning:} the requisite libraries are not available for all HPPA
  12996. targets. Normally the facilities of the machine's usual C compiler are
  12997. used, but this cannot be done directly in cross-compilation. You must make
  12998. your own arrangements to provide suitable library functions for
  12999. cross-compilation.
  13000. @option{-msoft-float} changes the calling convention in the output file;
  13001. therefore, it is only useful if you compile @emph{all} of a program with
  13002. this option. In particular, you need to compile @file{libgcc.a}, the
  13003. library that comes with GCC, with @option{-msoft-float} in order for
  13004. this to work.
  13005. @item -msio
  13006. @opindex msio
  13007. Generate the predefine, @code{_SIO}, for server IO@. The default is
  13008. @option{-mwsio}. This generates the predefines, @code{__hp9000s700},
  13009. @code{__hp9000s700__} and @code{_WSIO}, for workstation IO@. These
  13010. options are available under HP-UX and HI-UX@.
  13011. @item -mgnu-ld
  13012. @opindex mgnu-ld
  13013. Use options specific to GNU @command{ld}.
  13014. This passes @option{-shared} to @command{ld} when
  13015. building a shared library. It is the default when GCC is configured,
  13016. explicitly or implicitly, with the GNU linker. This option does not
  13017. affect which @command{ld} is called; it only changes what parameters
  13018. are passed to that @command{ld}.
  13019. The @command{ld} that is called is determined by the
  13020. @option{--with-ld} configure option, GCC's program search path, and
  13021. finally by the user's @env{PATH}. The linker used by GCC can be printed
  13022. using @samp{which `gcc -print-prog-name=ld`}. This option is only available
  13023. on the 64-bit HP-UX GCC, i.e.@: configured with @samp{hppa*64*-*-hpux*}.
  13024. @item -mhp-ld
  13025. @opindex mhp-ld
  13026. Use options specific to HP @command{ld}.
  13027. This passes @option{-b} to @command{ld} when building
  13028. a shared library and passes @option{+Accept TypeMismatch} to @command{ld} on all
  13029. links. It is the default when GCC is configured, explicitly or
  13030. implicitly, with the HP linker. This option does not affect
  13031. which @command{ld} is called; it only changes what parameters are passed to that
  13032. @command{ld}.
  13033. The @command{ld} that is called is determined by the @option{--with-ld}
  13034. configure option, GCC's program search path, and finally by the user's
  13035. @env{PATH}. The linker used by GCC can be printed using @samp{which
  13036. `gcc -print-prog-name=ld`}. This option is only available on the 64-bit
  13037. HP-UX GCC, i.e.@: configured with @samp{hppa*64*-*-hpux*}.
  13038. @item -mlong-calls
  13039. @opindex mno-long-calls
  13040. Generate code that uses long call sequences. This ensures that a call
  13041. is always able to reach linker generated stubs. The default is to generate
  13042. long calls only when the distance from the call site to the beginning
  13043. of the function or translation unit, as the case may be, exceeds a
  13044. predefined limit set by the branch type being used. The limits for
  13045. normal calls are 7,600,000 and 240,000 bytes, respectively for the
  13046. PA 2.0 and PA 1.X architectures. Sibcalls are always limited at
  13047. 240,000 bytes.
  13048. Distances are measured from the beginning of functions when using the
  13049. @option{-ffunction-sections} option, or when using the @option{-mgas}
  13050. and @option{-mno-portable-runtime} options together under HP-UX with
  13051. the SOM linker.
  13052. It is normally not desirable to use this option as it degrades
  13053. performance. However, it may be useful in large applications,
  13054. particularly when partial linking is used to build the application.
  13055. The types of long calls used depends on the capabilities of the
  13056. assembler and linker, and the type of code being generated. The
  13057. impact on systems that support long absolute calls, and long pic
  13058. symbol-difference or pc-relative calls should be relatively small.
  13059. However, an indirect call is used on 32-bit ELF systems in pic code
  13060. and it is quite long.
  13061. @item -munix=@var{unix-std}
  13062. @opindex march
  13063. Generate compiler predefines and select a startfile for the specified
  13064. UNIX standard. The choices for @var{unix-std} are @samp{93}, @samp{95}
  13065. and @samp{98}. @samp{93} is supported on all HP-UX versions. @samp{95}
  13066. is available on HP-UX 10.10 and later. @samp{98} is available on HP-UX
  13067. 11.11 and later. The default values are @samp{93} for HP-UX 10.00,
  13068. @samp{95} for HP-UX 10.10 though to 11.00, and @samp{98} for HP-UX 11.11
  13069. and later.
  13070. @option{-munix=93} provides the same predefines as GCC 3.3 and 3.4.
  13071. @option{-munix=95} provides additional predefines for @code{XOPEN_UNIX}
  13072. and @code{_XOPEN_SOURCE_EXTENDED}, and the startfile @file{unix95.o}.
  13073. @option{-munix=98} provides additional predefines for @code{_XOPEN_UNIX},
  13074. @code{_XOPEN_SOURCE_EXTENDED}, @code{_INCLUDE__STDC_A1_SOURCE} and
  13075. @code{_INCLUDE_XOPEN_SOURCE_500}, and the startfile @file{unix98.o}.
  13076. It is @emph{important} to note that this option changes the interfaces
  13077. for various library routines. It also affects the operational behavior
  13078. of the C library. Thus, @emph{extreme} care is needed in using this
  13079. option.
  13080. Library code that is intended to operate with more than one UNIX
  13081. standard must test, set and restore the variable @code{__xpg4_extended_mask}
  13082. as appropriate. Most GNU software doesn't provide this capability.
  13083. @item -nolibdld
  13084. @opindex nolibdld
  13085. Suppress the generation of link options to search libdld.sl when the
  13086. @option{-static} option is specified on HP-UX 10 and later.
  13087. @item -static
  13088. @opindex static
  13089. The HP-UX implementation of setlocale in libc has a dependency on
  13090. libdld.sl. There isn't an archive version of libdld.sl. Thus,
  13091. when the @option{-static} option is specified, special link options
  13092. are needed to resolve this dependency.
  13093. On HP-UX 10 and later, the GCC driver adds the necessary options to
  13094. link with libdld.sl when the @option{-static} option is specified.
  13095. This causes the resulting binary to be dynamic. On the 64-bit port,
  13096. the linkers generate dynamic binaries by default in any case. The
  13097. @option{-nolibdld} option can be used to prevent the GCC driver from
  13098. adding these link options.
  13099. @item -threads
  13100. @opindex threads
  13101. Add support for multithreading with the @dfn{dce thread} library
  13102. under HP-UX@. This option sets flags for both the preprocessor and
  13103. linker.
  13104. @end table
  13105. @node IA-64 Options
  13106. @subsection IA-64 Options
  13107. @cindex IA-64 Options
  13108. These are the @samp{-m} options defined for the Intel IA-64 architecture.
  13109. @table @gcctabopt
  13110. @item -mbig-endian
  13111. @opindex mbig-endian
  13112. Generate code for a big-endian target. This is the default for HP-UX@.
  13113. @item -mlittle-endian
  13114. @opindex mlittle-endian
  13115. Generate code for a little-endian target. This is the default for AIX5
  13116. and GNU/Linux.
  13117. @item -mgnu-as
  13118. @itemx -mno-gnu-as
  13119. @opindex mgnu-as
  13120. @opindex mno-gnu-as
  13121. Generate (or don't) code for the GNU assembler. This is the default.
  13122. @c Also, this is the default if the configure option @option{--with-gnu-as}
  13123. @c is used.
  13124. @item -mgnu-ld
  13125. @itemx -mno-gnu-ld
  13126. @opindex mgnu-ld
  13127. @opindex mno-gnu-ld
  13128. Generate (or don't) code for the GNU linker. This is the default.
  13129. @c Also, this is the default if the configure option @option{--with-gnu-ld}
  13130. @c is used.
  13131. @item -mno-pic
  13132. @opindex mno-pic
  13133. Generate code that does not use a global pointer register. The result
  13134. is not position independent code, and violates the IA-64 ABI@.
  13135. @item -mvolatile-asm-stop
  13136. @itemx -mno-volatile-asm-stop
  13137. @opindex mvolatile-asm-stop
  13138. @opindex mno-volatile-asm-stop
  13139. Generate (or don't) a stop bit immediately before and after volatile asm
  13140. statements.
  13141. @item -mregister-names
  13142. @itemx -mno-register-names
  13143. @opindex mregister-names
  13144. @opindex mno-register-names
  13145. Generate (or don't) @samp{in}, @samp{loc}, and @samp{out} register names for
  13146. the stacked registers. This may make assembler output more readable.
  13147. @item -mno-sdata
  13148. @itemx -msdata
  13149. @opindex mno-sdata
  13150. @opindex msdata
  13151. Disable (or enable) optimizations that use the small data section. This may
  13152. be useful for working around optimizer bugs.
  13153. @item -mconstant-gp
  13154. @opindex mconstant-gp
  13155. Generate code that uses a single constant global pointer value. This is
  13156. useful when compiling kernel code.
  13157. @item -mauto-pic
  13158. @opindex mauto-pic
  13159. Generate code that is self-relocatable. This implies @option{-mconstant-gp}.
  13160. This is useful when compiling firmware code.
  13161. @item -minline-float-divide-min-latency
  13162. @opindex minline-float-divide-min-latency
  13163. Generate code for inline divides of floating-point values
  13164. using the minimum latency algorithm.
  13165. @item -minline-float-divide-max-throughput
  13166. @opindex minline-float-divide-max-throughput
  13167. Generate code for inline divides of floating-point values
  13168. using the maximum throughput algorithm.
  13169. @item -mno-inline-float-divide
  13170. @opindex mno-inline-float-divide
  13171. Do not generate inline code for divides of floating-point values.
  13172. @item -minline-int-divide-min-latency
  13173. @opindex minline-int-divide-min-latency
  13174. Generate code for inline divides of integer values
  13175. using the minimum latency algorithm.
  13176. @item -minline-int-divide-max-throughput
  13177. @opindex minline-int-divide-max-throughput
  13178. Generate code for inline divides of integer values
  13179. using the maximum throughput algorithm.
  13180. @item -mno-inline-int-divide
  13181. @opindex mno-inline-int-divide
  13182. Do not generate inline code for divides of integer values.
  13183. @item -minline-sqrt-min-latency
  13184. @opindex minline-sqrt-min-latency
  13185. Generate code for inline square roots
  13186. using the minimum latency algorithm.
  13187. @item -minline-sqrt-max-throughput
  13188. @opindex minline-sqrt-max-throughput
  13189. Generate code for inline square roots
  13190. using the maximum throughput algorithm.
  13191. @item -mno-inline-sqrt
  13192. @opindex mno-inline-sqrt
  13193. Do not generate inline code for @code{sqrt}.
  13194. @item -mfused-madd
  13195. @itemx -mno-fused-madd
  13196. @opindex mfused-madd
  13197. @opindex mno-fused-madd
  13198. Do (don't) generate code that uses the fused multiply/add or multiply/subtract
  13199. instructions. The default is to use these instructions.
  13200. @item -mno-dwarf2-asm
  13201. @itemx -mdwarf2-asm
  13202. @opindex mno-dwarf2-asm
  13203. @opindex mdwarf2-asm
  13204. Don't (or do) generate assembler code for the DWARF 2 line number debugging
  13205. info. This may be useful when not using the GNU assembler.
  13206. @item -mearly-stop-bits
  13207. @itemx -mno-early-stop-bits
  13208. @opindex mearly-stop-bits
  13209. @opindex mno-early-stop-bits
  13210. Allow stop bits to be placed earlier than immediately preceding the
  13211. instruction that triggered the stop bit. This can improve instruction
  13212. scheduling, but does not always do so.
  13213. @item -mfixed-range=@var{register-range}
  13214. @opindex mfixed-range
  13215. Generate code treating the given register range as fixed registers.
  13216. A fixed register is one that the register allocator cannot use. This is
  13217. useful when compiling kernel code. A register range is specified as
  13218. two registers separated by a dash. Multiple register ranges can be
  13219. specified separated by a comma.
  13220. @item -mtls-size=@var{tls-size}
  13221. @opindex mtls-size
  13222. Specify bit size of immediate TLS offsets. Valid values are 14, 22, and
  13223. 64.
  13224. @item -mtune=@var{cpu-type}
  13225. @opindex mtune
  13226. Tune the instruction scheduling for a particular CPU, Valid values are
  13227. @samp{itanium}, @samp{itanium1}, @samp{merced}, @samp{itanium2},
  13228. and @samp{mckinley}.
  13229. @item -milp32
  13230. @itemx -mlp64
  13231. @opindex milp32
  13232. @opindex mlp64
  13233. Generate code for a 32-bit or 64-bit environment.
  13234. The 32-bit environment sets int, long and pointer to 32 bits.
  13235. The 64-bit environment sets int to 32 bits and long and pointer
  13236. to 64 bits. These are HP-UX specific flags.
  13237. @item -mno-sched-br-data-spec
  13238. @itemx -msched-br-data-spec
  13239. @opindex mno-sched-br-data-spec
  13240. @opindex msched-br-data-spec
  13241. (Dis/En)able data speculative scheduling before reload.
  13242. This results in generation of @code{ld.a} instructions and
  13243. the corresponding check instructions (@code{ld.c} / @code{chk.a}).
  13244. The default is 'disable'.
  13245. @item -msched-ar-data-spec
  13246. @itemx -mno-sched-ar-data-spec
  13247. @opindex msched-ar-data-spec
  13248. @opindex mno-sched-ar-data-spec
  13249. (En/Dis)able data speculative scheduling after reload.
  13250. This results in generation of @code{ld.a} instructions and
  13251. the corresponding check instructions (@code{ld.c} / @code{chk.a}).
  13252. The default is 'enable'.
  13253. @item -mno-sched-control-spec
  13254. @itemx -msched-control-spec
  13255. @opindex mno-sched-control-spec
  13256. @opindex msched-control-spec
  13257. (Dis/En)able control speculative scheduling. This feature is
  13258. available only during region scheduling (i.e.@: before reload).
  13259. This results in generation of the @code{ld.s} instructions and
  13260. the corresponding check instructions @code{chk.s}.
  13261. The default is 'disable'.
  13262. @item -msched-br-in-data-spec
  13263. @itemx -mno-sched-br-in-data-spec
  13264. @opindex msched-br-in-data-spec
  13265. @opindex mno-sched-br-in-data-spec
  13266. (En/Dis)able speculative scheduling of the instructions that
  13267. are dependent on the data speculative loads before reload.
  13268. This is effective only with @option{-msched-br-data-spec} enabled.
  13269. The default is 'enable'.
  13270. @item -msched-ar-in-data-spec
  13271. @itemx -mno-sched-ar-in-data-spec
  13272. @opindex msched-ar-in-data-spec
  13273. @opindex mno-sched-ar-in-data-spec
  13274. (En/Dis)able speculative scheduling of the instructions that
  13275. are dependent on the data speculative loads after reload.
  13276. This is effective only with @option{-msched-ar-data-spec} enabled.
  13277. The default is 'enable'.
  13278. @item -msched-in-control-spec
  13279. @itemx -mno-sched-in-control-spec
  13280. @opindex msched-in-control-spec
  13281. @opindex mno-sched-in-control-spec
  13282. (En/Dis)able speculative scheduling of the instructions that
  13283. are dependent on the control speculative loads.
  13284. This is effective only with @option{-msched-control-spec} enabled.
  13285. The default is 'enable'.
  13286. @item -mno-sched-prefer-non-data-spec-insns
  13287. @itemx -msched-prefer-non-data-spec-insns
  13288. @opindex mno-sched-prefer-non-data-spec-insns
  13289. @opindex msched-prefer-non-data-spec-insns
  13290. If enabled, data-speculative instructions are chosen for schedule
  13291. only if there are no other choices at the moment. This makes
  13292. the use of the data speculation much more conservative.
  13293. The default is 'disable'.
  13294. @item -mno-sched-prefer-non-control-spec-insns
  13295. @itemx -msched-prefer-non-control-spec-insns
  13296. @opindex mno-sched-prefer-non-control-spec-insns
  13297. @opindex msched-prefer-non-control-spec-insns
  13298. If enabled, control-speculative instructions are chosen for schedule
  13299. only if there are no other choices at the moment. This makes
  13300. the use of the control speculation much more conservative.
  13301. The default is 'disable'.
  13302. @item -mno-sched-count-spec-in-critical-path
  13303. @itemx -msched-count-spec-in-critical-path
  13304. @opindex mno-sched-count-spec-in-critical-path
  13305. @opindex msched-count-spec-in-critical-path
  13306. If enabled, speculative dependencies are considered during
  13307. computation of the instructions priorities. This makes the use of the
  13308. speculation a bit more conservative.
  13309. The default is 'disable'.
  13310. @item -msched-spec-ldc
  13311. @opindex msched-spec-ldc
  13312. Use a simple data speculation check. This option is on by default.
  13313. @item -msched-control-spec-ldc
  13314. @opindex msched-spec-ldc
  13315. Use a simple check for control speculation. This option is on by default.
  13316. @item -msched-stop-bits-after-every-cycle
  13317. @opindex msched-stop-bits-after-every-cycle
  13318. Place a stop bit after every cycle when scheduling. This option is on
  13319. by default.
  13320. @item -msched-fp-mem-deps-zero-cost
  13321. @opindex msched-fp-mem-deps-zero-cost
  13322. Assume that floating-point stores and loads are not likely to cause a conflict
  13323. when placed into the same instruction group. This option is disabled by
  13324. default.
  13325. @item -msel-sched-dont-check-control-spec
  13326. @opindex msel-sched-dont-check-control-spec
  13327. Generate checks for control speculation in selective scheduling.
  13328. This flag is disabled by default.
  13329. @item -msched-max-memory-insns=@var{max-insns}
  13330. @opindex msched-max-memory-insns
  13331. Limit on the number of memory insns per instruction group, giving lower
  13332. priority to subsequent memory insns attempting to schedule in the same
  13333. instruction group. Frequently useful to prevent cache bank conflicts.
  13334. The default value is 1.
  13335. @item -msched-max-memory-insns-hard-limit
  13336. @opindex msched-max-memory-insns-hard-limit
  13337. Makes the limit specified by @option{msched-max-memory-insns} a hard limit,
  13338. disallowing more than that number in an instruction group.
  13339. Otherwise, the limit is ``soft'', meaning that non-memory operations
  13340. are preferred when the limit is reached, but memory operations may still
  13341. be scheduled.
  13342. @end table
  13343. @node LM32 Options
  13344. @subsection LM32 Options
  13345. @cindex LM32 options
  13346. These @option{-m} options are defined for the LatticeMico32 architecture:
  13347. @table @gcctabopt
  13348. @item -mbarrel-shift-enabled
  13349. @opindex mbarrel-shift-enabled
  13350. Enable barrel-shift instructions.
  13351. @item -mdivide-enabled
  13352. @opindex mdivide-enabled
  13353. Enable divide and modulus instructions.
  13354. @item -mmultiply-enabled
  13355. @opindex multiply-enabled
  13356. Enable multiply instructions.
  13357. @item -msign-extend-enabled
  13358. @opindex msign-extend-enabled
  13359. Enable sign extend instructions.
  13360. @item -muser-enabled
  13361. @opindex muser-enabled
  13362. Enable user-defined instructions.
  13363. @end table
  13364. @node M32C Options
  13365. @subsection M32C Options
  13366. @cindex M32C options
  13367. @table @gcctabopt
  13368. @item -mcpu=@var{name}
  13369. @opindex mcpu=
  13370. Select the CPU for which code is generated. @var{name} may be one of
  13371. @samp{r8c} for the R8C/Tiny series, @samp{m16c} for the M16C (up to
  13372. /60) series, @samp{m32cm} for the M16C/80 series, or @samp{m32c} for
  13373. the M32C/80 series.
  13374. @item -msim
  13375. @opindex msim
  13376. Specifies that the program will be run on the simulator. This causes
  13377. an alternate runtime library to be linked in which supports, for
  13378. example, file I/O@. You must not use this option when generating
  13379. programs that will run on real hardware; you must provide your own
  13380. runtime library for whatever I/O functions are needed.
  13381. @item -memregs=@var{number}
  13382. @opindex memregs=
  13383. Specifies the number of memory-based pseudo-registers GCC uses
  13384. during code generation. These pseudo-registers are used like real
  13385. registers, so there is a tradeoff between GCC's ability to fit the
  13386. code into available registers, and the performance penalty of using
  13387. memory instead of registers. Note that all modules in a program must
  13388. be compiled with the same value for this option. Because of that, you
  13389. must not use this option with GCC's default runtime libraries.
  13390. @end table
  13391. @node M32R/D Options
  13392. @subsection M32R/D Options
  13393. @cindex M32R/D options
  13394. These @option{-m} options are defined for Renesas M32R/D architectures:
  13395. @table @gcctabopt
  13396. @item -m32r2
  13397. @opindex m32r2
  13398. Generate code for the M32R/2@.
  13399. @item -m32rx
  13400. @opindex m32rx
  13401. Generate code for the M32R/X@.
  13402. @item -m32r
  13403. @opindex m32r
  13404. Generate code for the M32R@. This is the default.
  13405. @item -mmodel=small
  13406. @opindex mmodel=small
  13407. Assume all objects live in the lower 16MB of memory (so that their addresses
  13408. can be loaded with the @code{ld24} instruction), and assume all subroutines
  13409. are reachable with the @code{bl} instruction.
  13410. This is the default.
  13411. The addressability of a particular object can be set with the
  13412. @code{model} attribute.
  13413. @item -mmodel=medium
  13414. @opindex mmodel=medium
  13415. Assume objects may be anywhere in the 32-bit address space (the compiler
  13416. generates @code{seth/add3} instructions to load their addresses), and
  13417. assume all subroutines are reachable with the @code{bl} instruction.
  13418. @item -mmodel=large
  13419. @opindex mmodel=large
  13420. Assume objects may be anywhere in the 32-bit address space (the compiler
  13421. generates @code{seth/add3} instructions to load their addresses), and
  13422. assume subroutines may not be reachable with the @code{bl} instruction
  13423. (the compiler generates the much slower @code{seth/add3/jl}
  13424. instruction sequence).
  13425. @item -msdata=none
  13426. @opindex msdata=none
  13427. Disable use of the small data area. Variables are put into
  13428. one of @code{.data}, @code{.bss}, or @code{.rodata} (unless the
  13429. @code{section} attribute has been specified).
  13430. This is the default.
  13431. The small data area consists of sections @code{.sdata} and @code{.sbss}.
  13432. Objects may be explicitly put in the small data area with the
  13433. @code{section} attribute using one of these sections.
  13434. @item -msdata=sdata
  13435. @opindex msdata=sdata
  13436. Put small global and static data in the small data area, but do not
  13437. generate special code to reference them.
  13438. @item -msdata=use
  13439. @opindex msdata=use
  13440. Put small global and static data in the small data area, and generate
  13441. special instructions to reference them.
  13442. @item -G @var{num}
  13443. @opindex G
  13444. @cindex smaller data references
  13445. Put global and static objects less than or equal to @var{num} bytes
  13446. into the small data or BSS sections instead of the normal data or BSS
  13447. sections. The default value of @var{num} is 8.
  13448. The @option{-msdata} option must be set to one of @samp{sdata} or @samp{use}
  13449. for this option to have any effect.
  13450. All modules should be compiled with the same @option{-G @var{num}} value.
  13451. Compiling with different values of @var{num} may or may not work; if it
  13452. doesn't the linker gives an error message---incorrect code is not
  13453. generated.
  13454. @item -mdebug
  13455. @opindex mdebug
  13456. Makes the M32R-specific code in the compiler display some statistics
  13457. that might help in debugging programs.
  13458. @item -malign-loops
  13459. @opindex malign-loops
  13460. Align all loops to a 32-byte boundary.
  13461. @item -mno-align-loops
  13462. @opindex mno-align-loops
  13463. Do not enforce a 32-byte alignment for loops. This is the default.
  13464. @item -missue-rate=@var{number}
  13465. @opindex missue-rate=@var{number}
  13466. Issue @var{number} instructions per cycle. @var{number} can only be 1
  13467. or 2.
  13468. @item -mbranch-cost=@var{number}
  13469. @opindex mbranch-cost=@var{number}
  13470. @var{number} can only be 1 or 2. If it is 1 then branches are
  13471. preferred over conditional code, if it is 2, then the opposite applies.
  13472. @item -mflush-trap=@var{number}
  13473. @opindex mflush-trap=@var{number}
  13474. Specifies the trap number to use to flush the cache. The default is
  13475. 12. Valid numbers are between 0 and 15 inclusive.
  13476. @item -mno-flush-trap
  13477. @opindex mno-flush-trap
  13478. Specifies that the cache cannot be flushed by using a trap.
  13479. @item -mflush-func=@var{name}
  13480. @opindex mflush-func=@var{name}
  13481. Specifies the name of the operating system function to call to flush
  13482. the cache. The default is @samp{_flush_cache}, but a function call
  13483. is only used if a trap is not available.
  13484. @item -mno-flush-func
  13485. @opindex mno-flush-func
  13486. Indicates that there is no OS function for flushing the cache.
  13487. @end table
  13488. @node M680x0 Options
  13489. @subsection M680x0 Options
  13490. @cindex M680x0 options
  13491. These are the @samp{-m} options defined for M680x0 and ColdFire processors.
  13492. The default settings depend on which architecture was selected when
  13493. the compiler was configured; the defaults for the most common choices
  13494. are given below.
  13495. @table @gcctabopt
  13496. @item -march=@var{arch}
  13497. @opindex march
  13498. Generate code for a specific M680x0 or ColdFire instruction set
  13499. architecture. Permissible values of @var{arch} for M680x0
  13500. architectures are: @samp{68000}, @samp{68010}, @samp{68020},
  13501. @samp{68030}, @samp{68040}, @samp{68060} and @samp{cpu32}. ColdFire
  13502. architectures are selected according to Freescale's ISA classification
  13503. and the permissible values are: @samp{isaa}, @samp{isaaplus},
  13504. @samp{isab} and @samp{isac}.
  13505. GCC defines a macro @code{__mcf@var{arch}__} whenever it is generating
  13506. code for a ColdFire target. The @var{arch} in this macro is one of the
  13507. @option{-march} arguments given above.
  13508. When used together, @option{-march} and @option{-mtune} select code
  13509. that runs on a family of similar processors but that is optimized
  13510. for a particular microarchitecture.
  13511. @item -mcpu=@var{cpu}
  13512. @opindex mcpu
  13513. Generate code for a specific M680x0 or ColdFire processor.
  13514. The M680x0 @var{cpu}s are: @samp{68000}, @samp{68010}, @samp{68020},
  13515. @samp{68030}, @samp{68040}, @samp{68060}, @samp{68302}, @samp{68332}
  13516. and @samp{cpu32}. The ColdFire @var{cpu}s are given by the table
  13517. below, which also classifies the CPUs into families:
  13518. @multitable @columnfractions 0.20 0.80
  13519. @item @strong{Family} @tab @strong{@samp{-mcpu} arguments}
  13520. @item @samp{51} @tab @samp{51} @samp{51ac} @samp{51ag} @samp{51cn} @samp{51em} @samp{51je} @samp{51jf} @samp{51jg} @samp{51jm} @samp{51mm} @samp{51qe} @samp{51qm}
  13521. @item @samp{5206} @tab @samp{5202} @samp{5204} @samp{5206}
  13522. @item @samp{5206e} @tab @samp{5206e}
  13523. @item @samp{5208} @tab @samp{5207} @samp{5208}
  13524. @item @samp{5211a} @tab @samp{5210a} @samp{5211a}
  13525. @item @samp{5213} @tab @samp{5211} @samp{5212} @samp{5213}
  13526. @item @samp{5216} @tab @samp{5214} @samp{5216}
  13527. @item @samp{52235} @tab @samp{52230} @samp{52231} @samp{52232} @samp{52233} @samp{52234} @samp{52235}
  13528. @item @samp{5225} @tab @samp{5224} @samp{5225}
  13529. @item @samp{52259} @tab @samp{52252} @samp{52254} @samp{52255} @samp{52256} @samp{52258} @samp{52259}
  13530. @item @samp{5235} @tab @samp{5232} @samp{5233} @samp{5234} @samp{5235} @samp{523x}
  13531. @item @samp{5249} @tab @samp{5249}
  13532. @item @samp{5250} @tab @samp{5250}
  13533. @item @samp{5271} @tab @samp{5270} @samp{5271}
  13534. @item @samp{5272} @tab @samp{5272}
  13535. @item @samp{5275} @tab @samp{5274} @samp{5275}
  13536. @item @samp{5282} @tab @samp{5280} @samp{5281} @samp{5282} @samp{528x}
  13537. @item @samp{53017} @tab @samp{53011} @samp{53012} @samp{53013} @samp{53014} @samp{53015} @samp{53016} @samp{53017}
  13538. @item @samp{5307} @tab @samp{5307}
  13539. @item @samp{5329} @tab @samp{5327} @samp{5328} @samp{5329} @samp{532x}
  13540. @item @samp{5373} @tab @samp{5372} @samp{5373} @samp{537x}
  13541. @item @samp{5407} @tab @samp{5407}
  13542. @item @samp{5475} @tab @samp{5470} @samp{5471} @samp{5472} @samp{5473} @samp{5474} @samp{5475} @samp{547x} @samp{5480} @samp{5481} @samp{5482} @samp{5483} @samp{5484} @samp{5485}
  13543. @end multitable
  13544. @option{-mcpu=@var{cpu}} overrides @option{-march=@var{arch}} if
  13545. @var{arch} is compatible with @var{cpu}. Other combinations of
  13546. @option{-mcpu} and @option{-march} are rejected.
  13547. GCC defines the macro @code{__mcf_cpu_@var{cpu}} when ColdFire target
  13548. @var{cpu} is selected. It also defines @code{__mcf_family_@var{family}},
  13549. where the value of @var{family} is given by the table above.
  13550. @item -mtune=@var{tune}
  13551. @opindex mtune
  13552. Tune the code for a particular microarchitecture within the
  13553. constraints set by @option{-march} and @option{-mcpu}.
  13554. The M680x0 microarchitectures are: @samp{68000}, @samp{68010},
  13555. @samp{68020}, @samp{68030}, @samp{68040}, @samp{68060}
  13556. and @samp{cpu32}. The ColdFire microarchitectures
  13557. are: @samp{cfv1}, @samp{cfv2}, @samp{cfv3}, @samp{cfv4} and @samp{cfv4e}.
  13558. You can also use @option{-mtune=68020-40} for code that needs
  13559. to run relatively well on 68020, 68030 and 68040 targets.
  13560. @option{-mtune=68020-60} is similar but includes 68060 targets
  13561. as well. These two options select the same tuning decisions as
  13562. @option{-m68020-40} and @option{-m68020-60} respectively.
  13563. GCC defines the macros @code{__mc@var{arch}} and @code{__mc@var{arch}__}
  13564. when tuning for 680x0 architecture @var{arch}. It also defines
  13565. @code{mc@var{arch}} unless either @option{-ansi} or a non-GNU @option{-std}
  13566. option is used. If GCC is tuning for a range of architectures,
  13567. as selected by @option{-mtune=68020-40} or @option{-mtune=68020-60},
  13568. it defines the macros for every architecture in the range.
  13569. GCC also defines the macro @code{__m@var{uarch}__} when tuning for
  13570. ColdFire microarchitecture @var{uarch}, where @var{uarch} is one
  13571. of the arguments given above.
  13572. @item -m68000
  13573. @itemx -mc68000
  13574. @opindex m68000
  13575. @opindex mc68000
  13576. Generate output for a 68000. This is the default
  13577. when the compiler is configured for 68000-based systems.
  13578. It is equivalent to @option{-march=68000}.
  13579. Use this option for microcontrollers with a 68000 or EC000 core,
  13580. including the 68008, 68302, 68306, 68307, 68322, 68328 and 68356.
  13581. @item -m68010
  13582. @opindex m68010
  13583. Generate output for a 68010. This is the default
  13584. when the compiler is configured for 68010-based systems.
  13585. It is equivalent to @option{-march=68010}.
  13586. @item -m68020
  13587. @itemx -mc68020
  13588. @opindex m68020
  13589. @opindex mc68020
  13590. Generate output for a 68020. This is the default
  13591. when the compiler is configured for 68020-based systems.
  13592. It is equivalent to @option{-march=68020}.
  13593. @item -m68030
  13594. @opindex m68030
  13595. Generate output for a 68030. This is the default when the compiler is
  13596. configured for 68030-based systems. It is equivalent to
  13597. @option{-march=68030}.
  13598. @item -m68040
  13599. @opindex m68040
  13600. Generate output for a 68040. This is the default when the compiler is
  13601. configured for 68040-based systems. It is equivalent to
  13602. @option{-march=68040}.
  13603. This option inhibits the use of 68881/68882 instructions that have to be
  13604. emulated by software on the 68040. Use this option if your 68040 does not
  13605. have code to emulate those instructions.
  13606. @item -m68060
  13607. @opindex m68060
  13608. Generate output for a 68060. This is the default when the compiler is
  13609. configured for 68060-based systems. It is equivalent to
  13610. @option{-march=68060}.
  13611. This option inhibits the use of 68020 and 68881/68882 instructions that
  13612. have to be emulated by software on the 68060. Use this option if your 68060
  13613. does not have code to emulate those instructions.
  13614. @item -mcpu32
  13615. @opindex mcpu32
  13616. Generate output for a CPU32. This is the default
  13617. when the compiler is configured for CPU32-based systems.
  13618. It is equivalent to @option{-march=cpu32}.
  13619. Use this option for microcontrollers with a
  13620. CPU32 or CPU32+ core, including the 68330, 68331, 68332, 68333, 68334,
  13621. 68336, 68340, 68341, 68349 and 68360.
  13622. @item -m5200
  13623. @opindex m5200
  13624. Generate output for a 520X ColdFire CPU@. This is the default
  13625. when the compiler is configured for 520X-based systems.
  13626. It is equivalent to @option{-mcpu=5206}, and is now deprecated
  13627. in favor of that option.
  13628. Use this option for microcontroller with a 5200 core, including
  13629. the MCF5202, MCF5203, MCF5204 and MCF5206.
  13630. @item -m5206e
  13631. @opindex m5206e
  13632. Generate output for a 5206e ColdFire CPU@. The option is now
  13633. deprecated in favor of the equivalent @option{-mcpu=5206e}.
  13634. @item -m528x
  13635. @opindex m528x
  13636. Generate output for a member of the ColdFire 528X family.
  13637. The option is now deprecated in favor of the equivalent
  13638. @option{-mcpu=528x}.
  13639. @item -m5307
  13640. @opindex m5307
  13641. Generate output for a ColdFire 5307 CPU@. The option is now deprecated
  13642. in favor of the equivalent @option{-mcpu=5307}.
  13643. @item -m5407
  13644. @opindex m5407
  13645. Generate output for a ColdFire 5407 CPU@. The option is now deprecated
  13646. in favor of the equivalent @option{-mcpu=5407}.
  13647. @item -mcfv4e
  13648. @opindex mcfv4e
  13649. Generate output for a ColdFire V4e family CPU (e.g.@: 547x/548x).
  13650. This includes use of hardware floating-point instructions.
  13651. The option is equivalent to @option{-mcpu=547x}, and is now
  13652. deprecated in favor of that option.
  13653. @item -m68020-40
  13654. @opindex m68020-40
  13655. Generate output for a 68040, without using any of the new instructions.
  13656. This results in code that can run relatively efficiently on either a
  13657. 68020/68881 or a 68030 or a 68040. The generated code does use the
  13658. 68881 instructions that are emulated on the 68040.
  13659. The option is equivalent to @option{-march=68020} @option{-mtune=68020-40}.
  13660. @item -m68020-60
  13661. @opindex m68020-60
  13662. Generate output for a 68060, without using any of the new instructions.
  13663. This results in code that can run relatively efficiently on either a
  13664. 68020/68881 or a 68030 or a 68040. The generated code does use the
  13665. 68881 instructions that are emulated on the 68060.
  13666. The option is equivalent to @option{-march=68020} @option{-mtune=68020-60}.
  13667. @item -mhard-float
  13668. @itemx -m68881
  13669. @opindex mhard-float
  13670. @opindex m68881
  13671. Generate floating-point instructions. This is the default for 68020
  13672. and above, and for ColdFire devices that have an FPU@. It defines the
  13673. macro @code{__HAVE_68881__} on M680x0 targets and @code{__mcffpu__}
  13674. on ColdFire targets.
  13675. @item -msoft-float
  13676. @opindex msoft-float
  13677. Do not generate floating-point instructions; use library calls instead.
  13678. This is the default for 68000, 68010, and 68832 targets. It is also
  13679. the default for ColdFire devices that have no FPU.
  13680. @item -mdiv
  13681. @itemx -mno-div
  13682. @opindex mdiv
  13683. @opindex mno-div
  13684. Generate (do not generate) ColdFire hardware divide and remainder
  13685. instructions. If @option{-march} is used without @option{-mcpu},
  13686. the default is ``on'' for ColdFire architectures and ``off'' for M680x0
  13687. architectures. Otherwise, the default is taken from the target CPU
  13688. (either the default CPU, or the one specified by @option{-mcpu}). For
  13689. example, the default is ``off'' for @option{-mcpu=5206} and ``on'' for
  13690. @option{-mcpu=5206e}.
  13691. GCC defines the macro @code{__mcfhwdiv__} when this option is enabled.
  13692. @item -mshort
  13693. @opindex mshort
  13694. Consider type @code{int} to be 16 bits wide, like @code{short int}.
  13695. Additionally, parameters passed on the stack are also aligned to a
  13696. 16-bit boundary even on targets whose API mandates promotion to 32-bit.
  13697. @item -mno-short
  13698. @opindex mno-short
  13699. Do not consider type @code{int} to be 16 bits wide. This is the default.
  13700. @item -mnobitfield
  13701. @itemx -mno-bitfield
  13702. @opindex mnobitfield
  13703. @opindex mno-bitfield
  13704. Do not use the bit-field instructions. The @option{-m68000}, @option{-mcpu32}
  13705. and @option{-m5200} options imply @w{@option{-mnobitfield}}.
  13706. @item -mbitfield
  13707. @opindex mbitfield
  13708. Do use the bit-field instructions. The @option{-m68020} option implies
  13709. @option{-mbitfield}. This is the default if you use a configuration
  13710. designed for a 68020.
  13711. @item -mrtd
  13712. @opindex mrtd
  13713. Use a different function-calling convention, in which functions
  13714. that take a fixed number of arguments return with the @code{rtd}
  13715. instruction, which pops their arguments while returning. This
  13716. saves one instruction in the caller since there is no need to pop
  13717. the arguments there.
  13718. This calling convention is incompatible with the one normally
  13719. used on Unix, so you cannot use it if you need to call libraries
  13720. compiled with the Unix compiler.
  13721. Also, you must provide function prototypes for all functions that
  13722. take variable numbers of arguments (including @code{printf});
  13723. otherwise incorrect code is generated for calls to those
  13724. functions.
  13725. In addition, seriously incorrect code results if you call a
  13726. function with too many arguments. (Normally, extra arguments are
  13727. harmlessly ignored.)
  13728. The @code{rtd} instruction is supported by the 68010, 68020, 68030,
  13729. 68040, 68060 and CPU32 processors, but not by the 68000 or 5200.
  13730. @item -mno-rtd
  13731. @opindex mno-rtd
  13732. Do not use the calling conventions selected by @option{-mrtd}.
  13733. This is the default.
  13734. @item -malign-int
  13735. @itemx -mno-align-int
  13736. @opindex malign-int
  13737. @opindex mno-align-int
  13738. Control whether GCC aligns @code{int}, @code{long}, @code{long long},
  13739. @code{float}, @code{double}, and @code{long double} variables on a 32-bit
  13740. boundary (@option{-malign-int}) or a 16-bit boundary (@option{-mno-align-int}).
  13741. Aligning variables on 32-bit boundaries produces code that runs somewhat
  13742. faster on processors with 32-bit busses at the expense of more memory.
  13743. @strong{Warning:} if you use the @option{-malign-int} switch, GCC
  13744. aligns structures containing the above types differently than
  13745. most published application binary interface specifications for the m68k.
  13746. @item -mpcrel
  13747. @opindex mpcrel
  13748. Use the pc-relative addressing mode of the 68000 directly, instead of
  13749. using a global offset table. At present, this option implies @option{-fpic},
  13750. allowing at most a 16-bit offset for pc-relative addressing. @option{-fPIC} is
  13751. not presently supported with @option{-mpcrel}, though this could be supported for
  13752. 68020 and higher processors.
  13753. @item -mno-strict-align
  13754. @itemx -mstrict-align
  13755. @opindex mno-strict-align
  13756. @opindex mstrict-align
  13757. Do not (do) assume that unaligned memory references are handled by
  13758. the system.
  13759. @item -msep-data
  13760. Generate code that allows the data segment to be located in a different
  13761. area of memory from the text segment. This allows for execute-in-place in
  13762. an environment without virtual memory management. This option implies
  13763. @option{-fPIC}.
  13764. @item -mno-sep-data
  13765. Generate code that assumes that the data segment follows the text segment.
  13766. This is the default.
  13767. @item -mid-shared-library
  13768. Generate code that supports shared libraries via the library ID method.
  13769. This allows for execute-in-place and shared libraries in an environment
  13770. without virtual memory management. This option implies @option{-fPIC}.
  13771. @item -mno-id-shared-library
  13772. Generate code that doesn't assume ID-based shared libraries are being used.
  13773. This is the default.
  13774. @item -mshared-library-id=n
  13775. Specifies the identification number of the ID-based shared library being
  13776. compiled. Specifying a value of 0 generates more compact code; specifying
  13777. other values forces the allocation of that number to the current
  13778. library, but is no more space- or time-efficient than omitting this option.
  13779. @item -mxgot
  13780. @itemx -mno-xgot
  13781. @opindex mxgot
  13782. @opindex mno-xgot
  13783. When generating position-independent code for ColdFire, generate code
  13784. that works if the GOT has more than 8192 entries. This code is
  13785. larger and slower than code generated without this option. On M680x0
  13786. processors, this option is not needed; @option{-fPIC} suffices.
  13787. GCC normally uses a single instruction to load values from the GOT@.
  13788. While this is relatively efficient, it only works if the GOT
  13789. is smaller than about 64k. Anything larger causes the linker
  13790. to report an error such as:
  13791. @cindex relocation truncated to fit (ColdFire)
  13792. @smallexample
  13793. relocation truncated to fit: R_68K_GOT16O foobar
  13794. @end smallexample
  13795. If this happens, you should recompile your code with @option{-mxgot}.
  13796. It should then work with very large GOTs. However, code generated with
  13797. @option{-mxgot} is less efficient, since it takes 4 instructions to fetch
  13798. the value of a global symbol.
  13799. Note that some linkers, including newer versions of the GNU linker,
  13800. can create multiple GOTs and sort GOT entries. If you have such a linker,
  13801. you should only need to use @option{-mxgot} when compiling a single
  13802. object file that accesses more than 8192 GOT entries. Very few do.
  13803. These options have no effect unless GCC is generating
  13804. position-independent code.
  13805. @end table
  13806. @node MCore Options
  13807. @subsection MCore Options
  13808. @cindex MCore options
  13809. These are the @samp{-m} options defined for the Motorola M*Core
  13810. processors.
  13811. @table @gcctabopt
  13812. @item -mhardlit
  13813. @itemx -mno-hardlit
  13814. @opindex mhardlit
  13815. @opindex mno-hardlit
  13816. Inline constants into the code stream if it can be done in two
  13817. instructions or less.
  13818. @item -mdiv
  13819. @itemx -mno-div
  13820. @opindex mdiv
  13821. @opindex mno-div
  13822. Use the divide instruction. (Enabled by default).
  13823. @item -mrelax-immediate
  13824. @itemx -mno-relax-immediate
  13825. @opindex mrelax-immediate
  13826. @opindex mno-relax-immediate
  13827. Allow arbitrary-sized immediates in bit operations.
  13828. @item -mwide-bitfields
  13829. @itemx -mno-wide-bitfields
  13830. @opindex mwide-bitfields
  13831. @opindex mno-wide-bitfields
  13832. Always treat bit-fields as @code{int}-sized.
  13833. @item -m4byte-functions
  13834. @itemx -mno-4byte-functions
  13835. @opindex m4byte-functions
  13836. @opindex mno-4byte-functions
  13837. Force all functions to be aligned to a 4-byte boundary.
  13838. @item -mcallgraph-data
  13839. @itemx -mno-callgraph-data
  13840. @opindex mcallgraph-data
  13841. @opindex mno-callgraph-data
  13842. Emit callgraph information.
  13843. @item -mslow-bytes
  13844. @itemx -mno-slow-bytes
  13845. @opindex mslow-bytes
  13846. @opindex mno-slow-bytes
  13847. Prefer word access when reading byte quantities.
  13848. @item -mlittle-endian
  13849. @itemx -mbig-endian
  13850. @opindex mlittle-endian
  13851. @opindex mbig-endian
  13852. Generate code for a little-endian target.
  13853. @item -m210
  13854. @itemx -m340
  13855. @opindex m210
  13856. @opindex m340
  13857. Generate code for the 210 processor.
  13858. @item -mno-lsim
  13859. @opindex mno-lsim
  13860. Assume that runtime support has been provided and so omit the
  13861. simulator library (@file{libsim.a)} from the linker command line.
  13862. @item -mstack-increment=@var{size}
  13863. @opindex mstack-increment
  13864. Set the maximum amount for a single stack increment operation. Large
  13865. values can increase the speed of programs that contain functions
  13866. that need a large amount of stack space, but they can also trigger a
  13867. segmentation fault if the stack is extended too much. The default
  13868. value is 0x1000.
  13869. @end table
  13870. @node MeP Options
  13871. @subsection MeP Options
  13872. @cindex MeP options
  13873. @table @gcctabopt
  13874. @item -mabsdiff
  13875. @opindex mabsdiff
  13876. Enables the @code{abs} instruction, which is the absolute difference
  13877. between two registers.
  13878. @item -mall-opts
  13879. @opindex mall-opts
  13880. Enables all the optional instructions---average, multiply, divide, bit
  13881. operations, leading zero, absolute difference, min/max, clip, and
  13882. saturation.
  13883. @item -maverage
  13884. @opindex maverage
  13885. Enables the @code{ave} instruction, which computes the average of two
  13886. registers.
  13887. @item -mbased=@var{n}
  13888. @opindex mbased=
  13889. Variables of size @var{n} bytes or smaller are placed in the
  13890. @code{.based} section by default. Based variables use the @code{$tp}
  13891. register as a base register, and there is a 128-byte limit to the
  13892. @code{.based} section.
  13893. @item -mbitops
  13894. @opindex mbitops
  13895. Enables the bit operation instructions---bit test (@code{btstm}), set
  13896. (@code{bsetm}), clear (@code{bclrm}), invert (@code{bnotm}), and
  13897. test-and-set (@code{tas}).
  13898. @item -mc=@var{name}
  13899. @opindex mc=
  13900. Selects which section constant data is placed in. @var{name} may
  13901. be @samp{tiny}, @samp{near}, or @samp{far}.
  13902. @item -mclip
  13903. @opindex mclip
  13904. Enables the @code{clip} instruction. Note that @option{-mclip} is not
  13905. useful unless you also provide @option{-mminmax}.
  13906. @item -mconfig=@var{name}
  13907. @opindex mconfig=
  13908. Selects one of the built-in core configurations. Each MeP chip has
  13909. one or more modules in it; each module has a core CPU and a variety of
  13910. coprocessors, optional instructions, and peripherals. The
  13911. @code{MeP-Integrator} tool, not part of GCC, provides these
  13912. configurations through this option; using this option is the same as
  13913. using all the corresponding command-line options. The default
  13914. configuration is @samp{default}.
  13915. @item -mcop
  13916. @opindex mcop
  13917. Enables the coprocessor instructions. By default, this is a 32-bit
  13918. coprocessor. Note that the coprocessor is normally enabled via the
  13919. @option{-mconfig=} option.
  13920. @item -mcop32
  13921. @opindex mcop32
  13922. Enables the 32-bit coprocessor's instructions.
  13923. @item -mcop64
  13924. @opindex mcop64
  13925. Enables the 64-bit coprocessor's instructions.
  13926. @item -mivc2
  13927. @opindex mivc2
  13928. Enables IVC2 scheduling. IVC2 is a 64-bit VLIW coprocessor.
  13929. @item -mdc
  13930. @opindex mdc
  13931. Causes constant variables to be placed in the @code{.near} section.
  13932. @item -mdiv
  13933. @opindex mdiv
  13934. Enables the @code{div} and @code{divu} instructions.
  13935. @item -meb
  13936. @opindex meb
  13937. Generate big-endian code.
  13938. @item -mel
  13939. @opindex mel
  13940. Generate little-endian code.
  13941. @item -mio-volatile
  13942. @opindex mio-volatile
  13943. Tells the compiler that any variable marked with the @code{io}
  13944. attribute is to be considered volatile.
  13945. @item -ml
  13946. @opindex ml
  13947. Causes variables to be assigned to the @code{.far} section by default.
  13948. @item -mleadz
  13949. @opindex mleadz
  13950. Enables the @code{leadz} (leading zero) instruction.
  13951. @item -mm
  13952. @opindex mm
  13953. Causes variables to be assigned to the @code{.near} section by default.
  13954. @item -mminmax
  13955. @opindex mminmax
  13956. Enables the @code{min} and @code{max} instructions.
  13957. @item -mmult
  13958. @opindex mmult
  13959. Enables the multiplication and multiply-accumulate instructions.
  13960. @item -mno-opts
  13961. @opindex mno-opts
  13962. Disables all the optional instructions enabled by @option{-mall-opts}.
  13963. @item -mrepeat
  13964. @opindex mrepeat
  13965. Enables the @code{repeat} and @code{erepeat} instructions, used for
  13966. low-overhead looping.
  13967. @item -ms
  13968. @opindex ms
  13969. Causes all variables to default to the @code{.tiny} section. Note
  13970. that there is a 65536-byte limit to this section. Accesses to these
  13971. variables use the @code{%gp} base register.
  13972. @item -msatur
  13973. @opindex msatur
  13974. Enables the saturation instructions. Note that the compiler does not
  13975. currently generate these itself, but this option is included for
  13976. compatibility with other tools, like @code{as}.
  13977. @item -msdram
  13978. @opindex msdram
  13979. Link the SDRAM-based runtime instead of the default ROM-based runtime.
  13980. @item -msim
  13981. @opindex msim
  13982. Link the simulator run-time libraries.
  13983. @item -msimnovec
  13984. @opindex msimnovec
  13985. Link the simulator runtime libraries, excluding built-in support
  13986. for reset and exception vectors and tables.
  13987. @item -mtf
  13988. @opindex mtf
  13989. Causes all functions to default to the @code{.far} section. Without
  13990. this option, functions default to the @code{.near} section.
  13991. @item -mtiny=@var{n}
  13992. @opindex mtiny=
  13993. Variables that are @var{n} bytes or smaller are allocated to the
  13994. @code{.tiny} section. These variables use the @code{$gp} base
  13995. register. The default for this option is 4, but note that there's a
  13996. 65536-byte limit to the @code{.tiny} section.
  13997. @end table
  13998. @node MicroBlaze Options
  13999. @subsection MicroBlaze Options
  14000. @cindex MicroBlaze Options
  14001. @table @gcctabopt
  14002. @item -msoft-float
  14003. @opindex msoft-float
  14004. Use software emulation for floating point (default).
  14005. @item -mhard-float
  14006. @opindex mhard-float
  14007. Use hardware floating-point instructions.
  14008. @item -mmemcpy
  14009. @opindex mmemcpy
  14010. Do not optimize block moves, use @code{memcpy}.
  14011. @item -mno-clearbss
  14012. @opindex mno-clearbss
  14013. This option is deprecated. Use @option{-fno-zero-initialized-in-bss} instead.
  14014. @item -mcpu=@var{cpu-type}
  14015. @opindex mcpu=
  14016. Use features of, and schedule code for, the given CPU.
  14017. Supported values are in the format @samp{v@var{X}.@var{YY}.@var{Z}},
  14018. where @var{X} is a major version, @var{YY} is the minor version, and
  14019. @var{Z} is compatibility code. Example values are @samp{v3.00.a},
  14020. @samp{v4.00.b}, @samp{v5.00.a}, @samp{v5.00.b}, @samp{v5.00.b}, @samp{v6.00.a}.
  14021. @item -mxl-soft-mul
  14022. @opindex mxl-soft-mul
  14023. Use software multiply emulation (default).
  14024. @item -mxl-soft-div
  14025. @opindex mxl-soft-div
  14026. Use software emulation for divides (default).
  14027. @item -mxl-barrel-shift
  14028. @opindex mxl-barrel-shift
  14029. Use the hardware barrel shifter.
  14030. @item -mxl-pattern-compare
  14031. @opindex mxl-pattern-compare
  14032. Use pattern compare instructions.
  14033. @item -msmall-divides
  14034. @opindex msmall-divides
  14035. Use table lookup optimization for small signed integer divisions.
  14036. @item -mxl-stack-check
  14037. @opindex mxl-stack-check
  14038. This option is deprecated. Use @option{-fstack-check} instead.
  14039. @item -mxl-gp-opt
  14040. @opindex mxl-gp-opt
  14041. Use GP-relative @code{.sdata}/@code{.sbss} sections.
  14042. @item -mxl-multiply-high
  14043. @opindex mxl-multiply-high
  14044. Use multiply high instructions for high part of 32x32 multiply.
  14045. @item -mxl-float-convert
  14046. @opindex mxl-float-convert
  14047. Use hardware floating-point conversion instructions.
  14048. @item -mxl-float-sqrt
  14049. @opindex mxl-float-sqrt
  14050. Use hardware floating-point square root instruction.
  14051. @item -mbig-endian
  14052. @opindex mbig-endian
  14053. Generate code for a big-endian target.
  14054. @item -mlittle-endian
  14055. @opindex mlittle-endian
  14056. Generate code for a little-endian target.
  14057. @item -mxl-reorder
  14058. @opindex mxl-reorder
  14059. Use reorder instructions (swap and byte reversed load/store).
  14060. @item -mxl-mode-@var{app-model}
  14061. Select application model @var{app-model}. Valid models are
  14062. @table @samp
  14063. @item executable
  14064. normal executable (default), uses startup code @file{crt0.o}.
  14065. @item xmdstub
  14066. for use with Xilinx Microprocessor Debugger (XMD) based
  14067. software intrusive debug agent called xmdstub. This uses startup file
  14068. @file{crt1.o} and sets the start address of the program to 0x800.
  14069. @item bootstrap
  14070. for applications that are loaded using a bootloader.
  14071. This model uses startup file @file{crt2.o} which does not contain a processor
  14072. reset vector handler. This is suitable for transferring control on a
  14073. processor reset to the bootloader rather than the application.
  14074. @item novectors
  14075. for applications that do not require any of the
  14076. MicroBlaze vectors. This option may be useful for applications running
  14077. within a monitoring application. This model uses @file{crt3.o} as a startup file.
  14078. @end table
  14079. Option @option{-xl-mode-@var{app-model}} is a deprecated alias for
  14080. @option{-mxl-mode-@var{app-model}}.
  14081. @end table
  14082. @node MIPS Options
  14083. @subsection MIPS Options
  14084. @cindex MIPS options
  14085. @table @gcctabopt
  14086. @item -EB
  14087. @opindex EB
  14088. Generate big-endian code.
  14089. @item -EL
  14090. @opindex EL
  14091. Generate little-endian code. This is the default for @samp{mips*el-*-*}
  14092. configurations.
  14093. @item -march=@var{arch}
  14094. @opindex march
  14095. Generate code that runs on @var{arch}, which can be the name of a
  14096. generic MIPS ISA, or the name of a particular processor.
  14097. The ISA names are:
  14098. @samp{mips1}, @samp{mips2}, @samp{mips3}, @samp{mips4},
  14099. @samp{mips32}, @samp{mips32r2}, @samp{mips32r3}, @samp{mips32r5},
  14100. @samp{mips32r6}, @samp{mips64}, @samp{mips64r2}, @samp{mips64r3},
  14101. @samp{mips64r5} and @samp{mips64r6}.
  14102. The processor names are:
  14103. @samp{4kc}, @samp{4km}, @samp{4kp}, @samp{4ksc},
  14104. @samp{4kec}, @samp{4kem}, @samp{4kep}, @samp{4ksd},
  14105. @samp{5kc}, @samp{5kf},
  14106. @samp{20kc},
  14107. @samp{24kc}, @samp{24kf2_1}, @samp{24kf1_1},
  14108. @samp{24kec}, @samp{24kef2_1}, @samp{24kef1_1},
  14109. @samp{34kc}, @samp{34kf2_1}, @samp{34kf1_1}, @samp{34kn},
  14110. @samp{74kc}, @samp{74kf2_1}, @samp{74kf1_1}, @samp{74kf3_2},
  14111. @samp{1004kc}, @samp{1004kf2_1}, @samp{1004kf1_1},
  14112. @samp{loongson2e}, @samp{loongson2f}, @samp{loongson3a},
  14113. @samp{m4k},
  14114. @samp{m14k}, @samp{m14kc}, @samp{m14ke}, @samp{m14kec},
  14115. @samp{octeon}, @samp{octeon+}, @samp{octeon2}, @samp{octeon3},
  14116. @samp{orion},
  14117. @samp{p5600},
  14118. @samp{r2000}, @samp{r3000}, @samp{r3900}, @samp{r4000}, @samp{r4400},
  14119. @samp{r4600}, @samp{r4650}, @samp{r4700}, @samp{r6000}, @samp{r8000},
  14120. @samp{rm7000}, @samp{rm9000},
  14121. @samp{r10000}, @samp{r12000}, @samp{r14000}, @samp{r16000},
  14122. @samp{sb1},
  14123. @samp{sr71000},
  14124. @samp{vr4100}, @samp{vr4111}, @samp{vr4120}, @samp{vr4130}, @samp{vr4300},
  14125. @samp{vr5000}, @samp{vr5400}, @samp{vr5500},
  14126. @samp{xlr} and @samp{xlp}.
  14127. The special value @samp{from-abi} selects the
  14128. most compatible architecture for the selected ABI (that is,
  14129. @samp{mips1} for 32-bit ABIs and @samp{mips3} for 64-bit ABIs)@.
  14130. The native Linux/GNU toolchain also supports the value @samp{native},
  14131. which selects the best architecture option for the host processor.
  14132. @option{-march=native} has no effect if GCC does not recognize
  14133. the processor.
  14134. In processor names, a final @samp{000} can be abbreviated as @samp{k}
  14135. (for example, @option{-march=r2k}). Prefixes are optional, and
  14136. @samp{vr} may be written @samp{r}.
  14137. Names of the form @samp{@var{n}f2_1} refer to processors with
  14138. FPUs clocked at half the rate of the core, names of the form
  14139. @samp{@var{n}f1_1} refer to processors with FPUs clocked at the same
  14140. rate as the core, and names of the form @samp{@var{n}f3_2} refer to
  14141. processors with FPUs clocked a ratio of 3:2 with respect to the core.
  14142. For compatibility reasons, @samp{@var{n}f} is accepted as a synonym
  14143. for @samp{@var{n}f2_1} while @samp{@var{n}x} and @samp{@var{b}fx} are
  14144. accepted as synonyms for @samp{@var{n}f1_1}.
  14145. GCC defines two macros based on the value of this option. The first
  14146. is @code{_MIPS_ARCH}, which gives the name of target architecture, as
  14147. a string. The second has the form @code{_MIPS_ARCH_@var{foo}},
  14148. where @var{foo} is the capitalized value of @code{_MIPS_ARCH}@.
  14149. For example, @option{-march=r2000} sets @code{_MIPS_ARCH}
  14150. to @code{"r2000"} and defines the macro @code{_MIPS_ARCH_R2000}.
  14151. Note that the @code{_MIPS_ARCH} macro uses the processor names given
  14152. above. In other words, it has the full prefix and does not
  14153. abbreviate @samp{000} as @samp{k}. In the case of @samp{from-abi},
  14154. the macro names the resolved architecture (either @code{"mips1"} or
  14155. @code{"mips3"}). It names the default architecture when no
  14156. @option{-march} option is given.
  14157. @item -mtune=@var{arch}
  14158. @opindex mtune
  14159. Optimize for @var{arch}. Among other things, this option controls
  14160. the way instructions are scheduled, and the perceived cost of arithmetic
  14161. operations. The list of @var{arch} values is the same as for
  14162. @option{-march}.
  14163. When this option is not used, GCC optimizes for the processor
  14164. specified by @option{-march}. By using @option{-march} and
  14165. @option{-mtune} together, it is possible to generate code that
  14166. runs on a family of processors, but optimize the code for one
  14167. particular member of that family.
  14168. @option{-mtune} defines the macros @code{_MIPS_TUNE} and
  14169. @code{_MIPS_TUNE_@var{foo}}, which work in the same way as the
  14170. @option{-march} ones described above.
  14171. @item -mips1
  14172. @opindex mips1
  14173. Equivalent to @option{-march=mips1}.
  14174. @item -mips2
  14175. @opindex mips2
  14176. Equivalent to @option{-march=mips2}.
  14177. @item -mips3
  14178. @opindex mips3
  14179. Equivalent to @option{-march=mips3}.
  14180. @item -mips4
  14181. @opindex mips4
  14182. Equivalent to @option{-march=mips4}.
  14183. @item -mips32
  14184. @opindex mips32
  14185. Equivalent to @option{-march=mips32}.
  14186. @item -mips32r3
  14187. @opindex mips32r3
  14188. Equivalent to @option{-march=mips32r3}.
  14189. @item -mips32r5
  14190. @opindex mips32r5
  14191. Equivalent to @option{-march=mips32r5}.
  14192. @item -mips32r6
  14193. @opindex mips32r6
  14194. Equivalent to @option{-march=mips32r6}.
  14195. @item -mips64
  14196. @opindex mips64
  14197. Equivalent to @option{-march=mips64}.
  14198. @item -mips64r2
  14199. @opindex mips64r2
  14200. Equivalent to @option{-march=mips64r2}.
  14201. @item -mips64r3
  14202. @opindex mips64r3
  14203. Equivalent to @option{-march=mips64r3}.
  14204. @item -mips64r5
  14205. @opindex mips64r5
  14206. Equivalent to @option{-march=mips64r5}.
  14207. @item -mips64r6
  14208. @opindex mips64r6
  14209. Equivalent to @option{-march=mips64r6}.
  14210. @item -mips16
  14211. @itemx -mno-mips16
  14212. @opindex mips16
  14213. @opindex mno-mips16
  14214. Generate (do not generate) MIPS16 code. If GCC is targeting a
  14215. MIPS32 or MIPS64 architecture, it makes use of the MIPS16e ASE@.
  14216. MIPS16 code generation can also be controlled on a per-function basis
  14217. by means of @code{mips16} and @code{nomips16} attributes.
  14218. @xref{Function Attributes}, for more information.
  14219. @item -mflip-mips16
  14220. @opindex mflip-mips16
  14221. Generate MIPS16 code on alternating functions. This option is provided
  14222. for regression testing of mixed MIPS16/non-MIPS16 code generation, and is
  14223. not intended for ordinary use in compiling user code.
  14224. @item -minterlink-compressed
  14225. @item -mno-interlink-compressed
  14226. @opindex minterlink-compressed
  14227. @opindex mno-interlink-compressed
  14228. Require (do not require) that code using the standard (uncompressed) MIPS ISA
  14229. be link-compatible with MIPS16 and microMIPS code, and vice versa.
  14230. For example, code using the standard ISA encoding cannot jump directly
  14231. to MIPS16 or microMIPS code; it must either use a call or an indirect jump.
  14232. @option{-minterlink-compressed} therefore disables direct jumps unless GCC
  14233. knows that the target of the jump is not compressed.
  14234. @item -minterlink-mips16
  14235. @itemx -mno-interlink-mips16
  14236. @opindex minterlink-mips16
  14237. @opindex mno-interlink-mips16
  14238. Aliases of @option{-minterlink-compressed} and
  14239. @option{-mno-interlink-compressed}. These options predate the microMIPS ASE
  14240. and are retained for backwards compatibility.
  14241. @item -mabi=32
  14242. @itemx -mabi=o64
  14243. @itemx -mabi=n32
  14244. @itemx -mabi=64
  14245. @itemx -mabi=eabi
  14246. @opindex mabi=32
  14247. @opindex mabi=o64
  14248. @opindex mabi=n32
  14249. @opindex mabi=64
  14250. @opindex mabi=eabi
  14251. Generate code for the given ABI@.
  14252. Note that the EABI has a 32-bit and a 64-bit variant. GCC normally
  14253. generates 64-bit code when you select a 64-bit architecture, but you
  14254. can use @option{-mgp32} to get 32-bit code instead.
  14255. For information about the O64 ABI, see
  14256. @uref{http://gcc.gnu.org/@/projects/@/mipso64-abi.html}.
  14257. GCC supports a variant of the o32 ABI in which floating-point registers
  14258. are 64 rather than 32 bits wide. You can select this combination with
  14259. @option{-mabi=32} @option{-mfp64}. This ABI relies on the @code{mthc1}
  14260. and @code{mfhc1} instructions and is therefore only supported for
  14261. MIPS32R2, MIPS32R3 and MIPS32R5 processors.
  14262. The register assignments for arguments and return values remain the
  14263. same, but each scalar value is passed in a single 64-bit register
  14264. rather than a pair of 32-bit registers. For example, scalar
  14265. floating-point values are returned in @samp{$f0} only, not a
  14266. @samp{$f0}/@samp{$f1} pair. The set of call-saved registers also
  14267. remains the same in that the even-numbered double-precision registers
  14268. are saved.
  14269. Two additional variants of the o32 ABI are supported to enable
  14270. a transition from 32-bit to 64-bit registers. These are FPXX
  14271. (@option{-mfpxx}) and FP64A (@option{-mfp64} @option{-mno-odd-spreg}).
  14272. The FPXX extension mandates that all code must execute correctly
  14273. when run using 32-bit or 64-bit registers. The code can be interlinked
  14274. with either FP32 or FP64, but not both.
  14275. The FP64A extension is similar to the FP64 extension but forbids the
  14276. use of odd-numbered single-precision registers. This can be used
  14277. in conjunction with the @code{FRE} mode of FPUs in MIPS32R5
  14278. processors and allows both FP32 and FP64A code to interlink and
  14279. run in the same process without changing FPU modes.
  14280. @item -mabicalls
  14281. @itemx -mno-abicalls
  14282. @opindex mabicalls
  14283. @opindex mno-abicalls
  14284. Generate (do not generate) code that is suitable for SVR4-style
  14285. dynamic objects. @option{-mabicalls} is the default for SVR4-based
  14286. systems.
  14287. @item -mshared
  14288. @itemx -mno-shared
  14289. Generate (do not generate) code that is fully position-independent,
  14290. and that can therefore be linked into shared libraries. This option
  14291. only affects @option{-mabicalls}.
  14292. All @option{-mabicalls} code has traditionally been position-independent,
  14293. regardless of options like @option{-fPIC} and @option{-fpic}. However,
  14294. as an extension, the GNU toolchain allows executables to use absolute
  14295. accesses for locally-binding symbols. It can also use shorter GP
  14296. initialization sequences and generate direct calls to locally-defined
  14297. functions. This mode is selected by @option{-mno-shared}.
  14298. @option{-mno-shared} depends on binutils 2.16 or higher and generates
  14299. objects that can only be linked by the GNU linker. However, the option
  14300. does not affect the ABI of the final executable; it only affects the ABI
  14301. of relocatable objects. Using @option{-mno-shared} generally makes
  14302. executables both smaller and quicker.
  14303. @option{-mshared} is the default.
  14304. @item -mplt
  14305. @itemx -mno-plt
  14306. @opindex mplt
  14307. @opindex mno-plt
  14308. Assume (do not assume) that the static and dynamic linkers
  14309. support PLTs and copy relocations. This option only affects
  14310. @option{-mno-shared -mabicalls}. For the n64 ABI, this option
  14311. has no effect without @option{-msym32}.
  14312. You can make @option{-mplt} the default by configuring
  14313. GCC with @option{--with-mips-plt}. The default is
  14314. @option{-mno-plt} otherwise.
  14315. @item -mxgot
  14316. @itemx -mno-xgot
  14317. @opindex mxgot
  14318. @opindex mno-xgot
  14319. Lift (do not lift) the usual restrictions on the size of the global
  14320. offset table.
  14321. GCC normally uses a single instruction to load values from the GOT@.
  14322. While this is relatively efficient, it only works if the GOT
  14323. is smaller than about 64k. Anything larger causes the linker
  14324. to report an error such as:
  14325. @cindex relocation truncated to fit (MIPS)
  14326. @smallexample
  14327. relocation truncated to fit: R_MIPS_GOT16 foobar
  14328. @end smallexample
  14329. If this happens, you should recompile your code with @option{-mxgot}.
  14330. This works with very large GOTs, although the code is also
  14331. less efficient, since it takes three instructions to fetch the
  14332. value of a global symbol.
  14333. Note that some linkers can create multiple GOTs. If you have such a
  14334. linker, you should only need to use @option{-mxgot} when a single object
  14335. file accesses more than 64k's worth of GOT entries. Very few do.
  14336. These options have no effect unless GCC is generating position
  14337. independent code.
  14338. @item -mgp32
  14339. @opindex mgp32
  14340. Assume that general-purpose registers are 32 bits wide.
  14341. @item -mgp64
  14342. @opindex mgp64
  14343. Assume that general-purpose registers are 64 bits wide.
  14344. @item -mfp32
  14345. @opindex mfp32
  14346. Assume that floating-point registers are 32 bits wide.
  14347. @item -mfp64
  14348. @opindex mfp64
  14349. Assume that floating-point registers are 64 bits wide.
  14350. @item -mfpxx
  14351. @opindex mfpxx
  14352. Do not assume the width of floating-point registers.
  14353. @item -mhard-float
  14354. @opindex mhard-float
  14355. Use floating-point coprocessor instructions.
  14356. @item -msoft-float
  14357. @opindex msoft-float
  14358. Do not use floating-point coprocessor instructions. Implement
  14359. floating-point calculations using library calls instead.
  14360. @item -mno-float
  14361. @opindex mno-float
  14362. Equivalent to @option{-msoft-float}, but additionally asserts that the
  14363. program being compiled does not perform any floating-point operations.
  14364. This option is presently supported only by some bare-metal MIPS
  14365. configurations, where it may select a special set of libraries
  14366. that lack all floating-point support (including, for example, the
  14367. floating-point @code{printf} formats).
  14368. If code compiled with @option{-mno-float} accidentally contains
  14369. floating-point operations, it is likely to suffer a link-time
  14370. or run-time failure.
  14371. @item -msingle-float
  14372. @opindex msingle-float
  14373. Assume that the floating-point coprocessor only supports single-precision
  14374. operations.
  14375. @item -mdouble-float
  14376. @opindex mdouble-float
  14377. Assume that the floating-point coprocessor supports double-precision
  14378. operations. This is the default.
  14379. @item -modd-spreg
  14380. @itemx -mno-odd-spreg
  14381. @opindex modd-spreg
  14382. @opindex mno-odd-spreg
  14383. Enable the use of odd-numbered single-precision floating-point registers
  14384. for the o32 ABI. This is the default for processors that are known to
  14385. support these registers. When using the o32 FPXX ABI, @option{-mno-odd-spreg}
  14386. is set by default.
  14387. @item -mabs=2008
  14388. @itemx -mabs=legacy
  14389. @opindex mabs=2008
  14390. @opindex mabs=legacy
  14391. These options control the treatment of the special not-a-number (NaN)
  14392. IEEE 754 floating-point data with the @code{abs.@i{fmt}} and
  14393. @code{neg.@i{fmt}} machine instructions.
  14394. By default or when @option{-mabs=legacy} is used the legacy
  14395. treatment is selected. In this case these instructions are considered
  14396. arithmetic and avoided where correct operation is required and the
  14397. input operand might be a NaN. A longer sequence of instructions that
  14398. manipulate the sign bit of floating-point datum manually is used
  14399. instead unless the @option{-ffinite-math-only} option has also been
  14400. specified.
  14401. The @option{-mabs=2008} option selects the IEEE 754-2008 treatment. In
  14402. this case these instructions are considered non-arithmetic and therefore
  14403. operating correctly in all cases, including in particular where the
  14404. input operand is a NaN. These instructions are therefore always used
  14405. for the respective operations.
  14406. @item -mnan=2008
  14407. @itemx -mnan=legacy
  14408. @opindex mnan=2008
  14409. @opindex mnan=legacy
  14410. These options control the encoding of the special not-a-number (NaN)
  14411. IEEE 754 floating-point data.
  14412. The @option{-mnan=legacy} option selects the legacy encoding. In this
  14413. case quiet NaNs (qNaNs) are denoted by the first bit of their trailing
  14414. significand field being 0, whereas signalling NaNs (sNaNs) are denoted
  14415. by the first bit of their trailing significand field being 1.
  14416. The @option{-mnan=2008} option selects the IEEE 754-2008 encoding. In
  14417. this case qNaNs are denoted by the first bit of their trailing
  14418. significand field being 1, whereas sNaNs are denoted by the first bit of
  14419. their trailing significand field being 0.
  14420. The default is @option{-mnan=legacy} unless GCC has been configured with
  14421. @option{--with-nan=2008}.
  14422. @item -mllsc
  14423. @itemx -mno-llsc
  14424. @opindex mllsc
  14425. @opindex mno-llsc
  14426. Use (do not use) @samp{ll}, @samp{sc}, and @samp{sync} instructions to
  14427. implement atomic memory built-in functions. When neither option is
  14428. specified, GCC uses the instructions if the target architecture
  14429. supports them.
  14430. @option{-mllsc} is useful if the runtime environment can emulate the
  14431. instructions and @option{-mno-llsc} can be useful when compiling for
  14432. nonstandard ISAs. You can make either option the default by
  14433. configuring GCC with @option{--with-llsc} and @option{--without-llsc}
  14434. respectively. @option{--with-llsc} is the default for some
  14435. configurations; see the installation documentation for details.
  14436. @item -mdsp
  14437. @itemx -mno-dsp
  14438. @opindex mdsp
  14439. @opindex mno-dsp
  14440. Use (do not use) revision 1 of the MIPS DSP ASE@.
  14441. @xref{MIPS DSP Built-in Functions}. This option defines the
  14442. preprocessor macro @code{__mips_dsp}. It also defines
  14443. @code{__mips_dsp_rev} to 1.
  14444. @item -mdspr2
  14445. @itemx -mno-dspr2
  14446. @opindex mdspr2
  14447. @opindex mno-dspr2
  14448. Use (do not use) revision 2 of the MIPS DSP ASE@.
  14449. @xref{MIPS DSP Built-in Functions}. This option defines the
  14450. preprocessor macros @code{__mips_dsp} and @code{__mips_dspr2}.
  14451. It also defines @code{__mips_dsp_rev} to 2.
  14452. @item -msmartmips
  14453. @itemx -mno-smartmips
  14454. @opindex msmartmips
  14455. @opindex mno-smartmips
  14456. Use (do not use) the MIPS SmartMIPS ASE.
  14457. @item -mpaired-single
  14458. @itemx -mno-paired-single
  14459. @opindex mpaired-single
  14460. @opindex mno-paired-single
  14461. Use (do not use) paired-single floating-point instructions.
  14462. @xref{MIPS Paired-Single Support}. This option requires
  14463. hardware floating-point support to be enabled.
  14464. @item -mdmx
  14465. @itemx -mno-mdmx
  14466. @opindex mdmx
  14467. @opindex mno-mdmx
  14468. Use (do not use) MIPS Digital Media Extension instructions.
  14469. This option can only be used when generating 64-bit code and requires
  14470. hardware floating-point support to be enabled.
  14471. @item -mips3d
  14472. @itemx -mno-mips3d
  14473. @opindex mips3d
  14474. @opindex mno-mips3d
  14475. Use (do not use) the MIPS-3D ASE@. @xref{MIPS-3D Built-in Functions}.
  14476. The option @option{-mips3d} implies @option{-mpaired-single}.
  14477. @item -mmicromips
  14478. @itemx -mno-micromips
  14479. @opindex mmicromips
  14480. @opindex mno-mmicromips
  14481. Generate (do not generate) microMIPS code.
  14482. MicroMIPS code generation can also be controlled on a per-function basis
  14483. by means of @code{micromips} and @code{nomicromips} attributes.
  14484. @xref{Function Attributes}, for more information.
  14485. @item -mmt
  14486. @itemx -mno-mt
  14487. @opindex mmt
  14488. @opindex mno-mt
  14489. Use (do not use) MT Multithreading instructions.
  14490. @item -mmcu
  14491. @itemx -mno-mcu
  14492. @opindex mmcu
  14493. @opindex mno-mcu
  14494. Use (do not use) the MIPS MCU ASE instructions.
  14495. @item -meva
  14496. @itemx -mno-eva
  14497. @opindex meva
  14498. @opindex mno-eva
  14499. Use (do not use) the MIPS Enhanced Virtual Addressing instructions.
  14500. @item -mvirt
  14501. @itemx -mno-virt
  14502. @opindex mvirt
  14503. @opindex mno-virt
  14504. Use (do not use) the MIPS Virtualization Application Specific instructions.
  14505. @item -mxpa
  14506. @itemx -mno-xpa
  14507. @opindex mxpa
  14508. @opindex mno-xpa
  14509. Use (do not use) the MIPS eXtended Physical Address (XPA) instructions.
  14510. @item -mlong64
  14511. @opindex mlong64
  14512. Force @code{long} types to be 64 bits wide. See @option{-mlong32} for
  14513. an explanation of the default and the way that the pointer size is
  14514. determined.
  14515. @item -mlong32
  14516. @opindex mlong32
  14517. Force @code{long}, @code{int}, and pointer types to be 32 bits wide.
  14518. The default size of @code{int}s, @code{long}s and pointers depends on
  14519. the ABI@. All the supported ABIs use 32-bit @code{int}s. The n64 ABI
  14520. uses 64-bit @code{long}s, as does the 64-bit EABI; the others use
  14521. 32-bit @code{long}s. Pointers are the same size as @code{long}s,
  14522. or the same size as integer registers, whichever is smaller.
  14523. @item -msym32
  14524. @itemx -mno-sym32
  14525. @opindex msym32
  14526. @opindex mno-sym32
  14527. Assume (do not assume) that all symbols have 32-bit values, regardless
  14528. of the selected ABI@. This option is useful in combination with
  14529. @option{-mabi=64} and @option{-mno-abicalls} because it allows GCC
  14530. to generate shorter and faster references to symbolic addresses.
  14531. @item -G @var{num}
  14532. @opindex G
  14533. Put definitions of externally-visible data in a small data section
  14534. if that data is no bigger than @var{num} bytes. GCC can then generate
  14535. more efficient accesses to the data; see @option{-mgpopt} for details.
  14536. The default @option{-G} option depends on the configuration.
  14537. @item -mlocal-sdata
  14538. @itemx -mno-local-sdata
  14539. @opindex mlocal-sdata
  14540. @opindex mno-local-sdata
  14541. Extend (do not extend) the @option{-G} behavior to local data too,
  14542. such as to static variables in C@. @option{-mlocal-sdata} is the
  14543. default for all configurations.
  14544. If the linker complains that an application is using too much small data,
  14545. you might want to try rebuilding the less performance-critical parts with
  14546. @option{-mno-local-sdata}. You might also want to build large
  14547. libraries with @option{-mno-local-sdata}, so that the libraries leave
  14548. more room for the main program.
  14549. @item -mextern-sdata
  14550. @itemx -mno-extern-sdata
  14551. @opindex mextern-sdata
  14552. @opindex mno-extern-sdata
  14553. Assume (do not assume) that externally-defined data is in
  14554. a small data section if the size of that data is within the @option{-G} limit.
  14555. @option{-mextern-sdata} is the default for all configurations.
  14556. If you compile a module @var{Mod} with @option{-mextern-sdata} @option{-G
  14557. @var{num}} @option{-mgpopt}, and @var{Mod} references a variable @var{Var}
  14558. that is no bigger than @var{num} bytes, you must make sure that @var{Var}
  14559. is placed in a small data section. If @var{Var} is defined by another
  14560. module, you must either compile that module with a high-enough
  14561. @option{-G} setting or attach a @code{section} attribute to @var{Var}'s
  14562. definition. If @var{Var} is common, you must link the application
  14563. with a high-enough @option{-G} setting.
  14564. The easiest way of satisfying these restrictions is to compile
  14565. and link every module with the same @option{-G} option. However,
  14566. you may wish to build a library that supports several different
  14567. small data limits. You can do this by compiling the library with
  14568. the highest supported @option{-G} setting and additionally using
  14569. @option{-mno-extern-sdata} to stop the library from making assumptions
  14570. about externally-defined data.
  14571. @item -mgpopt
  14572. @itemx -mno-gpopt
  14573. @opindex mgpopt
  14574. @opindex mno-gpopt
  14575. Use (do not use) GP-relative accesses for symbols that are known to be
  14576. in a small data section; see @option{-G}, @option{-mlocal-sdata} and
  14577. @option{-mextern-sdata}. @option{-mgpopt} is the default for all
  14578. configurations.
  14579. @option{-mno-gpopt} is useful for cases where the @code{$gp} register
  14580. might not hold the value of @code{_gp}. For example, if the code is
  14581. part of a library that might be used in a boot monitor, programs that
  14582. call boot monitor routines pass an unknown value in @code{$gp}.
  14583. (In such situations, the boot monitor itself is usually compiled
  14584. with @option{-G0}.)
  14585. @option{-mno-gpopt} implies @option{-mno-local-sdata} and
  14586. @option{-mno-extern-sdata}.
  14587. @item -membedded-data
  14588. @itemx -mno-embedded-data
  14589. @opindex membedded-data
  14590. @opindex mno-embedded-data
  14591. Allocate variables to the read-only data section first if possible, then
  14592. next in the small data section if possible, otherwise in data. This gives
  14593. slightly slower code than the default, but reduces the amount of RAM required
  14594. when executing, and thus may be preferred for some embedded systems.
  14595. @item -muninit-const-in-rodata
  14596. @itemx -mno-uninit-const-in-rodata
  14597. @opindex muninit-const-in-rodata
  14598. @opindex mno-uninit-const-in-rodata
  14599. Put uninitialized @code{const} variables in the read-only data section.
  14600. This option is only meaningful in conjunction with @option{-membedded-data}.
  14601. @item -mcode-readable=@var{setting}
  14602. @opindex mcode-readable
  14603. Specify whether GCC may generate code that reads from executable sections.
  14604. There are three possible settings:
  14605. @table @gcctabopt
  14606. @item -mcode-readable=yes
  14607. Instructions may freely access executable sections. This is the
  14608. default setting.
  14609. @item -mcode-readable=pcrel
  14610. MIPS16 PC-relative load instructions can access executable sections,
  14611. but other instructions must not do so. This option is useful on 4KSc
  14612. and 4KSd processors when the code TLBs have the Read Inhibit bit set.
  14613. It is also useful on processors that can be configured to have a dual
  14614. instruction/data SRAM interface and that, like the M4K, automatically
  14615. redirect PC-relative loads to the instruction RAM.
  14616. @item -mcode-readable=no
  14617. Instructions must not access executable sections. This option can be
  14618. useful on targets that are configured to have a dual instruction/data
  14619. SRAM interface but that (unlike the M4K) do not automatically redirect
  14620. PC-relative loads to the instruction RAM.
  14621. @end table
  14622. @item -msplit-addresses
  14623. @itemx -mno-split-addresses
  14624. @opindex msplit-addresses
  14625. @opindex mno-split-addresses
  14626. Enable (disable) use of the @code{%hi()} and @code{%lo()} assembler
  14627. relocation operators. This option has been superseded by
  14628. @option{-mexplicit-relocs} but is retained for backwards compatibility.
  14629. @item -mexplicit-relocs
  14630. @itemx -mno-explicit-relocs
  14631. @opindex mexplicit-relocs
  14632. @opindex mno-explicit-relocs
  14633. Use (do not use) assembler relocation operators when dealing with symbolic
  14634. addresses. The alternative, selected by @option{-mno-explicit-relocs},
  14635. is to use assembler macros instead.
  14636. @option{-mexplicit-relocs} is the default if GCC was configured
  14637. to use an assembler that supports relocation operators.
  14638. @item -mcheck-zero-division
  14639. @itemx -mno-check-zero-division
  14640. @opindex mcheck-zero-division
  14641. @opindex mno-check-zero-division
  14642. Trap (do not trap) on integer division by zero.
  14643. The default is @option{-mcheck-zero-division}.
  14644. @item -mdivide-traps
  14645. @itemx -mdivide-breaks
  14646. @opindex mdivide-traps
  14647. @opindex mdivide-breaks
  14648. MIPS systems check for division by zero by generating either a
  14649. conditional trap or a break instruction. Using traps results in
  14650. smaller code, but is only supported on MIPS II and later. Also, some
  14651. versions of the Linux kernel have a bug that prevents trap from
  14652. generating the proper signal (@code{SIGFPE}). Use @option{-mdivide-traps} to
  14653. allow conditional traps on architectures that support them and
  14654. @option{-mdivide-breaks} to force the use of breaks.
  14655. The default is usually @option{-mdivide-traps}, but this can be
  14656. overridden at configure time using @option{--with-divide=breaks}.
  14657. Divide-by-zero checks can be completely disabled using
  14658. @option{-mno-check-zero-division}.
  14659. @item -mmemcpy
  14660. @itemx -mno-memcpy
  14661. @opindex mmemcpy
  14662. @opindex mno-memcpy
  14663. Force (do not force) the use of @code{memcpy} for non-trivial block
  14664. moves. The default is @option{-mno-memcpy}, which allows GCC to inline
  14665. most constant-sized copies.
  14666. @item -mlong-calls
  14667. @itemx -mno-long-calls
  14668. @opindex mlong-calls
  14669. @opindex mno-long-calls
  14670. Disable (do not disable) use of the @code{jal} instruction. Calling
  14671. functions using @code{jal} is more efficient but requires the caller
  14672. and callee to be in the same 256 megabyte segment.
  14673. This option has no effect on abicalls code. The default is
  14674. @option{-mno-long-calls}.
  14675. @item -mmad
  14676. @itemx -mno-mad
  14677. @opindex mmad
  14678. @opindex mno-mad
  14679. Enable (disable) use of the @code{mad}, @code{madu} and @code{mul}
  14680. instructions, as provided by the R4650 ISA@.
  14681. @item -mimadd
  14682. @itemx -mno-imadd
  14683. @opindex mimadd
  14684. @opindex mno-imadd
  14685. Enable (disable) use of the @code{madd} and @code{msub} integer
  14686. instructions. The default is @option{-mimadd} on architectures
  14687. that support @code{madd} and @code{msub} except for the 74k
  14688. architecture where it was found to generate slower code.
  14689. @item -mfused-madd
  14690. @itemx -mno-fused-madd
  14691. @opindex mfused-madd
  14692. @opindex mno-fused-madd
  14693. Enable (disable) use of the floating-point multiply-accumulate
  14694. instructions, when they are available. The default is
  14695. @option{-mfused-madd}.
  14696. On the R8000 CPU when multiply-accumulate instructions are used,
  14697. the intermediate product is calculated to infinite precision
  14698. and is not subject to the FCSR Flush to Zero bit. This may be
  14699. undesirable in some circumstances. On other processors the result
  14700. is numerically identical to the equivalent computation using
  14701. separate multiply, add, subtract and negate instructions.
  14702. @item -nocpp
  14703. @opindex nocpp
  14704. Tell the MIPS assembler to not run its preprocessor over user
  14705. assembler files (with a @samp{.s} suffix) when assembling them.
  14706. @item -mfix-24k
  14707. @item -mno-fix-24k
  14708. @opindex mfix-24k
  14709. @opindex mno-fix-24k
  14710. Work around the 24K E48 (lost data on stores during refill) errata.
  14711. The workarounds are implemented by the assembler rather than by GCC@.
  14712. @item -mfix-r4000
  14713. @itemx -mno-fix-r4000
  14714. @opindex mfix-r4000
  14715. @opindex mno-fix-r4000
  14716. Work around certain R4000 CPU errata:
  14717. @itemize @minus
  14718. @item
  14719. A double-word or a variable shift may give an incorrect result if executed
  14720. immediately after starting an integer division.
  14721. @item
  14722. A double-word or a variable shift may give an incorrect result if executed
  14723. while an integer multiplication is in progress.
  14724. @item
  14725. An integer division may give an incorrect result if started in a delay slot
  14726. of a taken branch or a jump.
  14727. @end itemize
  14728. @item -mfix-r4400
  14729. @itemx -mno-fix-r4400
  14730. @opindex mfix-r4400
  14731. @opindex mno-fix-r4400
  14732. Work around certain R4400 CPU errata:
  14733. @itemize @minus
  14734. @item
  14735. A double-word or a variable shift may give an incorrect result if executed
  14736. immediately after starting an integer division.
  14737. @end itemize
  14738. @item -mfix-r10000
  14739. @itemx -mno-fix-r10000
  14740. @opindex mfix-r10000
  14741. @opindex mno-fix-r10000
  14742. Work around certain R10000 errata:
  14743. @itemize @minus
  14744. @item
  14745. @code{ll}/@code{sc} sequences may not behave atomically on revisions
  14746. prior to 3.0. They may deadlock on revisions 2.6 and earlier.
  14747. @end itemize
  14748. This option can only be used if the target architecture supports
  14749. branch-likely instructions. @option{-mfix-r10000} is the default when
  14750. @option{-march=r10000} is used; @option{-mno-fix-r10000} is the default
  14751. otherwise.
  14752. @item -mfix-rm7000
  14753. @itemx -mno-fix-rm7000
  14754. @opindex mfix-rm7000
  14755. Work around the RM7000 @code{dmult}/@code{dmultu} errata. The
  14756. workarounds are implemented by the assembler rather than by GCC@.
  14757. @item -mfix-vr4120
  14758. @itemx -mno-fix-vr4120
  14759. @opindex mfix-vr4120
  14760. Work around certain VR4120 errata:
  14761. @itemize @minus
  14762. @item
  14763. @code{dmultu} does not always produce the correct result.
  14764. @item
  14765. @code{div} and @code{ddiv} do not always produce the correct result if one
  14766. of the operands is negative.
  14767. @end itemize
  14768. The workarounds for the division errata rely on special functions in
  14769. @file{libgcc.a}. At present, these functions are only provided by
  14770. the @code{mips64vr*-elf} configurations.
  14771. Other VR4120 errata require a NOP to be inserted between certain pairs of
  14772. instructions. These errata are handled by the assembler, not by GCC itself.
  14773. @item -mfix-vr4130
  14774. @opindex mfix-vr4130
  14775. Work around the VR4130 @code{mflo}/@code{mfhi} errata. The
  14776. workarounds are implemented by the assembler rather than by GCC,
  14777. although GCC avoids using @code{mflo} and @code{mfhi} if the
  14778. VR4130 @code{macc}, @code{macchi}, @code{dmacc} and @code{dmacchi}
  14779. instructions are available instead.
  14780. @item -mfix-sb1
  14781. @itemx -mno-fix-sb1
  14782. @opindex mfix-sb1
  14783. Work around certain SB-1 CPU core errata.
  14784. (This flag currently works around the SB-1 revision 2
  14785. ``F1'' and ``F2'' floating-point errata.)
  14786. @item -mr10k-cache-barrier=@var{setting}
  14787. @opindex mr10k-cache-barrier
  14788. Specify whether GCC should insert cache barriers to avoid the
  14789. side-effects of speculation on R10K processors.
  14790. In common with many processors, the R10K tries to predict the outcome
  14791. of a conditional branch and speculatively executes instructions from
  14792. the ``taken'' branch. It later aborts these instructions if the
  14793. predicted outcome is wrong. However, on the R10K, even aborted
  14794. instructions can have side effects.
  14795. This problem only affects kernel stores and, depending on the system,
  14796. kernel loads. As an example, a speculatively-executed store may load
  14797. the target memory into cache and mark the cache line as dirty, even if
  14798. the store itself is later aborted. If a DMA operation writes to the
  14799. same area of memory before the ``dirty'' line is flushed, the cached
  14800. data overwrites the DMA-ed data. See the R10K processor manual
  14801. for a full description, including other potential problems.
  14802. One workaround is to insert cache barrier instructions before every memory
  14803. access that might be speculatively executed and that might have side
  14804. effects even if aborted. @option{-mr10k-cache-barrier=@var{setting}}
  14805. controls GCC's implementation of this workaround. It assumes that
  14806. aborted accesses to any byte in the following regions does not have
  14807. side effects:
  14808. @enumerate
  14809. @item
  14810. the memory occupied by the current function's stack frame;
  14811. @item
  14812. the memory occupied by an incoming stack argument;
  14813. @item
  14814. the memory occupied by an object with a link-time-constant address.
  14815. @end enumerate
  14816. It is the kernel's responsibility to ensure that speculative
  14817. accesses to these regions are indeed safe.
  14818. If the input program contains a function declaration such as:
  14819. @smallexample
  14820. void foo (void);
  14821. @end smallexample
  14822. then the implementation of @code{foo} must allow @code{j foo} and
  14823. @code{jal foo} to be executed speculatively. GCC honors this
  14824. restriction for functions it compiles itself. It expects non-GCC
  14825. functions (such as hand-written assembly code) to do the same.
  14826. The option has three forms:
  14827. @table @gcctabopt
  14828. @item -mr10k-cache-barrier=load-store
  14829. Insert a cache barrier before a load or store that might be
  14830. speculatively executed and that might have side effects even
  14831. if aborted.
  14832. @item -mr10k-cache-barrier=store
  14833. Insert a cache barrier before a store that might be speculatively
  14834. executed and that might have side effects even if aborted.
  14835. @item -mr10k-cache-barrier=none
  14836. Disable the insertion of cache barriers. This is the default setting.
  14837. @end table
  14838. @item -mflush-func=@var{func}
  14839. @itemx -mno-flush-func
  14840. @opindex mflush-func
  14841. Specifies the function to call to flush the I and D caches, or to not
  14842. call any such function. If called, the function must take the same
  14843. arguments as the common @code{_flush_func}, that is, the address of the
  14844. memory range for which the cache is being flushed, the size of the
  14845. memory range, and the number 3 (to flush both caches). The default
  14846. depends on the target GCC was configured for, but commonly is either
  14847. @code{_flush_func} or @code{__cpu_flush}.
  14848. @item mbranch-cost=@var{num}
  14849. @opindex mbranch-cost
  14850. Set the cost of branches to roughly @var{num} ``simple'' instructions.
  14851. This cost is only a heuristic and is not guaranteed to produce
  14852. consistent results across releases. A zero cost redundantly selects
  14853. the default, which is based on the @option{-mtune} setting.
  14854. @item -mbranch-likely
  14855. @itemx -mno-branch-likely
  14856. @opindex mbranch-likely
  14857. @opindex mno-branch-likely
  14858. Enable or disable use of Branch Likely instructions, regardless of the
  14859. default for the selected architecture. By default, Branch Likely
  14860. instructions may be generated if they are supported by the selected
  14861. architecture. An exception is for the MIPS32 and MIPS64 architectures
  14862. and processors that implement those architectures; for those, Branch
  14863. Likely instructions are not be generated by default because the MIPS32
  14864. and MIPS64 architectures specifically deprecate their use.
  14865. @item -mfp-exceptions
  14866. @itemx -mno-fp-exceptions
  14867. @opindex mfp-exceptions
  14868. Specifies whether FP exceptions are enabled. This affects how
  14869. FP instructions are scheduled for some processors.
  14870. The default is that FP exceptions are
  14871. enabled.
  14872. For instance, on the SB-1, if FP exceptions are disabled, and we are emitting
  14873. 64-bit code, then we can use both FP pipes. Otherwise, we can only use one
  14874. FP pipe.
  14875. @item -mvr4130-align
  14876. @itemx -mno-vr4130-align
  14877. @opindex mvr4130-align
  14878. The VR4130 pipeline is two-way superscalar, but can only issue two
  14879. instructions together if the first one is 8-byte aligned. When this
  14880. option is enabled, GCC aligns pairs of instructions that it
  14881. thinks should execute in parallel.
  14882. This option only has an effect when optimizing for the VR4130.
  14883. It normally makes code faster, but at the expense of making it bigger.
  14884. It is enabled by default at optimization level @option{-O3}.
  14885. @item -msynci
  14886. @itemx -mno-synci
  14887. @opindex msynci
  14888. Enable (disable) generation of @code{synci} instructions on
  14889. architectures that support it. The @code{synci} instructions (if
  14890. enabled) are generated when @code{__builtin___clear_cache} is
  14891. compiled.
  14892. This option defaults to @option{-mno-synci}, but the default can be
  14893. overridden by configuring GCC with @option{--with-synci}.
  14894. When compiling code for single processor systems, it is generally safe
  14895. to use @code{synci}. However, on many multi-core (SMP) systems, it
  14896. does not invalidate the instruction caches on all cores and may lead
  14897. to undefined behavior.
  14898. @item -mrelax-pic-calls
  14899. @itemx -mno-relax-pic-calls
  14900. @opindex mrelax-pic-calls
  14901. Try to turn PIC calls that are normally dispatched via register
  14902. @code{$25} into direct calls. This is only possible if the linker can
  14903. resolve the destination at link-time and if the destination is within
  14904. range for a direct call.
  14905. @option{-mrelax-pic-calls} is the default if GCC was configured to use
  14906. an assembler and a linker that support the @code{.reloc} assembly
  14907. directive and @option{-mexplicit-relocs} is in effect. With
  14908. @option{-mno-explicit-relocs}, this optimization can be performed by the
  14909. assembler and the linker alone without help from the compiler.
  14910. @item -mmcount-ra-address
  14911. @itemx -mno-mcount-ra-address
  14912. @opindex mmcount-ra-address
  14913. @opindex mno-mcount-ra-address
  14914. Emit (do not emit) code that allows @code{_mcount} to modify the
  14915. calling function's return address. When enabled, this option extends
  14916. the usual @code{_mcount} interface with a new @var{ra-address}
  14917. parameter, which has type @code{intptr_t *} and is passed in register
  14918. @code{$12}. @code{_mcount} can then modify the return address by
  14919. doing both of the following:
  14920. @itemize
  14921. @item
  14922. Returning the new address in register @code{$31}.
  14923. @item
  14924. Storing the new address in @code{*@var{ra-address}},
  14925. if @var{ra-address} is nonnull.
  14926. @end itemize
  14927. The default is @option{-mno-mcount-ra-address}.
  14928. @end table
  14929. @node MMIX Options
  14930. @subsection MMIX Options
  14931. @cindex MMIX Options
  14932. These options are defined for the MMIX:
  14933. @table @gcctabopt
  14934. @item -mlibfuncs
  14935. @itemx -mno-libfuncs
  14936. @opindex mlibfuncs
  14937. @opindex mno-libfuncs
  14938. Specify that intrinsic library functions are being compiled, passing all
  14939. values in registers, no matter the size.
  14940. @item -mepsilon
  14941. @itemx -mno-epsilon
  14942. @opindex mepsilon
  14943. @opindex mno-epsilon
  14944. Generate floating-point comparison instructions that compare with respect
  14945. to the @code{rE} epsilon register.
  14946. @item -mabi=mmixware
  14947. @itemx -mabi=gnu
  14948. @opindex mabi=mmixware
  14949. @opindex mabi=gnu
  14950. Generate code that passes function parameters and return values that (in
  14951. the called function) are seen as registers @code{$0} and up, as opposed to
  14952. the GNU ABI which uses global registers @code{$231} and up.
  14953. @item -mzero-extend
  14954. @itemx -mno-zero-extend
  14955. @opindex mzero-extend
  14956. @opindex mno-zero-extend
  14957. When reading data from memory in sizes shorter than 64 bits, use (do not
  14958. use) zero-extending load instructions by default, rather than
  14959. sign-extending ones.
  14960. @item -mknuthdiv
  14961. @itemx -mno-knuthdiv
  14962. @opindex mknuthdiv
  14963. @opindex mno-knuthdiv
  14964. Make the result of a division yielding a remainder have the same sign as
  14965. the divisor. With the default, @option{-mno-knuthdiv}, the sign of the
  14966. remainder follows the sign of the dividend. Both methods are
  14967. arithmetically valid, the latter being almost exclusively used.
  14968. @item -mtoplevel-symbols
  14969. @itemx -mno-toplevel-symbols
  14970. @opindex mtoplevel-symbols
  14971. @opindex mno-toplevel-symbols
  14972. Prepend (do not prepend) a @samp{:} to all global symbols, so the assembly
  14973. code can be used with the @code{PREFIX} assembly directive.
  14974. @item -melf
  14975. @opindex melf
  14976. Generate an executable in the ELF format, rather than the default
  14977. @samp{mmo} format used by the @command{mmix} simulator.
  14978. @item -mbranch-predict
  14979. @itemx -mno-branch-predict
  14980. @opindex mbranch-predict
  14981. @opindex mno-branch-predict
  14982. Use (do not use) the probable-branch instructions, when static branch
  14983. prediction indicates a probable branch.
  14984. @item -mbase-addresses
  14985. @itemx -mno-base-addresses
  14986. @opindex mbase-addresses
  14987. @opindex mno-base-addresses
  14988. Generate (do not generate) code that uses @emph{base addresses}. Using a
  14989. base address automatically generates a request (handled by the assembler
  14990. and the linker) for a constant to be set up in a global register. The
  14991. register is used for one or more base address requests within the range 0
  14992. to 255 from the value held in the register. The generally leads to short
  14993. and fast code, but the number of different data items that can be
  14994. addressed is limited. This means that a program that uses lots of static
  14995. data may require @option{-mno-base-addresses}.
  14996. @item -msingle-exit
  14997. @itemx -mno-single-exit
  14998. @opindex msingle-exit
  14999. @opindex mno-single-exit
  15000. Force (do not force) generated code to have a single exit point in each
  15001. function.
  15002. @end table
  15003. @node MN10300 Options
  15004. @subsection MN10300 Options
  15005. @cindex MN10300 options
  15006. These @option{-m} options are defined for Matsushita MN10300 architectures:
  15007. @table @gcctabopt
  15008. @item -mmult-bug
  15009. @opindex mmult-bug
  15010. Generate code to avoid bugs in the multiply instructions for the MN10300
  15011. processors. This is the default.
  15012. @item -mno-mult-bug
  15013. @opindex mno-mult-bug
  15014. Do not generate code to avoid bugs in the multiply instructions for the
  15015. MN10300 processors.
  15016. @item -mam33
  15017. @opindex mam33
  15018. Generate code using features specific to the AM33 processor.
  15019. @item -mno-am33
  15020. @opindex mno-am33
  15021. Do not generate code using features specific to the AM33 processor. This
  15022. is the default.
  15023. @item -mam33-2
  15024. @opindex mam33-2
  15025. Generate code using features specific to the AM33/2.0 processor.
  15026. @item -mam34
  15027. @opindex mam34
  15028. Generate code using features specific to the AM34 processor.
  15029. @item -mtune=@var{cpu-type}
  15030. @opindex mtune
  15031. Use the timing characteristics of the indicated CPU type when
  15032. scheduling instructions. This does not change the targeted processor
  15033. type. The CPU type must be one of @samp{mn10300}, @samp{am33},
  15034. @samp{am33-2} or @samp{am34}.
  15035. @item -mreturn-pointer-on-d0
  15036. @opindex mreturn-pointer-on-d0
  15037. When generating a function that returns a pointer, return the pointer
  15038. in both @code{a0} and @code{d0}. Otherwise, the pointer is returned
  15039. only in @code{a0}, and attempts to call such functions without a prototype
  15040. result in errors. Note that this option is on by default; use
  15041. @option{-mno-return-pointer-on-d0} to disable it.
  15042. @item -mno-crt0
  15043. @opindex mno-crt0
  15044. Do not link in the C run-time initialization object file.
  15045. @item -mrelax
  15046. @opindex mrelax
  15047. Indicate to the linker that it should perform a relaxation optimization pass
  15048. to shorten branches, calls and absolute memory addresses. This option only
  15049. has an effect when used on the command line for the final link step.
  15050. This option makes symbolic debugging impossible.
  15051. @item -mliw
  15052. @opindex mliw
  15053. Allow the compiler to generate @emph{Long Instruction Word}
  15054. instructions if the target is the @samp{AM33} or later. This is the
  15055. default. This option defines the preprocessor macro @code{__LIW__}.
  15056. @item -mnoliw
  15057. @opindex mnoliw
  15058. Do not allow the compiler to generate @emph{Long Instruction Word}
  15059. instructions. This option defines the preprocessor macro
  15060. @code{__NO_LIW__}.
  15061. @item -msetlb
  15062. @opindex msetlb
  15063. Allow the compiler to generate the @emph{SETLB} and @emph{Lcc}
  15064. instructions if the target is the @samp{AM33} or later. This is the
  15065. default. This option defines the preprocessor macro @code{__SETLB__}.
  15066. @item -mnosetlb
  15067. @opindex mnosetlb
  15068. Do not allow the compiler to generate @emph{SETLB} or @emph{Lcc}
  15069. instructions. This option defines the preprocessor macro
  15070. @code{__NO_SETLB__}.
  15071. @end table
  15072. @node Moxie Options
  15073. @subsection Moxie Options
  15074. @cindex Moxie Options
  15075. @table @gcctabopt
  15076. @item -meb
  15077. @opindex meb
  15078. Generate big-endian code. This is the default for @samp{moxie-*-*}
  15079. configurations.
  15080. @item -mel
  15081. @opindex mel
  15082. Generate little-endian code.
  15083. @item -mmul.x
  15084. @opindex mmul.x
  15085. Generate mul.x and umul.x instructions. This is the default for
  15086. @samp{moxiebox-*-*} configurations.
  15087. @item -mno-crt0
  15088. @opindex mno-crt0
  15089. Do not link in the C run-time initialization object file.
  15090. @end table
  15091. @node MSP430 Options
  15092. @subsection MSP430 Options
  15093. @cindex MSP430 Options
  15094. These options are defined for the MSP430:
  15095. @table @gcctabopt
  15096. @item -masm-hex
  15097. @opindex masm-hex
  15098. Force assembly output to always use hex constants. Normally such
  15099. constants are signed decimals, but this option is available for
  15100. testsuite and/or aesthetic purposes.
  15101. @item -mmcu=
  15102. @opindex mmcu=
  15103. Select the MCU to target. This is used to create a C preprocessor
  15104. symbol based upon the MCU name, converted to upper case and pre- and
  15105. post-fixed with @samp{__}. This in turn is used by the
  15106. @file{msp430.h} header file to select an MCU-specific supplementary
  15107. header file.
  15108. The option also sets the ISA to use. If the MCU name is one that is
  15109. known to only support the 430 ISA then that is selected, otherwise the
  15110. 430X ISA is selected. A generic MCU name of @samp{msp430} can also be
  15111. used to select the 430 ISA. Similarly the generic @samp{msp430x} MCU
  15112. name selects the 430X ISA.
  15113. In addition an MCU-specific linker script is added to the linker
  15114. command line. The script's name is the name of the MCU with
  15115. @file{.ld} appended. Thus specifying @option{-mmcu=xxx} on the @command{gcc}
  15116. command line defines the C preprocessor symbol @code{__XXX__} and
  15117. cause the linker to search for a script called @file{xxx.ld}.
  15118. This option is also passed on to the assembler.
  15119. @item -mcpu=
  15120. @opindex mcpu=
  15121. Specifies the ISA to use. Accepted values are @samp{msp430},
  15122. @samp{msp430x} and @samp{msp430xv2}. This option is deprecated. The
  15123. @option{-mmcu=} option should be used to select the ISA.
  15124. @item -msim
  15125. @opindex msim
  15126. Link to the simulator runtime libraries and linker script. Overrides
  15127. any scripts that would be selected by the @option{-mmcu=} option.
  15128. @item -mlarge
  15129. @opindex mlarge
  15130. Use large-model addressing (20-bit pointers, 32-bit @code{size_t}).
  15131. @item -msmall
  15132. @opindex msmall
  15133. Use small-model addressing (16-bit pointers, 16-bit @code{size_t}).
  15134. @item -mrelax
  15135. @opindex mrelax
  15136. This option is passed to the assembler and linker, and allows the
  15137. linker to perform certain optimizations that cannot be done until
  15138. the final link.
  15139. @item mhwmult=
  15140. @opindex mhwmult=
  15141. Describes the type of hardware multiply supported by the target.
  15142. Accepted values are @samp{none} for no hardware multiply, @samp{16bit}
  15143. for the original 16-bit-only multiply supported by early MCUs.
  15144. @samp{32bit} for the 16/32-bit multiply supported by later MCUs and
  15145. @samp{f5series} for the 16/32-bit multiply supported by F5-series MCUs.
  15146. A value of @samp{auto} can also be given. This tells GCC to deduce
  15147. the hardware multiply support based upon the MCU name provided by the
  15148. @option{-mmcu} option. If no @option{-mmcu} option is specified then
  15149. @samp{32bit} hardware multiply support is assumed. @samp{auto} is the
  15150. default setting.
  15151. Hardware multiplies are normally performed by calling a library
  15152. routine. This saves space in the generated code. When compiling at
  15153. @option{-O3} or higher however the hardware multiplier is invoked
  15154. inline. This makes for bigger, but faster code.
  15155. The hardware multiply routines disable interrupts whilst running and
  15156. restore the previous interrupt state when they finish. This makes
  15157. them safe to use inside interrupt handlers as well as in normal code.
  15158. @item -minrt
  15159. @opindex minrt
  15160. Enable the use of a minimum runtime environment - no static
  15161. initializers or constructors. This is intended for memory-constrained
  15162. devices. The compiler includes special symbols in some objects
  15163. that tell the linker and runtime which code fragments are required.
  15164. @end table
  15165. @node NDS32 Options
  15166. @subsection NDS32 Options
  15167. @cindex NDS32 Options
  15168. These options are defined for NDS32 implementations:
  15169. @table @gcctabopt
  15170. @item -mbig-endian
  15171. @opindex mbig-endian
  15172. Generate code in big-endian mode.
  15173. @item -mlittle-endian
  15174. @opindex mlittle-endian
  15175. Generate code in little-endian mode.
  15176. @item -mreduced-regs
  15177. @opindex mreduced-regs
  15178. Use reduced-set registers for register allocation.
  15179. @item -mfull-regs
  15180. @opindex mfull-regs
  15181. Use full-set registers for register allocation.
  15182. @item -mcmov
  15183. @opindex mcmov
  15184. Generate conditional move instructions.
  15185. @item -mno-cmov
  15186. @opindex mno-cmov
  15187. Do not generate conditional move instructions.
  15188. @item -mperf-ext
  15189. @opindex mperf-ext
  15190. Generate performance extension instructions.
  15191. @item -mno-perf-ext
  15192. @opindex mno-perf-ext
  15193. Do not generate performance extension instructions.
  15194. @item -mv3push
  15195. @opindex mv3push
  15196. Generate v3 push25/pop25 instructions.
  15197. @item -mno-v3push
  15198. @opindex mno-v3push
  15199. Do not generate v3 push25/pop25 instructions.
  15200. @item -m16-bit
  15201. @opindex m16-bit
  15202. Generate 16-bit instructions.
  15203. @item -mno-16-bit
  15204. @opindex mno-16-bit
  15205. Do not generate 16-bit instructions.
  15206. @item -misr-vector-size=@var{num}
  15207. @opindex misr-vector-size
  15208. Specify the size of each interrupt vector, which must be 4 or 16.
  15209. @item -mcache-block-size=@var{num}
  15210. @opindex mcache-block-size
  15211. Specify the size of each cache block,
  15212. which must be a power of 2 between 4 and 512.
  15213. @item -march=@var{arch}
  15214. @opindex march
  15215. Specify the name of the target architecture.
  15216. @item -mcmodel=@var{code-model}
  15217. @opindex mcmodel
  15218. Set the code model to one of
  15219. @table @asis
  15220. @item @samp{small}
  15221. All the data and read-only data segments must be within 512KB addressing space.
  15222. The text segment must be within 16MB addressing space.
  15223. @item @samp{medium}
  15224. The data segment must be within 512KB while the read-only data segment can be
  15225. within 4GB addressing space. The text segment should be still within 16MB
  15226. addressing space.
  15227. @item @samp{large}
  15228. All the text and data segments can be within 4GB addressing space.
  15229. @end table
  15230. @item -mctor-dtor
  15231. @opindex mctor-dtor
  15232. Enable constructor/destructor feature.
  15233. @item -mrelax
  15234. @opindex mrelax
  15235. Guide linker to relax instructions.
  15236. @end table
  15237. @node Nios II Options
  15238. @subsection Nios II Options
  15239. @cindex Nios II options
  15240. @cindex Altera Nios II options
  15241. These are the options defined for the Altera Nios II processor.
  15242. @table @gcctabopt
  15243. @item -G @var{num}
  15244. @opindex G
  15245. @cindex smaller data references
  15246. Put global and static objects less than or equal to @var{num} bytes
  15247. into the small data or BSS sections instead of the normal data or BSS
  15248. sections. The default value of @var{num} is 8.
  15249. @item -mgpopt=@var{option}
  15250. @item -mgpopt
  15251. @itemx -mno-gpopt
  15252. @opindex mgpopt
  15253. @opindex mno-gpopt
  15254. Generate (do not generate) GP-relative accesses. The following
  15255. @var{option} names are recognized:
  15256. @table @samp
  15257. @item none
  15258. Do not generate GP-relative accesses.
  15259. @item local
  15260. Generate GP-relative accesses for small data objects that are not
  15261. external or weak. Also use GP-relative addressing for objects that
  15262. have been explicitly placed in a small data section via a @code{section}
  15263. attribute.
  15264. @item global
  15265. As for @samp{local}, but also generate GP-relative accesses for
  15266. small data objects that are external or weak. If you use this option,
  15267. you must ensure that all parts of your program (including libraries) are
  15268. compiled with the same @option{-G} setting.
  15269. @item data
  15270. Generate GP-relative accesses for all data objects in the program. If you
  15271. use this option, the entire data and BSS segments
  15272. of your program must fit in 64K of memory and you must use an appropriate
  15273. linker script to allocate them within the addressible range of the
  15274. global pointer.
  15275. @item all
  15276. Generate GP-relative addresses for function pointers as well as data
  15277. pointers. If you use this option, the entire text, data, and BSS segments
  15278. of your program must fit in 64K of memory and you must use an appropriate
  15279. linker script to allocate them within the addressible range of the
  15280. global pointer.
  15281. @end table
  15282. @option{-mgpopt} is equivalent to @option{-mgpopt=local}, and
  15283. @option{-mno-gpopt} is equivalent to @option{-mgpopt=none}.
  15284. The default is @option{-mgpopt} except when @option{-fpic} or
  15285. @option{-fPIC} is specified to generate position-independent code.
  15286. Note that the Nios II ABI does not permit GP-relative accesses from
  15287. shared libraries.
  15288. You may need to specify @option{-mno-gpopt} explicitly when building
  15289. programs that include large amounts of small data, including large
  15290. GOT data sections. In this case, the 16-bit offset for GP-relative
  15291. addressing may not be large enough to allow access to the entire
  15292. small data section.
  15293. @item -mel
  15294. @itemx -meb
  15295. @opindex mel
  15296. @opindex meb
  15297. Generate little-endian (default) or big-endian (experimental) code,
  15298. respectively.
  15299. @item -mbypass-cache
  15300. @itemx -mno-bypass-cache
  15301. @opindex mno-bypass-cache
  15302. @opindex mbypass-cache
  15303. Force all load and store instructions to always bypass cache by
  15304. using I/O variants of the instructions. The default is not to
  15305. bypass the cache.
  15306. @item -mno-cache-volatile
  15307. @itemx -mcache-volatile
  15308. @opindex mcache-volatile
  15309. @opindex mno-cache-volatile
  15310. Volatile memory access bypass the cache using the I/O variants of
  15311. the load and store instructions. The default is not to bypass the cache.
  15312. @item -mno-fast-sw-div
  15313. @itemx -mfast-sw-div
  15314. @opindex mno-fast-sw-div
  15315. @opindex mfast-sw-div
  15316. Do not use table-based fast divide for small numbers. The default
  15317. is to use the fast divide at @option{-O3} and above.
  15318. @item -mno-hw-mul
  15319. @itemx -mhw-mul
  15320. @itemx -mno-hw-mulx
  15321. @itemx -mhw-mulx
  15322. @itemx -mno-hw-div
  15323. @itemx -mhw-div
  15324. @opindex mno-hw-mul
  15325. @opindex mhw-mul
  15326. @opindex mno-hw-mulx
  15327. @opindex mhw-mulx
  15328. @opindex mno-hw-div
  15329. @opindex mhw-div
  15330. Enable or disable emitting @code{mul}, @code{mulx} and @code{div} family of
  15331. instructions by the compiler. The default is to emit @code{mul}
  15332. and not emit @code{div} and @code{mulx}.
  15333. @item -mcustom-@var{insn}=@var{N}
  15334. @itemx -mno-custom-@var{insn}
  15335. @opindex mcustom-@var{insn}
  15336. @opindex mno-custom-@var{insn}
  15337. Each @option{-mcustom-@var{insn}=@var{N}} option enables use of a
  15338. custom instruction with encoding @var{N} when generating code that uses
  15339. @var{insn}. For example, @option{-mcustom-fadds=253} generates custom
  15340. instruction 253 for single-precision floating-point add operations instead
  15341. of the default behavior of using a library call.
  15342. The following values of @var{insn} are supported. Except as otherwise
  15343. noted, floating-point operations are expected to be implemented with
  15344. normal IEEE 754 semantics and correspond directly to the C operators or the
  15345. equivalent GCC built-in functions (@pxref{Other Builtins}).
  15346. Single-precision floating point:
  15347. @table @asis
  15348. @item @samp{fadds}, @samp{fsubs}, @samp{fdivs}, @samp{fmuls}
  15349. Binary arithmetic operations.
  15350. @item @samp{fnegs}
  15351. Unary negation.
  15352. @item @samp{fabss}
  15353. Unary absolute value.
  15354. @item @samp{fcmpeqs}, @samp{fcmpges}, @samp{fcmpgts}, @samp{fcmples}, @samp{fcmplts}, @samp{fcmpnes}
  15355. Comparison operations.
  15356. @item @samp{fmins}, @samp{fmaxs}
  15357. Floating-point minimum and maximum. These instructions are only
  15358. generated if @option{-ffinite-math-only} is specified.
  15359. @item @samp{fsqrts}
  15360. Unary square root operation.
  15361. @item @samp{fcoss}, @samp{fsins}, @samp{ftans}, @samp{fatans}, @samp{fexps}, @samp{flogs}
  15362. Floating-point trigonometric and exponential functions. These instructions
  15363. are only generated if @option{-funsafe-math-optimizations} is also specified.
  15364. @end table
  15365. Double-precision floating point:
  15366. @table @asis
  15367. @item @samp{faddd}, @samp{fsubd}, @samp{fdivd}, @samp{fmuld}
  15368. Binary arithmetic operations.
  15369. @item @samp{fnegd}
  15370. Unary negation.
  15371. @item @samp{fabsd}
  15372. Unary absolute value.
  15373. @item @samp{fcmpeqd}, @samp{fcmpged}, @samp{fcmpgtd}, @samp{fcmpled}, @samp{fcmpltd}, @samp{fcmpned}
  15374. Comparison operations.
  15375. @item @samp{fmind}, @samp{fmaxd}
  15376. Double-precision minimum and maximum. These instructions are only
  15377. generated if @option{-ffinite-math-only} is specified.
  15378. @item @samp{fsqrtd}
  15379. Unary square root operation.
  15380. @item @samp{fcosd}, @samp{fsind}, @samp{ftand}, @samp{fatand}, @samp{fexpd}, @samp{flogd}
  15381. Double-precision trigonometric and exponential functions. These instructions
  15382. are only generated if @option{-funsafe-math-optimizations} is also specified.
  15383. @end table
  15384. Conversions:
  15385. @table @asis
  15386. @item @samp{fextsd}
  15387. Conversion from single precision to double precision.
  15388. @item @samp{ftruncds}
  15389. Conversion from double precision to single precision.
  15390. @item @samp{fixsi}, @samp{fixsu}, @samp{fixdi}, @samp{fixdu}
  15391. Conversion from floating point to signed or unsigned integer types, with
  15392. truncation towards zero.
  15393. @item @samp{round}
  15394. Conversion from single-precision floating point to signed integer,
  15395. rounding to the nearest integer and ties away from zero.
  15396. This corresponds to the @code{__builtin_lroundf} function when
  15397. @option{-fno-math-errno} is used.
  15398. @item @samp{floatis}, @samp{floatus}, @samp{floatid}, @samp{floatud}
  15399. Conversion from signed or unsigned integer types to floating-point types.
  15400. @end table
  15401. In addition, all of the following transfer instructions for internal
  15402. registers X and Y must be provided to use any of the double-precision
  15403. floating-point instructions. Custom instructions taking two
  15404. double-precision source operands expect the first operand in the
  15405. 64-bit register X. The other operand (or only operand of a unary
  15406. operation) is given to the custom arithmetic instruction with the
  15407. least significant half in source register @var{src1} and the most
  15408. significant half in @var{src2}. A custom instruction that returns a
  15409. double-precision result returns the most significant 32 bits in the
  15410. destination register and the other half in 32-bit register Y.
  15411. GCC automatically generates the necessary code sequences to write
  15412. register X and/or read register Y when double-precision floating-point
  15413. instructions are used.
  15414. @table @asis
  15415. @item @samp{fwrx}
  15416. Write @var{src1} into the least significant half of X and @var{src2} into
  15417. the most significant half of X.
  15418. @item @samp{fwry}
  15419. Write @var{src1} into Y.
  15420. @item @samp{frdxhi}, @samp{frdxlo}
  15421. Read the most or least (respectively) significant half of X and store it in
  15422. @var{dest}.
  15423. @item @samp{frdy}
  15424. Read the value of Y and store it into @var{dest}.
  15425. @end table
  15426. Note that you can gain more local control over generation of Nios II custom
  15427. instructions by using the @code{target("custom-@var{insn}=@var{N}")}
  15428. and @code{target("no-custom-@var{insn}")} function attributes
  15429. (@pxref{Function Attributes})
  15430. or pragmas (@pxref{Function Specific Option Pragmas}).
  15431. @item -mcustom-fpu-cfg=@var{name}
  15432. @opindex mcustom-fpu-cfg
  15433. This option enables a predefined, named set of custom instruction encodings
  15434. (see @option{-mcustom-@var{insn}} above).
  15435. Currently, the following sets are defined:
  15436. @option{-mcustom-fpu-cfg=60-1} is equivalent to:
  15437. @gccoptlist{-mcustom-fmuls=252 @gol
  15438. -mcustom-fadds=253 @gol
  15439. -mcustom-fsubs=254 @gol
  15440. -fsingle-precision-constant}
  15441. @option{-mcustom-fpu-cfg=60-2} is equivalent to:
  15442. @gccoptlist{-mcustom-fmuls=252 @gol
  15443. -mcustom-fadds=253 @gol
  15444. -mcustom-fsubs=254 @gol
  15445. -mcustom-fdivs=255 @gol
  15446. -fsingle-precision-constant}
  15447. @option{-mcustom-fpu-cfg=72-3} is equivalent to:
  15448. @gccoptlist{-mcustom-floatus=243 @gol
  15449. -mcustom-fixsi=244 @gol
  15450. -mcustom-floatis=245 @gol
  15451. -mcustom-fcmpgts=246 @gol
  15452. -mcustom-fcmples=249 @gol
  15453. -mcustom-fcmpeqs=250 @gol
  15454. -mcustom-fcmpnes=251 @gol
  15455. -mcustom-fmuls=252 @gol
  15456. -mcustom-fadds=253 @gol
  15457. -mcustom-fsubs=254 @gol
  15458. -mcustom-fdivs=255 @gol
  15459. -fsingle-precision-constant}
  15460. Custom instruction assignments given by individual
  15461. @option{-mcustom-@var{insn}=} options override those given by
  15462. @option{-mcustom-fpu-cfg=}, regardless of the
  15463. order of the options on the command line.
  15464. Note that you can gain more local control over selection of a FPU
  15465. configuration by using the @code{target("custom-fpu-cfg=@var{name}")}
  15466. function attribute (@pxref{Function Attributes})
  15467. or pragma (@pxref{Function Specific Option Pragmas}).
  15468. @end table
  15469. These additional @samp{-m} options are available for the Altera Nios II
  15470. ELF (bare-metal) target:
  15471. @table @gcctabopt
  15472. @item -mhal
  15473. @opindex mhal
  15474. Link with HAL BSP. This suppresses linking with the GCC-provided C runtime
  15475. startup and termination code, and is typically used in conjunction with
  15476. @option{-msys-crt0=} to specify the location of the alternate startup code
  15477. provided by the HAL BSP.
  15478. @item -msmallc
  15479. @opindex msmallc
  15480. Link with a limited version of the C library, @option{-lsmallc}, rather than
  15481. Newlib.
  15482. @item -msys-crt0=@var{startfile}
  15483. @opindex msys-crt0
  15484. @var{startfile} is the file name of the startfile (crt0) to use
  15485. when linking. This option is only useful in conjunction with @option{-mhal}.
  15486. @item -msys-lib=@var{systemlib}
  15487. @opindex msys-lib
  15488. @var{systemlib} is the library name of the library that provides
  15489. low-level system calls required by the C library,
  15490. e.g. @code{read} and @code{write}.
  15491. This option is typically used to link with a library provided by a HAL BSP.
  15492. @end table
  15493. @node Nvidia PTX Options
  15494. @subsection Nvidia PTX Options
  15495. @cindex Nvidia PTX options
  15496. @cindex nvptx options
  15497. These options are defined for Nvidia PTX:
  15498. @table @gcctabopt
  15499. @item -m32
  15500. @itemx -m64
  15501. @opindex m32
  15502. @opindex m64
  15503. Generate code for 32-bit or 64-bit ABI.
  15504. @item -mmainkernel
  15505. @opindex mmainkernel
  15506. Link in code for a __main kernel. This is for stand-alone instead of
  15507. offloading execution.
  15508. @end table
  15509. @node PDP-11 Options
  15510. @subsection PDP-11 Options
  15511. @cindex PDP-11 Options
  15512. These options are defined for the PDP-11:
  15513. @table @gcctabopt
  15514. @item -mfpu
  15515. @opindex mfpu
  15516. Use hardware FPP floating point. This is the default. (FIS floating
  15517. point on the PDP-11/40 is not supported.)
  15518. @item -msoft-float
  15519. @opindex msoft-float
  15520. Do not use hardware floating point.
  15521. @item -mac0
  15522. @opindex mac0
  15523. Return floating-point results in ac0 (fr0 in Unix assembler syntax).
  15524. @item -mno-ac0
  15525. @opindex mno-ac0
  15526. Return floating-point results in memory. This is the default.
  15527. @item -m40
  15528. @opindex m40
  15529. Generate code for a PDP-11/40.
  15530. @item -m45
  15531. @opindex m45
  15532. Generate code for a PDP-11/45. This is the default.
  15533. @item -m10
  15534. @opindex m10
  15535. Generate code for a PDP-11/10.
  15536. @item -mbcopy-builtin
  15537. @opindex mbcopy-builtin
  15538. Use inline @code{movmemhi} patterns for copying memory. This is the
  15539. default.
  15540. @item -mbcopy
  15541. @opindex mbcopy
  15542. Do not use inline @code{movmemhi} patterns for copying memory.
  15543. @item -mint16
  15544. @itemx -mno-int32
  15545. @opindex mint16
  15546. @opindex mno-int32
  15547. Use 16-bit @code{int}. This is the default.
  15548. @item -mint32
  15549. @itemx -mno-int16
  15550. @opindex mint32
  15551. @opindex mno-int16
  15552. Use 32-bit @code{int}.
  15553. @item -mfloat64
  15554. @itemx -mno-float32
  15555. @opindex mfloat64
  15556. @opindex mno-float32
  15557. Use 64-bit @code{float}. This is the default.
  15558. @item -mfloat32
  15559. @itemx -mno-float64
  15560. @opindex mfloat32
  15561. @opindex mno-float64
  15562. Use 32-bit @code{float}.
  15563. @item -mabshi
  15564. @opindex mabshi
  15565. Use @code{abshi2} pattern. This is the default.
  15566. @item -mno-abshi
  15567. @opindex mno-abshi
  15568. Do not use @code{abshi2} pattern.
  15569. @item -mbranch-expensive
  15570. @opindex mbranch-expensive
  15571. Pretend that branches are expensive. This is for experimenting with
  15572. code generation only.
  15573. @item -mbranch-cheap
  15574. @opindex mbranch-cheap
  15575. Do not pretend that branches are expensive. This is the default.
  15576. @item -munix-asm
  15577. @opindex munix-asm
  15578. Use Unix assembler syntax. This is the default when configured for
  15579. @samp{pdp11-*-bsd}.
  15580. @item -mdec-asm
  15581. @opindex mdec-asm
  15582. Use DEC assembler syntax. This is the default when configured for any
  15583. PDP-11 target other than @samp{pdp11-*-bsd}.
  15584. @end table
  15585. @node picoChip Options
  15586. @subsection picoChip Options
  15587. @cindex picoChip options
  15588. These @samp{-m} options are defined for picoChip implementations:
  15589. @table @gcctabopt
  15590. @item -mae=@var{ae_type}
  15591. @opindex mcpu
  15592. Set the instruction set, register set, and instruction scheduling
  15593. parameters for array element type @var{ae_type}. Supported values
  15594. for @var{ae_type} are @samp{ANY}, @samp{MUL}, and @samp{MAC}.
  15595. @option{-mae=ANY} selects a completely generic AE type. Code
  15596. generated with this option runs on any of the other AE types. The
  15597. code is not as efficient as it would be if compiled for a specific
  15598. AE type, and some types of operation (e.g., multiplication) do not
  15599. work properly on all types of AE.
  15600. @option{-mae=MUL} selects a MUL AE type. This is the most useful AE type
  15601. for compiled code, and is the default.
  15602. @option{-mae=MAC} selects a DSP-style MAC AE. Code compiled with this
  15603. option may suffer from poor performance of byte (char) manipulation,
  15604. since the DSP AE does not provide hardware support for byte load/stores.
  15605. @item -msymbol-as-address
  15606. Enable the compiler to directly use a symbol name as an address in a
  15607. load/store instruction, without first loading it into a
  15608. register. Typically, the use of this option generates larger
  15609. programs, which run faster than when the option isn't used. However, the
  15610. results vary from program to program, so it is left as a user option,
  15611. rather than being permanently enabled.
  15612. @item -mno-inefficient-warnings
  15613. Disables warnings about the generation of inefficient code. These
  15614. warnings can be generated, for example, when compiling code that
  15615. performs byte-level memory operations on the MAC AE type. The MAC AE has
  15616. no hardware support for byte-level memory operations, so all byte
  15617. load/stores must be synthesized from word load/store operations. This is
  15618. inefficient and a warning is generated to indicate
  15619. that you should rewrite the code to avoid byte operations, or to target
  15620. an AE type that has the necessary hardware support. This option disables
  15621. these warnings.
  15622. @end table
  15623. @node PowerPC Options
  15624. @subsection PowerPC Options
  15625. @cindex PowerPC options
  15626. These are listed under @xref{RS/6000 and PowerPC Options}.
  15627. @node RL78 Options
  15628. @subsection RL78 Options
  15629. @cindex RL78 Options
  15630. @table @gcctabopt
  15631. @item -msim
  15632. @opindex msim
  15633. Links in additional target libraries to support operation within a
  15634. simulator.
  15635. @item -mmul=none
  15636. @itemx -mmul=g13
  15637. @itemx -mmul=rl78
  15638. @opindex mmul
  15639. Specifies the type of hardware multiplication support to be used. The
  15640. default is @samp{none}, which uses software multiplication functions.
  15641. The @samp{g13} option is for the hardware multiply/divide peripheral
  15642. only on the RL78/G13 targets. The @samp{rl78} option is for the
  15643. standard hardware multiplication defined in the RL78 software manual.
  15644. @item -m64bit-doubles
  15645. @itemx -m32bit-doubles
  15646. @opindex m64bit-doubles
  15647. @opindex m32bit-doubles
  15648. Make the @code{double} data type be 64 bits (@option{-m64bit-doubles})
  15649. or 32 bits (@option{-m32bit-doubles}) in size. The default is
  15650. @option{-m32bit-doubles}.
  15651. @end table
  15652. @node RS/6000 and PowerPC Options
  15653. @subsection IBM RS/6000 and PowerPC Options
  15654. @cindex RS/6000 and PowerPC Options
  15655. @cindex IBM RS/6000 and PowerPC Options
  15656. These @samp{-m} options are defined for the IBM RS/6000 and PowerPC:
  15657. @table @gcctabopt
  15658. @item -mpowerpc-gpopt
  15659. @itemx -mno-powerpc-gpopt
  15660. @itemx -mpowerpc-gfxopt
  15661. @itemx -mno-powerpc-gfxopt
  15662. @need 800
  15663. @itemx -mpowerpc64
  15664. @itemx -mno-powerpc64
  15665. @itemx -mmfcrf
  15666. @itemx -mno-mfcrf
  15667. @itemx -mpopcntb
  15668. @itemx -mno-popcntb
  15669. @itemx -mpopcntd
  15670. @itemx -mno-popcntd
  15671. @itemx -mfprnd
  15672. @itemx -mno-fprnd
  15673. @need 800
  15674. @itemx -mcmpb
  15675. @itemx -mno-cmpb
  15676. @itemx -mmfpgpr
  15677. @itemx -mno-mfpgpr
  15678. @itemx -mhard-dfp
  15679. @itemx -mno-hard-dfp
  15680. @opindex mpowerpc-gpopt
  15681. @opindex mno-powerpc-gpopt
  15682. @opindex mpowerpc-gfxopt
  15683. @opindex mno-powerpc-gfxopt
  15684. @opindex mpowerpc64
  15685. @opindex mno-powerpc64
  15686. @opindex mmfcrf
  15687. @opindex mno-mfcrf
  15688. @opindex mpopcntb
  15689. @opindex mno-popcntb
  15690. @opindex mpopcntd
  15691. @opindex mno-popcntd
  15692. @opindex mfprnd
  15693. @opindex mno-fprnd
  15694. @opindex mcmpb
  15695. @opindex mno-cmpb
  15696. @opindex mmfpgpr
  15697. @opindex mno-mfpgpr
  15698. @opindex mhard-dfp
  15699. @opindex mno-hard-dfp
  15700. You use these options to specify which instructions are available on the
  15701. processor you are using. The default value of these options is
  15702. determined when configuring GCC@. Specifying the
  15703. @option{-mcpu=@var{cpu_type}} overrides the specification of these
  15704. options. We recommend you use the @option{-mcpu=@var{cpu_type}} option
  15705. rather than the options listed above.
  15706. Specifying @option{-mpowerpc-gpopt} allows
  15707. GCC to use the optional PowerPC architecture instructions in the
  15708. General Purpose group, including floating-point square root. Specifying
  15709. @option{-mpowerpc-gfxopt} allows GCC to
  15710. use the optional PowerPC architecture instructions in the Graphics
  15711. group, including floating-point select.
  15712. The @option{-mmfcrf} option allows GCC to generate the move from
  15713. condition register field instruction implemented on the POWER4
  15714. processor and other processors that support the PowerPC V2.01
  15715. architecture.
  15716. The @option{-mpopcntb} option allows GCC to generate the popcount and
  15717. double-precision FP reciprocal estimate instruction implemented on the
  15718. POWER5 processor and other processors that support the PowerPC V2.02
  15719. architecture.
  15720. The @option{-mpopcntd} option allows GCC to generate the popcount
  15721. instruction implemented on the POWER7 processor and other processors
  15722. that support the PowerPC V2.06 architecture.
  15723. The @option{-mfprnd} option allows GCC to generate the FP round to
  15724. integer instructions implemented on the POWER5+ processor and other
  15725. processors that support the PowerPC V2.03 architecture.
  15726. The @option{-mcmpb} option allows GCC to generate the compare bytes
  15727. instruction implemented on the POWER6 processor and other processors
  15728. that support the PowerPC V2.05 architecture.
  15729. The @option{-mmfpgpr} option allows GCC to generate the FP move to/from
  15730. general-purpose register instructions implemented on the POWER6X
  15731. processor and other processors that support the extended PowerPC V2.05
  15732. architecture.
  15733. The @option{-mhard-dfp} option allows GCC to generate the decimal
  15734. floating-point instructions implemented on some POWER processors.
  15735. The @option{-mpowerpc64} option allows GCC to generate the additional
  15736. 64-bit instructions that are found in the full PowerPC64 architecture
  15737. and to treat GPRs as 64-bit, doubleword quantities. GCC defaults to
  15738. @option{-mno-powerpc64}.
  15739. @item -mcpu=@var{cpu_type}
  15740. @opindex mcpu
  15741. Set architecture type, register usage, and
  15742. instruction scheduling parameters for machine type @var{cpu_type}.
  15743. Supported values for @var{cpu_type} are @samp{401}, @samp{403},
  15744. @samp{405}, @samp{405fp}, @samp{440}, @samp{440fp}, @samp{464}, @samp{464fp},
  15745. @samp{476}, @samp{476fp}, @samp{505}, @samp{601}, @samp{602}, @samp{603},
  15746. @samp{603e}, @samp{604}, @samp{604e}, @samp{620}, @samp{630}, @samp{740},
  15747. @samp{7400}, @samp{7450}, @samp{750}, @samp{801}, @samp{821}, @samp{823},
  15748. @samp{860}, @samp{970}, @samp{8540}, @samp{a2}, @samp{e300c2},
  15749. @samp{e300c3}, @samp{e500mc}, @samp{e500mc64}, @samp{e5500},
  15750. @samp{e6500}, @samp{ec603e}, @samp{G3}, @samp{G4}, @samp{G5},
  15751. @samp{titan}, @samp{power3}, @samp{power4}, @samp{power5}, @samp{power5+},
  15752. @samp{power6}, @samp{power6x}, @samp{power7}, @samp{power8}, @samp{powerpc},
  15753. @samp{powerpc64}, @samp{powerpc64le}, and @samp{rs64}.
  15754. @option{-mcpu=powerpc}, @option{-mcpu=powerpc64}, and
  15755. @option{-mcpu=powerpc64le} specify pure 32-bit PowerPC (either
  15756. endian), 64-bit big endian PowerPC and 64-bit little endian PowerPC
  15757. architecture machine types, with an appropriate, generic processor
  15758. model assumed for scheduling purposes.
  15759. The other options specify a specific processor. Code generated under
  15760. those options runs best on that processor, and may not run at all on
  15761. others.
  15762. The @option{-mcpu} options automatically enable or disable the
  15763. following options:
  15764. @gccoptlist{-maltivec -mfprnd -mhard-float -mmfcrf -mmultiple @gol
  15765. -mpopcntb -mpopcntd -mpowerpc64 @gol
  15766. -mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float @gol
  15767. -msimple-fpu -mstring -mmulhw -mdlmzb -mmfpgpr -mvsx @gol
  15768. -mcrypto -mdirect-move -mpower8-fusion -mpower8-vector @gol
  15769. -mquad-memory -mquad-memory-atomic}
  15770. The particular options set for any particular CPU varies between
  15771. compiler versions, depending on what setting seems to produce optimal
  15772. code for that CPU; it doesn't necessarily reflect the actual hardware's
  15773. capabilities. If you wish to set an individual option to a particular
  15774. value, you may specify it after the @option{-mcpu} option, like
  15775. @option{-mcpu=970 -mno-altivec}.
  15776. On AIX, the @option{-maltivec} and @option{-mpowerpc64} options are
  15777. not enabled or disabled by the @option{-mcpu} option at present because
  15778. AIX does not have full support for these options. You may still
  15779. enable or disable them individually if you're sure it'll work in your
  15780. environment.
  15781. @item -mtune=@var{cpu_type}
  15782. @opindex mtune
  15783. Set the instruction scheduling parameters for machine type
  15784. @var{cpu_type}, but do not set the architecture type or register usage,
  15785. as @option{-mcpu=@var{cpu_type}} does. The same
  15786. values for @var{cpu_type} are used for @option{-mtune} as for
  15787. @option{-mcpu}. If both are specified, the code generated uses the
  15788. architecture and registers set by @option{-mcpu}, but the
  15789. scheduling parameters set by @option{-mtune}.
  15790. @item -mcmodel=small
  15791. @opindex mcmodel=small
  15792. Generate PowerPC64 code for the small model: The TOC is limited to
  15793. 64k.
  15794. @item -mcmodel=medium
  15795. @opindex mcmodel=medium
  15796. Generate PowerPC64 code for the medium model: The TOC and other static
  15797. data may be up to a total of 4G in size.
  15798. @item -mcmodel=large
  15799. @opindex mcmodel=large
  15800. Generate PowerPC64 code for the large model: The TOC may be up to 4G
  15801. in size. Other data and code is only limited by the 64-bit address
  15802. space.
  15803. @item -maltivec
  15804. @itemx -mno-altivec
  15805. @opindex maltivec
  15806. @opindex mno-altivec
  15807. Generate code that uses (does not use) AltiVec instructions, and also
  15808. enable the use of built-in functions that allow more direct access to
  15809. the AltiVec instruction set. You may also need to set
  15810. @option{-mabi=altivec} to adjust the current ABI with AltiVec ABI
  15811. enhancements.
  15812. When @option{-maltivec} is used, rather than @option{-maltivec=le} or
  15813. @option{-maltivec=be}, the element order for Altivec intrinsics such
  15814. as @code{vec_splat}, @code{vec_extract}, and @code{vec_insert}
  15815. match array element order corresponding to the endianness of the
  15816. target. That is, element zero identifies the leftmost element in a
  15817. vector register when targeting a big-endian platform, and identifies
  15818. the rightmost element in a vector register when targeting a
  15819. little-endian platform.
  15820. @item -maltivec=be
  15821. @opindex maltivec=be
  15822. Generate Altivec instructions using big-endian element order,
  15823. regardless of whether the target is big- or little-endian. This is
  15824. the default when targeting a big-endian platform.
  15825. The element order is used to interpret element numbers in Altivec
  15826. intrinsics such as @code{vec_splat}, @code{vec_extract}, and
  15827. @code{vec_insert}. By default, these match array element order
  15828. corresponding to the endianness for the target.
  15829. @item -maltivec=le
  15830. @opindex maltivec=le
  15831. Generate Altivec instructions using little-endian element order,
  15832. regardless of whether the target is big- or little-endian. This is
  15833. the default when targeting a little-endian platform. This option is
  15834. currently ignored when targeting a big-endian platform.
  15835. The element order is used to interpret element numbers in Altivec
  15836. intrinsics such as @code{vec_splat}, @code{vec_extract}, and
  15837. @code{vec_insert}. By default, these match array element order
  15838. corresponding to the endianness for the target.
  15839. @item -mvrsave
  15840. @itemx -mno-vrsave
  15841. @opindex mvrsave
  15842. @opindex mno-vrsave
  15843. Generate VRSAVE instructions when generating AltiVec code.
  15844. @item -mgen-cell-microcode
  15845. @opindex mgen-cell-microcode
  15846. Generate Cell microcode instructions.
  15847. @item -mwarn-cell-microcode
  15848. @opindex mwarn-cell-microcode
  15849. Warn when a Cell microcode instruction is emitted. An example
  15850. of a Cell microcode instruction is a variable shift.
  15851. @item -msecure-plt
  15852. @opindex msecure-plt
  15853. Generate code that allows @command{ld} and @command{ld.so}
  15854. to build executables and shared
  15855. libraries with non-executable @code{.plt} and @code{.got} sections.
  15856. This is a PowerPC
  15857. 32-bit SYSV ABI option.
  15858. @item -mbss-plt
  15859. @opindex mbss-plt
  15860. Generate code that uses a BSS @code{.plt} section that @command{ld.so}
  15861. fills in, and
  15862. requires @code{.plt} and @code{.got}
  15863. sections that are both writable and executable.
  15864. This is a PowerPC 32-bit SYSV ABI option.
  15865. @item -misel
  15866. @itemx -mno-isel
  15867. @opindex misel
  15868. @opindex mno-isel
  15869. This switch enables or disables the generation of ISEL instructions.
  15870. @item -misel=@var{yes/no}
  15871. This switch has been deprecated. Use @option{-misel} and
  15872. @option{-mno-isel} instead.
  15873. @item -mspe
  15874. @itemx -mno-spe
  15875. @opindex mspe
  15876. @opindex mno-spe
  15877. This switch enables or disables the generation of SPE simd
  15878. instructions.
  15879. @item -mpaired
  15880. @itemx -mno-paired
  15881. @opindex mpaired
  15882. @opindex mno-paired
  15883. This switch enables or disables the generation of PAIRED simd
  15884. instructions.
  15885. @item -mspe=@var{yes/no}
  15886. This option has been deprecated. Use @option{-mspe} and
  15887. @option{-mno-spe} instead.
  15888. @item -mvsx
  15889. @itemx -mno-vsx
  15890. @opindex mvsx
  15891. @opindex mno-vsx
  15892. Generate code that uses (does not use) vector/scalar (VSX)
  15893. instructions, and also enable the use of built-in functions that allow
  15894. more direct access to the VSX instruction set.
  15895. @item -mcrypto
  15896. @itemx -mno-crypto
  15897. @opindex mcrypto
  15898. @opindex mno-crypto
  15899. Enable the use (disable) of the built-in functions that allow direct
  15900. access to the cryptographic instructions that were added in version
  15901. 2.07 of the PowerPC ISA.
  15902. @item -mdirect-move
  15903. @itemx -mno-direct-move
  15904. @opindex mdirect-move
  15905. @opindex mno-direct-move
  15906. Generate code that uses (does not use) the instructions to move data
  15907. between the general purpose registers and the vector/scalar (VSX)
  15908. registers that were added in version 2.07 of the PowerPC ISA.
  15909. @item -mpower8-fusion
  15910. @itemx -mno-power8-fusion
  15911. @opindex mpower8-fusion
  15912. @opindex mno-power8-fusion
  15913. Generate code that keeps (does not keeps) some integer operations
  15914. adjacent so that the instructions can be fused together on power8 and
  15915. later processors.
  15916. @item -mpower8-vector
  15917. @itemx -mno-power8-vector
  15918. @opindex mpower8-vector
  15919. @opindex mno-power8-vector
  15920. Generate code that uses (does not use) the vector and scalar
  15921. instructions that were added in version 2.07 of the PowerPC ISA. Also
  15922. enable the use of built-in functions that allow more direct access to
  15923. the vector instructions.
  15924. @item -mquad-memory
  15925. @itemx -mno-quad-memory
  15926. @opindex mquad-memory
  15927. @opindex mno-quad-memory
  15928. Generate code that uses (does not use) the non-atomic quad word memory
  15929. instructions. The @option{-mquad-memory} option requires use of
  15930. 64-bit mode.
  15931. @item -mquad-memory-atomic
  15932. @itemx -mno-quad-memory-atomic
  15933. @opindex mquad-memory-atomic
  15934. @opindex mno-quad-memory-atomic
  15935. Generate code that uses (does not use) the atomic quad word memory
  15936. instructions. The @option{-mquad-memory-atomic} option requires use of
  15937. 64-bit mode.
  15938. @item -mupper-regs-df
  15939. @itemx -mno-upper-regs-df
  15940. @opindex mupper-regs-df
  15941. @opindex mno-upper-regs-df
  15942. Generate code that uses (does not use) the scalar double precision
  15943. instructions that target all 64 registers in the vector/scalar
  15944. floating point register set that were added in version 2.06 of the
  15945. PowerPC ISA. @option{-mupper-regs-df} is turned on by default if you
  15946. use any of the @option{-mcpu=power7}, @option{-mcpu=power8}, or
  15947. @option{-mvsx} options.
  15948. @item -mupper-regs-sf
  15949. @itemx -mno-upper-regs-sf
  15950. @opindex mupper-regs-sf
  15951. @opindex mno-upper-regs-sf
  15952. Generate code that uses (does not use) the scalar single precision
  15953. instructions that target all 64 registers in the vector/scalar
  15954. floating point register set that were added in version 2.07 of the
  15955. PowerPC ISA. @option{-mupper-regs-sf} is turned on by default if you
  15956. use either of the @option{-mcpu=power8} or @option{-mpower8-vector}
  15957. options.
  15958. @item -mupper-regs
  15959. @itemx -mno-upper-regs
  15960. @opindex mupper-regs
  15961. @opindex mno-upper-regs
  15962. Generate code that uses (does not use) the scalar
  15963. instructions that target all 64 registers in the vector/scalar
  15964. floating point register set, depending on the model of the machine.
  15965. If the @option{-mno-upper-regs} option is used, it turns off both
  15966. @option{-mupper-regs-sf} and @option{-mupper-regs-df} options.
  15967. @item -mfloat-gprs=@var{yes/single/double/no}
  15968. @itemx -mfloat-gprs
  15969. @opindex mfloat-gprs
  15970. This switch enables or disables the generation of floating-point
  15971. operations on the general-purpose registers for architectures that
  15972. support it.
  15973. The argument @samp{yes} or @samp{single} enables the use of
  15974. single-precision floating-point operations.
  15975. The argument @samp{double} enables the use of single and
  15976. double-precision floating-point operations.
  15977. The argument @samp{no} disables floating-point operations on the
  15978. general-purpose registers.
  15979. This option is currently only available on the MPC854x.
  15980. @item -m32
  15981. @itemx -m64
  15982. @opindex m32
  15983. @opindex m64
  15984. Generate code for 32-bit or 64-bit environments of Darwin and SVR4
  15985. targets (including GNU/Linux). The 32-bit environment sets int, long
  15986. and pointer to 32 bits and generates code that runs on any PowerPC
  15987. variant. The 64-bit environment sets int to 32 bits and long and
  15988. pointer to 64 bits, and generates code for PowerPC64, as for
  15989. @option{-mpowerpc64}.
  15990. @item -mfull-toc
  15991. @itemx -mno-fp-in-toc
  15992. @itemx -mno-sum-in-toc
  15993. @itemx -mminimal-toc
  15994. @opindex mfull-toc
  15995. @opindex mno-fp-in-toc
  15996. @opindex mno-sum-in-toc
  15997. @opindex mminimal-toc
  15998. Modify generation of the TOC (Table Of Contents), which is created for
  15999. every executable file. The @option{-mfull-toc} option is selected by
  16000. default. In that case, GCC allocates at least one TOC entry for
  16001. each unique non-automatic variable reference in your program. GCC
  16002. also places floating-point constants in the TOC@. However, only
  16003. 16,384 entries are available in the TOC@.
  16004. If you receive a linker error message that saying you have overflowed
  16005. the available TOC space, you can reduce the amount of TOC space used
  16006. with the @option{-mno-fp-in-toc} and @option{-mno-sum-in-toc} options.
  16007. @option{-mno-fp-in-toc} prevents GCC from putting floating-point
  16008. constants in the TOC and @option{-mno-sum-in-toc} forces GCC to
  16009. generate code to calculate the sum of an address and a constant at
  16010. run time instead of putting that sum into the TOC@. You may specify one
  16011. or both of these options. Each causes GCC to produce very slightly
  16012. slower and larger code at the expense of conserving TOC space.
  16013. If you still run out of space in the TOC even when you specify both of
  16014. these options, specify @option{-mminimal-toc} instead. This option causes
  16015. GCC to make only one TOC entry for every file. When you specify this
  16016. option, GCC produces code that is slower and larger but which
  16017. uses extremely little TOC space. You may wish to use this option
  16018. only on files that contain less frequently-executed code.
  16019. @item -maix64
  16020. @itemx -maix32
  16021. @opindex maix64
  16022. @opindex maix32
  16023. Enable 64-bit AIX ABI and calling convention: 64-bit pointers, 64-bit
  16024. @code{long} type, and the infrastructure needed to support them.
  16025. Specifying @option{-maix64} implies @option{-mpowerpc64},
  16026. while @option{-maix32} disables the 64-bit ABI and
  16027. implies @option{-mno-powerpc64}. GCC defaults to @option{-maix32}.
  16028. @item -mxl-compat
  16029. @itemx -mno-xl-compat
  16030. @opindex mxl-compat
  16031. @opindex mno-xl-compat
  16032. Produce code that conforms more closely to IBM XL compiler semantics
  16033. when using AIX-compatible ABI@. Pass floating-point arguments to
  16034. prototyped functions beyond the register save area (RSA) on the stack
  16035. in addition to argument FPRs. Do not assume that most significant
  16036. double in 128-bit long double value is properly rounded when comparing
  16037. values and converting to double. Use XL symbol names for long double
  16038. support routines.
  16039. The AIX calling convention was extended but not initially documented to
  16040. handle an obscure K&R C case of calling a function that takes the
  16041. address of its arguments with fewer arguments than declared. IBM XL
  16042. compilers access floating-point arguments that do not fit in the
  16043. RSA from the stack when a subroutine is compiled without
  16044. optimization. Because always storing floating-point arguments on the
  16045. stack is inefficient and rarely needed, this option is not enabled by
  16046. default and only is necessary when calling subroutines compiled by IBM
  16047. XL compilers without optimization.
  16048. @item -mpe
  16049. @opindex mpe
  16050. Support @dfn{IBM RS/6000 SP} @dfn{Parallel Environment} (PE)@. Link an
  16051. application written to use message passing with special startup code to
  16052. enable the application to run. The system must have PE installed in the
  16053. standard location (@file{/usr/lpp/ppe.poe/}), or the @file{specs} file
  16054. must be overridden with the @option{-specs=} option to specify the
  16055. appropriate directory location. The Parallel Environment does not
  16056. support threads, so the @option{-mpe} option and the @option{-pthread}
  16057. option are incompatible.
  16058. @item -malign-natural
  16059. @itemx -malign-power
  16060. @opindex malign-natural
  16061. @opindex malign-power
  16062. On AIX, 32-bit Darwin, and 64-bit PowerPC GNU/Linux, the option
  16063. @option{-malign-natural} overrides the ABI-defined alignment of larger
  16064. types, such as floating-point doubles, on their natural size-based boundary.
  16065. The option @option{-malign-power} instructs GCC to follow the ABI-specified
  16066. alignment rules. GCC defaults to the standard alignment defined in the ABI@.
  16067. On 64-bit Darwin, natural alignment is the default, and @option{-malign-power}
  16068. is not supported.
  16069. @item -msoft-float
  16070. @itemx -mhard-float
  16071. @opindex msoft-float
  16072. @opindex mhard-float
  16073. Generate code that does not use (uses) the floating-point register set.
  16074. Software floating-point emulation is provided if you use the
  16075. @option{-msoft-float} option, and pass the option to GCC when linking.
  16076. @item -msingle-float
  16077. @itemx -mdouble-float
  16078. @opindex msingle-float
  16079. @opindex mdouble-float
  16080. Generate code for single- or double-precision floating-point operations.
  16081. @option{-mdouble-float} implies @option{-msingle-float}.
  16082. @item -msimple-fpu
  16083. @opindex msimple-fpu
  16084. Do not generate @code{sqrt} and @code{div} instructions for hardware
  16085. floating-point unit.
  16086. @item -mfpu=@var{name}
  16087. @opindex mfpu
  16088. Specify type of floating-point unit. Valid values for @var{name} are
  16089. @samp{sp_lite} (equivalent to @option{-msingle-float -msimple-fpu}),
  16090. @samp{dp_lite} (equivalent to @option{-mdouble-float -msimple-fpu}),
  16091. @samp{sp_full} (equivalent to @option{-msingle-float}),
  16092. and @samp{dp_full} (equivalent to @option{-mdouble-float}).
  16093. @item -mxilinx-fpu
  16094. @opindex mxilinx-fpu
  16095. Perform optimizations for the floating-point unit on Xilinx PPC 405/440.
  16096. @item -mmultiple
  16097. @itemx -mno-multiple
  16098. @opindex mmultiple
  16099. @opindex mno-multiple
  16100. Generate code that uses (does not use) the load multiple word
  16101. instructions and the store multiple word instructions. These
  16102. instructions are generated by default on POWER systems, and not
  16103. generated on PowerPC systems. Do not use @option{-mmultiple} on little-endian
  16104. PowerPC systems, since those instructions do not work when the
  16105. processor is in little-endian mode. The exceptions are PPC740 and
  16106. PPC750 which permit these instructions in little-endian mode.
  16107. @item -mstring
  16108. @itemx -mno-string
  16109. @opindex mstring
  16110. @opindex mno-string
  16111. Generate code that uses (does not use) the load string instructions
  16112. and the store string word instructions to save multiple registers and
  16113. do small block moves. These instructions are generated by default on
  16114. POWER systems, and not generated on PowerPC systems. Do not use
  16115. @option{-mstring} on little-endian PowerPC systems, since those
  16116. instructions do not work when the processor is in little-endian mode.
  16117. The exceptions are PPC740 and PPC750 which permit these instructions
  16118. in little-endian mode.
  16119. @item -mupdate
  16120. @itemx -mno-update
  16121. @opindex mupdate
  16122. @opindex mno-update
  16123. Generate code that uses (does not use) the load or store instructions
  16124. that update the base register to the address of the calculated memory
  16125. location. These instructions are generated by default. If you use
  16126. @option{-mno-update}, there is a small window between the time that the
  16127. stack pointer is updated and the address of the previous frame is
  16128. stored, which means code that walks the stack frame across interrupts or
  16129. signals may get corrupted data.
  16130. @item -mavoid-indexed-addresses
  16131. @itemx -mno-avoid-indexed-addresses
  16132. @opindex mavoid-indexed-addresses
  16133. @opindex mno-avoid-indexed-addresses
  16134. Generate code that tries to avoid (not avoid) the use of indexed load
  16135. or store instructions. These instructions can incur a performance
  16136. penalty on Power6 processors in certain situations, such as when
  16137. stepping through large arrays that cross a 16M boundary. This option
  16138. is enabled by default when targeting Power6 and disabled otherwise.
  16139. @item -mfused-madd
  16140. @itemx -mno-fused-madd
  16141. @opindex mfused-madd
  16142. @opindex mno-fused-madd
  16143. Generate code that uses (does not use) the floating-point multiply and
  16144. accumulate instructions. These instructions are generated by default
  16145. if hardware floating point is used. The machine-dependent
  16146. @option{-mfused-madd} option is now mapped to the machine-independent
  16147. @option{-ffp-contract=fast} option, and @option{-mno-fused-madd} is
  16148. mapped to @option{-ffp-contract=off}.
  16149. @item -mmulhw
  16150. @itemx -mno-mulhw
  16151. @opindex mmulhw
  16152. @opindex mno-mulhw
  16153. Generate code that uses (does not use) the half-word multiply and
  16154. multiply-accumulate instructions on the IBM 405, 440, 464 and 476 processors.
  16155. These instructions are generated by default when targeting those
  16156. processors.
  16157. @item -mdlmzb
  16158. @itemx -mno-dlmzb
  16159. @opindex mdlmzb
  16160. @opindex mno-dlmzb
  16161. Generate code that uses (does not use) the string-search @samp{dlmzb}
  16162. instruction on the IBM 405, 440, 464 and 476 processors. This instruction is
  16163. generated by default when targeting those processors.
  16164. @item -mno-bit-align
  16165. @itemx -mbit-align
  16166. @opindex mno-bit-align
  16167. @opindex mbit-align
  16168. On System V.4 and embedded PowerPC systems do not (do) force structures
  16169. and unions that contain bit-fields to be aligned to the base type of the
  16170. bit-field.
  16171. For example, by default a structure containing nothing but 8
  16172. @code{unsigned} bit-fields of length 1 is aligned to a 4-byte
  16173. boundary and has a size of 4 bytes. By using @option{-mno-bit-align},
  16174. the structure is aligned to a 1-byte boundary and is 1 byte in
  16175. size.
  16176. @item -mno-strict-align
  16177. @itemx -mstrict-align
  16178. @opindex mno-strict-align
  16179. @opindex mstrict-align
  16180. On System V.4 and embedded PowerPC systems do not (do) assume that
  16181. unaligned memory references are handled by the system.
  16182. @item -mrelocatable
  16183. @itemx -mno-relocatable
  16184. @opindex mrelocatable
  16185. @opindex mno-relocatable
  16186. Generate code that allows (does not allow) a static executable to be
  16187. relocated to a different address at run time. A simple embedded
  16188. PowerPC system loader should relocate the entire contents of
  16189. @code{.got2} and 4-byte locations listed in the @code{.fixup} section,
  16190. a table of 32-bit addresses generated by this option. For this to
  16191. work, all objects linked together must be compiled with
  16192. @option{-mrelocatable} or @option{-mrelocatable-lib}.
  16193. @option{-mrelocatable} code aligns the stack to an 8-byte boundary.
  16194. @item -mrelocatable-lib
  16195. @itemx -mno-relocatable-lib
  16196. @opindex mrelocatable-lib
  16197. @opindex mno-relocatable-lib
  16198. Like @option{-mrelocatable}, @option{-mrelocatable-lib} generates a
  16199. @code{.fixup} section to allow static executables to be relocated at
  16200. run time, but @option{-mrelocatable-lib} does not use the smaller stack
  16201. alignment of @option{-mrelocatable}. Objects compiled with
  16202. @option{-mrelocatable-lib} may be linked with objects compiled with
  16203. any combination of the @option{-mrelocatable} options.
  16204. @item -mno-toc
  16205. @itemx -mtoc
  16206. @opindex mno-toc
  16207. @opindex mtoc
  16208. On System V.4 and embedded PowerPC systems do not (do) assume that
  16209. register 2 contains a pointer to a global area pointing to the addresses
  16210. used in the program.
  16211. @item -mlittle
  16212. @itemx -mlittle-endian
  16213. @opindex mlittle
  16214. @opindex mlittle-endian
  16215. On System V.4 and embedded PowerPC systems compile code for the
  16216. processor in little-endian mode. The @option{-mlittle-endian} option is
  16217. the same as @option{-mlittle}.
  16218. @item -mbig
  16219. @itemx -mbig-endian
  16220. @opindex mbig
  16221. @opindex mbig-endian
  16222. On System V.4 and embedded PowerPC systems compile code for the
  16223. processor in big-endian mode. The @option{-mbig-endian} option is
  16224. the same as @option{-mbig}.
  16225. @item -mdynamic-no-pic
  16226. @opindex mdynamic-no-pic
  16227. On Darwin and Mac OS X systems, compile code so that it is not
  16228. relocatable, but that its external references are relocatable. The
  16229. resulting code is suitable for applications, but not shared
  16230. libraries.
  16231. @item -msingle-pic-base
  16232. @opindex msingle-pic-base
  16233. Treat the register used for PIC addressing as read-only, rather than
  16234. loading it in the prologue for each function. The runtime system is
  16235. responsible for initializing this register with an appropriate value
  16236. before execution begins.
  16237. @item -mprioritize-restricted-insns=@var{priority}
  16238. @opindex mprioritize-restricted-insns
  16239. This option controls the priority that is assigned to
  16240. dispatch-slot restricted instructions during the second scheduling
  16241. pass. The argument @var{priority} takes the value @samp{0}, @samp{1},
  16242. or @samp{2} to assign no, highest, or second-highest (respectively)
  16243. priority to dispatch-slot restricted
  16244. instructions.
  16245. @item -msched-costly-dep=@var{dependence_type}
  16246. @opindex msched-costly-dep
  16247. This option controls which dependences are considered costly
  16248. by the target during instruction scheduling. The argument
  16249. @var{dependence_type} takes one of the following values:
  16250. @table @asis
  16251. @item @samp{no}
  16252. No dependence is costly.
  16253. @item @samp{all}
  16254. All dependences are costly.
  16255. @item @samp{true_store_to_load}
  16256. A true dependence from store to load is costly.
  16257. @item @samp{store_to_load}
  16258. Any dependence from store to load is costly.
  16259. @item @var{number}
  16260. Any dependence for which the latency is greater than or equal to
  16261. @var{number} is costly.
  16262. @end table
  16263. @item -minsert-sched-nops=@var{scheme}
  16264. @opindex minsert-sched-nops
  16265. This option controls which NOP insertion scheme is used during
  16266. the second scheduling pass. The argument @var{scheme} takes one of the
  16267. following values:
  16268. @table @asis
  16269. @item @samp{no}
  16270. Don't insert NOPs.
  16271. @item @samp{pad}
  16272. Pad with NOPs any dispatch group that has vacant issue slots,
  16273. according to the scheduler's grouping.
  16274. @item @samp{regroup_exact}
  16275. Insert NOPs to force costly dependent insns into
  16276. separate groups. Insert exactly as many NOPs as needed to force an insn
  16277. to a new group, according to the estimated processor grouping.
  16278. @item @var{number}
  16279. Insert NOPs to force costly dependent insns into
  16280. separate groups. Insert @var{number} NOPs to force an insn to a new group.
  16281. @end table
  16282. @item -mcall-sysv
  16283. @opindex mcall-sysv
  16284. On System V.4 and embedded PowerPC systems compile code using calling
  16285. conventions that adhere to the March 1995 draft of the System V
  16286. Application Binary Interface, PowerPC processor supplement. This is the
  16287. default unless you configured GCC using @samp{powerpc-*-eabiaix}.
  16288. @item -mcall-sysv-eabi
  16289. @itemx -mcall-eabi
  16290. @opindex mcall-sysv-eabi
  16291. @opindex mcall-eabi
  16292. Specify both @option{-mcall-sysv} and @option{-meabi} options.
  16293. @item -mcall-sysv-noeabi
  16294. @opindex mcall-sysv-noeabi
  16295. Specify both @option{-mcall-sysv} and @option{-mno-eabi} options.
  16296. @item -mcall-aixdesc
  16297. @opindex m
  16298. On System V.4 and embedded PowerPC systems compile code for the AIX
  16299. operating system.
  16300. @item -mcall-linux
  16301. @opindex mcall-linux
  16302. On System V.4 and embedded PowerPC systems compile code for the
  16303. Linux-based GNU system.
  16304. @item -mcall-freebsd
  16305. @opindex mcall-freebsd
  16306. On System V.4 and embedded PowerPC systems compile code for the
  16307. FreeBSD operating system.
  16308. @item -mcall-netbsd
  16309. @opindex mcall-netbsd
  16310. On System V.4 and embedded PowerPC systems compile code for the
  16311. NetBSD operating system.
  16312. @item -mcall-openbsd
  16313. @opindex mcall-netbsd
  16314. On System V.4 and embedded PowerPC systems compile code for the
  16315. OpenBSD operating system.
  16316. @item -maix-struct-return
  16317. @opindex maix-struct-return
  16318. Return all structures in memory (as specified by the AIX ABI)@.
  16319. @item -msvr4-struct-return
  16320. @opindex msvr4-struct-return
  16321. Return structures smaller than 8 bytes in registers (as specified by the
  16322. SVR4 ABI)@.
  16323. @item -mabi=@var{abi-type}
  16324. @opindex mabi
  16325. Extend the current ABI with a particular extension, or remove such extension.
  16326. Valid values are @samp{altivec}, @samp{no-altivec}, @samp{spe},
  16327. @samp{no-spe}, @samp{ibmlongdouble}, @samp{ieeelongdouble},
  16328. @samp{elfv1}, @samp{elfv2}@.
  16329. @item -mabi=spe
  16330. @opindex mabi=spe
  16331. Extend the current ABI with SPE ABI extensions. This does not change
  16332. the default ABI, instead it adds the SPE ABI extensions to the current
  16333. ABI@.
  16334. @item -mabi=no-spe
  16335. @opindex mabi=no-spe
  16336. Disable Book-E SPE ABI extensions for the current ABI@.
  16337. @item -mabi=ibmlongdouble
  16338. @opindex mabi=ibmlongdouble
  16339. Change the current ABI to use IBM extended-precision long double.
  16340. This is a PowerPC 32-bit SYSV ABI option.
  16341. @item -mabi=ieeelongdouble
  16342. @opindex mabi=ieeelongdouble
  16343. Change the current ABI to use IEEE extended-precision long double.
  16344. This is a PowerPC 32-bit Linux ABI option.
  16345. @item -mabi=elfv1
  16346. @opindex mabi=elfv1
  16347. Change the current ABI to use the ELFv1 ABI.
  16348. This is the default ABI for big-endian PowerPC 64-bit Linux.
  16349. Overriding the default ABI requires special system support and is
  16350. likely to fail in spectacular ways.
  16351. @item -mabi=elfv2
  16352. @opindex mabi=elfv2
  16353. Change the current ABI to use the ELFv2 ABI.
  16354. This is the default ABI for little-endian PowerPC 64-bit Linux.
  16355. Overriding the default ABI requires special system support and is
  16356. likely to fail in spectacular ways.
  16357. @item -mprototype
  16358. @itemx -mno-prototype
  16359. @opindex mprototype
  16360. @opindex mno-prototype
  16361. On System V.4 and embedded PowerPC systems assume that all calls to
  16362. variable argument functions are properly prototyped. Otherwise, the
  16363. compiler must insert an instruction before every non-prototyped call to
  16364. set or clear bit 6 of the condition code register (@code{CR}) to
  16365. indicate whether floating-point values are passed in the floating-point
  16366. registers in case the function takes variable arguments. With
  16367. @option{-mprototype}, only calls to prototyped variable argument functions
  16368. set or clear the bit.
  16369. @item -msim
  16370. @opindex msim
  16371. On embedded PowerPC systems, assume that the startup module is called
  16372. @file{sim-crt0.o} and that the standard C libraries are @file{libsim.a} and
  16373. @file{libc.a}. This is the default for @samp{powerpc-*-eabisim}
  16374. configurations.
  16375. @item -mmvme
  16376. @opindex mmvme
  16377. On embedded PowerPC systems, assume that the startup module is called
  16378. @file{crt0.o} and the standard C libraries are @file{libmvme.a} and
  16379. @file{libc.a}.
  16380. @item -mads
  16381. @opindex mads
  16382. On embedded PowerPC systems, assume that the startup module is called
  16383. @file{crt0.o} and the standard C libraries are @file{libads.a} and
  16384. @file{libc.a}.
  16385. @item -myellowknife
  16386. @opindex myellowknife
  16387. On embedded PowerPC systems, assume that the startup module is called
  16388. @file{crt0.o} and the standard C libraries are @file{libyk.a} and
  16389. @file{libc.a}.
  16390. @item -mvxworks
  16391. @opindex mvxworks
  16392. On System V.4 and embedded PowerPC systems, specify that you are
  16393. compiling for a VxWorks system.
  16394. @item -memb
  16395. @opindex memb
  16396. On embedded PowerPC systems, set the @code{PPC_EMB} bit in the ELF flags
  16397. header to indicate that @samp{eabi} extended relocations are used.
  16398. @item -meabi
  16399. @itemx -mno-eabi
  16400. @opindex meabi
  16401. @opindex mno-eabi
  16402. On System V.4 and embedded PowerPC systems do (do not) adhere to the
  16403. Embedded Applications Binary Interface (EABI), which is a set of
  16404. modifications to the System V.4 specifications. Selecting @option{-meabi}
  16405. means that the stack is aligned to an 8-byte boundary, a function
  16406. @code{__eabi} is called from @code{main} to set up the EABI
  16407. environment, and the @option{-msdata} option can use both @code{r2} and
  16408. @code{r13} to point to two separate small data areas. Selecting
  16409. @option{-mno-eabi} means that the stack is aligned to a 16-byte boundary,
  16410. no EABI initialization function is called from @code{main}, and the
  16411. @option{-msdata} option only uses @code{r13} to point to a single
  16412. small data area. The @option{-meabi} option is on by default if you
  16413. configured GCC using one of the @samp{powerpc*-*-eabi*} options.
  16414. @item -msdata=eabi
  16415. @opindex msdata=eabi
  16416. On System V.4 and embedded PowerPC systems, put small initialized
  16417. @code{const} global and static data in the @code{.sdata2} section, which
  16418. is pointed to by register @code{r2}. Put small initialized
  16419. non-@code{const} global and static data in the @code{.sdata} section,
  16420. which is pointed to by register @code{r13}. Put small uninitialized
  16421. global and static data in the @code{.sbss} section, which is adjacent to
  16422. the @code{.sdata} section. The @option{-msdata=eabi} option is
  16423. incompatible with the @option{-mrelocatable} option. The
  16424. @option{-msdata=eabi} option also sets the @option{-memb} option.
  16425. @item -msdata=sysv
  16426. @opindex msdata=sysv
  16427. On System V.4 and embedded PowerPC systems, put small global and static
  16428. data in the @code{.sdata} section, which is pointed to by register
  16429. @code{r13}. Put small uninitialized global and static data in the
  16430. @code{.sbss} section, which is adjacent to the @code{.sdata} section.
  16431. The @option{-msdata=sysv} option is incompatible with the
  16432. @option{-mrelocatable} option.
  16433. @item -msdata=default
  16434. @itemx -msdata
  16435. @opindex msdata=default
  16436. @opindex msdata
  16437. On System V.4 and embedded PowerPC systems, if @option{-meabi} is used,
  16438. compile code the same as @option{-msdata=eabi}, otherwise compile code the
  16439. same as @option{-msdata=sysv}.
  16440. @item -msdata=data
  16441. @opindex msdata=data
  16442. On System V.4 and embedded PowerPC systems, put small global
  16443. data in the @code{.sdata} section. Put small uninitialized global
  16444. data in the @code{.sbss} section. Do not use register @code{r13}
  16445. to address small data however. This is the default behavior unless
  16446. other @option{-msdata} options are used.
  16447. @item -msdata=none
  16448. @itemx -mno-sdata
  16449. @opindex msdata=none
  16450. @opindex mno-sdata
  16451. On embedded PowerPC systems, put all initialized global and static data
  16452. in the @code{.data} section, and all uninitialized data in the
  16453. @code{.bss} section.
  16454. @item -mblock-move-inline-limit=@var{num}
  16455. @opindex mblock-move-inline-limit
  16456. Inline all block moves (such as calls to @code{memcpy} or structure
  16457. copies) less than or equal to @var{num} bytes. The minimum value for
  16458. @var{num} is 32 bytes on 32-bit targets and 64 bytes on 64-bit
  16459. targets. The default value is target-specific.
  16460. @item -G @var{num}
  16461. @opindex G
  16462. @cindex smaller data references (PowerPC)
  16463. @cindex .sdata/.sdata2 references (PowerPC)
  16464. On embedded PowerPC systems, put global and static items less than or
  16465. equal to @var{num} bytes into the small data or BSS sections instead of
  16466. the normal data or BSS section. By default, @var{num} is 8. The
  16467. @option{-G @var{num}} switch is also passed to the linker.
  16468. All modules should be compiled with the same @option{-G @var{num}} value.
  16469. @item -mregnames
  16470. @itemx -mno-regnames
  16471. @opindex mregnames
  16472. @opindex mno-regnames
  16473. On System V.4 and embedded PowerPC systems do (do not) emit register
  16474. names in the assembly language output using symbolic forms.
  16475. @item -mlongcall
  16476. @itemx -mno-longcall
  16477. @opindex mlongcall
  16478. @opindex mno-longcall
  16479. By default assume that all calls are far away so that a longer and more
  16480. expensive calling sequence is required. This is required for calls
  16481. farther than 32 megabytes (33,554,432 bytes) from the current location.
  16482. A short call is generated if the compiler knows
  16483. the call cannot be that far away. This setting can be overridden by
  16484. the @code{shortcall} function attribute, or by @code{#pragma
  16485. longcall(0)}.
  16486. Some linkers are capable of detecting out-of-range calls and generating
  16487. glue code on the fly. On these systems, long calls are unnecessary and
  16488. generate slower code. As of this writing, the AIX linker can do this,
  16489. as can the GNU linker for PowerPC/64. It is planned to add this feature
  16490. to the GNU linker for 32-bit PowerPC systems as well.
  16491. On Darwin/PPC systems, @code{#pragma longcall} generates @code{jbsr
  16492. callee, L42}, plus a @dfn{branch island} (glue code). The two target
  16493. addresses represent the callee and the branch island. The
  16494. Darwin/PPC linker prefers the first address and generates a @code{bl
  16495. callee} if the PPC @code{bl} instruction reaches the callee directly;
  16496. otherwise, the linker generates @code{bl L42} to call the branch
  16497. island. The branch island is appended to the body of the
  16498. calling function; it computes the full 32-bit address of the callee
  16499. and jumps to it.
  16500. On Mach-O (Darwin) systems, this option directs the compiler emit to
  16501. the glue for every direct call, and the Darwin linker decides whether
  16502. to use or discard it.
  16503. In the future, GCC may ignore all longcall specifications
  16504. when the linker is known to generate glue.
  16505. @item -mtls-markers
  16506. @itemx -mno-tls-markers
  16507. @opindex mtls-markers
  16508. @opindex mno-tls-markers
  16509. Mark (do not mark) calls to @code{__tls_get_addr} with a relocation
  16510. specifying the function argument. The relocation allows the linker to
  16511. reliably associate function call with argument setup instructions for
  16512. TLS optimization, which in turn allows GCC to better schedule the
  16513. sequence.
  16514. @item -pthread
  16515. @opindex pthread
  16516. Adds support for multithreading with the @dfn{pthreads} library.
  16517. This option sets flags for both the preprocessor and linker.
  16518. @item -mrecip
  16519. @itemx -mno-recip
  16520. @opindex mrecip
  16521. This option enables use of the reciprocal estimate and
  16522. reciprocal square root estimate instructions with additional
  16523. Newton-Raphson steps to increase precision instead of doing a divide or
  16524. square root and divide for floating-point arguments. You should use
  16525. the @option{-ffast-math} option when using @option{-mrecip} (or at
  16526. least @option{-funsafe-math-optimizations},
  16527. @option{-finite-math-only}, @option{-freciprocal-math} and
  16528. @option{-fno-trapping-math}). Note that while the throughput of the
  16529. sequence is generally higher than the throughput of the non-reciprocal
  16530. instruction, the precision of the sequence can be decreased by up to 2
  16531. ulp (i.e.@: the inverse of 1.0 equals 0.99999994) for reciprocal square
  16532. roots.
  16533. @item -mrecip=@var{opt}
  16534. @opindex mrecip=opt
  16535. This option controls which reciprocal estimate instructions
  16536. may be used. @var{opt} is a comma-separated list of options, which may
  16537. be preceded by a @code{!} to invert the option:
  16538. @table @samp
  16539. @item all
  16540. Enable all estimate instructions.
  16541. @item default
  16542. Enable the default instructions, equivalent to @option{-mrecip}.
  16543. @item none
  16544. Disable all estimate instructions, equivalent to @option{-mno-recip}.
  16545. @item div
  16546. Enable the reciprocal approximation instructions for both
  16547. single and double precision.
  16548. @item divf
  16549. Enable the single-precision reciprocal approximation instructions.
  16550. @item divd
  16551. Enable the double-precision reciprocal approximation instructions.
  16552. @item rsqrt
  16553. Enable the reciprocal square root approximation instructions for both
  16554. single and double precision.
  16555. @item rsqrtf
  16556. Enable the single-precision reciprocal square root approximation instructions.
  16557. @item rsqrtd
  16558. Enable the double-precision reciprocal square root approximation instructions.
  16559. @end table
  16560. So, for example, @option{-mrecip=all,!rsqrtd} enables
  16561. all of the reciprocal estimate instructions, except for the
  16562. @code{FRSQRTE}, @code{XSRSQRTEDP}, and @code{XVRSQRTEDP} instructions
  16563. which handle the double-precision reciprocal square root calculations.
  16564. @item -mrecip-precision
  16565. @itemx -mno-recip-precision
  16566. @opindex mrecip-precision
  16567. Assume (do not assume) that the reciprocal estimate instructions
  16568. provide higher-precision estimates than is mandated by the PowerPC
  16569. ABI. Selecting @option{-mcpu=power6}, @option{-mcpu=power7} or
  16570. @option{-mcpu=power8} automatically selects @option{-mrecip-precision}.
  16571. The double-precision square root estimate instructions are not generated by
  16572. default on low-precision machines, since they do not provide an
  16573. estimate that converges after three steps.
  16574. @item -mveclibabi=@var{type}
  16575. @opindex mveclibabi
  16576. Specifies the ABI type to use for vectorizing intrinsics using an
  16577. external library. The only type supported at present is @samp{mass},
  16578. which specifies to use IBM's Mathematical Acceleration Subsystem
  16579. (MASS) libraries for vectorizing intrinsics using external libraries.
  16580. GCC currently emits calls to @code{acosd2}, @code{acosf4},
  16581. @code{acoshd2}, @code{acoshf4}, @code{asind2}, @code{asinf4},
  16582. @code{asinhd2}, @code{asinhf4}, @code{atan2d2}, @code{atan2f4},
  16583. @code{atand2}, @code{atanf4}, @code{atanhd2}, @code{atanhf4},
  16584. @code{cbrtd2}, @code{cbrtf4}, @code{cosd2}, @code{cosf4},
  16585. @code{coshd2}, @code{coshf4}, @code{erfcd2}, @code{erfcf4},
  16586. @code{erfd2}, @code{erff4}, @code{exp2d2}, @code{exp2f4},
  16587. @code{expd2}, @code{expf4}, @code{expm1d2}, @code{expm1f4},
  16588. @code{hypotd2}, @code{hypotf4}, @code{lgammad2}, @code{lgammaf4},
  16589. @code{log10d2}, @code{log10f4}, @code{log1pd2}, @code{log1pf4},
  16590. @code{log2d2}, @code{log2f4}, @code{logd2}, @code{logf4},
  16591. @code{powd2}, @code{powf4}, @code{sind2}, @code{sinf4}, @code{sinhd2},
  16592. @code{sinhf4}, @code{sqrtd2}, @code{sqrtf4}, @code{tand2},
  16593. @code{tanf4}, @code{tanhd2}, and @code{tanhf4} when generating code
  16594. for power7. Both @option{-ftree-vectorize} and
  16595. @option{-funsafe-math-optimizations} must also be enabled. The MASS
  16596. libraries must be specified at link time.
  16597. @item -mfriz
  16598. @itemx -mno-friz
  16599. @opindex mfriz
  16600. Generate (do not generate) the @code{friz} instruction when the
  16601. @option{-funsafe-math-optimizations} option is used to optimize
  16602. rounding of floating-point values to 64-bit integer and back to floating
  16603. point. The @code{friz} instruction does not return the same value if
  16604. the floating-point number is too large to fit in an integer.
  16605. @item -mpointers-to-nested-functions
  16606. @itemx -mno-pointers-to-nested-functions
  16607. @opindex mpointers-to-nested-functions
  16608. Generate (do not generate) code to load up the static chain register
  16609. (@code{r11}) when calling through a pointer on AIX and 64-bit Linux
  16610. systems where a function pointer points to a 3-word descriptor giving
  16611. the function address, TOC value to be loaded in register @code{r2}, and
  16612. static chain value to be loaded in register @code{r11}. The
  16613. @option{-mpointers-to-nested-functions} is on by default. You cannot
  16614. call through pointers to nested functions or pointers
  16615. to functions compiled in other languages that use the static chain if
  16616. you use @option{-mno-pointers-to-nested-functions}.
  16617. @item -msave-toc-indirect
  16618. @itemx -mno-save-toc-indirect
  16619. @opindex msave-toc-indirect
  16620. Generate (do not generate) code to save the TOC value in the reserved
  16621. stack location in the function prologue if the function calls through
  16622. a pointer on AIX and 64-bit Linux systems. If the TOC value is not
  16623. saved in the prologue, it is saved just before the call through the
  16624. pointer. The @option{-mno-save-toc-indirect} option is the default.
  16625. @item -mcompat-align-parm
  16626. @itemx -mno-compat-align-parm
  16627. @opindex mcompat-align-parm
  16628. Generate (do not generate) code to pass structure parameters with a
  16629. maximum alignment of 64 bits, for compatibility with older versions
  16630. of GCC.
  16631. Older versions of GCC (prior to 4.9.0) incorrectly did not align a
  16632. structure parameter on a 128-bit boundary when that structure contained
  16633. a member requiring 128-bit alignment. This is corrected in more
  16634. recent versions of GCC. This option may be used to generate code
  16635. that is compatible with functions compiled with older versions of
  16636. GCC.
  16637. The @option{-mno-compat-align-parm} option is the default.
  16638. @end table
  16639. @node RX Options
  16640. @subsection RX Options
  16641. @cindex RX Options
  16642. These command-line options are defined for RX targets:
  16643. @table @gcctabopt
  16644. @item -m64bit-doubles
  16645. @itemx -m32bit-doubles
  16646. @opindex m64bit-doubles
  16647. @opindex m32bit-doubles
  16648. Make the @code{double} data type be 64 bits (@option{-m64bit-doubles})
  16649. or 32 bits (@option{-m32bit-doubles}) in size. The default is
  16650. @option{-m32bit-doubles}. @emph{Note} RX floating-point hardware only
  16651. works on 32-bit values, which is why the default is
  16652. @option{-m32bit-doubles}.
  16653. @item -fpu
  16654. @itemx -nofpu
  16655. @opindex fpu
  16656. @opindex nofpu
  16657. Enables (@option{-fpu}) or disables (@option{-nofpu}) the use of RX
  16658. floating-point hardware. The default is enabled for the RX600
  16659. series and disabled for the RX200 series.
  16660. Floating-point instructions are only generated for 32-bit floating-point
  16661. values, however, so the FPU hardware is not used for doubles if the
  16662. @option{-m64bit-doubles} option is used.
  16663. @emph{Note} If the @option{-fpu} option is enabled then
  16664. @option{-funsafe-math-optimizations} is also enabled automatically.
  16665. This is because the RX FPU instructions are themselves unsafe.
  16666. @item -mcpu=@var{name}
  16667. @opindex mcpu
  16668. Selects the type of RX CPU to be targeted. Currently three types are
  16669. supported, the generic @samp{RX600} and @samp{RX200} series hardware and
  16670. the specific @samp{RX610} CPU. The default is @samp{RX600}.
  16671. The only difference between @samp{RX600} and @samp{RX610} is that the
  16672. @samp{RX610} does not support the @code{MVTIPL} instruction.
  16673. The @samp{RX200} series does not have a hardware floating-point unit
  16674. and so @option{-nofpu} is enabled by default when this type is
  16675. selected.
  16676. @item -mbig-endian-data
  16677. @itemx -mlittle-endian-data
  16678. @opindex mbig-endian-data
  16679. @opindex mlittle-endian-data
  16680. Store data (but not code) in the big-endian format. The default is
  16681. @option{-mlittle-endian-data}, i.e.@: to store data in the little-endian
  16682. format.
  16683. @item -msmall-data-limit=@var{N}
  16684. @opindex msmall-data-limit
  16685. Specifies the maximum size in bytes of global and static variables
  16686. which can be placed into the small data area. Using the small data
  16687. area can lead to smaller and faster code, but the size of area is
  16688. limited and it is up to the programmer to ensure that the area does
  16689. not overflow. Also when the small data area is used one of the RX's
  16690. registers (usually @code{r13}) is reserved for use pointing to this
  16691. area, so it is no longer available for use by the compiler. This
  16692. could result in slower and/or larger code if variables are pushed onto
  16693. the stack instead of being held in this register.
  16694. Note, common variables (variables that have not been initialized) and
  16695. constants are not placed into the small data area as they are assigned
  16696. to other sections in the output executable.
  16697. The default value is zero, which disables this feature. Note, this
  16698. feature is not enabled by default with higher optimization levels
  16699. (@option{-O2} etc) because of the potentially detrimental effects of
  16700. reserving a register. It is up to the programmer to experiment and
  16701. discover whether this feature is of benefit to their program. See the
  16702. description of the @option{-mpid} option for a description of how the
  16703. actual register to hold the small data area pointer is chosen.
  16704. @item -msim
  16705. @itemx -mno-sim
  16706. @opindex msim
  16707. @opindex mno-sim
  16708. Use the simulator runtime. The default is to use the libgloss
  16709. board-specific runtime.
  16710. @item -mas100-syntax
  16711. @itemx -mno-as100-syntax
  16712. @opindex mas100-syntax
  16713. @opindex mno-as100-syntax
  16714. When generating assembler output use a syntax that is compatible with
  16715. Renesas's AS100 assembler. This syntax can also be handled by the GAS
  16716. assembler, but it has some restrictions so it is not generated by default.
  16717. @item -mmax-constant-size=@var{N}
  16718. @opindex mmax-constant-size
  16719. Specifies the maximum size, in bytes, of a constant that can be used as
  16720. an operand in a RX instruction. Although the RX instruction set does
  16721. allow constants of up to 4 bytes in length to be used in instructions,
  16722. a longer value equates to a longer instruction. Thus in some
  16723. circumstances it can be beneficial to restrict the size of constants
  16724. that are used in instructions. Constants that are too big are instead
  16725. placed into a constant pool and referenced via register indirection.
  16726. The value @var{N} can be between 0 and 4. A value of 0 (the default)
  16727. or 4 means that constants of any size are allowed.
  16728. @item -mrelax
  16729. @opindex mrelax
  16730. Enable linker relaxation. Linker relaxation is a process whereby the
  16731. linker attempts to reduce the size of a program by finding shorter
  16732. versions of various instructions. Disabled by default.
  16733. @item -mint-register=@var{N}
  16734. @opindex mint-register
  16735. Specify the number of registers to reserve for fast interrupt handler
  16736. functions. The value @var{N} can be between 0 and 4. A value of 1
  16737. means that register @code{r13} is reserved for the exclusive use
  16738. of fast interrupt handlers. A value of 2 reserves @code{r13} and
  16739. @code{r12}. A value of 3 reserves @code{r13}, @code{r12} and
  16740. @code{r11}, and a value of 4 reserves @code{r13} through @code{r10}.
  16741. A value of 0, the default, does not reserve any registers.
  16742. @item -msave-acc-in-interrupts
  16743. @opindex msave-acc-in-interrupts
  16744. Specifies that interrupt handler functions should preserve the
  16745. accumulator register. This is only necessary if normal code might use
  16746. the accumulator register, for example because it performs 64-bit
  16747. multiplications. The default is to ignore the accumulator as this
  16748. makes the interrupt handlers faster.
  16749. @item -mpid
  16750. @itemx -mno-pid
  16751. @opindex mpid
  16752. @opindex mno-pid
  16753. Enables the generation of position independent data. When enabled any
  16754. access to constant data is done via an offset from a base address
  16755. held in a register. This allows the location of constant data to be
  16756. determined at run time without requiring the executable to be
  16757. relocated, which is a benefit to embedded applications with tight
  16758. memory constraints. Data that can be modified is not affected by this
  16759. option.
  16760. Note, using this feature reserves a register, usually @code{r13}, for
  16761. the constant data base address. This can result in slower and/or
  16762. larger code, especially in complicated functions.
  16763. The actual register chosen to hold the constant data base address
  16764. depends upon whether the @option{-msmall-data-limit} and/or the
  16765. @option{-mint-register} command-line options are enabled. Starting
  16766. with register @code{r13} and proceeding downwards, registers are
  16767. allocated first to satisfy the requirements of @option{-mint-register},
  16768. then @option{-mpid} and finally @option{-msmall-data-limit}. Thus it
  16769. is possible for the small data area register to be @code{r8} if both
  16770. @option{-mint-register=4} and @option{-mpid} are specified on the
  16771. command line.
  16772. By default this feature is not enabled. The default can be restored
  16773. via the @option{-mno-pid} command-line option.
  16774. @item -mno-warn-multiple-fast-interrupts
  16775. @itemx -mwarn-multiple-fast-interrupts
  16776. @opindex mno-warn-multiple-fast-interrupts
  16777. @opindex mwarn-multiple-fast-interrupts
  16778. Prevents GCC from issuing a warning message if it finds more than one
  16779. fast interrupt handler when it is compiling a file. The default is to
  16780. issue a warning for each extra fast interrupt handler found, as the RX
  16781. only supports one such interrupt.
  16782. @end table
  16783. @emph{Note:} The generic GCC command-line option @option{-ffixed-@var{reg}}
  16784. has special significance to the RX port when used with the
  16785. @code{interrupt} function attribute. This attribute indicates a
  16786. function intended to process fast interrupts. GCC ensures
  16787. that it only uses the registers @code{r10}, @code{r11}, @code{r12}
  16788. and/or @code{r13} and only provided that the normal use of the
  16789. corresponding registers have been restricted via the
  16790. @option{-ffixed-@var{reg}} or @option{-mint-register} command-line
  16791. options.
  16792. @node S/390 and zSeries Options
  16793. @subsection S/390 and zSeries Options
  16794. @cindex S/390 and zSeries Options
  16795. These are the @samp{-m} options defined for the S/390 and zSeries architecture.
  16796. @table @gcctabopt
  16797. @item -mhard-float
  16798. @itemx -msoft-float
  16799. @opindex mhard-float
  16800. @opindex msoft-float
  16801. Use (do not use) the hardware floating-point instructions and registers
  16802. for floating-point operations. When @option{-msoft-float} is specified,
  16803. functions in @file{libgcc.a} are used to perform floating-point
  16804. operations. When @option{-mhard-float} is specified, the compiler
  16805. generates IEEE floating-point instructions. This is the default.
  16806. @item -mhard-dfp
  16807. @itemx -mno-hard-dfp
  16808. @opindex mhard-dfp
  16809. @opindex mno-hard-dfp
  16810. Use (do not use) the hardware decimal-floating-point instructions for
  16811. decimal-floating-point operations. When @option{-mno-hard-dfp} is
  16812. specified, functions in @file{libgcc.a} are used to perform
  16813. decimal-floating-point operations. When @option{-mhard-dfp} is
  16814. specified, the compiler generates decimal-floating-point hardware
  16815. instructions. This is the default for @option{-march=z9-ec} or higher.
  16816. @item -mlong-double-64
  16817. @itemx -mlong-double-128
  16818. @opindex mlong-double-64
  16819. @opindex mlong-double-128
  16820. These switches control the size of @code{long double} type. A size
  16821. of 64 bits makes the @code{long double} type equivalent to the @code{double}
  16822. type. This is the default.
  16823. @item -mbackchain
  16824. @itemx -mno-backchain
  16825. @opindex mbackchain
  16826. @opindex mno-backchain
  16827. Store (do not store) the address of the caller's frame as backchain pointer
  16828. into the callee's stack frame.
  16829. A backchain may be needed to allow debugging using tools that do not understand
  16830. DWARF 2 call frame information.
  16831. When @option{-mno-packed-stack} is in effect, the backchain pointer is stored
  16832. at the bottom of the stack frame; when @option{-mpacked-stack} is in effect,
  16833. the backchain is placed into the topmost word of the 96/160 byte register
  16834. save area.
  16835. In general, code compiled with @option{-mbackchain} is call-compatible with
  16836. code compiled with @option{-mmo-backchain}; however, use of the backchain
  16837. for debugging purposes usually requires that the whole binary is built with
  16838. @option{-mbackchain}. Note that the combination of @option{-mbackchain},
  16839. @option{-mpacked-stack} and @option{-mhard-float} is not supported. In order
  16840. to build a linux kernel use @option{-msoft-float}.
  16841. The default is to not maintain the backchain.
  16842. @item -mpacked-stack
  16843. @itemx -mno-packed-stack
  16844. @opindex mpacked-stack
  16845. @opindex mno-packed-stack
  16846. Use (do not use) the packed stack layout. When @option{-mno-packed-stack} is
  16847. specified, the compiler uses the all fields of the 96/160 byte register save
  16848. area only for their default purpose; unused fields still take up stack space.
  16849. When @option{-mpacked-stack} is specified, register save slots are densely
  16850. packed at the top of the register save area; unused space is reused for other
  16851. purposes, allowing for more efficient use of the available stack space.
  16852. However, when @option{-mbackchain} is also in effect, the topmost word of
  16853. the save area is always used to store the backchain, and the return address
  16854. register is always saved two words below the backchain.
  16855. As long as the stack frame backchain is not used, code generated with
  16856. @option{-mpacked-stack} is call-compatible with code generated with
  16857. @option{-mno-packed-stack}. Note that some non-FSF releases of GCC 2.95 for
  16858. S/390 or zSeries generated code that uses the stack frame backchain at run
  16859. time, not just for debugging purposes. Such code is not call-compatible
  16860. with code compiled with @option{-mpacked-stack}. Also, note that the
  16861. combination of @option{-mbackchain},
  16862. @option{-mpacked-stack} and @option{-mhard-float} is not supported. In order
  16863. to build a linux kernel use @option{-msoft-float}.
  16864. The default is to not use the packed stack layout.
  16865. @item -msmall-exec
  16866. @itemx -mno-small-exec
  16867. @opindex msmall-exec
  16868. @opindex mno-small-exec
  16869. Generate (or do not generate) code using the @code{bras} instruction
  16870. to do subroutine calls.
  16871. This only works reliably if the total executable size does not
  16872. exceed 64k. The default is to use the @code{basr} instruction instead,
  16873. which does not have this limitation.
  16874. @item -m64
  16875. @itemx -m31
  16876. @opindex m64
  16877. @opindex m31
  16878. When @option{-m31} is specified, generate code compliant to the
  16879. GNU/Linux for S/390 ABI@. When @option{-m64} is specified, generate
  16880. code compliant to the GNU/Linux for zSeries ABI@. This allows GCC in
  16881. particular to generate 64-bit instructions. For the @samp{s390}
  16882. targets, the default is @option{-m31}, while the @samp{s390x}
  16883. targets default to @option{-m64}.
  16884. @item -mzarch
  16885. @itemx -mesa
  16886. @opindex mzarch
  16887. @opindex mesa
  16888. When @option{-mzarch} is specified, generate code using the
  16889. instructions available on z/Architecture.
  16890. When @option{-mesa} is specified, generate code using the
  16891. instructions available on ESA/390. Note that @option{-mesa} is
  16892. not possible with @option{-m64}.
  16893. When generating code compliant to the GNU/Linux for S/390 ABI,
  16894. the default is @option{-mesa}. When generating code compliant
  16895. to the GNU/Linux for zSeries ABI, the default is @option{-mzarch}.
  16896. @item -mmvcle
  16897. @itemx -mno-mvcle
  16898. @opindex mmvcle
  16899. @opindex mno-mvcle
  16900. Generate (or do not generate) code using the @code{mvcle} instruction
  16901. to perform block moves. When @option{-mno-mvcle} is specified,
  16902. use a @code{mvc} loop instead. This is the default unless optimizing for
  16903. size.
  16904. @item -mdebug
  16905. @itemx -mno-debug
  16906. @opindex mdebug
  16907. @opindex mno-debug
  16908. Print (or do not print) additional debug information when compiling.
  16909. The default is to not print debug information.
  16910. @item -march=@var{cpu-type}
  16911. @opindex march
  16912. Generate code that runs on @var{cpu-type}, which is the name of a system
  16913. representing a certain processor type. Possible values for
  16914. @var{cpu-type} are @samp{g5}, @samp{g6}, @samp{z900}, @samp{z990},
  16915. @samp{z9-109}, @samp{z9-ec}, @samp{z10}, @samp{z196}, @samp{zEC12},
  16916. and @samp{z13}.
  16917. When generating code using the instructions available on z/Architecture,
  16918. the default is @option{-march=z900}. Otherwise, the default is
  16919. @option{-march=g5}.
  16920. @item -mtune=@var{cpu-type}
  16921. @opindex mtune
  16922. Tune to @var{cpu-type} everything applicable about the generated code,
  16923. except for the ABI and the set of available instructions.
  16924. The list of @var{cpu-type} values is the same as for @option{-march}.
  16925. The default is the value used for @option{-march}.
  16926. @item -mtpf-trace
  16927. @itemx -mno-tpf-trace
  16928. @opindex mtpf-trace
  16929. @opindex mno-tpf-trace
  16930. Generate code that adds (does not add) in TPF OS specific branches to trace
  16931. routines in the operating system. This option is off by default, even
  16932. when compiling for the TPF OS@.
  16933. @item -mfused-madd
  16934. @itemx -mno-fused-madd
  16935. @opindex mfused-madd
  16936. @opindex mno-fused-madd
  16937. Generate code that uses (does not use) the floating-point multiply and
  16938. accumulate instructions. These instructions are generated by default if
  16939. hardware floating point is used.
  16940. @item -mwarn-framesize=@var{framesize}
  16941. @opindex mwarn-framesize
  16942. Emit a warning if the current function exceeds the given frame size. Because
  16943. this is a compile-time check it doesn't need to be a real problem when the program
  16944. runs. It is intended to identify functions that most probably cause
  16945. a stack overflow. It is useful to be used in an environment with limited stack
  16946. size e.g.@: the linux kernel.
  16947. @item -mwarn-dynamicstack
  16948. @opindex mwarn-dynamicstack
  16949. Emit a warning if the function calls @code{alloca} or uses dynamically-sized
  16950. arrays. This is generally a bad idea with a limited stack size.
  16951. @item -mstack-guard=@var{stack-guard}
  16952. @itemx -mstack-size=@var{stack-size}
  16953. @opindex mstack-guard
  16954. @opindex mstack-size
  16955. If these options are provided the S/390 back end emits additional instructions in
  16956. the function prologue that trigger a trap if the stack size is @var{stack-guard}
  16957. bytes above the @var{stack-size} (remember that the stack on S/390 grows downward).
  16958. If the @var{stack-guard} option is omitted the smallest power of 2 larger than
  16959. the frame size of the compiled function is chosen.
  16960. These options are intended to be used to help debugging stack overflow problems.
  16961. The additionally emitted code causes only little overhead and hence can also be
  16962. used in production-like systems without greater performance degradation. The given
  16963. values have to be exact powers of 2 and @var{stack-size} has to be greater than
  16964. @var{stack-guard} without exceeding 64k.
  16965. In order to be efficient the extra code makes the assumption that the stack starts
  16966. at an address aligned to the value given by @var{stack-size}.
  16967. The @var{stack-guard} option can only be used in conjunction with @var{stack-size}.
  16968. @item -mhotpatch=@var{pre-halfwords},@var{post-halfwords}
  16969. @opindex mhotpatch
  16970. If the hotpatch option is enabled, a ``hot-patching'' function
  16971. prologue is generated for all functions in the compilation unit.
  16972. The funtion label is prepended with the given number of two-byte
  16973. NOP instructions (@var{pre-halfwords}, maximum 1000000). After
  16974. the label, 2 * @var{post-halfwords} bytes are appended, using the
  16975. largest NOP like instructions the architecture allows (maximum
  16976. 1000000).
  16977. If both arguments are zero, hotpatching is disabled.
  16978. This option can be overridden for individual functions with the
  16979. @code{hotpatch} attribute.
  16980. @end table
  16981. @node Score Options
  16982. @subsection Score Options
  16983. @cindex Score Options
  16984. These options are defined for Score implementations:
  16985. @table @gcctabopt
  16986. @item -meb
  16987. @opindex meb
  16988. Compile code for big-endian mode. This is the default.
  16989. @item -mel
  16990. @opindex mel
  16991. Compile code for little-endian mode.
  16992. @item -mnhwloop
  16993. @opindex mnhwloop
  16994. Disable generation of @code{bcnz} instructions.
  16995. @item -muls
  16996. @opindex muls
  16997. Enable generation of unaligned load and store instructions.
  16998. @item -mmac
  16999. @opindex mmac
  17000. Enable the use of multiply-accumulate instructions. Disabled by default.
  17001. @item -mscore5
  17002. @opindex mscore5
  17003. Specify the SCORE5 as the target architecture.
  17004. @item -mscore5u
  17005. @opindex mscore5u
  17006. Specify the SCORE5U of the target architecture.
  17007. @item -mscore7
  17008. @opindex mscore7
  17009. Specify the SCORE7 as the target architecture. This is the default.
  17010. @item -mscore7d
  17011. @opindex mscore7d
  17012. Specify the SCORE7D as the target architecture.
  17013. @end table
  17014. @node SH Options
  17015. @subsection SH Options
  17016. These @samp{-m} options are defined for the SH implementations:
  17017. @table @gcctabopt
  17018. @item -m1
  17019. @opindex m1
  17020. Generate code for the SH1.
  17021. @item -m2
  17022. @opindex m2
  17023. Generate code for the SH2.
  17024. @item -m2e
  17025. Generate code for the SH2e.
  17026. @item -m2a-nofpu
  17027. @opindex m2a-nofpu
  17028. Generate code for the SH2a without FPU, or for a SH2a-FPU in such a way
  17029. that the floating-point unit is not used.
  17030. @item -m2a-single-only
  17031. @opindex m2a-single-only
  17032. Generate code for the SH2a-FPU, in such a way that no double-precision
  17033. floating-point operations are used.
  17034. @item -m2a-single
  17035. @opindex m2a-single
  17036. Generate code for the SH2a-FPU assuming the floating-point unit is in
  17037. single-precision mode by default.
  17038. @item -m2a
  17039. @opindex m2a
  17040. Generate code for the SH2a-FPU assuming the floating-point unit is in
  17041. double-precision mode by default.
  17042. @item -m3
  17043. @opindex m3
  17044. Generate code for the SH3.
  17045. @item -m3e
  17046. @opindex m3e
  17047. Generate code for the SH3e.
  17048. @item -m4-nofpu
  17049. @opindex m4-nofpu
  17050. Generate code for the SH4 without a floating-point unit.
  17051. @item -m4-single-only
  17052. @opindex m4-single-only
  17053. Generate code for the SH4 with a floating-point unit that only
  17054. supports single-precision arithmetic.
  17055. @item -m4-single
  17056. @opindex m4-single
  17057. Generate code for the SH4 assuming the floating-point unit is in
  17058. single-precision mode by default.
  17059. @item -m4
  17060. @opindex m4
  17061. Generate code for the SH4.
  17062. @item -m4-100
  17063. @opindex m4-100
  17064. Generate code for SH4-100.
  17065. @item -m4-100-nofpu
  17066. @opindex m4-100-nofpu
  17067. Generate code for SH4-100 in such a way that the
  17068. floating-point unit is not used.
  17069. @item -m4-100-single
  17070. @opindex m4-100-single
  17071. Generate code for SH4-100 assuming the floating-point unit is in
  17072. single-precision mode by default.
  17073. @item -m4-100-single-only
  17074. @opindex m4-100-single-only
  17075. Generate code for SH4-100 in such a way that no double-precision
  17076. floating-point operations are used.
  17077. @item -m4-200
  17078. @opindex m4-200
  17079. Generate code for SH4-200.
  17080. @item -m4-200-nofpu
  17081. @opindex m4-200-nofpu
  17082. Generate code for SH4-200 without in such a way that the
  17083. floating-point unit is not used.
  17084. @item -m4-200-single
  17085. @opindex m4-200-single
  17086. Generate code for SH4-200 assuming the floating-point unit is in
  17087. single-precision mode by default.
  17088. @item -m4-200-single-only
  17089. @opindex m4-200-single-only
  17090. Generate code for SH4-200 in such a way that no double-precision
  17091. floating-point operations are used.
  17092. @item -m4-300
  17093. @opindex m4-300
  17094. Generate code for SH4-300.
  17095. @item -m4-300-nofpu
  17096. @opindex m4-300-nofpu
  17097. Generate code for SH4-300 without in such a way that the
  17098. floating-point unit is not used.
  17099. @item -m4-300-single
  17100. @opindex m4-300-single
  17101. Generate code for SH4-300 in such a way that no double-precision
  17102. floating-point operations are used.
  17103. @item -m4-300-single-only
  17104. @opindex m4-300-single-only
  17105. Generate code for SH4-300 in such a way that no double-precision
  17106. floating-point operations are used.
  17107. @item -m4-340
  17108. @opindex m4-340
  17109. Generate code for SH4-340 (no MMU, no FPU).
  17110. @item -m4-500
  17111. @opindex m4-500
  17112. Generate code for SH4-500 (no FPU). Passes @option{-isa=sh4-nofpu} to the
  17113. assembler.
  17114. @item -m4a-nofpu
  17115. @opindex m4a-nofpu
  17116. Generate code for the SH4al-dsp, or for a SH4a in such a way that the
  17117. floating-point unit is not used.
  17118. @item -m4a-single-only
  17119. @opindex m4a-single-only
  17120. Generate code for the SH4a, in such a way that no double-precision
  17121. floating-point operations are used.
  17122. @item -m4a-single
  17123. @opindex m4a-single
  17124. Generate code for the SH4a assuming the floating-point unit is in
  17125. single-precision mode by default.
  17126. @item -m4a
  17127. @opindex m4a
  17128. Generate code for the SH4a.
  17129. @item -m4al
  17130. @opindex m4al
  17131. Same as @option{-m4a-nofpu}, except that it implicitly passes
  17132. @option{-dsp} to the assembler. GCC doesn't generate any DSP
  17133. instructions at the moment.
  17134. @item -m5-32media
  17135. @opindex m5-32media
  17136. Generate 32-bit code for SHmedia.
  17137. @item -m5-32media-nofpu
  17138. @opindex m5-32media-nofpu
  17139. Generate 32-bit code for SHmedia in such a way that the
  17140. floating-point unit is not used.
  17141. @item -m5-64media
  17142. @opindex m5-64media
  17143. Generate 64-bit code for SHmedia.
  17144. @item -m5-64media-nofpu
  17145. @opindex m5-64media-nofpu
  17146. Generate 64-bit code for SHmedia in such a way that the
  17147. floating-point unit is not used.
  17148. @item -m5-compact
  17149. @opindex m5-compact
  17150. Generate code for SHcompact.
  17151. @item -m5-compact-nofpu
  17152. @opindex m5-compact-nofpu
  17153. Generate code for SHcompact in such a way that the
  17154. floating-point unit is not used.
  17155. @item -mb
  17156. @opindex mb
  17157. Compile code for the processor in big-endian mode.
  17158. @item -ml
  17159. @opindex ml
  17160. Compile code for the processor in little-endian mode.
  17161. @item -mdalign
  17162. @opindex mdalign
  17163. Align doubles at 64-bit boundaries. Note that this changes the calling
  17164. conventions, and thus some functions from the standard C library do
  17165. not work unless you recompile it first with @option{-mdalign}.
  17166. @item -mrelax
  17167. @opindex mrelax
  17168. Shorten some address references at link time, when possible; uses the
  17169. linker option @option{-relax}.
  17170. @item -mbigtable
  17171. @opindex mbigtable
  17172. Use 32-bit offsets in @code{switch} tables. The default is to use
  17173. 16-bit offsets.
  17174. @item -mbitops
  17175. @opindex mbitops
  17176. Enable the use of bit manipulation instructions on SH2A.
  17177. @item -mfmovd
  17178. @opindex mfmovd
  17179. Enable the use of the instruction @code{fmovd}. Check @option{-mdalign} for
  17180. alignment constraints.
  17181. @item -mrenesas
  17182. @opindex mrenesas
  17183. Comply with the calling conventions defined by Renesas.
  17184. @item -mno-renesas
  17185. @opindex mno-renesas
  17186. Comply with the calling conventions defined for GCC before the Renesas
  17187. conventions were available. This option is the default for all
  17188. targets of the SH toolchain.
  17189. @item -mnomacsave
  17190. @opindex mnomacsave
  17191. Mark the @code{MAC} register as call-clobbered, even if
  17192. @option{-mrenesas} is given.
  17193. @item -mieee
  17194. @itemx -mno-ieee
  17195. @opindex mieee
  17196. @opindex mno-ieee
  17197. Control the IEEE compliance of floating-point comparisons, which affects the
  17198. handling of cases where the result of a comparison is unordered. By default
  17199. @option{-mieee} is implicitly enabled. If @option{-ffinite-math-only} is
  17200. enabled @option{-mno-ieee} is implicitly set, which results in faster
  17201. floating-point greater-equal and less-equal comparisons. The implcit settings
  17202. can be overridden by specifying either @option{-mieee} or @option{-mno-ieee}.
  17203. @item -minline-ic_invalidate
  17204. @opindex minline-ic_invalidate
  17205. Inline code to invalidate instruction cache entries after setting up
  17206. nested function trampolines.
  17207. This option has no effect if @option{-musermode} is in effect and the selected
  17208. code generation option (e.g. @option{-m4}) does not allow the use of the @code{icbi}
  17209. instruction.
  17210. If the selected code generation option does not allow the use of the @code{icbi}
  17211. instruction, and @option{-musermode} is not in effect, the inlined code
  17212. manipulates the instruction cache address array directly with an associative
  17213. write. This not only requires privileged mode at run time, but it also
  17214. fails if the cache line had been mapped via the TLB and has become unmapped.
  17215. @item -misize
  17216. @opindex misize
  17217. Dump instruction size and location in the assembly code.
  17218. @item -mpadstruct
  17219. @opindex mpadstruct
  17220. This option is deprecated. It pads structures to multiple of 4 bytes,
  17221. which is incompatible with the SH ABI@.
  17222. @item -matomic-model=@var{model}
  17223. @opindex matomic-model=@var{model}
  17224. Sets the model of atomic operations and additional parameters as a comma
  17225. separated list. For details on the atomic built-in functions see
  17226. @ref{__atomic Builtins}. The following models and parameters are supported:
  17227. @table @samp
  17228. @item none
  17229. Disable compiler generated atomic sequences and emit library calls for atomic
  17230. operations. This is the default if the target is not @code{sh*-*-linux*}.
  17231. @item soft-gusa
  17232. Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
  17233. built-in functions. The generated atomic sequences require additional support
  17234. from the interrupt/exception handling code of the system and are only suitable
  17235. for SH3* and SH4* single-core systems. This option is enabled by default when
  17236. the target is @code{sh*-*-linux*} and SH3* or SH4*. When the target is SH4A,
  17237. this option also partially utilizes the hardware atomic instructions
  17238. @code{movli.l} and @code{movco.l} to create more efficient code, unless
  17239. @samp{strict} is specified.
  17240. @item soft-tcb
  17241. Generate software atomic sequences that use a variable in the thread control
  17242. block. This is a variation of the gUSA sequences which can also be used on
  17243. SH1* and SH2* targets. The generated atomic sequences require additional
  17244. support from the interrupt/exception handling code of the system and are only
  17245. suitable for single-core systems. When using this model, the @samp{gbr-offset=}
  17246. parameter has to be specified as well.
  17247. @item soft-imask
  17248. Generate software atomic sequences that temporarily disable interrupts by
  17249. setting @code{SR.IMASK = 1111}. This model works only when the program runs
  17250. in privileged mode and is only suitable for single-core systems. Additional
  17251. support from the interrupt/exception handling code of the system is not
  17252. required. This model is enabled by default when the target is
  17253. @code{sh*-*-linux*} and SH1* or SH2*.
  17254. @item hard-llcs
  17255. Generate hardware atomic sequences using the @code{movli.l} and @code{movco.l}
  17256. instructions only. This is only available on SH4A and is suitable for
  17257. multi-core systems. Since the hardware instructions support only 32 bit atomic
  17258. variables access to 8 or 16 bit variables is emulated with 32 bit accesses.
  17259. Code compiled with this option is also compatible with other software
  17260. atomic model interrupt/exception handling systems if executed on an SH4A
  17261. system. Additional support from the interrupt/exception handling code of the
  17262. system is not required for this model.
  17263. @item gbr-offset=
  17264. This parameter specifies the offset in bytes of the variable in the thread
  17265. control block structure that should be used by the generated atomic sequences
  17266. when the @samp{soft-tcb} model has been selected. For other models this
  17267. parameter is ignored. The specified value must be an integer multiple of four
  17268. and in the range 0-1020.
  17269. @item strict
  17270. This parameter prevents mixed usage of multiple atomic models, even if they
  17271. are compatible, and makes the compiler generate atomic sequences of the
  17272. specified model only.
  17273. @end table
  17274. @item -mtas
  17275. @opindex mtas
  17276. Generate the @code{tas.b} opcode for @code{__atomic_test_and_set}.
  17277. Notice that depending on the particular hardware and software configuration
  17278. this can degrade overall performance due to the operand cache line flushes
  17279. that are implied by the @code{tas.b} instruction. On multi-core SH4A
  17280. processors the @code{tas.b} instruction must be used with caution since it
  17281. can result in data corruption for certain cache configurations.
  17282. @item -mprefergot
  17283. @opindex mprefergot
  17284. When generating position-independent code, emit function calls using
  17285. the Global Offset Table instead of the Procedure Linkage Table.
  17286. @item -musermode
  17287. @itemx -mno-usermode
  17288. @opindex musermode
  17289. @opindex mno-usermode
  17290. Don't allow (allow) the compiler generating privileged mode code. Specifying
  17291. @option{-musermode} also implies @option{-mno-inline-ic_invalidate} if the
  17292. inlined code would not work in user mode. @option{-musermode} is the default
  17293. when the target is @code{sh*-*-linux*}. If the target is SH1* or SH2*
  17294. @option{-musermode} has no effect, since there is no user mode.
  17295. @item -multcost=@var{number}
  17296. @opindex multcost=@var{number}
  17297. Set the cost to assume for a multiply insn.
  17298. @item -mdiv=@var{strategy}
  17299. @opindex mdiv=@var{strategy}
  17300. Set the division strategy to be used for integer division operations.
  17301. For SHmedia @var{strategy} can be one of:
  17302. @table @samp
  17303. @item fp
  17304. Performs the operation in floating point. This has a very high latency,
  17305. but needs only a few instructions, so it might be a good choice if
  17306. your code has enough easily-exploitable ILP to allow the compiler to
  17307. schedule the floating-point instructions together with other instructions.
  17308. Division by zero causes a floating-point exception.
  17309. @item inv
  17310. Uses integer operations to calculate the inverse of the divisor,
  17311. and then multiplies the dividend with the inverse. This strategy allows
  17312. CSE and hoisting of the inverse calculation. Division by zero calculates
  17313. an unspecified result, but does not trap.
  17314. @item inv:minlat
  17315. A variant of @samp{inv} where, if no CSE or hoisting opportunities
  17316. have been found, or if the entire operation has been hoisted to the same
  17317. place, the last stages of the inverse calculation are intertwined with the
  17318. final multiply to reduce the overall latency, at the expense of using a few
  17319. more instructions, and thus offering fewer scheduling opportunities with
  17320. other code.
  17321. @item call
  17322. Calls a library function that usually implements the @samp{inv:minlat}
  17323. strategy.
  17324. This gives high code density for @code{m5-*media-nofpu} compilations.
  17325. @item call2
  17326. Uses a different entry point of the same library function, where it
  17327. assumes that a pointer to a lookup table has already been set up, which
  17328. exposes the pointer load to CSE and code hoisting optimizations.
  17329. @item inv:call
  17330. @itemx inv:call2
  17331. @itemx inv:fp
  17332. Use the @samp{inv} algorithm for initial
  17333. code generation, but if the code stays unoptimized, revert to the @samp{call},
  17334. @samp{call2}, or @samp{fp} strategies, respectively. Note that the
  17335. potentially-trapping side effect of division by zero is carried by a
  17336. separate instruction, so it is possible that all the integer instructions
  17337. are hoisted out, but the marker for the side effect stays where it is.
  17338. A recombination to floating-point operations or a call is not possible
  17339. in that case.
  17340. @item inv20u
  17341. @itemx inv20l
  17342. Variants of the @samp{inv:minlat} strategy. In the case
  17343. that the inverse calculation is not separated from the multiply, they speed
  17344. up division where the dividend fits into 20 bits (plus sign where applicable)
  17345. by inserting a test to skip a number of operations in this case; this test
  17346. slows down the case of larger dividends. @samp{inv20u} assumes the case of a such
  17347. a small dividend to be unlikely, and @samp{inv20l} assumes it to be likely.
  17348. @end table
  17349. For targets other than SHmedia @var{strategy} can be one of:
  17350. @table @samp
  17351. @item call-div1
  17352. Calls a library function that uses the single-step division instruction
  17353. @code{div1} to perform the operation. Division by zero calculates an
  17354. unspecified result and does not trap. This is the default except for SH4,
  17355. SH2A and SHcompact.
  17356. @item call-fp
  17357. Calls a library function that performs the operation in double precision
  17358. floating point. Division by zero causes a floating-point exception. This is
  17359. the default for SHcompact with FPU. Specifying this for targets that do not
  17360. have a double precision FPU defaults to @code{call-div1}.
  17361. @item call-table
  17362. Calls a library function that uses a lookup table for small divisors and
  17363. the @code{div1} instruction with case distinction for larger divisors. Division
  17364. by zero calculates an unspecified result and does not trap. This is the default
  17365. for SH4. Specifying this for targets that do not have dynamic shift
  17366. instructions defaults to @code{call-div1}.
  17367. @end table
  17368. When a division strategy has not been specified the default strategy is
  17369. selected based on the current target. For SH2A the default strategy is to
  17370. use the @code{divs} and @code{divu} instructions instead of library function
  17371. calls.
  17372. @item -maccumulate-outgoing-args
  17373. @opindex maccumulate-outgoing-args
  17374. Reserve space once for outgoing arguments in the function prologue rather
  17375. than around each call. Generally beneficial for performance and size. Also
  17376. needed for unwinding to avoid changing the stack frame around conditional code.
  17377. @item -mdivsi3_libfunc=@var{name}
  17378. @opindex mdivsi3_libfunc=@var{name}
  17379. Set the name of the library function used for 32-bit signed division to
  17380. @var{name}.
  17381. This only affects the name used in the @samp{call} and @samp{inv:call}
  17382. division strategies, and the compiler still expects the same
  17383. sets of input/output/clobbered registers as if this option were not present.
  17384. @item -mfixed-range=@var{register-range}
  17385. @opindex mfixed-range
  17386. Generate code treating the given register range as fixed registers.
  17387. A fixed register is one that the register allocator can not use. This is
  17388. useful when compiling kernel code. A register range is specified as
  17389. two registers separated by a dash. Multiple register ranges can be
  17390. specified separated by a comma.
  17391. @item -mindexed-addressing
  17392. @opindex mindexed-addressing
  17393. Enable the use of the indexed addressing mode for SHmedia32/SHcompact.
  17394. This is only safe if the hardware and/or OS implement 32-bit wrap-around
  17395. semantics for the indexed addressing mode. The architecture allows the
  17396. implementation of processors with 64-bit MMU, which the OS could use to
  17397. get 32-bit addressing, but since no current hardware implementation supports
  17398. this or any other way to make the indexed addressing mode safe to use in
  17399. the 32-bit ABI, the default is @option{-mno-indexed-addressing}.
  17400. @item -mgettrcost=@var{number}
  17401. @opindex mgettrcost=@var{number}
  17402. Set the cost assumed for the @code{gettr} instruction to @var{number}.
  17403. The default is 2 if @option{-mpt-fixed} is in effect, 100 otherwise.
  17404. @item -mpt-fixed
  17405. @opindex mpt-fixed
  17406. Assume @code{pt*} instructions won't trap. This generally generates
  17407. better-scheduled code, but is unsafe on current hardware.
  17408. The current architecture
  17409. definition says that @code{ptabs} and @code{ptrel} trap when the target
  17410. anded with 3 is 3.
  17411. This has the unintentional effect of making it unsafe to schedule these
  17412. instructions before a branch, or hoist them out of a loop. For example,
  17413. @code{__do_global_ctors}, a part of @file{libgcc}
  17414. that runs constructors at program
  17415. startup, calls functions in a list which is delimited by @minus{}1. With the
  17416. @option{-mpt-fixed} option, the @code{ptabs} is done before testing against @minus{}1.
  17417. That means that all the constructors run a bit more quickly, but when
  17418. the loop comes to the end of the list, the program crashes because @code{ptabs}
  17419. loads @minus{}1 into a target register.
  17420. Since this option is unsafe for any
  17421. hardware implementing the current architecture specification, the default
  17422. is @option{-mno-pt-fixed}. Unless specified explicitly with
  17423. @option{-mgettrcost}, @option{-mno-pt-fixed} also implies @option{-mgettrcost=100};
  17424. this deters register allocation from using target registers for storing
  17425. ordinary integers.
  17426. @item -minvalid-symbols
  17427. @opindex minvalid-symbols
  17428. Assume symbols might be invalid. Ordinary function symbols generated by
  17429. the compiler are always valid to load with
  17430. @code{movi}/@code{shori}/@code{ptabs} or
  17431. @code{movi}/@code{shori}/@code{ptrel},
  17432. but with assembler and/or linker tricks it is possible
  17433. to generate symbols that cause @code{ptabs} or @code{ptrel} to trap.
  17434. This option is only meaningful when @option{-mno-pt-fixed} is in effect.
  17435. It prevents cross-basic-block CSE, hoisting and most scheduling
  17436. of symbol loads. The default is @option{-mno-invalid-symbols}.
  17437. @item -mbranch-cost=@var{num}
  17438. @opindex mbranch-cost=@var{num}
  17439. Assume @var{num} to be the cost for a branch instruction. Higher numbers
  17440. make the compiler try to generate more branch-free code if possible.
  17441. If not specified the value is selected depending on the processor type that
  17442. is being compiled for.
  17443. @item -mzdcbranch
  17444. @itemx -mno-zdcbranch
  17445. @opindex mzdcbranch
  17446. @opindex mno-zdcbranch
  17447. Assume (do not assume) that zero displacement conditional branch instructions
  17448. @code{bt} and @code{bf} are fast. If @option{-mzdcbranch} is specified, the
  17449. compiler prefers zero displacement branch code sequences. This is
  17450. enabled by default when generating code for SH4 and SH4A. It can be explicitly
  17451. disabled by specifying @option{-mno-zdcbranch}.
  17452. @item -mcbranch-force-delay-slot
  17453. @opindex mcbranch-force-delay-slot
  17454. Force the usage of delay slots for conditional branches, which stuffs the delay
  17455. slot with a @code{nop} if a suitable instruction can't be found. By default
  17456. this option is disabled. It can be enabled to work around hardware bugs as
  17457. found in the original SH7055.
  17458. @item -mfused-madd
  17459. @itemx -mno-fused-madd
  17460. @opindex mfused-madd
  17461. @opindex mno-fused-madd
  17462. Generate code that uses (does not use) the floating-point multiply and
  17463. accumulate instructions. These instructions are generated by default
  17464. if hardware floating point is used. The machine-dependent
  17465. @option{-mfused-madd} option is now mapped to the machine-independent
  17466. @option{-ffp-contract=fast} option, and @option{-mno-fused-madd} is
  17467. mapped to @option{-ffp-contract=off}.
  17468. @item -mfsca
  17469. @itemx -mno-fsca
  17470. @opindex mfsca
  17471. @opindex mno-fsca
  17472. Allow or disallow the compiler to emit the @code{fsca} instruction for sine
  17473. and cosine approximations. The option @option{-mfsca} must be used in
  17474. combination with @option{-funsafe-math-optimizations}. It is enabled by default
  17475. when generating code for SH4A. Using @option{-mno-fsca} disables sine and cosine
  17476. approximations even if @option{-funsafe-math-optimizations} is in effect.
  17477. @item -mfsrra
  17478. @itemx -mno-fsrra
  17479. @opindex mfsrra
  17480. @opindex mno-fsrra
  17481. Allow or disallow the compiler to emit the @code{fsrra} instruction for
  17482. reciprocal square root approximations. The option @option{-mfsrra} must be used
  17483. in combination with @option{-funsafe-math-optimizations} and
  17484. @option{-ffinite-math-only}. It is enabled by default when generating code for
  17485. SH4A. Using @option{-mno-fsrra} disables reciprocal square root approximations
  17486. even if @option{-funsafe-math-optimizations} and @option{-ffinite-math-only} are
  17487. in effect.
  17488. @item -mpretend-cmove
  17489. @opindex mpretend-cmove
  17490. Prefer zero-displacement conditional branches for conditional move instruction
  17491. patterns. This can result in faster code on the SH4 processor.
  17492. @end table
  17493. @node Solaris 2 Options
  17494. @subsection Solaris 2 Options
  17495. @cindex Solaris 2 options
  17496. These @samp{-m} options are supported on Solaris 2:
  17497. @table @gcctabopt
  17498. @item -mclear-hwcap
  17499. @opindex mclear-hwcap
  17500. @option{-mclear-hwcap} tells the compiler to remove the hardware
  17501. capabilities generated by the Solaris assembler. This is only necessary
  17502. when object files use ISA extensions not supported by the current
  17503. machine, but check at runtime whether or not to use them.
  17504. @item -mimpure-text
  17505. @opindex mimpure-text
  17506. @option{-mimpure-text}, used in addition to @option{-shared}, tells
  17507. the compiler to not pass @option{-z text} to the linker when linking a
  17508. shared object. Using this option, you can link position-dependent
  17509. code into a shared object.
  17510. @option{-mimpure-text} suppresses the ``relocations remain against
  17511. allocatable but non-writable sections'' linker error message.
  17512. However, the necessary relocations trigger copy-on-write, and the
  17513. shared object is not actually shared across processes. Instead of
  17514. using @option{-mimpure-text}, you should compile all source code with
  17515. @option{-fpic} or @option{-fPIC}.
  17516. @end table
  17517. These switches are supported in addition to the above on Solaris 2:
  17518. @table @gcctabopt
  17519. @item -pthreads
  17520. @opindex pthreads
  17521. Add support for multithreading using the POSIX threads library. This
  17522. option sets flags for both the preprocessor and linker. This option does
  17523. not affect the thread safety of object code produced by the compiler or
  17524. that of libraries supplied with it.
  17525. @item -pthread
  17526. @opindex pthread
  17527. This is a synonym for @option{-pthreads}.
  17528. @end table
  17529. @node SPARC Options
  17530. @subsection SPARC Options
  17531. @cindex SPARC options
  17532. These @samp{-m} options are supported on the SPARC:
  17533. @table @gcctabopt
  17534. @item -mno-app-regs
  17535. @itemx -mapp-regs
  17536. @opindex mno-app-regs
  17537. @opindex mapp-regs
  17538. Specify @option{-mapp-regs} to generate output using the global registers
  17539. 2 through 4, which the SPARC SVR4 ABI reserves for applications. Like the
  17540. global register 1, each global register 2 through 4 is then treated as an
  17541. allocable register that is clobbered by function calls. This is the default.
  17542. To be fully SVR4 ABI-compliant at the cost of some performance loss,
  17543. specify @option{-mno-app-regs}. You should compile libraries and system
  17544. software with this option.
  17545. @item -mflat
  17546. @itemx -mno-flat
  17547. @opindex mflat
  17548. @opindex mno-flat
  17549. With @option{-mflat}, the compiler does not generate save/restore instructions
  17550. and uses a ``flat'' or single register window model. This model is compatible
  17551. with the regular register window model. The local registers and the input
  17552. registers (0--5) are still treated as ``call-saved'' registers and are
  17553. saved on the stack as needed.
  17554. With @option{-mno-flat} (the default), the compiler generates save/restore
  17555. instructions (except for leaf functions). This is the normal operating mode.
  17556. @item -mfpu
  17557. @itemx -mhard-float
  17558. @opindex mfpu
  17559. @opindex mhard-float
  17560. Generate output containing floating-point instructions. This is the
  17561. default.
  17562. @item -mno-fpu
  17563. @itemx -msoft-float
  17564. @opindex mno-fpu
  17565. @opindex msoft-float
  17566. Generate output containing library calls for floating point.
  17567. @strong{Warning:} the requisite libraries are not available for all SPARC
  17568. targets. Normally the facilities of the machine's usual C compiler are
  17569. used, but this cannot be done directly in cross-compilation. You must make
  17570. your own arrangements to provide suitable library functions for
  17571. cross-compilation. The embedded targets @samp{sparc-*-aout} and
  17572. @samp{sparclite-*-*} do provide software floating-point support.
  17573. @option{-msoft-float} changes the calling convention in the output file;
  17574. therefore, it is only useful if you compile @emph{all} of a program with
  17575. this option. In particular, you need to compile @file{libgcc.a}, the
  17576. library that comes with GCC, with @option{-msoft-float} in order for
  17577. this to work.
  17578. @item -mhard-quad-float
  17579. @opindex mhard-quad-float
  17580. Generate output containing quad-word (long double) floating-point
  17581. instructions.
  17582. @item -msoft-quad-float
  17583. @opindex msoft-quad-float
  17584. Generate output containing library calls for quad-word (long double)
  17585. floating-point instructions. The functions called are those specified
  17586. in the SPARC ABI@. This is the default.
  17587. As of this writing, there are no SPARC implementations that have hardware
  17588. support for the quad-word floating-point instructions. They all invoke
  17589. a trap handler for one of these instructions, and then the trap handler
  17590. emulates the effect of the instruction. Because of the trap handler overhead,
  17591. this is much slower than calling the ABI library routines. Thus the
  17592. @option{-msoft-quad-float} option is the default.
  17593. @item -mno-unaligned-doubles
  17594. @itemx -munaligned-doubles
  17595. @opindex mno-unaligned-doubles
  17596. @opindex munaligned-doubles
  17597. Assume that doubles have 8-byte alignment. This is the default.
  17598. With @option{-munaligned-doubles}, GCC assumes that doubles have 8-byte
  17599. alignment only if they are contained in another type, or if they have an
  17600. absolute address. Otherwise, it assumes they have 4-byte alignment.
  17601. Specifying this option avoids some rare compatibility problems with code
  17602. generated by other compilers. It is not the default because it results
  17603. in a performance loss, especially for floating-point code.
  17604. @item -muser-mode
  17605. @itemx -mno-user-mode
  17606. @opindex muser-mode
  17607. @opindex mno-user-mode
  17608. Do not generate code that can only run in supervisor mode. This is relevant
  17609. only for the @code{casa} instruction emitted for the LEON3 processor. The
  17610. default is @option{-mno-user-mode}.
  17611. @item -mno-faster-structs
  17612. @itemx -mfaster-structs
  17613. @opindex mno-faster-structs
  17614. @opindex mfaster-structs
  17615. With @option{-mfaster-structs}, the compiler assumes that structures
  17616. should have 8-byte alignment. This enables the use of pairs of
  17617. @code{ldd} and @code{std} instructions for copies in structure
  17618. assignment, in place of twice as many @code{ld} and @code{st} pairs.
  17619. However, the use of this changed alignment directly violates the SPARC
  17620. ABI@. Thus, it's intended only for use on targets where the developer
  17621. acknowledges that their resulting code is not directly in line with
  17622. the rules of the ABI@.
  17623. @item -mcpu=@var{cpu_type}
  17624. @opindex mcpu
  17625. Set the instruction set, register set, and instruction scheduling parameters
  17626. for machine type @var{cpu_type}. Supported values for @var{cpu_type} are
  17627. @samp{v7}, @samp{cypress}, @samp{v8}, @samp{supersparc}, @samp{hypersparc},
  17628. @samp{leon}, @samp{leon3}, @samp{leon3v7}, @samp{sparclite}, @samp{f930},
  17629. @samp{f934}, @samp{sparclite86x}, @samp{sparclet}, @samp{tsc701}, @samp{v9},
  17630. @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2},
  17631. @samp{niagara3} and @samp{niagara4}.
  17632. Native Solaris and GNU/Linux toolchains also support the value @samp{native},
  17633. which selects the best architecture option for the host processor.
  17634. @option{-mcpu=native} has no effect if GCC does not recognize
  17635. the processor.
  17636. Default instruction scheduling parameters are used for values that select
  17637. an architecture and not an implementation. These are @samp{v7}, @samp{v8},
  17638. @samp{sparclite}, @samp{sparclet}, @samp{v9}.
  17639. Here is a list of each supported architecture and their supported
  17640. implementations.
  17641. @table @asis
  17642. @item v7
  17643. cypress, leon3v7
  17644. @item v8
  17645. supersparc, hypersparc, leon, leon3
  17646. @item sparclite
  17647. f930, f934, sparclite86x
  17648. @item sparclet
  17649. tsc701
  17650. @item v9
  17651. ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4
  17652. @end table
  17653. By default (unless configured otherwise), GCC generates code for the V7
  17654. variant of the SPARC architecture. With @option{-mcpu=cypress}, the compiler
  17655. additionally optimizes it for the Cypress CY7C602 chip, as used in the
  17656. SPARCStation/SPARCServer 3xx series. This is also appropriate for the older
  17657. SPARCStation 1, 2, IPX etc.
  17658. With @option{-mcpu=v8}, GCC generates code for the V8 variant of the SPARC
  17659. architecture. The only difference from V7 code is that the compiler emits
  17660. the integer multiply and integer divide instructions which exist in SPARC-V8
  17661. but not in SPARC-V7. With @option{-mcpu=supersparc}, the compiler additionally
  17662. optimizes it for the SuperSPARC chip, as used in the SPARCStation 10, 1000 and
  17663. 2000 series.
  17664. With @option{-mcpu=sparclite}, GCC generates code for the SPARClite variant of
  17665. the SPARC architecture. This adds the integer multiply, integer divide step
  17666. and scan (@code{ffs}) instructions which exist in SPARClite but not in SPARC-V7.
  17667. With @option{-mcpu=f930}, the compiler additionally optimizes it for the
  17668. Fujitsu MB86930 chip, which is the original SPARClite, with no FPU@. With
  17669. @option{-mcpu=f934}, the compiler additionally optimizes it for the Fujitsu
  17670. MB86934 chip, which is the more recent SPARClite with FPU@.
  17671. With @option{-mcpu=sparclet}, GCC generates code for the SPARClet variant of
  17672. the SPARC architecture. This adds the integer multiply, multiply/accumulate,
  17673. integer divide step and scan (@code{ffs}) instructions which exist in SPARClet
  17674. but not in SPARC-V7. With @option{-mcpu=tsc701}, the compiler additionally
  17675. optimizes it for the TEMIC SPARClet chip.
  17676. With @option{-mcpu=v9}, GCC generates code for the V9 variant of the SPARC
  17677. architecture. This adds 64-bit integer and floating-point move instructions,
  17678. 3 additional floating-point condition code registers and conditional move
  17679. instructions. With @option{-mcpu=ultrasparc}, the compiler additionally
  17680. optimizes it for the Sun UltraSPARC I/II/IIi chips. With
  17681. @option{-mcpu=ultrasparc3}, the compiler additionally optimizes it for the
  17682. Sun UltraSPARC III/III+/IIIi/IIIi+/IV/IV+ chips. With
  17683. @option{-mcpu=niagara}, the compiler additionally optimizes it for
  17684. Sun UltraSPARC T1 chips. With @option{-mcpu=niagara2}, the compiler
  17685. additionally optimizes it for Sun UltraSPARC T2 chips. With
  17686. @option{-mcpu=niagara3}, the compiler additionally optimizes it for Sun
  17687. UltraSPARC T3 chips. With @option{-mcpu=niagara4}, the compiler
  17688. additionally optimizes it for Sun UltraSPARC T4 chips.
  17689. @item -mtune=@var{cpu_type}
  17690. @opindex mtune
  17691. Set the instruction scheduling parameters for machine type
  17692. @var{cpu_type}, but do not set the instruction set or register set that the
  17693. option @option{-mcpu=@var{cpu_type}} does.
  17694. The same values for @option{-mcpu=@var{cpu_type}} can be used for
  17695. @option{-mtune=@var{cpu_type}}, but the only useful values are those
  17696. that select a particular CPU implementation. Those are @samp{cypress},
  17697. @samp{supersparc}, @samp{hypersparc}, @samp{leon}, @samp{leon3},
  17698. @samp{leon3v7}, @samp{f930}, @samp{f934}, @samp{sparclite86x}, @samp{tsc701},
  17699. @samp{ultrasparc}, @samp{ultrasparc3}, @samp{niagara}, @samp{niagara2},
  17700. @samp{niagara3} and @samp{niagara4}. With native Solaris and GNU/Linux
  17701. toolchains, @samp{native} can also be used.
  17702. @item -mv8plus
  17703. @itemx -mno-v8plus
  17704. @opindex mv8plus
  17705. @opindex mno-v8plus
  17706. With @option{-mv8plus}, GCC generates code for the SPARC-V8+ ABI@. The
  17707. difference from the V8 ABI is that the global and out registers are
  17708. considered 64 bits wide. This is enabled by default on Solaris in 32-bit
  17709. mode for all SPARC-V9 processors.
  17710. @item -mvis
  17711. @itemx -mno-vis
  17712. @opindex mvis
  17713. @opindex mno-vis
  17714. With @option{-mvis}, GCC generates code that takes advantage of the UltraSPARC
  17715. Visual Instruction Set extensions. The default is @option{-mno-vis}.
  17716. @item -mvis2
  17717. @itemx -mno-vis2
  17718. @opindex mvis2
  17719. @opindex mno-vis2
  17720. With @option{-mvis2}, GCC generates code that takes advantage of
  17721. version 2.0 of the UltraSPARC Visual Instruction Set extensions. The
  17722. default is @option{-mvis2} when targeting a cpu that supports such
  17723. instructions, such as UltraSPARC-III and later. Setting @option{-mvis2}
  17724. also sets @option{-mvis}.
  17725. @item -mvis3
  17726. @itemx -mno-vis3
  17727. @opindex mvis3
  17728. @opindex mno-vis3
  17729. With @option{-mvis3}, GCC generates code that takes advantage of
  17730. version 3.0 of the UltraSPARC Visual Instruction Set extensions. The
  17731. default is @option{-mvis3} when targeting a cpu that supports such
  17732. instructions, such as niagara-3 and later. Setting @option{-mvis3}
  17733. also sets @option{-mvis2} and @option{-mvis}.
  17734. @item -mcbcond
  17735. @itemx -mno-cbcond
  17736. @opindex mcbcond
  17737. @opindex mno-cbcond
  17738. With @option{-mcbcond}, GCC generates code that takes advantage of
  17739. compare-and-branch instructions, as defined in the Sparc Architecture 2011.
  17740. The default is @option{-mcbcond} when targeting a cpu that supports such
  17741. instructions, such as niagara-4 and later.
  17742. @item -mpopc
  17743. @itemx -mno-popc
  17744. @opindex mpopc
  17745. @opindex mno-popc
  17746. With @option{-mpopc}, GCC generates code that takes advantage of the UltraSPARC
  17747. population count instruction. The default is @option{-mpopc}
  17748. when targeting a cpu that supports such instructions, such as Niagara-2 and
  17749. later.
  17750. @item -mfmaf
  17751. @itemx -mno-fmaf
  17752. @opindex mfmaf
  17753. @opindex mno-fmaf
  17754. With @option{-mfmaf}, GCC generates code that takes advantage of the UltraSPARC
  17755. Fused Multiply-Add Floating-point extensions. The default is @option{-mfmaf}
  17756. when targeting a cpu that supports such instructions, such as Niagara-3 and
  17757. later.
  17758. @item -mfix-at697f
  17759. @opindex mfix-at697f
  17760. Enable the documented workaround for the single erratum of the Atmel AT697F
  17761. processor (which corresponds to erratum #13 of the AT697E processor).
  17762. @item -mfix-ut699
  17763. @opindex mfix-ut699
  17764. Enable the documented workarounds for the floating-point errata and the data
  17765. cache nullify errata of the UT699 processor.
  17766. @end table
  17767. These @samp{-m} options are supported in addition to the above
  17768. on SPARC-V9 processors in 64-bit environments:
  17769. @table @gcctabopt
  17770. @item -m32
  17771. @itemx -m64
  17772. @opindex m32
  17773. @opindex m64
  17774. Generate code for a 32-bit or 64-bit environment.
  17775. The 32-bit environment sets int, long and pointer to 32 bits.
  17776. The 64-bit environment sets int to 32 bits and long and pointer
  17777. to 64 bits.
  17778. @item -mcmodel=@var{which}
  17779. @opindex mcmodel
  17780. Set the code model to one of
  17781. @table @samp
  17782. @item medlow
  17783. The Medium/Low code model: 64-bit addresses, programs
  17784. must be linked in the low 32 bits of memory. Programs can be statically
  17785. or dynamically linked.
  17786. @item medmid
  17787. The Medium/Middle code model: 64-bit addresses, programs
  17788. must be linked in the low 44 bits of memory, the text and data segments must
  17789. be less than 2GB in size and the data segment must be located within 2GB of
  17790. the text segment.
  17791. @item medany
  17792. The Medium/Anywhere code model: 64-bit addresses, programs
  17793. may be linked anywhere in memory, the text and data segments must be less
  17794. than 2GB in size and the data segment must be located within 2GB of the
  17795. text segment.
  17796. @item embmedany
  17797. The Medium/Anywhere code model for embedded systems:
  17798. 64-bit addresses, the text and data segments must be less than 2GB in
  17799. size, both starting anywhere in memory (determined at link time). The
  17800. global register %g4 points to the base of the data segment. Programs
  17801. are statically linked and PIC is not supported.
  17802. @end table
  17803. @item -mmemory-model=@var{mem-model}
  17804. @opindex mmemory-model
  17805. Set the memory model in force on the processor to one of
  17806. @table @samp
  17807. @item default
  17808. The default memory model for the processor and operating system.
  17809. @item rmo
  17810. Relaxed Memory Order
  17811. @item pso
  17812. Partial Store Order
  17813. @item tso
  17814. Total Store Order
  17815. @item sc
  17816. Sequential Consistency
  17817. @end table
  17818. These memory models are formally defined in Appendix D of the Sparc V9
  17819. architecture manual, as set in the processor's @code{PSTATE.MM} field.
  17820. @item -mstack-bias
  17821. @itemx -mno-stack-bias
  17822. @opindex mstack-bias
  17823. @opindex mno-stack-bias
  17824. With @option{-mstack-bias}, GCC assumes that the stack pointer, and
  17825. frame pointer if present, are offset by @minus{}2047 which must be added back
  17826. when making stack frame references. This is the default in 64-bit mode.
  17827. Otherwise, assume no such offset is present.
  17828. @end table
  17829. @node SPU Options
  17830. @subsection SPU Options
  17831. @cindex SPU options
  17832. These @samp{-m} options are supported on the SPU:
  17833. @table @gcctabopt
  17834. @item -mwarn-reloc
  17835. @itemx -merror-reloc
  17836. @opindex mwarn-reloc
  17837. @opindex merror-reloc
  17838. The loader for SPU does not handle dynamic relocations. By default, GCC
  17839. gives an error when it generates code that requires a dynamic
  17840. relocation. @option{-mno-error-reloc} disables the error,
  17841. @option{-mwarn-reloc} generates a warning instead.
  17842. @item -msafe-dma
  17843. @itemx -munsafe-dma
  17844. @opindex msafe-dma
  17845. @opindex munsafe-dma
  17846. Instructions that initiate or test completion of DMA must not be
  17847. reordered with respect to loads and stores of the memory that is being
  17848. accessed.
  17849. With @option{-munsafe-dma} you must use the @code{volatile} keyword to protect
  17850. memory accesses, but that can lead to inefficient code in places where the
  17851. memory is known to not change. Rather than mark the memory as volatile,
  17852. you can use @option{-msafe-dma} to tell the compiler to treat
  17853. the DMA instructions as potentially affecting all memory.
  17854. @item -mbranch-hints
  17855. @opindex mbranch-hints
  17856. By default, GCC generates a branch hint instruction to avoid
  17857. pipeline stalls for always-taken or probably-taken branches. A hint
  17858. is not generated closer than 8 instructions away from its branch.
  17859. There is little reason to disable them, except for debugging purposes,
  17860. or to make an object a little bit smaller.
  17861. @item -msmall-mem
  17862. @itemx -mlarge-mem
  17863. @opindex msmall-mem
  17864. @opindex mlarge-mem
  17865. By default, GCC generates code assuming that addresses are never larger
  17866. than 18 bits. With @option{-mlarge-mem} code is generated that assumes
  17867. a full 32-bit address.
  17868. @item -mstdmain
  17869. @opindex mstdmain
  17870. By default, GCC links against startup code that assumes the SPU-style
  17871. main function interface (which has an unconventional parameter list).
  17872. With @option{-mstdmain}, GCC links your program against startup
  17873. code that assumes a C99-style interface to @code{main}, including a
  17874. local copy of @code{argv} strings.
  17875. @item -mfixed-range=@var{register-range}
  17876. @opindex mfixed-range
  17877. Generate code treating the given register range as fixed registers.
  17878. A fixed register is one that the register allocator cannot use. This is
  17879. useful when compiling kernel code. A register range is specified as
  17880. two registers separated by a dash. Multiple register ranges can be
  17881. specified separated by a comma.
  17882. @item -mea32
  17883. @itemx -mea64
  17884. @opindex mea32
  17885. @opindex mea64
  17886. Compile code assuming that pointers to the PPU address space accessed
  17887. via the @code{__ea} named address space qualifier are either 32 or 64
  17888. bits wide. The default is 32 bits. As this is an ABI-changing option,
  17889. all object code in an executable must be compiled with the same setting.
  17890. @item -maddress-space-conversion
  17891. @itemx -mno-address-space-conversion
  17892. @opindex maddress-space-conversion
  17893. @opindex mno-address-space-conversion
  17894. Allow/disallow treating the @code{__ea} address space as superset
  17895. of the generic address space. This enables explicit type casts
  17896. between @code{__ea} and generic pointer as well as implicit
  17897. conversions of generic pointers to @code{__ea} pointers. The
  17898. default is to allow address space pointer conversions.
  17899. @item -mcache-size=@var{cache-size}
  17900. @opindex mcache-size
  17901. This option controls the version of libgcc that the compiler links to an
  17902. executable and selects a software-managed cache for accessing variables
  17903. in the @code{__ea} address space with a particular cache size. Possible
  17904. options for @var{cache-size} are @samp{8}, @samp{16}, @samp{32}, @samp{64}
  17905. and @samp{128}. The default cache size is 64KB.
  17906. @item -matomic-updates
  17907. @itemx -mno-atomic-updates
  17908. @opindex matomic-updates
  17909. @opindex mno-atomic-updates
  17910. This option controls the version of libgcc that the compiler links to an
  17911. executable and selects whether atomic updates to the software-managed
  17912. cache of PPU-side variables are used. If you use atomic updates, changes
  17913. to a PPU variable from SPU code using the @code{__ea} named address space
  17914. qualifier do not interfere with changes to other PPU variables residing
  17915. in the same cache line from PPU code. If you do not use atomic updates,
  17916. such interference may occur; however, writing back cache lines is
  17917. more efficient. The default behavior is to use atomic updates.
  17918. @item -mdual-nops
  17919. @itemx -mdual-nops=@var{n}
  17920. @opindex mdual-nops
  17921. By default, GCC inserts nops to increase dual issue when it expects
  17922. it to increase performance. @var{n} can be a value from 0 to 10. A
  17923. smaller @var{n} inserts fewer nops. 10 is the default, 0 is the
  17924. same as @option{-mno-dual-nops}. Disabled with @option{-Os}.
  17925. @item -mhint-max-nops=@var{n}
  17926. @opindex mhint-max-nops
  17927. Maximum number of nops to insert for a branch hint. A branch hint must
  17928. be at least 8 instructions away from the branch it is affecting. GCC
  17929. inserts up to @var{n} nops to enforce this, otherwise it does not
  17930. generate the branch hint.
  17931. @item -mhint-max-distance=@var{n}
  17932. @opindex mhint-max-distance
  17933. The encoding of the branch hint instruction limits the hint to be within
  17934. 256 instructions of the branch it is affecting. By default, GCC makes
  17935. sure it is within 125.
  17936. @item -msafe-hints
  17937. @opindex msafe-hints
  17938. Work around a hardware bug that causes the SPU to stall indefinitely.
  17939. By default, GCC inserts the @code{hbrp} instruction to make sure
  17940. this stall won't happen.
  17941. @end table
  17942. @node System V Options
  17943. @subsection Options for System V
  17944. These additional options are available on System V Release 4 for
  17945. compatibility with other compilers on those systems:
  17946. @table @gcctabopt
  17947. @item -G
  17948. @opindex G
  17949. Create a shared object.
  17950. It is recommended that @option{-symbolic} or @option{-shared} be used instead.
  17951. @item -Qy
  17952. @opindex Qy
  17953. Identify the versions of each tool used by the compiler, in a
  17954. @code{.ident} assembler directive in the output.
  17955. @item -Qn
  17956. @opindex Qn
  17957. Refrain from adding @code{.ident} directives to the output file (this is
  17958. the default).
  17959. @item -YP,@var{dirs}
  17960. @opindex YP
  17961. Search the directories @var{dirs}, and no others, for libraries
  17962. specified with @option{-l}.
  17963. @item -Ym,@var{dir}
  17964. @opindex Ym
  17965. Look in the directory @var{dir} to find the M4 preprocessor.
  17966. The assembler uses this option.
  17967. @c This is supposed to go with a -Yd for predefined M4 macro files, but
  17968. @c the generic assembler that comes with Solaris takes just -Ym.
  17969. @end table
  17970. @node TILE-Gx Options
  17971. @subsection TILE-Gx Options
  17972. @cindex TILE-Gx options
  17973. These @samp{-m} options are supported on the TILE-Gx:
  17974. @table @gcctabopt
  17975. @item -mcmodel=small
  17976. @opindex mcmodel=small
  17977. Generate code for the small model. The distance for direct calls is
  17978. limited to 500M in either direction. PC-relative addresses are 32
  17979. bits. Absolute addresses support the full address range.
  17980. @item -mcmodel=large
  17981. @opindex mcmodel=large
  17982. Generate code for the large model. There is no limitation on call
  17983. distance, pc-relative addresses, or absolute addresses.
  17984. @item -mcpu=@var{name}
  17985. @opindex mcpu
  17986. Selects the type of CPU to be targeted. Currently the only supported
  17987. type is @samp{tilegx}.
  17988. @item -m32
  17989. @itemx -m64
  17990. @opindex m32
  17991. @opindex m64
  17992. Generate code for a 32-bit or 64-bit environment. The 32-bit
  17993. environment sets int, long, and pointer to 32 bits. The 64-bit
  17994. environment sets int to 32 bits and long and pointer to 64 bits.
  17995. @item -mbig-endian
  17996. @itemx -mlittle-endian
  17997. @opindex mbig-endian
  17998. @opindex mlittle-endian
  17999. Generate code in big/little endian mode, respectively.
  18000. @end table
  18001. @node TILEPro Options
  18002. @subsection TILEPro Options
  18003. @cindex TILEPro options
  18004. These @samp{-m} options are supported on the TILEPro:
  18005. @table @gcctabopt
  18006. @item -mcpu=@var{name}
  18007. @opindex mcpu
  18008. Selects the type of CPU to be targeted. Currently the only supported
  18009. type is @samp{tilepro}.
  18010. @item -m32
  18011. @opindex m32
  18012. Generate code for a 32-bit environment, which sets int, long, and
  18013. pointer to 32 bits. This is the only supported behavior so the flag
  18014. is essentially ignored.
  18015. @end table
  18016. @node V850 Options
  18017. @subsection V850 Options
  18018. @cindex V850 Options
  18019. These @samp{-m} options are defined for V850 implementations:
  18020. @table @gcctabopt
  18021. @item -mlong-calls
  18022. @itemx -mno-long-calls
  18023. @opindex mlong-calls
  18024. @opindex mno-long-calls
  18025. Treat all calls as being far away (near). If calls are assumed to be
  18026. far away, the compiler always loads the function's address into a
  18027. register, and calls indirect through the pointer.
  18028. @item -mno-ep
  18029. @itemx -mep
  18030. @opindex mno-ep
  18031. @opindex mep
  18032. Do not optimize (do optimize) basic blocks that use the same index
  18033. pointer 4 or more times to copy pointer into the @code{ep} register, and
  18034. use the shorter @code{sld} and @code{sst} instructions. The @option{-mep}
  18035. option is on by default if you optimize.
  18036. @item -mno-prolog-function
  18037. @itemx -mprolog-function
  18038. @opindex mno-prolog-function
  18039. @opindex mprolog-function
  18040. Do not use (do use) external functions to save and restore registers
  18041. at the prologue and epilogue of a function. The external functions
  18042. are slower, but use less code space if more than one function saves
  18043. the same number of registers. The @option{-mprolog-function} option
  18044. is on by default if you optimize.
  18045. @item -mspace
  18046. @opindex mspace
  18047. Try to make the code as small as possible. At present, this just turns
  18048. on the @option{-mep} and @option{-mprolog-function} options.
  18049. @item -mtda=@var{n}
  18050. @opindex mtda
  18051. Put static or global variables whose size is @var{n} bytes or less into
  18052. the tiny data area that register @code{ep} points to. The tiny data
  18053. area can hold up to 256 bytes in total (128 bytes for byte references).
  18054. @item -msda=@var{n}
  18055. @opindex msda
  18056. Put static or global variables whose size is @var{n} bytes or less into
  18057. the small data area that register @code{gp} points to. The small data
  18058. area can hold up to 64 kilobytes.
  18059. @item -mzda=@var{n}
  18060. @opindex mzda
  18061. Put static or global variables whose size is @var{n} bytes or less into
  18062. the first 32 kilobytes of memory.
  18063. @item -mv850
  18064. @opindex mv850
  18065. Specify that the target processor is the V850.
  18066. @item -mv850e3v5
  18067. @opindex mv850e3v5
  18068. Specify that the target processor is the V850E3V5. The preprocessor
  18069. constant @code{__v850e3v5__} is defined if this option is used.
  18070. @item -mv850e2v4
  18071. @opindex mv850e2v4
  18072. Specify that the target processor is the V850E3V5. This is an alias for
  18073. the @option{-mv850e3v5} option.
  18074. @item -mv850e2v3
  18075. @opindex mv850e2v3
  18076. Specify that the target processor is the V850E2V3. The preprocessor
  18077. constant @code{__v850e2v3__} is defined if this option is used.
  18078. @item -mv850e2
  18079. @opindex mv850e2
  18080. Specify that the target processor is the V850E2. The preprocessor
  18081. constant @code{__v850e2__} is defined if this option is used.
  18082. @item -mv850e1
  18083. @opindex mv850e1
  18084. Specify that the target processor is the V850E1. The preprocessor
  18085. constants @code{__v850e1__} and @code{__v850e__} are defined if
  18086. this option is used.
  18087. @item -mv850es
  18088. @opindex mv850es
  18089. Specify that the target processor is the V850ES. This is an alias for
  18090. the @option{-mv850e1} option.
  18091. @item -mv850e
  18092. @opindex mv850e
  18093. Specify that the target processor is the V850E@. The preprocessor
  18094. constant @code{__v850e__} is defined if this option is used.
  18095. If neither @option{-mv850} nor @option{-mv850e} nor @option{-mv850e1}
  18096. nor @option{-mv850e2} nor @option{-mv850e2v3} nor @option{-mv850e3v5}
  18097. are defined then a default target processor is chosen and the
  18098. relevant @samp{__v850*__} preprocessor constant is defined.
  18099. The preprocessor constants @code{__v850} and @code{__v851__} are always
  18100. defined, regardless of which processor variant is the target.
  18101. @item -mdisable-callt
  18102. @itemx -mno-disable-callt
  18103. @opindex mdisable-callt
  18104. @opindex mno-disable-callt
  18105. This option suppresses generation of the @code{CALLT} instruction for the
  18106. v850e, v850e1, v850e2, v850e2v3 and v850e3v5 flavors of the v850
  18107. architecture.
  18108. This option is enabled by default when the RH850 ABI is
  18109. in use (see @option{-mrh850-abi}), and disabled by default when the
  18110. GCC ABI is in use. If @code{CALLT} instructions are being generated
  18111. then the C preprocessor symbol @code{__V850_CALLT__} is defined.
  18112. @item -mrelax
  18113. @itemx -mno-relax
  18114. @opindex mrelax
  18115. @opindex mno-relax
  18116. Pass on (or do not pass on) the @option{-mrelax} command-line option
  18117. to the assembler.
  18118. @item -mlong-jumps
  18119. @itemx -mno-long-jumps
  18120. @opindex mlong-jumps
  18121. @opindex mno-long-jumps
  18122. Disable (or re-enable) the generation of PC-relative jump instructions.
  18123. @item -msoft-float
  18124. @itemx -mhard-float
  18125. @opindex msoft-float
  18126. @opindex mhard-float
  18127. Disable (or re-enable) the generation of hardware floating point
  18128. instructions. This option is only significant when the target
  18129. architecture is @samp{V850E2V3} or higher. If hardware floating point
  18130. instructions are being generated then the C preprocessor symbol
  18131. @code{__FPU_OK__} is defined, otherwise the symbol
  18132. @code{__NO_FPU__} is defined.
  18133. @item -mloop
  18134. @opindex mloop
  18135. Enables the use of the e3v5 LOOP instruction. The use of this
  18136. instruction is not enabled by default when the e3v5 architecture is
  18137. selected because its use is still experimental.
  18138. @item -mrh850-abi
  18139. @itemx -mghs
  18140. @opindex mrh850-abi
  18141. @opindex mghs
  18142. Enables support for the RH850 version of the V850 ABI. This is the
  18143. default. With this version of the ABI the following rules apply:
  18144. @itemize
  18145. @item
  18146. Integer sized structures and unions are returned via a memory pointer
  18147. rather than a register.
  18148. @item
  18149. Large structures and unions (more than 8 bytes in size) are passed by
  18150. value.
  18151. @item
  18152. Functions are aligned to 16-bit boundaries.
  18153. @item
  18154. The @option{-m8byte-align} command-line option is supported.
  18155. @item
  18156. The @option{-mdisable-callt} command-line option is enabled by
  18157. default. The @option{-mno-disable-callt} command-line option is not
  18158. supported.
  18159. @end itemize
  18160. When this version of the ABI is enabled the C preprocessor symbol
  18161. @code{__V850_RH850_ABI__} is defined.
  18162. @item -mgcc-abi
  18163. @opindex mgcc-abi
  18164. Enables support for the old GCC version of the V850 ABI. With this
  18165. version of the ABI the following rules apply:
  18166. @itemize
  18167. @item
  18168. Integer sized structures and unions are returned in register @code{r10}.
  18169. @item
  18170. Large structures and unions (more than 8 bytes in size) are passed by
  18171. reference.
  18172. @item
  18173. Functions are aligned to 32-bit boundaries, unless optimizing for
  18174. size.
  18175. @item
  18176. The @option{-m8byte-align} command-line option is not supported.
  18177. @item
  18178. The @option{-mdisable-callt} command-line option is supported but not
  18179. enabled by default.
  18180. @end itemize
  18181. When this version of the ABI is enabled the C preprocessor symbol
  18182. @code{__V850_GCC_ABI__} is defined.
  18183. @item -m8byte-align
  18184. @itemx -mno-8byte-align
  18185. @opindex m8byte-align
  18186. @opindex mno-8byte-align
  18187. Enables support for @code{double} and @code{long long} types to be
  18188. aligned on 8-byte boundaries. The default is to restrict the
  18189. alignment of all objects to at most 4-bytes. When
  18190. @option{-m8byte-align} is in effect the C preprocessor symbol
  18191. @code{__V850_8BYTE_ALIGN__} is defined.
  18192. @item -mbig-switch
  18193. @opindex mbig-switch
  18194. Generate code suitable for big switch tables. Use this option only if
  18195. the assembler/linker complain about out of range branches within a switch
  18196. table.
  18197. @item -mapp-regs
  18198. @opindex mapp-regs
  18199. This option causes r2 and r5 to be used in the code generated by
  18200. the compiler. This setting is the default.
  18201. @item -mno-app-regs
  18202. @opindex mno-app-regs
  18203. This option causes r2 and r5 to be treated as fixed registers.
  18204. @end table
  18205. @node VAX Options
  18206. @subsection VAX Options
  18207. @cindex VAX options
  18208. These @samp{-m} options are defined for the VAX:
  18209. @table @gcctabopt
  18210. @item -munix
  18211. @opindex munix
  18212. Do not output certain jump instructions (@code{aobleq} and so on)
  18213. that the Unix assembler for the VAX cannot handle across long
  18214. ranges.
  18215. @item -mgnu
  18216. @opindex mgnu
  18217. Do output those jump instructions, on the assumption that the
  18218. GNU assembler is being used.
  18219. @item -mg
  18220. @opindex mg
  18221. Output code for G-format floating-point numbers instead of D-format.
  18222. @end table
  18223. @node Visium Options
  18224. @subsection Visium Options
  18225. @cindex Visium options
  18226. @table @gcctabopt
  18227. @item -mdebug
  18228. @opindex mdebug
  18229. A program which performs file I/O and is destined to run on an MCM target
  18230. should be linked with this option. It causes the libraries libc.a and
  18231. libdebug.a to be linked. The program should be run on the target under
  18232. the control of the GDB remote debugging stub.
  18233. @item -msim
  18234. @opindex msim
  18235. A program which performs file I/O and is destined to run on the simulator
  18236. should be linked with option. This causes libraries libc.a and libsim.a to
  18237. be linked.
  18238. @item -mfpu
  18239. @itemx -mhard-float
  18240. @opindex mfpu
  18241. @opindex mhard-float
  18242. Generate code containing floating-point instructions. This is the
  18243. default.
  18244. @item -mno-fpu
  18245. @itemx -msoft-float
  18246. @opindex mno-fpu
  18247. @opindex msoft-float
  18248. Generate code containing library calls for floating-point.
  18249. @option{-msoft-float} changes the calling convention in the output file;
  18250. therefore, it is only useful if you compile @emph{all} of a program with
  18251. this option. In particular, you need to compile @file{libgcc.a}, the
  18252. library that comes with GCC, with @option{-msoft-float} in order for
  18253. this to work.
  18254. @item -mcpu=@var{cpu_type}
  18255. @opindex mcpu
  18256. Set the instruction set, register set, and instruction scheduling parameters
  18257. for machine type @var{cpu_type}. Supported values for @var{cpu_type} are
  18258. @samp{mcm}, @samp{gr5} and @samp{gr6}.
  18259. @samp{mcm} is a synonym of @samp{gr5} present for backward compatibility.
  18260. By default (unless configured otherwise), GCC generates code for the GR5
  18261. variant of the Visium architecture.
  18262. With @option{-mcpu=gr6}, GCC generates code for the GR6 variant of the Visium
  18263. architecture. The only difference from GR5 code is that the compiler will
  18264. generate block move instructions.
  18265. @item -mtune=@var{cpu_type}
  18266. @opindex mtune
  18267. Set the instruction scheduling parameters for machine type @var{cpu_type},
  18268. but do not set the instruction set or register set that the option
  18269. @option{-mcpu=@var{cpu_type}} would.
  18270. @item -msv-mode
  18271. @opindex msv-mode
  18272. Generate code for the supervisor mode, where there are no restrictions on
  18273. the access to general registers. This is the default.
  18274. @item -muser-mode
  18275. @opindex muser-mode
  18276. Generate code for the user mode, where the access to some general registers
  18277. is forbidden: on the GR5, registers r24 to r31 cannot be accessed in this
  18278. mode; on the GR6, only registers r29 to r31 are affected.
  18279. @end table
  18280. @node VMS Options
  18281. @subsection VMS Options
  18282. These @samp{-m} options are defined for the VMS implementations:
  18283. @table @gcctabopt
  18284. @item -mvms-return-codes
  18285. @opindex mvms-return-codes
  18286. Return VMS condition codes from @code{main}. The default is to return POSIX-style
  18287. condition (e.g.@ error) codes.
  18288. @item -mdebug-main=@var{prefix}
  18289. @opindex mdebug-main=@var{prefix}
  18290. Flag the first routine whose name starts with @var{prefix} as the main
  18291. routine for the debugger.
  18292. @item -mmalloc64
  18293. @opindex mmalloc64
  18294. Default to 64-bit memory allocation routines.
  18295. @item -mpointer-size=@var{size}
  18296. @opindex mpointer-size=@var{size}
  18297. Set the default size of pointers. Possible options for @var{size} are
  18298. @samp{32} or @samp{short} for 32 bit pointers, @samp{64} or @samp{long}
  18299. for 64 bit pointers, and @samp{no} for supporting only 32 bit pointers.
  18300. The later option disables @code{pragma pointer_size}.
  18301. @end table
  18302. @node VxWorks Options
  18303. @subsection VxWorks Options
  18304. @cindex VxWorks Options
  18305. The options in this section are defined for all VxWorks targets.
  18306. Options specific to the target hardware are listed with the other
  18307. options for that target.
  18308. @table @gcctabopt
  18309. @item -mrtp
  18310. @opindex mrtp
  18311. GCC can generate code for both VxWorks kernels and real time processes
  18312. (RTPs). This option switches from the former to the latter. It also
  18313. defines the preprocessor macro @code{__RTP__}.
  18314. @item -non-static
  18315. @opindex non-static
  18316. Link an RTP executable against shared libraries rather than static
  18317. libraries. The options @option{-static} and @option{-shared} can
  18318. also be used for RTPs (@pxref{Link Options}); @option{-static}
  18319. is the default.
  18320. @item -Bstatic
  18321. @itemx -Bdynamic
  18322. @opindex Bstatic
  18323. @opindex Bdynamic
  18324. These options are passed down to the linker. They are defined for
  18325. compatibility with Diab.
  18326. @item -Xbind-lazy
  18327. @opindex Xbind-lazy
  18328. Enable lazy binding of function calls. This option is equivalent to
  18329. @option{-Wl,-z,now} and is defined for compatibility with Diab.
  18330. @item -Xbind-now
  18331. @opindex Xbind-now
  18332. Disable lazy binding of function calls. This option is the default and
  18333. is defined for compatibility with Diab.
  18334. @end table
  18335. @node x86 Options
  18336. @subsection x86 Options
  18337. @cindex x86 Options
  18338. These @samp{-m} options are defined for the x86 family of computers.
  18339. @table @gcctabopt
  18340. @item -march=@var{cpu-type}
  18341. @opindex march
  18342. Generate instructions for the machine type @var{cpu-type}. In contrast to
  18343. @option{-mtune=@var{cpu-type}}, which merely tunes the generated code
  18344. for the specified @var{cpu-type}, @option{-march=@var{cpu-type}} allows GCC
  18345. to generate code that may not run at all on processors other than the one
  18346. indicated. Specifying @option{-march=@var{cpu-type}} implies
  18347. @option{-mtune=@var{cpu-type}}.
  18348. The choices for @var{cpu-type} are:
  18349. @table @samp
  18350. @item native
  18351. This selects the CPU to generate code for at compilation time by determining
  18352. the processor type of the compiling machine. Using @option{-march=native}
  18353. enables all instruction subsets supported by the local machine (hence
  18354. the result might not run on different machines). Using @option{-mtune=native}
  18355. produces code optimized for the local machine under the constraints
  18356. of the selected instruction set.
  18357. @item i386
  18358. Original Intel i386 CPU@.
  18359. @item i486
  18360. Intel i486 CPU@. (No scheduling is implemented for this chip.)
  18361. @item i586
  18362. @itemx pentium
  18363. Intel Pentium CPU with no MMX support.
  18364. @item pentium-mmx
  18365. Intel Pentium MMX CPU, based on Pentium core with MMX instruction set support.
  18366. @item pentiumpro
  18367. Intel Pentium Pro CPU@.
  18368. @item i686
  18369. When used with @option{-march}, the Pentium Pro
  18370. instruction set is used, so the code runs on all i686 family chips.
  18371. When used with @option{-mtune}, it has the same meaning as @samp{generic}.
  18372. @item pentium2
  18373. Intel Pentium II CPU, based on Pentium Pro core with MMX instruction set
  18374. support.
  18375. @item pentium3
  18376. @itemx pentium3m
  18377. Intel Pentium III CPU, based on Pentium Pro core with MMX and SSE instruction
  18378. set support.
  18379. @item pentium-m
  18380. Intel Pentium M; low-power version of Intel Pentium III CPU
  18381. with MMX, SSE and SSE2 instruction set support. Used by Centrino notebooks.
  18382. @item pentium4
  18383. @itemx pentium4m
  18384. Intel Pentium 4 CPU with MMX, SSE and SSE2 instruction set support.
  18385. @item prescott
  18386. Improved version of Intel Pentium 4 CPU with MMX, SSE, SSE2 and SSE3 instruction
  18387. set support.
  18388. @item nocona
  18389. Improved version of Intel Pentium 4 CPU with 64-bit extensions, MMX, SSE,
  18390. SSE2 and SSE3 instruction set support.
  18391. @item core2
  18392. Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3
  18393. instruction set support.
  18394. @item nehalem
  18395. Intel Nehalem CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3,
  18396. SSE4.1, SSE4.2 and POPCNT instruction set support.
  18397. @item westmere
  18398. Intel Westmere CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3,
  18399. SSE4.1, SSE4.2, POPCNT, AES and PCLMUL instruction set support.
  18400. @item sandybridge
  18401. Intel Sandy Bridge CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3,
  18402. SSE4.1, SSE4.2, POPCNT, AVX, AES and PCLMUL instruction set support.
  18403. @item ivybridge
  18404. Intel Ivy Bridge CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3,
  18405. SSE4.1, SSE4.2, POPCNT, AVX, AES, PCLMUL, FSGSBASE, RDRND and F16C
  18406. instruction set support.
  18407. @item haswell
  18408. Intel Haswell CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  18409. SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  18410. BMI, BMI2 and F16C instruction set support.
  18411. @item broadwell
  18412. Intel Broadwell CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  18413. SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  18414. BMI, BMI2, F16C, RDSEED, ADCX and PREFETCHW instruction set support.
  18415. @item bonnell
  18416. Intel Bonnell CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3 and SSSE3
  18417. instruction set support.
  18418. @item silvermont
  18419. Intel Silvermont CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3,
  18420. SSE4.1, SSE4.2, POPCNT, AES, PCLMUL and RDRND instruction set support.
  18421. @item knl
  18422. Intel Knight's Landing CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3,
  18423. SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA,
  18424. BMI, BMI2, F16C, RDSEED, ADCX, PREFETCHW, AVX512F, AVX512PF, AVX512ER and
  18425. AVX512CD instruction set support.
  18426. @item k6
  18427. AMD K6 CPU with MMX instruction set support.
  18428. @item k6-2
  18429. @itemx k6-3
  18430. Improved versions of AMD K6 CPU with MMX and 3DNow!@: instruction set support.
  18431. @item athlon
  18432. @itemx athlon-tbird
  18433. AMD Athlon CPU with MMX, 3dNOW!, enhanced 3DNow!@: and SSE prefetch instructions
  18434. support.
  18435. @item athlon-4
  18436. @itemx athlon-xp
  18437. @itemx athlon-mp
  18438. Improved AMD Athlon CPU with MMX, 3DNow!, enhanced 3DNow!@: and full SSE
  18439. instruction set support.
  18440. @item k8
  18441. @itemx opteron
  18442. @itemx athlon64
  18443. @itemx athlon-fx
  18444. Processors based on the AMD K8 core with x86-64 instruction set support,
  18445. including the AMD Opteron, Athlon 64, and Athlon 64 FX processors.
  18446. (This supersets MMX, SSE, SSE2, 3DNow!, enhanced 3DNow!@: and 64-bit
  18447. instruction set extensions.)
  18448. @item k8-sse3
  18449. @itemx opteron-sse3
  18450. @itemx athlon64-sse3
  18451. Improved versions of AMD K8 cores with SSE3 instruction set support.
  18452. @item amdfam10
  18453. @itemx barcelona
  18454. CPUs based on AMD Family 10h cores with x86-64 instruction set support. (This
  18455. supersets MMX, SSE, SSE2, SSE3, SSE4A, 3DNow!, enhanced 3DNow!, ABM and 64-bit
  18456. instruction set extensions.)
  18457. @item bdver1
  18458. CPUs based on AMD Family 15h cores with x86-64 instruction set support. (This
  18459. supersets FMA4, AVX, XOP, LWP, AES, PCL_MUL, CX16, MMX, SSE, SSE2, SSE3, SSE4A,
  18460. SSSE3, SSE4.1, SSE4.2, ABM and 64-bit instruction set extensions.)
  18461. @item bdver2
  18462. AMD Family 15h core based CPUs with x86-64 instruction set support. (This
  18463. supersets BMI, TBM, F16C, FMA, FMA4, AVX, XOP, LWP, AES, PCL_MUL, CX16, MMX,
  18464. SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM and 64-bit instruction set
  18465. extensions.)
  18466. @item bdver3
  18467. AMD Family 15h core based CPUs with x86-64 instruction set support. (This
  18468. supersets BMI, TBM, F16C, FMA, FMA4, FSGSBASE, AVX, XOP, LWP, AES,
  18469. PCL_MUL, CX16, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM and
  18470. 64-bit instruction set extensions.
  18471. @item bdver4
  18472. AMD Family 15h core based CPUs with x86-64 instruction set support. (This
  18473. supersets BMI, BMI2, TBM, F16C, FMA, FMA4, FSGSBASE, AVX, AVX2, XOP, LWP,
  18474. AES, PCL_MUL, CX16, MOVBE, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1,
  18475. SSE4.2, ABM and 64-bit instruction set extensions.
  18476. @item btver1
  18477. CPUs based on AMD Family 14h cores with x86-64 instruction set support. (This
  18478. supersets MMX, SSE, SSE2, SSE3, SSSE3, SSE4A, CX16, ABM and 64-bit
  18479. instruction set extensions.)
  18480. @item btver2
  18481. CPUs based on AMD Family 16h cores with x86-64 instruction set support. This
  18482. includes MOVBE, F16C, BMI, AVX, PCL_MUL, AES, SSE4.2, SSE4.1, CX16, ABM,
  18483. SSE4A, SSSE3, SSE3, SSE2, SSE, MMX and 64-bit instruction set extensions.
  18484. @item winchip-c6
  18485. IDT WinChip C6 CPU, dealt in same way as i486 with additional MMX instruction
  18486. set support.
  18487. @item winchip2
  18488. IDT WinChip 2 CPU, dealt in same way as i486 with additional MMX and 3DNow!@:
  18489. instruction set support.
  18490. @item c3
  18491. VIA C3 CPU with MMX and 3DNow!@: instruction set support. (No scheduling is
  18492. implemented for this chip.)
  18493. @item c3-2
  18494. VIA C3-2 (Nehemiah/C5XL) CPU with MMX and SSE instruction set support.
  18495. (No scheduling is
  18496. implemented for this chip.)
  18497. @item geode
  18498. AMD Geode embedded processor with MMX and 3DNow!@: instruction set support.
  18499. @end table
  18500. @item -mtune=@var{cpu-type}
  18501. @opindex mtune
  18502. Tune to @var{cpu-type} everything applicable about the generated code, except
  18503. for the ABI and the set of available instructions.
  18504. While picking a specific @var{cpu-type} schedules things appropriately
  18505. for that particular chip, the compiler does not generate any code that
  18506. cannot run on the default machine type unless you use a
  18507. @option{-march=@var{cpu-type}} option.
  18508. For example, if GCC is configured for i686-pc-linux-gnu
  18509. then @option{-mtune=pentium4} generates code that is tuned for Pentium 4
  18510. but still runs on i686 machines.
  18511. The choices for @var{cpu-type} are the same as for @option{-march}.
  18512. In addition, @option{-mtune} supports 2 extra choices for @var{cpu-type}:
  18513. @table @samp
  18514. @item generic
  18515. Produce code optimized for the most common IA32/@/AMD64/@/EM64T processors.
  18516. If you know the CPU on which your code will run, then you should use
  18517. the corresponding @option{-mtune} or @option{-march} option instead of
  18518. @option{-mtune=generic}. But, if you do not know exactly what CPU users
  18519. of your application will have, then you should use this option.
  18520. As new processors are deployed in the marketplace, the behavior of this
  18521. option will change. Therefore, if you upgrade to a newer version of
  18522. GCC, code generation controlled by this option will change to reflect
  18523. the processors
  18524. that are most common at the time that version of GCC is released.
  18525. There is no @option{-march=generic} option because @option{-march}
  18526. indicates the instruction set the compiler can use, and there is no
  18527. generic instruction set applicable to all processors. In contrast,
  18528. @option{-mtune} indicates the processor (or, in this case, collection of
  18529. processors) for which the code is optimized.
  18530. @item intel
  18531. Produce code optimized for the most current Intel processors, which are
  18532. Haswell and Silvermont for this version of GCC. If you know the CPU
  18533. on which your code will run, then you should use the corresponding
  18534. @option{-mtune} or @option{-march} option instead of @option{-mtune=intel}.
  18535. But, if you want your application performs better on both Haswell and
  18536. Silvermont, then you should use this option.
  18537. As new Intel processors are deployed in the marketplace, the behavior of
  18538. this option will change. Therefore, if you upgrade to a newer version of
  18539. GCC, code generation controlled by this option will change to reflect
  18540. the most current Intel processors at the time that version of GCC is
  18541. released.
  18542. There is no @option{-march=intel} option because @option{-march} indicates
  18543. the instruction set the compiler can use, and there is no common
  18544. instruction set applicable to all processors. In contrast,
  18545. @option{-mtune} indicates the processor (or, in this case, collection of
  18546. processors) for which the code is optimized.
  18547. @end table
  18548. @item -mcpu=@var{cpu-type}
  18549. @opindex mcpu
  18550. A deprecated synonym for @option{-mtune}.
  18551. @item -mfpmath=@var{unit}
  18552. @opindex mfpmath
  18553. Generate floating-point arithmetic for selected unit @var{unit}. The choices
  18554. for @var{unit} are:
  18555. @table @samp
  18556. @item 387
  18557. Use the standard 387 floating-point coprocessor present on the majority of chips and
  18558. emulated otherwise. Code compiled with this option runs almost everywhere.
  18559. The temporary results are computed in 80-bit precision instead of the precision
  18560. specified by the type, resulting in slightly different results compared to most
  18561. of other chips. See @option{-ffloat-store} for more detailed description.
  18562. This is the default choice for x86-32 targets.
  18563. @item sse
  18564. Use scalar floating-point instructions present in the SSE instruction set.
  18565. This instruction set is supported by Pentium III and newer chips,
  18566. and in the AMD line
  18567. by Athlon-4, Athlon XP and Athlon MP chips. The earlier version of the SSE
  18568. instruction set supports only single-precision arithmetic, thus the double and
  18569. extended-precision arithmetic are still done using 387. A later version, present
  18570. only in Pentium 4 and AMD x86-64 chips, supports double-precision
  18571. arithmetic too.
  18572. For the x86-32 compiler, you must use @option{-march=@var{cpu-type}}, @option{-msse}
  18573. or @option{-msse2} switches to enable SSE extensions and make this option
  18574. effective. For the x86-64 compiler, these extensions are enabled by default.
  18575. The resulting code should be considerably faster in the majority of cases and avoid
  18576. the numerical instability problems of 387 code, but may break some existing
  18577. code that expects temporaries to be 80 bits.
  18578. This is the default choice for the x86-64 compiler.
  18579. @item sse,387
  18580. @itemx sse+387
  18581. @itemx both
  18582. Attempt to utilize both instruction sets at once. This effectively doubles the
  18583. amount of available registers, and on chips with separate execution units for
  18584. 387 and SSE the execution resources too. Use this option with care, as it is
  18585. still experimental, because the GCC register allocator does not model separate
  18586. functional units well, resulting in unstable performance.
  18587. @end table
  18588. @item -masm=@var{dialect}
  18589. @opindex masm=@var{dialect}
  18590. Output assembly instructions using selected @var{dialect}. Also affects
  18591. which dialect is used for basic @code{asm} (@pxref{Basic Asm}) and
  18592. extended @code{asm} (@pxref{Extended Asm}). Supported choices (in dialect
  18593. order) are @samp{att} or @samp{intel}. The default is @samp{att}. Darwin does
  18594. not support @samp{intel}.
  18595. @item -mieee-fp
  18596. @itemx -mno-ieee-fp
  18597. @opindex mieee-fp
  18598. @opindex mno-ieee-fp
  18599. Control whether or not the compiler uses IEEE floating-point
  18600. comparisons. These correctly handle the case where the result of a
  18601. comparison is unordered.
  18602. @item -msoft-float
  18603. @opindex msoft-float
  18604. Generate output containing library calls for floating point.
  18605. @strong{Warning:} the requisite libraries are not part of GCC@.
  18606. Normally the facilities of the machine's usual C compiler are used, but
  18607. this can't be done directly in cross-compilation. You must make your
  18608. own arrangements to provide suitable library functions for
  18609. cross-compilation.
  18610. On machines where a function returns floating-point results in the 80387
  18611. register stack, some floating-point opcodes may be emitted even if
  18612. @option{-msoft-float} is used.
  18613. @item -mno-fp-ret-in-387
  18614. @opindex mno-fp-ret-in-387
  18615. Do not use the FPU registers for return values of functions.
  18616. The usual calling convention has functions return values of types
  18617. @code{float} and @code{double} in an FPU register, even if there
  18618. is no FPU@. The idea is that the operating system should emulate
  18619. an FPU@.
  18620. The option @option{-mno-fp-ret-in-387} causes such values to be returned
  18621. in ordinary CPU registers instead.
  18622. @item -mno-fancy-math-387
  18623. @opindex mno-fancy-math-387
  18624. Some 387 emulators do not support the @code{sin}, @code{cos} and
  18625. @code{sqrt} instructions for the 387. Specify this option to avoid
  18626. generating those instructions. This option is the default on
  18627. OpenBSD and NetBSD@. This option is overridden when @option{-march}
  18628. indicates that the target CPU always has an FPU and so the
  18629. instruction does not need emulation. These
  18630. instructions are not generated unless you also use the
  18631. @option{-funsafe-math-optimizations} switch.
  18632. @item -malign-double
  18633. @itemx -mno-align-double
  18634. @opindex malign-double
  18635. @opindex mno-align-double
  18636. Control whether GCC aligns @code{double}, @code{long double}, and
  18637. @code{long long} variables on a two-word boundary or a one-word
  18638. boundary. Aligning @code{double} variables on a two-word boundary
  18639. produces code that runs somewhat faster on a Pentium at the
  18640. expense of more memory.
  18641. On x86-64, @option{-malign-double} is enabled by default.
  18642. @strong{Warning:} if you use the @option{-malign-double} switch,
  18643. structures containing the above types are aligned differently than
  18644. the published application binary interface specifications for the x86-32
  18645. and are not binary compatible with structures in code compiled
  18646. without that switch.
  18647. @item -m96bit-long-double
  18648. @itemx -m128bit-long-double
  18649. @opindex m96bit-long-double
  18650. @opindex m128bit-long-double
  18651. These switches control the size of @code{long double} type. The x86-32
  18652. application binary interface specifies the size to be 96 bits,
  18653. so @option{-m96bit-long-double} is the default in 32-bit mode.
  18654. Modern architectures (Pentium and newer) prefer @code{long double}
  18655. to be aligned to an 8- or 16-byte boundary. In arrays or structures
  18656. conforming to the ABI, this is not possible. So specifying
  18657. @option{-m128bit-long-double} aligns @code{long double}
  18658. to a 16-byte boundary by padding the @code{long double} with an additional
  18659. 32-bit zero.
  18660. In the x86-64 compiler, @option{-m128bit-long-double} is the default choice as
  18661. its ABI specifies that @code{long double} is aligned on 16-byte boundary.
  18662. Notice that neither of these options enable any extra precision over the x87
  18663. standard of 80 bits for a @code{long double}.
  18664. @strong{Warning:} if you override the default value for your target ABI, this
  18665. changes the size of
  18666. structures and arrays containing @code{long double} variables,
  18667. as well as modifying the function calling convention for functions taking
  18668. @code{long double}. Hence they are not binary-compatible
  18669. with code compiled without that switch.
  18670. @item -mlong-double-64
  18671. @itemx -mlong-double-80
  18672. @itemx -mlong-double-128
  18673. @opindex mlong-double-64
  18674. @opindex mlong-double-80
  18675. @opindex mlong-double-128
  18676. These switches control the size of @code{long double} type. A size
  18677. of 64 bits makes the @code{long double} type equivalent to the @code{double}
  18678. type. This is the default for 32-bit Bionic C library. A size
  18679. of 128 bits makes the @code{long double} type equivalent to the
  18680. @code{__float128} type. This is the default for 64-bit Bionic C library.
  18681. @strong{Warning:} if you override the default value for your target ABI, this
  18682. changes the size of
  18683. structures and arrays containing @code{long double} variables,
  18684. as well as modifying the function calling convention for functions taking
  18685. @code{long double}. Hence they are not binary-compatible
  18686. with code compiled without that switch.
  18687. @item -malign-data=@var{type}
  18688. @opindex malign-data
  18689. Control how GCC aligns variables. Supported values for @var{type} are
  18690. @samp{compat} uses increased alignment value compatible uses GCC 4.8
  18691. and earlier, @samp{abi} uses alignment value as specified by the
  18692. psABI, and @samp{cacheline} uses increased alignment value to match
  18693. the cache line size. @samp{compat} is the default.
  18694. @item -mlarge-data-threshold=@var{threshold}
  18695. @opindex mlarge-data-threshold
  18696. When @option{-mcmodel=medium} is specified, data objects larger than
  18697. @var{threshold} are placed in the large data section. This value must be the
  18698. same across all objects linked into the binary, and defaults to 65535.
  18699. @item -mrtd
  18700. @opindex mrtd
  18701. Use a different function-calling convention, in which functions that
  18702. take a fixed number of arguments return with the @code{ret @var{num}}
  18703. instruction, which pops their arguments while returning. This saves one
  18704. instruction in the caller since there is no need to pop the arguments
  18705. there.
  18706. You can specify that an individual function is called with this calling
  18707. sequence with the function attribute @code{stdcall}. You can also
  18708. override the @option{-mrtd} option by using the function attribute
  18709. @code{cdecl}. @xref{Function Attributes}.
  18710. @strong{Warning:} this calling convention is incompatible with the one
  18711. normally used on Unix, so you cannot use it if you need to call
  18712. libraries compiled with the Unix compiler.
  18713. Also, you must provide function prototypes for all functions that
  18714. take variable numbers of arguments (including @code{printf});
  18715. otherwise incorrect code is generated for calls to those
  18716. functions.
  18717. In addition, seriously incorrect code results if you call a
  18718. function with too many arguments. (Normally, extra arguments are
  18719. harmlessly ignored.)
  18720. @item -mregparm=@var{num}
  18721. @opindex mregparm
  18722. Control how many registers are used to pass integer arguments. By
  18723. default, no registers are used to pass arguments, and at most 3
  18724. registers can be used. You can control this behavior for a specific
  18725. function by using the function attribute @code{regparm}.
  18726. @xref{Function Attributes}.
  18727. @strong{Warning:} if you use this switch, and
  18728. @var{num} is nonzero, then you must build all modules with the same
  18729. value, including any libraries. This includes the system libraries and
  18730. startup modules.
  18731. @item -msseregparm
  18732. @opindex msseregparm
  18733. Use SSE register passing conventions for float and double arguments
  18734. and return values. You can control this behavior for a specific
  18735. function by using the function attribute @code{sseregparm}.
  18736. @xref{Function Attributes}.
  18737. @strong{Warning:} if you use this switch then you must build all
  18738. modules with the same value, including any libraries. This includes
  18739. the system libraries and startup modules.
  18740. @item -mvect8-ret-in-mem
  18741. @opindex mvect8-ret-in-mem
  18742. Return 8-byte vectors in memory instead of MMX registers. This is the
  18743. default on Solaris@tie{}8 and 9 and VxWorks to match the ABI of the Sun
  18744. Studio compilers until version 12. Later compiler versions (starting
  18745. with Studio 12 Update@tie{}1) follow the ABI used by other x86 targets, which
  18746. is the default on Solaris@tie{}10 and later. @emph{Only} use this option if
  18747. you need to remain compatible with existing code produced by those
  18748. previous compiler versions or older versions of GCC@.
  18749. @item -mpc32
  18750. @itemx -mpc64
  18751. @itemx -mpc80
  18752. @opindex mpc32
  18753. @opindex mpc64
  18754. @opindex mpc80
  18755. Set 80387 floating-point precision to 32, 64 or 80 bits. When @option{-mpc32}
  18756. is specified, the significands of results of floating-point operations are
  18757. rounded to 24 bits (single precision); @option{-mpc64} rounds the
  18758. significands of results of floating-point operations to 53 bits (double
  18759. precision) and @option{-mpc80} rounds the significands of results of
  18760. floating-point operations to 64 bits (extended double precision), which is
  18761. the default. When this option is used, floating-point operations in higher
  18762. precisions are not available to the programmer without setting the FPU
  18763. control word explicitly.
  18764. Setting the rounding of floating-point operations to less than the default
  18765. 80 bits can speed some programs by 2% or more. Note that some mathematical
  18766. libraries assume that extended-precision (80-bit) floating-point operations
  18767. are enabled by default; routines in such libraries could suffer significant
  18768. loss of accuracy, typically through so-called ``catastrophic cancellation'',
  18769. when this option is used to set the precision to less than extended precision.
  18770. @item -mstackrealign
  18771. @opindex mstackrealign
  18772. Realign the stack at entry. On the x86, the @option{-mstackrealign}
  18773. option generates an alternate prologue and epilogue that realigns the
  18774. run-time stack if necessary. This supports mixing legacy codes that keep
  18775. 4-byte stack alignment with modern codes that keep 16-byte stack alignment for
  18776. SSE compatibility. See also the attribute @code{force_align_arg_pointer},
  18777. applicable to individual functions.
  18778. @item -mpreferred-stack-boundary=@var{num}
  18779. @opindex mpreferred-stack-boundary
  18780. Attempt to keep the stack boundary aligned to a 2 raised to @var{num}
  18781. byte boundary. If @option{-mpreferred-stack-boundary} is not specified,
  18782. the default is 4 (16 bytes or 128 bits).
  18783. @strong{Warning:} When generating code for the x86-64 architecture with
  18784. SSE extensions disabled, @option{-mpreferred-stack-boundary=3} can be
  18785. used to keep the stack boundary aligned to 8 byte boundary. Since
  18786. x86-64 ABI require 16 byte stack alignment, this is ABI incompatible and
  18787. intended to be used in controlled environment where stack space is
  18788. important limitation. This option leads to wrong code when functions
  18789. compiled with 16 byte stack alignment (such as functions from a standard
  18790. library) are called with misaligned stack. In this case, SSE
  18791. instructions may lead to misaligned memory access traps. In addition,
  18792. variable arguments are handled incorrectly for 16 byte aligned
  18793. objects (including x87 long double and __int128), leading to wrong
  18794. results. You must build all modules with
  18795. @option{-mpreferred-stack-boundary=3}, including any libraries. This
  18796. includes the system libraries and startup modules.
  18797. @item -mincoming-stack-boundary=@var{num}
  18798. @opindex mincoming-stack-boundary
  18799. Assume the incoming stack is aligned to a 2 raised to @var{num} byte
  18800. boundary. If @option{-mincoming-stack-boundary} is not specified,
  18801. the one specified by @option{-mpreferred-stack-boundary} is used.
  18802. On Pentium and Pentium Pro, @code{double} and @code{long double} values
  18803. should be aligned to an 8-byte boundary (see @option{-malign-double}) or
  18804. suffer significant run time performance penalties. On Pentium III, the
  18805. Streaming SIMD Extension (SSE) data type @code{__m128} may not work
  18806. properly if it is not 16-byte aligned.
  18807. To ensure proper alignment of this values on the stack, the stack boundary
  18808. must be as aligned as that required by any value stored on the stack.
  18809. Further, every function must be generated such that it keeps the stack
  18810. aligned. Thus calling a function compiled with a higher preferred
  18811. stack boundary from a function compiled with a lower preferred stack
  18812. boundary most likely misaligns the stack. It is recommended that
  18813. libraries that use callbacks always use the default setting.
  18814. This extra alignment does consume extra stack space, and generally
  18815. increases code size. Code that is sensitive to stack space usage, such
  18816. as embedded systems and operating system kernels, may want to reduce the
  18817. preferred alignment to @option{-mpreferred-stack-boundary=2}.
  18818. @need 200
  18819. @item -mmmx
  18820. @opindex mmmx
  18821. @need 200
  18822. @itemx -msse
  18823. @opindex msse
  18824. @need 200
  18825. @itemx -msse2
  18826. @need 200
  18827. @itemx -msse3
  18828. @need 200
  18829. @itemx -mssse3
  18830. @need 200
  18831. @itemx -msse4
  18832. @need 200
  18833. @itemx -msse4a
  18834. @need 200
  18835. @itemx -msse4.1
  18836. @need 200
  18837. @itemx -msse4.2
  18838. @need 200
  18839. @itemx -mavx
  18840. @opindex mavx
  18841. @need 200
  18842. @itemx -mavx2
  18843. @need 200
  18844. @itemx -mavx512f
  18845. @need 200
  18846. @itemx -mavx512pf
  18847. @need 200
  18848. @itemx -mavx512er
  18849. @need 200
  18850. @itemx -mavx512cd
  18851. @need 200
  18852. @itemx -msha
  18853. @opindex msha
  18854. @need 200
  18855. @itemx -maes
  18856. @opindex maes
  18857. @need 200
  18858. @itemx -mpclmul
  18859. @opindex mpclmul
  18860. @need 200
  18861. @itemx -mclfushopt
  18862. @opindex mclfushopt
  18863. @need 200
  18864. @itemx -mfsgsbase
  18865. @opindex mfsgsbase
  18866. @need 200
  18867. @itemx -mrdrnd
  18868. @opindex mrdrnd
  18869. @need 200
  18870. @itemx -mf16c
  18871. @opindex mf16c
  18872. @need 200
  18873. @itemx -mfma
  18874. @opindex mfma
  18875. @need 200
  18876. @itemx -mfma4
  18877. @need 200
  18878. @itemx -mno-fma4
  18879. @need 200
  18880. @itemx -mprefetchwt1
  18881. @opindex mprefetchwt1
  18882. @need 200
  18883. @itemx -mxop
  18884. @opindex mxop
  18885. @need 200
  18886. @itemx -mlwp
  18887. @opindex mlwp
  18888. @need 200
  18889. @itemx -m3dnow
  18890. @opindex m3dnow
  18891. @need 200
  18892. @itemx -mpopcnt
  18893. @opindex mpopcnt
  18894. @need 200
  18895. @itemx -mabm
  18896. @opindex mabm
  18897. @need 200
  18898. @itemx -mbmi
  18899. @opindex mbmi
  18900. @need 200
  18901. @itemx -mbmi2
  18902. @need 200
  18903. @itemx -mlzcnt
  18904. @opindex mlzcnt
  18905. @need 200
  18906. @itemx -mfxsr
  18907. @opindex mfxsr
  18908. @need 200
  18909. @itemx -mxsave
  18910. @opindex mxsave
  18911. @need 200
  18912. @itemx -mxsaveopt
  18913. @opindex mxsaveopt
  18914. @need 200
  18915. @itemx -mxsavec
  18916. @opindex mxsavec
  18917. @need 200
  18918. @itemx -mxsaves
  18919. @opindex mxsaves
  18920. @need 200
  18921. @itemx -mrtm
  18922. @opindex mrtm
  18923. @need 200
  18924. @itemx -mtbm
  18925. @opindex mtbm
  18926. @need 200
  18927. @itemx -mmpx
  18928. @opindex mmpx
  18929. @need 200
  18930. @itemx -mmwaitx
  18931. @opindex mmwaitx
  18932. These switches enable the use of instructions in the MMX, SSE,
  18933. SSE2, SSE3, SSSE3, SSE4.1, AVX, AVX2, AVX512F, AVX512PF, AVX512ER, AVX512CD,
  18934. SHA, AES, PCLMUL, FSGSBASE, RDRND, F16C, FMA, SSE4A, FMA4, XOP, LWP, ABM,
  18935. BMI, BMI2, FXSR, XSAVE, XSAVEOPT, LZCNT, RTM, MPX, MWAITX or 3DNow!@:
  18936. extended instruction sets. Each has a corresponding @option{-mno-} option
  18937. to disable use of these instructions.
  18938. These extensions are also available as built-in functions: see
  18939. @ref{x86 Built-in Functions}, for details of the functions enabled and
  18940. disabled by these switches.
  18941. To generate SSE/SSE2 instructions automatically from floating-point
  18942. code (as opposed to 387 instructions), see @option{-mfpmath=sse}.
  18943. GCC depresses SSEx instructions when @option{-mavx} is used. Instead, it
  18944. generates new AVX instructions or AVX equivalence for all SSEx instructions
  18945. when needed.
  18946. These options enable GCC to use these extended instructions in
  18947. generated code, even without @option{-mfpmath=sse}. Applications that
  18948. perform run-time CPU detection must compile separate files for each
  18949. supported architecture, using the appropriate flags. In particular,
  18950. the file containing the CPU detection code should be compiled without
  18951. these options.
  18952. @item -mdump-tune-features
  18953. @opindex mdump-tune-features
  18954. This option instructs GCC to dump the names of the x86 performance
  18955. tuning features and default settings. The names can be used in
  18956. @option{-mtune-ctrl=@var{feature-list}}.
  18957. @item -mtune-ctrl=@var{feature-list}
  18958. @opindex mtune-ctrl=@var{feature-list}
  18959. This option is used to do fine grain control of x86 code generation features.
  18960. @var{feature-list} is a comma separated list of @var{feature} names. See also
  18961. @option{-mdump-tune-features}. When specified, the @var{feature} is turned
  18962. on if it is not preceded with @samp{^}, otherwise, it is turned off.
  18963. @option{-mtune-ctrl=@var{feature-list}} is intended to be used by GCC
  18964. developers. Using it may lead to code paths not covered by testing and can
  18965. potentially result in compiler ICEs or runtime errors.
  18966. @item -mno-default
  18967. @opindex mno-default
  18968. This option instructs GCC to turn off all tunable features. See also
  18969. @option{-mtune-ctrl=@var{feature-list}} and @option{-mdump-tune-features}.
  18970. @item -mcld
  18971. @opindex mcld
  18972. This option instructs GCC to emit a @code{cld} instruction in the prologue
  18973. of functions that use string instructions. String instructions depend on
  18974. the DF flag to select between autoincrement or autodecrement mode. While the
  18975. ABI specifies the DF flag to be cleared on function entry, some operating
  18976. systems violate this specification by not clearing the DF flag in their
  18977. exception dispatchers. The exception handler can be invoked with the DF flag
  18978. set, which leads to wrong direction mode when string instructions are used.
  18979. This option can be enabled by default on 32-bit x86 targets by configuring
  18980. GCC with the @option{--enable-cld} configure option. Generation of @code{cld}
  18981. instructions can be suppressed with the @option{-mno-cld} compiler option
  18982. in this case.
  18983. @item -mvzeroupper
  18984. @opindex mvzeroupper
  18985. This option instructs GCC to emit a @code{vzeroupper} instruction
  18986. before a transfer of control flow out of the function to minimize
  18987. the AVX to SSE transition penalty as well as remove unnecessary @code{zeroupper}
  18988. intrinsics.
  18989. @item -mprefer-avx128
  18990. @opindex mprefer-avx128
  18991. This option instructs GCC to use 128-bit AVX instructions instead of
  18992. 256-bit AVX instructions in the auto-vectorizer.
  18993. @item -mcx16
  18994. @opindex mcx16
  18995. This option enables GCC to generate @code{CMPXCHG16B} instructions.
  18996. @code{CMPXCHG16B} allows for atomic operations on 128-bit double quadword
  18997. (or oword) data types.
  18998. This is useful for high-resolution counters that can be updated
  18999. by multiple processors (or cores). This instruction is generated as part of
  19000. atomic built-in functions: see @ref{__sync Builtins} or
  19001. @ref{__atomic Builtins} for details.
  19002. @item -msahf
  19003. @opindex msahf
  19004. This option enables generation of @code{SAHF} instructions in 64-bit code.
  19005. Early Intel Pentium 4 CPUs with Intel 64 support,
  19006. prior to the introduction of Pentium 4 G1 step in December 2005,
  19007. lacked the @code{LAHF} and @code{SAHF} instructions
  19008. which are supported by AMD64.
  19009. These are load and store instructions, respectively, for certain status flags.
  19010. In 64-bit mode, the @code{SAHF} instruction is used to optimize @code{fmod},
  19011. @code{drem}, and @code{remainder} built-in functions;
  19012. see @ref{Other Builtins} for details.
  19013. @item -mmovbe
  19014. @opindex mmovbe
  19015. This option enables use of the @code{movbe} instruction to implement
  19016. @code{__builtin_bswap32} and @code{__builtin_bswap64}.
  19017. @item -mcrc32
  19018. @opindex mcrc32
  19019. This option enables built-in functions @code{__builtin_ia32_crc32qi},
  19020. @code{__builtin_ia32_crc32hi}, @code{__builtin_ia32_crc32si} and
  19021. @code{__builtin_ia32_crc32di} to generate the @code{crc32} machine instruction.
  19022. @item -mrecip
  19023. @opindex mrecip
  19024. This option enables use of @code{RCPSS} and @code{RSQRTSS} instructions
  19025. (and their vectorized variants @code{RCPPS} and @code{RSQRTPS})
  19026. with an additional Newton-Raphson step
  19027. to increase precision instead of @code{DIVSS} and @code{SQRTSS}
  19028. (and their vectorized
  19029. variants) for single-precision floating-point arguments. These instructions
  19030. are generated only when @option{-funsafe-math-optimizations} is enabled
  19031. together with @option{-finite-math-only} and @option{-fno-trapping-math}.
  19032. Note that while the throughput of the sequence is higher than the throughput
  19033. of the non-reciprocal instruction, the precision of the sequence can be
  19034. decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994).
  19035. Note that GCC implements @code{1.0f/sqrtf(@var{x})} in terms of @code{RSQRTSS}
  19036. (or @code{RSQRTPS}) already with @option{-ffast-math} (or the above option
  19037. combination), and doesn't need @option{-mrecip}.
  19038. Also note that GCC emits the above sequence with additional Newton-Raphson step
  19039. for vectorized single-float division and vectorized @code{sqrtf(@var{x})}
  19040. already with @option{-ffast-math} (or the above option combination), and
  19041. doesn't need @option{-mrecip}.
  19042. @item -mrecip=@var{opt}
  19043. @opindex mrecip=opt
  19044. This option controls which reciprocal estimate instructions
  19045. may be used. @var{opt} is a comma-separated list of options, which may
  19046. be preceded by a @samp{!} to invert the option:
  19047. @table @samp
  19048. @item all
  19049. Enable all estimate instructions.
  19050. @item default
  19051. Enable the default instructions, equivalent to @option{-mrecip}.
  19052. @item none
  19053. Disable all estimate instructions, equivalent to @option{-mno-recip}.
  19054. @item div
  19055. Enable the approximation for scalar division.
  19056. @item vec-div
  19057. Enable the approximation for vectorized division.
  19058. @item sqrt
  19059. Enable the approximation for scalar square root.
  19060. @item vec-sqrt
  19061. Enable the approximation for vectorized square root.
  19062. @end table
  19063. So, for example, @option{-mrecip=all,!sqrt} enables
  19064. all of the reciprocal approximations, except for square root.
  19065. @item -mveclibabi=@var{type}
  19066. @opindex mveclibabi
  19067. Specifies the ABI type to use for vectorizing intrinsics using an
  19068. external library. Supported values for @var{type} are @samp{svml}
  19069. for the Intel short
  19070. vector math library and @samp{acml} for the AMD math core library.
  19071. To use this option, both @option{-ftree-vectorize} and
  19072. @option{-funsafe-math-optimizations} have to be enabled, and an SVML or ACML
  19073. ABI-compatible library must be specified at link time.
  19074. GCC currently emits calls to @code{vmldExp2},
  19075. @code{vmldLn2}, @code{vmldLog102}, @code{vmldLog102}, @code{vmldPow2},
  19076. @code{vmldTanh2}, @code{vmldTan2}, @code{vmldAtan2}, @code{vmldAtanh2},
  19077. @code{vmldCbrt2}, @code{vmldSinh2}, @code{vmldSin2}, @code{vmldAsinh2},
  19078. @code{vmldAsin2}, @code{vmldCosh2}, @code{vmldCos2}, @code{vmldAcosh2},
  19079. @code{vmldAcos2}, @code{vmlsExp4}, @code{vmlsLn4}, @code{vmlsLog104},
  19080. @code{vmlsLog104}, @code{vmlsPow4}, @code{vmlsTanh4}, @code{vmlsTan4},
  19081. @code{vmlsAtan4}, @code{vmlsAtanh4}, @code{vmlsCbrt4}, @code{vmlsSinh4},
  19082. @code{vmlsSin4}, @code{vmlsAsinh4}, @code{vmlsAsin4}, @code{vmlsCosh4},
  19083. @code{vmlsCos4}, @code{vmlsAcosh4} and @code{vmlsAcos4} for corresponding
  19084. function type when @option{-mveclibabi=svml} is used, and @code{__vrd2_sin},
  19085. @code{__vrd2_cos}, @code{__vrd2_exp}, @code{__vrd2_log}, @code{__vrd2_log2},
  19086. @code{__vrd2_log10}, @code{__vrs4_sinf}, @code{__vrs4_cosf},
  19087. @code{__vrs4_expf}, @code{__vrs4_logf}, @code{__vrs4_log2f},
  19088. @code{__vrs4_log10f} and @code{__vrs4_powf} for the corresponding function type
  19089. when @option{-mveclibabi=acml} is used.
  19090. @item -mabi=@var{name}
  19091. @opindex mabi
  19092. Generate code for the specified calling convention. Permissible values
  19093. are @samp{sysv} for the ABI used on GNU/Linux and other systems, and
  19094. @samp{ms} for the Microsoft ABI. The default is to use the Microsoft
  19095. ABI when targeting Microsoft Windows and the SysV ABI on all other systems.
  19096. You can control this behavior for specific functions by
  19097. using the function attributes @code{ms_abi} and @code{sysv_abi}.
  19098. @xref{Function Attributes}.
  19099. @item -mtls-dialect=@var{type}
  19100. @opindex mtls-dialect
  19101. Generate code to access thread-local storage using the @samp{gnu} or
  19102. @samp{gnu2} conventions. @samp{gnu} is the conservative default;
  19103. @samp{gnu2} is more efficient, but it may add compile- and run-time
  19104. requirements that cannot be satisfied on all systems.
  19105. @item -mpush-args
  19106. @itemx -mno-push-args
  19107. @opindex mpush-args
  19108. @opindex mno-push-args
  19109. Use PUSH operations to store outgoing parameters. This method is shorter
  19110. and usually equally fast as method using SUB/MOV operations and is enabled
  19111. by default. In some cases disabling it may improve performance because of
  19112. improved scheduling and reduced dependencies.
  19113. @item -maccumulate-outgoing-args
  19114. @opindex maccumulate-outgoing-args
  19115. If enabled, the maximum amount of space required for outgoing arguments is
  19116. computed in the function prologue. This is faster on most modern CPUs
  19117. because of reduced dependencies, improved scheduling and reduced stack usage
  19118. when the preferred stack boundary is not equal to 2. The drawback is a notable
  19119. increase in code size. This switch implies @option{-mno-push-args}.
  19120. @item -mthreads
  19121. @opindex mthreads
  19122. Support thread-safe exception handling on MinGW. Programs that rely
  19123. on thread-safe exception handling must compile and link all code with the
  19124. @option{-mthreads} option. When compiling, @option{-mthreads} defines
  19125. @option{-D_MT}; when linking, it links in a special thread helper library
  19126. @option{-lmingwthrd} which cleans up per-thread exception-handling data.
  19127. @item -mno-align-stringops
  19128. @opindex mno-align-stringops
  19129. Do not align the destination of inlined string operations. This switch reduces
  19130. code size and improves performance in case the destination is already aligned,
  19131. but GCC doesn't know about it.
  19132. @item -minline-all-stringops
  19133. @opindex minline-all-stringops
  19134. By default GCC inlines string operations only when the destination is
  19135. known to be aligned to least a 4-byte boundary.
  19136. This enables more inlining and increases code
  19137. size, but may improve performance of code that depends on fast
  19138. @code{memcpy}, @code{strlen},
  19139. and @code{memset} for short lengths.
  19140. @item -minline-stringops-dynamically
  19141. @opindex minline-stringops-dynamically
  19142. For string operations of unknown size, use run-time checks with
  19143. inline code for small blocks and a library call for large blocks.
  19144. @item -mstringop-strategy=@var{alg}
  19145. @opindex mstringop-strategy=@var{alg}
  19146. Override the internal decision heuristic for the particular algorithm to use
  19147. for inlining string operations. The allowed values for @var{alg} are:
  19148. @table @samp
  19149. @item rep_byte
  19150. @itemx rep_4byte
  19151. @itemx rep_8byte
  19152. Expand using i386 @code{rep} prefix of the specified size.
  19153. @item byte_loop
  19154. @itemx loop
  19155. @itemx unrolled_loop
  19156. Expand into an inline loop.
  19157. @item libcall
  19158. Always use a library call.
  19159. @end table
  19160. @item -mmemcpy-strategy=@var{strategy}
  19161. @opindex mmemcpy-strategy=@var{strategy}
  19162. Override the internal decision heuristic to decide if @code{__builtin_memcpy}
  19163. should be inlined and what inline algorithm to use when the expected size
  19164. of the copy operation is known. @var{strategy}
  19165. is a comma-separated list of @var{alg}:@var{max_size}:@var{dest_align} triplets.
  19166. @var{alg} is specified in @option{-mstringop-strategy}, @var{max_size} specifies
  19167. the max byte size with which inline algorithm @var{alg} is allowed. For the last
  19168. triplet, the @var{max_size} must be @code{-1}. The @var{max_size} of the triplets
  19169. in the list must be specified in increasing order. The minimal byte size for
  19170. @var{alg} is @code{0} for the first triplet and @code{@var{max_size} + 1} of the
  19171. preceding range.
  19172. @item -mmemset-strategy=@var{strategy}
  19173. @opindex mmemset-strategy=@var{strategy}
  19174. The option is similar to @option{-mmemcpy-strategy=} except that it is to control
  19175. @code{__builtin_memset} expansion.
  19176. @item -momit-leaf-frame-pointer
  19177. @opindex momit-leaf-frame-pointer
  19178. Don't keep the frame pointer in a register for leaf functions. This
  19179. avoids the instructions to save, set up, and restore frame pointers and
  19180. makes an extra register available in leaf functions. The option
  19181. @option{-fomit-leaf-frame-pointer} removes the frame pointer for leaf functions,
  19182. which might make debugging harder.
  19183. @item -mtls-direct-seg-refs
  19184. @itemx -mno-tls-direct-seg-refs
  19185. @opindex mtls-direct-seg-refs
  19186. Controls whether TLS variables may be accessed with offsets from the
  19187. TLS segment register (@code{%gs} for 32-bit, @code{%fs} for 64-bit),
  19188. or whether the thread base pointer must be added. Whether or not this
  19189. is valid depends on the operating system, and whether it maps the
  19190. segment to cover the entire TLS area.
  19191. For systems that use the GNU C Library, the default is on.
  19192. @item -msse2avx
  19193. @itemx -mno-sse2avx
  19194. @opindex msse2avx
  19195. Specify that the assembler should encode SSE instructions with VEX
  19196. prefix. The option @option{-mavx} turns this on by default.
  19197. @item -mfentry
  19198. @itemx -mno-fentry
  19199. @opindex mfentry
  19200. If profiling is active (@option{-pg}), put the profiling
  19201. counter call before the prologue.
  19202. Note: On x86 architectures the attribute @code{ms_hook_prologue}
  19203. isn't possible at the moment for @option{-mfentry} and @option{-pg}.
  19204. @item -mrecord-mcount
  19205. @itemx -mno-record-mcount
  19206. @opindex mrecord-mcount
  19207. If profiling is active (@option{-pg}), generate a __mcount_loc section
  19208. that contains pointers to each profiling call. This is useful for
  19209. automatically patching and out calls.
  19210. @item -mnop-mcount
  19211. @itemx -mno-nop-mcount
  19212. @opindex mnop-mcount
  19213. If profiling is active (@option{-pg}), generate the calls to
  19214. the profiling functions as nops. This is useful when they
  19215. should be patched in later dynamically. This is likely only
  19216. useful together with @option{-mrecord-mcount}.
  19217. @item -mskip-rax-setup
  19218. @itemx -mno-skip-rax-setup
  19219. @opindex mskip-rax-setup
  19220. When generating code for the x86-64 architecture with SSE extensions
  19221. disabled, @option{-skip-rax-setup} can be used to skip setting up RAX
  19222. register when there are no variable arguments passed in vector registers.
  19223. @strong{Warning:} Since RAX register is used to avoid unnecessarily
  19224. saving vector registers on stack when passing variable arguments, the
  19225. impacts of this option are callees may waste some stack space,
  19226. misbehave or jump to a random location. GCC 4.4 or newer don't have
  19227. those issues, regardless the RAX register value.
  19228. @item -m8bit-idiv
  19229. @itemx -mno-8bit-idiv
  19230. @opindex m8bit-idiv
  19231. On some processors, like Intel Atom, 8-bit unsigned integer divide is
  19232. much faster than 32-bit/64-bit integer divide. This option generates a
  19233. run-time check. If both dividend and divisor are within range of 0
  19234. to 255, 8-bit unsigned integer divide is used instead of
  19235. 32-bit/64-bit integer divide.
  19236. @item -mavx256-split-unaligned-load
  19237. @itemx -mavx256-split-unaligned-store
  19238. @opindex mavx256-split-unaligned-load
  19239. @opindex mavx256-split-unaligned-store
  19240. Split 32-byte AVX unaligned load and store.
  19241. @item -mstack-protector-guard=@var{guard}
  19242. @opindex mstack-protector-guard=@var{guard}
  19243. Generate stack protection code using canary at @var{guard}. Supported
  19244. locations are @samp{global} for global canary or @samp{tls} for per-thread
  19245. canary in the TLS block (the default). This option has effect only when
  19246. @option{-fstack-protector} or @option{-fstack-protector-all} is specified.
  19247. @end table
  19248. These @samp{-m} switches are supported in addition to the above
  19249. on x86-64 processors in 64-bit environments.
  19250. @table @gcctabopt
  19251. @item -m32
  19252. @itemx -m64
  19253. @itemx -mx32
  19254. @itemx -m16
  19255. @opindex m32
  19256. @opindex m64
  19257. @opindex mx32
  19258. @opindex m16
  19259. Generate code for a 16-bit, 32-bit or 64-bit environment.
  19260. The @option{-m32} option sets @code{int}, @code{long}, and pointer types
  19261. to 32 bits, and
  19262. generates code that runs on any i386 system.
  19263. The @option{-m64} option sets @code{int} to 32 bits and @code{long} and pointer
  19264. types to 64 bits, and generates code for the x86-64 architecture.
  19265. For Darwin only the @option{-m64} option also turns off the @option{-fno-pic}
  19266. and @option{-mdynamic-no-pic} options.
  19267. The @option{-mx32} option sets @code{int}, @code{long}, and pointer types
  19268. to 32 bits, and
  19269. generates code for the x86-64 architecture.
  19270. The @option{-m16} option is the same as @option{-m32}, except for that
  19271. it outputs the @code{.code16gcc} assembly directive at the beginning of
  19272. the assembly output so that the binary can run in 16-bit mode.
  19273. @item -mno-red-zone
  19274. @opindex mno-red-zone
  19275. Do not use a so-called ``red zone'' for x86-64 code. The red zone is mandated
  19276. by the x86-64 ABI; it is a 128-byte area beyond the location of the
  19277. stack pointer that is not modified by signal or interrupt handlers
  19278. and therefore can be used for temporary data without adjusting the stack
  19279. pointer. The flag @option{-mno-red-zone} disables this red zone.
  19280. @item -mcmodel=small
  19281. @opindex mcmodel=small
  19282. Generate code for the small code model: the program and its symbols must
  19283. be linked in the lower 2 GB of the address space. Pointers are 64 bits.
  19284. Programs can be statically or dynamically linked. This is the default
  19285. code model.
  19286. @item -mcmodel=kernel
  19287. @opindex mcmodel=kernel
  19288. Generate code for the kernel code model. The kernel runs in the
  19289. negative 2 GB of the address space.
  19290. This model has to be used for Linux kernel code.
  19291. @item -mcmodel=medium
  19292. @opindex mcmodel=medium
  19293. Generate code for the medium model: the program is linked in the lower 2
  19294. GB of the address space. Small symbols are also placed there. Symbols
  19295. with sizes larger than @option{-mlarge-data-threshold} are put into
  19296. large data or BSS sections and can be located above 2GB. Programs can
  19297. be statically or dynamically linked.
  19298. @item -mcmodel=large
  19299. @opindex mcmodel=large
  19300. Generate code for the large model. This model makes no assumptions
  19301. about addresses and sizes of sections.
  19302. @item -maddress-mode=long
  19303. @opindex maddress-mode=long
  19304. Generate code for long address mode. This is only supported for 64-bit
  19305. and x32 environments. It is the default address mode for 64-bit
  19306. environments.
  19307. @item -maddress-mode=short
  19308. @opindex maddress-mode=short
  19309. Generate code for short address mode. This is only supported for 32-bit
  19310. and x32 environments. It is the default address mode for 32-bit and
  19311. x32 environments.
  19312. @end table
  19313. @node x86 Windows Options
  19314. @subsection x86 Windows Options
  19315. @cindex x86 Windows Options
  19316. @cindex Windows Options for x86
  19317. These additional options are available for Microsoft Windows targets:
  19318. @table @gcctabopt
  19319. @item -mconsole
  19320. @opindex mconsole
  19321. This option
  19322. specifies that a console application is to be generated, by
  19323. instructing the linker to set the PE header subsystem type
  19324. required for console applications.
  19325. This option is available for Cygwin and MinGW targets and is
  19326. enabled by default on those targets.
  19327. @item -mdll
  19328. @opindex mdll
  19329. This option is available for Cygwin and MinGW targets. It
  19330. specifies that a DLL---a dynamic link library---is to be
  19331. generated, enabling the selection of the required runtime
  19332. startup object and entry point.
  19333. @item -mnop-fun-dllimport
  19334. @opindex mnop-fun-dllimport
  19335. This option is available for Cygwin and MinGW targets. It
  19336. specifies that the @code{dllimport} attribute should be ignored.
  19337. @item -mthread
  19338. @opindex mthread
  19339. This option is available for MinGW targets. It specifies
  19340. that MinGW-specific thread support is to be used.
  19341. @item -municode
  19342. @opindex municode
  19343. This option is available for MinGW-w64 targets. It causes
  19344. the @code{UNICODE} preprocessor macro to be predefined, and
  19345. chooses Unicode-capable runtime startup code.
  19346. @item -mwin32
  19347. @opindex mwin32
  19348. This option is available for Cygwin and MinGW targets. It
  19349. specifies that the typical Microsoft Windows predefined macros are to
  19350. be set in the pre-processor, but does not influence the choice
  19351. of runtime library/startup code.
  19352. @item -mwindows
  19353. @opindex mwindows
  19354. This option is available for Cygwin and MinGW targets. It
  19355. specifies that a GUI application is to be generated by
  19356. instructing the linker to set the PE header subsystem type
  19357. appropriately.
  19358. @item -fno-set-stack-executable
  19359. @opindex fno-set-stack-executable
  19360. This option is available for MinGW targets. It specifies that
  19361. the executable flag for the stack used by nested functions isn't
  19362. set. This is necessary for binaries running in kernel mode of
  19363. Microsoft Windows, as there the User32 API, which is used to set executable
  19364. privileges, isn't available.
  19365. @item -fwritable-relocated-rdata
  19366. @opindex fno-writable-relocated-rdata
  19367. This option is available for MinGW and Cygwin targets. It specifies
  19368. that relocated-data in read-only section is put into .data
  19369. section. This is a necessary for older runtimes not supporting
  19370. modification of .rdata sections for pseudo-relocation.
  19371. @item -mpe-aligned-commons
  19372. @opindex mpe-aligned-commons
  19373. This option is available for Cygwin and MinGW targets. It
  19374. specifies that the GNU extension to the PE file format that
  19375. permits the correct alignment of COMMON variables should be
  19376. used when generating code. It is enabled by default if
  19377. GCC detects that the target assembler found during configuration
  19378. supports the feature.
  19379. @end table
  19380. See also under @ref{x86 Options} for standard options.
  19381. @node Xstormy16 Options
  19382. @subsection Xstormy16 Options
  19383. @cindex Xstormy16 Options
  19384. These options are defined for Xstormy16:
  19385. @table @gcctabopt
  19386. @item -msim
  19387. @opindex msim
  19388. Choose startup files and linker script suitable for the simulator.
  19389. @end table
  19390. @node Xtensa Options
  19391. @subsection Xtensa Options
  19392. @cindex Xtensa Options
  19393. These options are supported for Xtensa targets:
  19394. @table @gcctabopt
  19395. @item -mconst16
  19396. @itemx -mno-const16
  19397. @opindex mconst16
  19398. @opindex mno-const16
  19399. Enable or disable use of @code{CONST16} instructions for loading
  19400. constant values. The @code{CONST16} instruction is currently not a
  19401. standard option from Tensilica. When enabled, @code{CONST16}
  19402. instructions are always used in place of the standard @code{L32R}
  19403. instructions. The use of @code{CONST16} is enabled by default only if
  19404. the @code{L32R} instruction is not available.
  19405. @item -mfused-madd
  19406. @itemx -mno-fused-madd
  19407. @opindex mfused-madd
  19408. @opindex mno-fused-madd
  19409. Enable or disable use of fused multiply/add and multiply/subtract
  19410. instructions in the floating-point option. This has no effect if the
  19411. floating-point option is not also enabled. Disabling fused multiply/add
  19412. and multiply/subtract instructions forces the compiler to use separate
  19413. instructions for the multiply and add/subtract operations. This may be
  19414. desirable in some cases where strict IEEE 754-compliant results are
  19415. required: the fused multiply add/subtract instructions do not round the
  19416. intermediate result, thereby producing results with @emph{more} bits of
  19417. precision than specified by the IEEE standard. Disabling fused multiply
  19418. add/subtract instructions also ensures that the program output is not
  19419. sensitive to the compiler's ability to combine multiply and add/subtract
  19420. operations.
  19421. @item -mserialize-volatile
  19422. @itemx -mno-serialize-volatile
  19423. @opindex mserialize-volatile
  19424. @opindex mno-serialize-volatile
  19425. When this option is enabled, GCC inserts @code{MEMW} instructions before
  19426. @code{volatile} memory references to guarantee sequential consistency.
  19427. The default is @option{-mserialize-volatile}. Use
  19428. @option{-mno-serialize-volatile} to omit the @code{MEMW} instructions.
  19429. @item -mforce-no-pic
  19430. @opindex mforce-no-pic
  19431. For targets, like GNU/Linux, where all user-mode Xtensa code must be
  19432. position-independent code (PIC), this option disables PIC for compiling
  19433. kernel code.
  19434. @item -mtext-section-literals
  19435. @itemx -mno-text-section-literals
  19436. @opindex mtext-section-literals
  19437. @opindex mno-text-section-literals
  19438. These options control the treatment of literal pools. The default is
  19439. @option{-mno-text-section-literals}, which places literals in a separate
  19440. section in the output file. This allows the literal pool to be placed
  19441. in a data RAM/ROM, and it also allows the linker to combine literal
  19442. pools from separate object files to remove redundant literals and
  19443. improve code size. With @option{-mtext-section-literals}, the literals
  19444. are interspersed in the text section in order to keep them as close as
  19445. possible to their references. This may be necessary for large assembly
  19446. files.
  19447. @item -mtarget-align
  19448. @itemx -mno-target-align
  19449. @opindex mtarget-align
  19450. @opindex mno-target-align
  19451. When this option is enabled, GCC instructs the assembler to
  19452. automatically align instructions to reduce branch penalties at the
  19453. expense of some code density. The assembler attempts to widen density
  19454. instructions to align branch targets and the instructions following call
  19455. instructions. If there are not enough preceding safe density
  19456. instructions to align a target, no widening is performed. The
  19457. default is @option{-mtarget-align}. These options do not affect the
  19458. treatment of auto-aligned instructions like @code{LOOP}, which the
  19459. assembler always aligns, either by widening density instructions or
  19460. by inserting NOP instructions.
  19461. @item -mlongcalls
  19462. @itemx -mno-longcalls
  19463. @opindex mlongcalls
  19464. @opindex mno-longcalls
  19465. When this option is enabled, GCC instructs the assembler to translate
  19466. direct calls to indirect calls unless it can determine that the target
  19467. of a direct call is in the range allowed by the call instruction. This
  19468. translation typically occurs for calls to functions in other source
  19469. files. Specifically, the assembler translates a direct @code{CALL}
  19470. instruction into an @code{L32R} followed by a @code{CALLX} instruction.
  19471. The default is @option{-mno-longcalls}. This option should be used in
  19472. programs where the call target can potentially be out of range. This
  19473. option is implemented in the assembler, not the compiler, so the
  19474. assembly code generated by GCC still shows direct call
  19475. instructions---look at the disassembled object code to see the actual
  19476. instructions. Note that the assembler uses an indirect call for
  19477. every cross-file call, not just those that really are out of range.
  19478. @end table
  19479. @node zSeries Options
  19480. @subsection zSeries Options
  19481. @cindex zSeries options
  19482. These are listed under @xref{S/390 and zSeries Options}.
  19483. @node Code Gen Options
  19484. @section Options for Code Generation Conventions
  19485. @cindex code generation conventions
  19486. @cindex options, code generation
  19487. @cindex run-time options
  19488. These machine-independent options control the interface conventions
  19489. used in code generation.
  19490. Most of them have both positive and negative forms; the negative form
  19491. of @option{-ffoo} is @option{-fno-foo}. In the table below, only
  19492. one of the forms is listed---the one that is not the default. You
  19493. can figure out the other form by either removing @samp{no-} or adding
  19494. it.
  19495. @table @gcctabopt
  19496. @item -fbounds-check
  19497. @opindex fbounds-check
  19498. For front ends that support it, generate additional code to check that
  19499. indices used to access arrays are within the declared range. This is
  19500. currently only supported by the Java and Fortran front ends, where
  19501. this option defaults to true and false respectively.
  19502. @item -fstack-reuse=@var{reuse-level}
  19503. @opindex fstack_reuse
  19504. This option controls stack space reuse for user declared local/auto variables
  19505. and compiler generated temporaries. @var{reuse_level} can be @samp{all},
  19506. @samp{named_vars}, or @samp{none}. @samp{all} enables stack reuse for all
  19507. local variables and temporaries, @samp{named_vars} enables the reuse only for
  19508. user defined local variables with names, and @samp{none} disables stack reuse
  19509. completely. The default value is @samp{all}. The option is needed when the
  19510. program extends the lifetime of a scoped local variable or a compiler generated
  19511. temporary beyond the end point defined by the language. When a lifetime of
  19512. a variable ends, and if the variable lives in memory, the optimizing compiler
  19513. has the freedom to reuse its stack space with other temporaries or scoped
  19514. local variables whose live range does not overlap with it. Legacy code extending
  19515. local lifetime is likely to break with the stack reuse optimization.
  19516. For example,
  19517. @smallexample
  19518. int *p;
  19519. @{
  19520. int local1;
  19521. p = &local1;
  19522. local1 = 10;
  19523. ....
  19524. @}
  19525. @{
  19526. int local2;
  19527. local2 = 20;
  19528. ...
  19529. @}
  19530. if (*p == 10) // out of scope use of local1
  19531. @{
  19532. @}
  19533. @end smallexample
  19534. Another example:
  19535. @smallexample
  19536. struct A
  19537. @{
  19538. A(int k) : i(k), j(k) @{ @}
  19539. int i;
  19540. int j;
  19541. @};
  19542. A *ap;
  19543. void foo(const A& ar)
  19544. @{
  19545. ap = &ar;
  19546. @}
  19547. void bar()
  19548. @{
  19549. foo(A(10)); // temp object's lifetime ends when foo returns
  19550. @{
  19551. A a(20);
  19552. ....
  19553. @}
  19554. ap->i+= 10; // ap references out of scope temp whose space
  19555. // is reused with a. What is the value of ap->i?
  19556. @}
  19557. @end smallexample
  19558. The lifetime of a compiler generated temporary is well defined by the C++
  19559. standard. When a lifetime of a temporary ends, and if the temporary lives
  19560. in memory, the optimizing compiler has the freedom to reuse its stack
  19561. space with other temporaries or scoped local variables whose live range
  19562. does not overlap with it. However some of the legacy code relies on
  19563. the behavior of older compilers in which temporaries' stack space is
  19564. not reused, the aggressive stack reuse can lead to runtime errors. This
  19565. option is used to control the temporary stack reuse optimization.
  19566. @item -ftrapv
  19567. @opindex ftrapv
  19568. This option generates traps for signed overflow on addition, subtraction,
  19569. multiplication operations.
  19570. @item -fwrapv
  19571. @opindex fwrapv
  19572. This option instructs the compiler to assume that signed arithmetic
  19573. overflow of addition, subtraction and multiplication wraps around
  19574. using twos-complement representation. This flag enables some optimizations
  19575. and disables others. This option is enabled by default for the Java
  19576. front end, as required by the Java language specification.
  19577. @item -fexceptions
  19578. @opindex fexceptions
  19579. Enable exception handling. Generates extra code needed to propagate
  19580. exceptions. For some targets, this implies GCC generates frame
  19581. unwind information for all functions, which can produce significant data
  19582. size overhead, although it does not affect execution. If you do not
  19583. specify this option, GCC enables it by default for languages like
  19584. C++ that normally require exception handling, and disables it for
  19585. languages like C that do not normally require it. However, you may need
  19586. to enable this option when compiling C code that needs to interoperate
  19587. properly with exception handlers written in C++. You may also wish to
  19588. disable this option if you are compiling older C++ programs that don't
  19589. use exception handling.
  19590. @item -fnon-call-exceptions
  19591. @opindex fnon-call-exceptions
  19592. Generate code that allows trapping instructions to throw exceptions.
  19593. Note that this requires platform-specific runtime support that does
  19594. not exist everywhere. Moreover, it only allows @emph{trapping}
  19595. instructions to throw exceptions, i.e.@: memory references or floating-point
  19596. instructions. It does not allow exceptions to be thrown from
  19597. arbitrary signal handlers such as @code{SIGALRM}.
  19598. @item -fdelete-dead-exceptions
  19599. @opindex fdelete-dead-exceptions
  19600. Consider that instructions that may throw exceptions but don't otherwise
  19601. contribute to the execution of the program can be optimized away.
  19602. This option is enabled by default for the Ada front end, as permitted by
  19603. the Ada language specification.
  19604. Optimization passes that cause dead exceptions to be removed are enabled independently at different optimization levels.
  19605. @item -funwind-tables
  19606. @opindex funwind-tables
  19607. Similar to @option{-fexceptions}, except that it just generates any needed
  19608. static data, but does not affect the generated code in any other way.
  19609. You normally do not need to enable this option; instead, a language processor
  19610. that needs this handling enables it on your behalf.
  19611. @item -fasynchronous-unwind-tables
  19612. @opindex fasynchronous-unwind-tables
  19613. Generate unwind table in DWARF 2 format, if supported by target machine. The
  19614. table is exact at each instruction boundary, so it can be used for stack
  19615. unwinding from asynchronous events (such as debugger or garbage collector).
  19616. @item -fno-gnu-unique
  19617. @opindex fno-gnu-unique
  19618. On systems with recent GNU assembler and C library, the C++ compiler
  19619. uses the @code{STB_GNU_UNIQUE} binding to make sure that definitions
  19620. of template static data members and static local variables in inline
  19621. functions are unique even in the presence of @code{RTLD_LOCAL}; this
  19622. is necessary to avoid problems with a library used by two different
  19623. @code{RTLD_LOCAL} plugins depending on a definition in one of them and
  19624. therefore disagreeing with the other one about the binding of the
  19625. symbol. But this causes @code{dlclose} to be ignored for affected
  19626. DSOs; if your program relies on reinitialization of a DSO via
  19627. @code{dlclose} and @code{dlopen}, you can use
  19628. @option{-fno-gnu-unique}.
  19629. @item -fpcc-struct-return
  19630. @opindex fpcc-struct-return
  19631. Return ``short'' @code{struct} and @code{union} values in memory like
  19632. longer ones, rather than in registers. This convention is less
  19633. efficient, but it has the advantage of allowing intercallability between
  19634. GCC-compiled files and files compiled with other compilers, particularly
  19635. the Portable C Compiler (pcc).
  19636. The precise convention for returning structures in memory depends
  19637. on the target configuration macros.
  19638. Short structures and unions are those whose size and alignment match
  19639. that of some integer type.
  19640. @strong{Warning:} code compiled with the @option{-fpcc-struct-return}
  19641. switch is not binary compatible with code compiled with the
  19642. @option{-freg-struct-return} switch.
  19643. Use it to conform to a non-default application binary interface.
  19644. @item -freg-struct-return
  19645. @opindex freg-struct-return
  19646. Return @code{struct} and @code{union} values in registers when possible.
  19647. This is more efficient for small structures than
  19648. @option{-fpcc-struct-return}.
  19649. If you specify neither @option{-fpcc-struct-return} nor
  19650. @option{-freg-struct-return}, GCC defaults to whichever convention is
  19651. standard for the target. If there is no standard convention, GCC
  19652. defaults to @option{-fpcc-struct-return}, except on targets where GCC is
  19653. the principal compiler. In those cases, we can choose the standard, and
  19654. we chose the more efficient register return alternative.
  19655. @strong{Warning:} code compiled with the @option{-freg-struct-return}
  19656. switch is not binary compatible with code compiled with the
  19657. @option{-fpcc-struct-return} switch.
  19658. Use it to conform to a non-default application binary interface.
  19659. @item -fshort-enums
  19660. @opindex fshort-enums
  19661. Allocate to an @code{enum} type only as many bytes as it needs for the
  19662. declared range of possible values. Specifically, the @code{enum} type
  19663. is equivalent to the smallest integer type that has enough room.
  19664. @strong{Warning:} the @option{-fshort-enums} switch causes GCC to generate
  19665. code that is not binary compatible with code generated without that switch.
  19666. Use it to conform to a non-default application binary interface.
  19667. @item -fshort-double
  19668. @opindex fshort-double
  19669. Use the same size for @code{double} as for @code{float}.
  19670. @strong{Warning:} the @option{-fshort-double} switch causes GCC to generate
  19671. code that is not binary compatible with code generated without that switch.
  19672. Use it to conform to a non-default application binary interface.
  19673. @item -fshort-wchar
  19674. @opindex fshort-wchar
  19675. Override the underlying type for @code{wchar_t} to be @code{short
  19676. unsigned int} instead of the default for the target. This option is
  19677. useful for building programs to run under WINE@.
  19678. @strong{Warning:} the @option{-fshort-wchar} switch causes GCC to generate
  19679. code that is not binary compatible with code generated without that switch.
  19680. Use it to conform to a non-default application binary interface.
  19681. @item -fno-common
  19682. @opindex fno-common
  19683. In C code, controls the placement of uninitialized global variables.
  19684. Unix C compilers have traditionally permitted multiple definitions of
  19685. such variables in different compilation units by placing the variables
  19686. in a common block.
  19687. This is the behavior specified by @option{-fcommon}, and is the default
  19688. for GCC on most targets.
  19689. On the other hand, this behavior is not required by ISO C, and on some
  19690. targets may carry a speed or code size penalty on variable references.
  19691. The @option{-fno-common} option specifies that the compiler should place
  19692. uninitialized global variables in the data section of the object file,
  19693. rather than generating them as common blocks.
  19694. This has the effect that if the same variable is declared
  19695. (without @code{extern}) in two different compilations,
  19696. you get a multiple-definition error when you link them.
  19697. In this case, you must compile with @option{-fcommon} instead.
  19698. Compiling with @option{-fno-common} is useful on targets for which
  19699. it provides better performance, or if you wish to verify that the
  19700. program will work on other systems that always treat uninitialized
  19701. variable declarations this way.
  19702. @item -fno-ident
  19703. @opindex fno-ident
  19704. Ignore the @code{#ident} directive.
  19705. @item -finhibit-size-directive
  19706. @opindex finhibit-size-directive
  19707. Don't output a @code{.size} assembler directive, or anything else that
  19708. would cause trouble if the function is split in the middle, and the
  19709. two halves are placed at locations far apart in memory. This option is
  19710. used when compiling @file{crtstuff.c}; you should not need to use it
  19711. for anything else.
  19712. @item -fverbose-asm
  19713. @opindex fverbose-asm
  19714. Put extra commentary information in the generated assembly code to
  19715. make it more readable. This option is generally only of use to those
  19716. who actually need to read the generated assembly code (perhaps while
  19717. debugging the compiler itself).
  19718. @option{-fno-verbose-asm}, the default, causes the
  19719. extra information to be omitted and is useful when comparing two assembler
  19720. files.
  19721. @item -frecord-gcc-switches
  19722. @opindex frecord-gcc-switches
  19723. This switch causes the command line used to invoke the
  19724. compiler to be recorded into the object file that is being created.
  19725. This switch is only implemented on some targets and the exact format
  19726. of the recording is target and binary file format dependent, but it
  19727. usually takes the form of a section containing ASCII text. This
  19728. switch is related to the @option{-fverbose-asm} switch, but that
  19729. switch only records information in the assembler output file as
  19730. comments, so it never reaches the object file.
  19731. See also @option{-grecord-gcc-switches} for another
  19732. way of storing compiler options into the object file.
  19733. @item -fpic
  19734. @opindex fpic
  19735. @cindex global offset table
  19736. @cindex PIC
  19737. Generate position-independent code (PIC) suitable for use in a shared
  19738. library, if supported for the target machine. Such code accesses all
  19739. constant addresses through a global offset table (GOT)@. The dynamic
  19740. loader resolves the GOT entries when the program starts (the dynamic
  19741. loader is not part of GCC; it is part of the operating system). If
  19742. the GOT size for the linked executable exceeds a machine-specific
  19743. maximum size, you get an error message from the linker indicating that
  19744. @option{-fpic} does not work; in that case, recompile with @option{-fPIC}
  19745. instead. (These maximums are 8k on the SPARC and 32k
  19746. on the m68k and RS/6000. The x86 has no such limit.)
  19747. Position-independent code requires special support, and therefore works
  19748. only on certain machines. For the x86, GCC supports PIC for System V
  19749. but not for the Sun 386i. Code generated for the IBM RS/6000 is always
  19750. position-independent.
  19751. When this flag is set, the macros @code{__pic__} and @code{__PIC__}
  19752. are defined to 1.
  19753. @item -fPIC
  19754. @opindex fPIC
  19755. If supported for the target machine, emit position-independent code,
  19756. suitable for dynamic linking and avoiding any limit on the size of the
  19757. global offset table. This option makes a difference on the m68k,
  19758. PowerPC and SPARC@.
  19759. Position-independent code requires special support, and therefore works
  19760. only on certain machines.
  19761. When this flag is set, the macros @code{__pic__} and @code{__PIC__}
  19762. are defined to 2.
  19763. @item -fpie
  19764. @itemx -fPIE
  19765. @opindex fpie
  19766. @opindex fPIE
  19767. These options are similar to @option{-fpic} and @option{-fPIC}, but
  19768. generated position independent code can be only linked into executables.
  19769. Usually these options are used when @option{-pie} GCC option is
  19770. used during linking.
  19771. @option{-fpie} and @option{-fPIE} both define the macros
  19772. @code{__pie__} and @code{__PIE__}. The macros have the value 1
  19773. for @option{-fpie} and 2 for @option{-fPIE}.
  19774. @item -fno-jump-tables
  19775. @opindex fno-jump-tables
  19776. Do not use jump tables for switch statements even where it would be
  19777. more efficient than other code generation strategies. This option is
  19778. of use in conjunction with @option{-fpic} or @option{-fPIC} for
  19779. building code that forms part of a dynamic linker and cannot
  19780. reference the address of a jump table. On some targets, jump tables
  19781. do not require a GOT and this option is not needed.
  19782. @item -ffixed-@var{reg}
  19783. @opindex ffixed
  19784. Treat the register named @var{reg} as a fixed register; generated code
  19785. should never refer to it (except perhaps as a stack pointer, frame
  19786. pointer or in some other fixed role).
  19787. @var{reg} must be the name of a register. The register names accepted
  19788. are machine-specific and are defined in the @code{REGISTER_NAMES}
  19789. macro in the machine description macro file.
  19790. This flag does not have a negative form, because it specifies a
  19791. three-way choice.
  19792. @item -fcall-used-@var{reg}
  19793. @opindex fcall-used
  19794. Treat the register named @var{reg} as an allocable register that is
  19795. clobbered by function calls. It may be allocated for temporaries or
  19796. variables that do not live across a call. Functions compiled this way
  19797. do not save and restore the register @var{reg}.
  19798. It is an error to use this flag with the frame pointer or stack pointer.
  19799. Use of this flag for other registers that have fixed pervasive roles in
  19800. the machine's execution model produces disastrous results.
  19801. This flag does not have a negative form, because it specifies a
  19802. three-way choice.
  19803. @item -fcall-saved-@var{reg}
  19804. @opindex fcall-saved
  19805. Treat the register named @var{reg} as an allocable register saved by
  19806. functions. It may be allocated even for temporaries or variables that
  19807. live across a call. Functions compiled this way save and restore
  19808. the register @var{reg} if they use it.
  19809. It is an error to use this flag with the frame pointer or stack pointer.
  19810. Use of this flag for other registers that have fixed pervasive roles in
  19811. the machine's execution model produces disastrous results.
  19812. A different sort of disaster results from the use of this flag for
  19813. a register in which function values may be returned.
  19814. This flag does not have a negative form, because it specifies a
  19815. three-way choice.
  19816. @item -fpack-struct[=@var{n}]
  19817. @opindex fpack-struct
  19818. Without a value specified, pack all structure members together without
  19819. holes. When a value is specified (which must be a small power of two), pack
  19820. structure members according to this value, representing the maximum
  19821. alignment (that is, objects with default alignment requirements larger than
  19822. this are output potentially unaligned at the next fitting location.
  19823. @strong{Warning:} the @option{-fpack-struct} switch causes GCC to generate
  19824. code that is not binary compatible with code generated without that switch.
  19825. Additionally, it makes the code suboptimal.
  19826. Use it to conform to a non-default application binary interface.
  19827. @item -finstrument-functions
  19828. @opindex finstrument-functions
  19829. Generate instrumentation calls for entry and exit to functions. Just
  19830. after function entry and just before function exit, the following
  19831. profiling functions are called with the address of the current
  19832. function and its call site. (On some platforms,
  19833. @code{__builtin_return_address} does not work beyond the current
  19834. function, so the call site information may not be available to the
  19835. profiling functions otherwise.)
  19836. @smallexample
  19837. void __cyg_profile_func_enter (void *this_fn,
  19838. void *call_site);
  19839. void __cyg_profile_func_exit (void *this_fn,
  19840. void *call_site);
  19841. @end smallexample
  19842. The first argument is the address of the start of the current function,
  19843. which may be looked up exactly in the symbol table.
  19844. This instrumentation is also done for functions expanded inline in other
  19845. functions. The profiling calls indicate where, conceptually, the
  19846. inline function is entered and exited. This means that addressable
  19847. versions of such functions must be available. If all your uses of a
  19848. function are expanded inline, this may mean an additional expansion of
  19849. code size. If you use @code{extern inline} in your C code, an
  19850. addressable version of such functions must be provided. (This is
  19851. normally the case anyway, but if you get lucky and the optimizer always
  19852. expands the functions inline, you might have gotten away without
  19853. providing static copies.)
  19854. A function may be given the attribute @code{no_instrument_function}, in
  19855. which case this instrumentation is not done. This can be used, for
  19856. example, for the profiling functions listed above, high-priority
  19857. interrupt routines, and any functions from which the profiling functions
  19858. cannot safely be called (perhaps signal handlers, if the profiling
  19859. routines generate output or allocate memory).
  19860. @item -finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{}
  19861. @opindex finstrument-functions-exclude-file-list
  19862. Set the list of functions that are excluded from instrumentation (see
  19863. the description of @option{-finstrument-functions}). If the file that
  19864. contains a function definition matches with one of @var{file}, then
  19865. that function is not instrumented. The match is done on substrings:
  19866. if the @var{file} parameter is a substring of the file name, it is
  19867. considered to be a match.
  19868. For example:
  19869. @smallexample
  19870. -finstrument-functions-exclude-file-list=/bits/stl,include/sys
  19871. @end smallexample
  19872. @noindent
  19873. excludes any inline function defined in files whose pathnames
  19874. contain @file{/bits/stl} or @file{include/sys}.
  19875. If, for some reason, you want to include letter @samp{,} in one of
  19876. @var{sym}, write @samp{\,}. For example,
  19877. @option{-finstrument-functions-exclude-file-list='\,\,tmp'}
  19878. (note the single quote surrounding the option).
  19879. @item -finstrument-functions-exclude-function-list=@var{sym},@var{sym},@dots{}
  19880. @opindex finstrument-functions-exclude-function-list
  19881. This is similar to @option{-finstrument-functions-exclude-file-list},
  19882. but this option sets the list of function names to be excluded from
  19883. instrumentation. The function name to be matched is its user-visible
  19884. name, such as @code{vector<int> blah(const vector<int> &)}, not the
  19885. internal mangled name (e.g., @code{_Z4blahRSt6vectorIiSaIiEE}). The
  19886. match is done on substrings: if the @var{sym} parameter is a substring
  19887. of the function name, it is considered to be a match. For C99 and C++
  19888. extended identifiers, the function name must be given in UTF-8, not
  19889. using universal character names.
  19890. @item -fstack-check
  19891. @opindex fstack-check
  19892. Generate code to verify that you do not go beyond the boundary of the
  19893. stack. You should specify this flag if you are running in an
  19894. environment with multiple threads, but you only rarely need to specify it in
  19895. a single-threaded environment since stack overflow is automatically
  19896. detected on nearly all systems if there is only one stack.
  19897. Note that this switch does not actually cause checking to be done; the
  19898. operating system or the language runtime must do that. The switch causes
  19899. generation of code to ensure that they see the stack being extended.
  19900. You can additionally specify a string parameter: @samp{no} means no
  19901. checking, @samp{generic} means force the use of old-style checking,
  19902. @samp{specific} means use the best checking method and is equivalent
  19903. to bare @option{-fstack-check}.
  19904. Old-style checking is a generic mechanism that requires no specific
  19905. target support in the compiler but comes with the following drawbacks:
  19906. @enumerate
  19907. @item
  19908. Modified allocation strategy for large objects: they are always
  19909. allocated dynamically if their size exceeds a fixed threshold.
  19910. @item
  19911. Fixed limit on the size of the static frame of functions: when it is
  19912. topped by a particular function, stack checking is not reliable and
  19913. a warning is issued by the compiler.
  19914. @item
  19915. Inefficiency: because of both the modified allocation strategy and the
  19916. generic implementation, code performance is hampered.
  19917. @end enumerate
  19918. Note that old-style stack checking is also the fallback method for
  19919. @samp{specific} if no target support has been added in the compiler.
  19920. @item -fstack-limit-register=@var{reg}
  19921. @itemx -fstack-limit-symbol=@var{sym}
  19922. @itemx -fno-stack-limit
  19923. @opindex fstack-limit-register
  19924. @opindex fstack-limit-symbol
  19925. @opindex fno-stack-limit
  19926. Generate code to ensure that the stack does not grow beyond a certain value,
  19927. either the value of a register or the address of a symbol. If a larger
  19928. stack is required, a signal is raised at run time. For most targets,
  19929. the signal is raised before the stack overruns the boundary, so
  19930. it is possible to catch the signal without taking special precautions.
  19931. For instance, if the stack starts at absolute address @samp{0x80000000}
  19932. and grows downwards, you can use the flags
  19933. @option{-fstack-limit-symbol=__stack_limit} and
  19934. @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
  19935. of 128KB@. Note that this may only work with the GNU linker.
  19936. @item -fsplit-stack
  19937. @opindex fsplit-stack
  19938. Generate code to automatically split the stack before it overflows.
  19939. The resulting program has a discontiguous stack which can only
  19940. overflow if the program is unable to allocate any more memory. This
  19941. is most useful when running threaded programs, as it is no longer
  19942. necessary to calculate a good stack size to use for each thread. This
  19943. is currently only implemented for the x86 targets running
  19944. GNU/Linux.
  19945. When code compiled with @option{-fsplit-stack} calls code compiled
  19946. without @option{-fsplit-stack}, there may not be much stack space
  19947. available for the latter code to run. If compiling all code,
  19948. including library code, with @option{-fsplit-stack} is not an option,
  19949. then the linker can fix up these calls so that the code compiled
  19950. without @option{-fsplit-stack} always has a large stack. Support for
  19951. this is implemented in the gold linker in GNU binutils release 2.21
  19952. and later.
  19953. @item -fleading-underscore
  19954. @opindex fleading-underscore
  19955. This option and its counterpart, @option{-fno-leading-underscore}, forcibly
  19956. change the way C symbols are represented in the object file. One use
  19957. is to help link with legacy assembly code.
  19958. @strong{Warning:} the @option{-fleading-underscore} switch causes GCC to
  19959. generate code that is not binary compatible with code generated without that
  19960. switch. Use it to conform to a non-default application binary interface.
  19961. Not all targets provide complete support for this switch.
  19962. @item -ftls-model=@var{model}
  19963. @opindex ftls-model
  19964. Alter the thread-local storage model to be used (@pxref{Thread-Local}).
  19965. The @var{model} argument should be one of @samp{global-dynamic},
  19966. @samp{local-dynamic}, @samp{initial-exec} or @samp{local-exec}.
  19967. Note that the choice is subject to optimization: the compiler may use
  19968. a more efficient model for symbols not visible outside of the translation
  19969. unit, or if @option{-fpic} is not given on the command line.
  19970. The default without @option{-fpic} is @samp{initial-exec}; with
  19971. @option{-fpic} the default is @samp{global-dynamic}.
  19972. @item -fvisibility=@r{[}default@r{|}internal@r{|}hidden@r{|}protected@r{]}
  19973. @opindex fvisibility
  19974. Set the default ELF image symbol visibility to the specified option---all
  19975. symbols are marked with this unless overridden within the code.
  19976. Using this feature can very substantially improve linking and
  19977. load times of shared object libraries, produce more optimized
  19978. code, provide near-perfect API export and prevent symbol clashes.
  19979. It is @strong{strongly} recommended that you use this in any shared objects
  19980. you distribute.
  19981. Despite the nomenclature, @samp{default} always means public; i.e.,
  19982. available to be linked against from outside the shared object.
  19983. @samp{protected} and @samp{internal} are pretty useless in real-world
  19984. usage so the only other commonly used option is @samp{hidden}.
  19985. The default if @option{-fvisibility} isn't specified is
  19986. @samp{default}, i.e., make every symbol public.
  19987. A good explanation of the benefits offered by ensuring ELF
  19988. symbols have the correct visibility is given by ``How To Write
  19989. Shared Libraries'' by Ulrich Drepper (which can be found at
  19990. @w{@uref{http://www.akkadia.org/drepper/}})---however a superior
  19991. solution made possible by this option to marking things hidden when
  19992. the default is public is to make the default hidden and mark things
  19993. public. This is the norm with DLLs on Windows and with @option{-fvisibility=hidden}
  19994. and @code{__attribute__ ((visibility("default")))} instead of
  19995. @code{__declspec(dllexport)} you get almost identical semantics with
  19996. identical syntax. This is a great boon to those working with
  19997. cross-platform projects.
  19998. For those adding visibility support to existing code, you may find
  19999. @code{#pragma GCC visibility} of use. This works by you enclosing
  20000. the declarations you wish to set visibility for with (for example)
  20001. @code{#pragma GCC visibility push(hidden)} and
  20002. @code{#pragma GCC visibility pop}.
  20003. Bear in mind that symbol visibility should be viewed @strong{as
  20004. part of the API interface contract} and thus all new code should
  20005. always specify visibility when it is not the default; i.e., declarations
  20006. only for use within the local DSO should @strong{always} be marked explicitly
  20007. as hidden as so to avoid PLT indirection overheads---making this
  20008. abundantly clear also aids readability and self-documentation of the code.
  20009. Note that due to ISO C++ specification requirements, @code{operator new} and
  20010. @code{operator delete} must always be of default visibility.
  20011. Be aware that headers from outside your project, in particular system
  20012. headers and headers from any other library you use, may not be
  20013. expecting to be compiled with visibility other than the default. You
  20014. may need to explicitly say @code{#pragma GCC visibility push(default)}
  20015. before including any such headers.
  20016. @code{extern} declarations are not affected by @option{-fvisibility}, so
  20017. a lot of code can be recompiled with @option{-fvisibility=hidden} with
  20018. no modifications. However, this means that calls to @code{extern}
  20019. functions with no explicit visibility use the PLT, so it is more
  20020. effective to use @code{__attribute ((visibility))} and/or
  20021. @code{#pragma GCC visibility} to tell the compiler which @code{extern}
  20022. declarations should be treated as hidden.
  20023. Note that @option{-fvisibility} does affect C++ vague linkage
  20024. entities. This means that, for instance, an exception class that is
  20025. be thrown between DSOs must be explicitly marked with default
  20026. visibility so that the @samp{type_info} nodes are unified between
  20027. the DSOs.
  20028. An overview of these techniques, their benefits and how to use them
  20029. is at @uref{http://gcc.gnu.org/@/wiki/@/Visibility}.
  20030. @item -fstrict-volatile-bitfields
  20031. @opindex fstrict-volatile-bitfields
  20032. This option should be used if accesses to volatile bit-fields (or other
  20033. structure fields, although the compiler usually honors those types
  20034. anyway) should use a single access of the width of the
  20035. field's type, aligned to a natural alignment if possible. For
  20036. example, targets with memory-mapped peripheral registers might require
  20037. all such accesses to be 16 bits wide; with this flag you can
  20038. declare all peripheral bit-fields as @code{unsigned short} (assuming short
  20039. is 16 bits on these targets) to force GCC to use 16-bit accesses
  20040. instead of, perhaps, a more efficient 32-bit access.
  20041. If this option is disabled, the compiler uses the most efficient
  20042. instruction. In the previous example, that might be a 32-bit load
  20043. instruction, even though that accesses bytes that do not contain
  20044. any portion of the bit-field, or memory-mapped registers unrelated to
  20045. the one being updated.
  20046. In some cases, such as when the @code{packed} attribute is applied to a
  20047. structure field, it may not be possible to access the field with a single
  20048. read or write that is correctly aligned for the target machine. In this
  20049. case GCC falls back to generating multiple accesses rather than code that
  20050. will fault or truncate the result at run time.
  20051. Note: Due to restrictions of the C/C++11 memory model, write accesses are
  20052. not allowed to touch non bit-field members. It is therefore recommended
  20053. to define all bits of the field's type as bit-field members.
  20054. The default value of this option is determined by the application binary
  20055. interface for the target processor.
  20056. @item -fsync-libcalls
  20057. @opindex fsync-libcalls
  20058. This option controls whether any out-of-line instance of the @code{__sync}
  20059. family of functions may be used to implement the C++11 @code{__atomic}
  20060. family of functions.
  20061. The default value of this option is enabled, thus the only useful form
  20062. of the option is @option{-fno-sync-libcalls}. This option is used in
  20063. the implementation of the @file{libatomic} runtime library.
  20064. @end table
  20065. @c man end
  20066. @node Environment Variables
  20067. @section Environment Variables Affecting GCC
  20068. @cindex environment variables
  20069. @c man begin ENVIRONMENT
  20070. This section describes several environment variables that affect how GCC
  20071. operates. Some of them work by specifying directories or prefixes to use
  20072. when searching for various kinds of files. Some are used to specify other
  20073. aspects of the compilation environment.
  20074. Note that you can also specify places to search using options such as
  20075. @option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}). These
  20076. take precedence over places specified using environment variables, which
  20077. in turn take precedence over those specified by the configuration of GCC@.
  20078. @xref{Driver,, Controlling the Compilation Driver @file{gcc}, gccint,
  20079. GNU Compiler Collection (GCC) Internals}.
  20080. @table @env
  20081. @item LANG
  20082. @itemx LC_CTYPE
  20083. @c @itemx LC_COLLATE
  20084. @itemx LC_MESSAGES
  20085. @c @itemx LC_MONETARY
  20086. @c @itemx LC_NUMERIC
  20087. @c @itemx LC_TIME
  20088. @itemx LC_ALL
  20089. @findex LANG
  20090. @findex LC_CTYPE
  20091. @c @findex LC_COLLATE
  20092. @findex LC_MESSAGES
  20093. @c @findex LC_MONETARY
  20094. @c @findex LC_NUMERIC
  20095. @c @findex LC_TIME
  20096. @findex LC_ALL
  20097. @cindex locale
  20098. These environment variables control the way that GCC uses
  20099. localization information which allows GCC to work with different
  20100. national conventions. GCC inspects the locale categories
  20101. @env{LC_CTYPE} and @env{LC_MESSAGES} if it has been configured to do
  20102. so. These locale categories can be set to any value supported by your
  20103. installation. A typical value is @samp{en_GB.UTF-8} for English in the United
  20104. Kingdom encoded in UTF-8.
  20105. The @env{LC_CTYPE} environment variable specifies character
  20106. classification. GCC uses it to determine the character boundaries in
  20107. a string; this is needed for some multibyte encodings that contain quote
  20108. and escape characters that are otherwise interpreted as a string
  20109. end or escape.
  20110. The @env{LC_MESSAGES} environment variable specifies the language to
  20111. use in diagnostic messages.
  20112. If the @env{LC_ALL} environment variable is set, it overrides the value
  20113. of @env{LC_CTYPE} and @env{LC_MESSAGES}; otherwise, @env{LC_CTYPE}
  20114. and @env{LC_MESSAGES} default to the value of the @env{LANG}
  20115. environment variable. If none of these variables are set, GCC
  20116. defaults to traditional C English behavior.
  20117. @item TMPDIR
  20118. @findex TMPDIR
  20119. If @env{TMPDIR} is set, it specifies the directory to use for temporary
  20120. files. GCC uses temporary files to hold the output of one stage of
  20121. compilation which is to be used as input to the next stage: for example,
  20122. the output of the preprocessor, which is the input to the compiler
  20123. proper.
  20124. @item GCC_COMPARE_DEBUG
  20125. @findex GCC_COMPARE_DEBUG
  20126. Setting @env{GCC_COMPARE_DEBUG} is nearly equivalent to passing
  20127. @option{-fcompare-debug} to the compiler driver. See the documentation
  20128. of this option for more details.
  20129. @item GCC_EXEC_PREFIX
  20130. @findex GCC_EXEC_PREFIX
  20131. If @env{GCC_EXEC_PREFIX} is set, it specifies a prefix to use in the
  20132. names of the subprograms executed by the compiler. No slash is added
  20133. when this prefix is combined with the name of a subprogram, but you can
  20134. specify a prefix that ends with a slash if you wish.
  20135. If @env{GCC_EXEC_PREFIX} is not set, GCC attempts to figure out
  20136. an appropriate prefix to use based on the pathname it is invoked with.
  20137. If GCC cannot find the subprogram using the specified prefix, it
  20138. tries looking in the usual places for the subprogram.
  20139. The default value of @env{GCC_EXEC_PREFIX} is
  20140. @file{@var{prefix}/lib/gcc/} where @var{prefix} is the prefix to
  20141. the installed compiler. In many cases @var{prefix} is the value
  20142. of @code{prefix} when you ran the @file{configure} script.
  20143. Other prefixes specified with @option{-B} take precedence over this prefix.
  20144. This prefix is also used for finding files such as @file{crt0.o} that are
  20145. used for linking.
  20146. In addition, the prefix is used in an unusual way in finding the
  20147. directories to search for header files. For each of the standard
  20148. directories whose name normally begins with @samp{/usr/local/lib/gcc}
  20149. (more precisely, with the value of @env{GCC_INCLUDE_DIR}), GCC tries
  20150. replacing that beginning with the specified prefix to produce an
  20151. alternate directory name. Thus, with @option{-Bfoo/}, GCC searches
  20152. @file{foo/bar} just before it searches the standard directory
  20153. @file{/usr/local/lib/bar}.
  20154. If a standard directory begins with the configured
  20155. @var{prefix} then the value of @var{prefix} is replaced by
  20156. @env{GCC_EXEC_PREFIX} when looking for header files.
  20157. @item COMPILER_PATH
  20158. @findex COMPILER_PATH
  20159. The value of @env{COMPILER_PATH} is a colon-separated list of
  20160. directories, much like @env{PATH}. GCC tries the directories thus
  20161. specified when searching for subprograms, if it can't find the
  20162. subprograms using @env{GCC_EXEC_PREFIX}.
  20163. @item LIBRARY_PATH
  20164. @findex LIBRARY_PATH
  20165. The value of @env{LIBRARY_PATH} is a colon-separated list of
  20166. directories, much like @env{PATH}. When configured as a native compiler,
  20167. GCC tries the directories thus specified when searching for special
  20168. linker files, if it can't find them using @env{GCC_EXEC_PREFIX}. Linking
  20169. using GCC also uses these directories when searching for ordinary
  20170. libraries for the @option{-l} option (but directories specified with
  20171. @option{-L} come first).
  20172. @item LANG
  20173. @findex LANG
  20174. @cindex locale definition
  20175. This variable is used to pass locale information to the compiler. One way in
  20176. which this information is used is to determine the character set to be used
  20177. when character literals, string literals and comments are parsed in C and C++.
  20178. When the compiler is configured to allow multibyte characters,
  20179. the following values for @env{LANG} are recognized:
  20180. @table @samp
  20181. @item C-JIS
  20182. Recognize JIS characters.
  20183. @item C-SJIS
  20184. Recognize SJIS characters.
  20185. @item C-EUCJP
  20186. Recognize EUCJP characters.
  20187. @end table
  20188. If @env{LANG} is not defined, or if it has some other value, then the
  20189. compiler uses @code{mblen} and @code{mbtowc} as defined by the default locale to
  20190. recognize and translate multibyte characters.
  20191. @end table
  20192. @noindent
  20193. Some additional environment variables affect the behavior of the
  20194. preprocessor.
  20195. @include cppenv.texi
  20196. @c man end
  20197. @node Precompiled Headers
  20198. @section Using Precompiled Headers
  20199. @cindex precompiled headers
  20200. @cindex speed of compilation
  20201. Often large projects have many header files that are included in every
  20202. source file. The time the compiler takes to process these header files
  20203. over and over again can account for nearly all of the time required to
  20204. build the project. To make builds faster, GCC allows you to
  20205. @dfn{precompile} a header file.
  20206. To create a precompiled header file, simply compile it as you would any
  20207. other file, if necessary using the @option{-x} option to make the driver
  20208. treat it as a C or C++ header file. You may want to use a
  20209. tool like @command{make} to keep the precompiled header up-to-date when
  20210. the headers it contains change.
  20211. A precompiled header file is searched for when @code{#include} is
  20212. seen in the compilation. As it searches for the included file
  20213. (@pxref{Search Path,,Search Path,cpp,The C Preprocessor}) the
  20214. compiler looks for a precompiled header in each directory just before it
  20215. looks for the include file in that directory. The name searched for is
  20216. the name specified in the @code{#include} with @samp{.gch} appended. If
  20217. the precompiled header file can't be used, it is ignored.
  20218. For instance, if you have @code{#include "all.h"}, and you have
  20219. @file{all.h.gch} in the same directory as @file{all.h}, then the
  20220. precompiled header file is used if possible, and the original
  20221. header is used otherwise.
  20222. Alternatively, you might decide to put the precompiled header file in a
  20223. directory and use @option{-I} to ensure that directory is searched
  20224. before (or instead of) the directory containing the original header.
  20225. Then, if you want to check that the precompiled header file is always
  20226. used, you can put a file of the same name as the original header in this
  20227. directory containing an @code{#error} command.
  20228. This also works with @option{-include}. So yet another way to use
  20229. precompiled headers, good for projects not designed with precompiled
  20230. header files in mind, is to simply take most of the header files used by
  20231. a project, include them from another header file, precompile that header
  20232. file, and @option{-include} the precompiled header. If the header files
  20233. have guards against multiple inclusion, they are skipped because
  20234. they've already been included (in the precompiled header).
  20235. If you need to precompile the same header file for different
  20236. languages, targets, or compiler options, you can instead make a
  20237. @emph{directory} named like @file{all.h.gch}, and put each precompiled
  20238. header in the directory, perhaps using @option{-o}. It doesn't matter
  20239. what you call the files in the directory; every precompiled header in
  20240. the directory is considered. The first precompiled header
  20241. encountered in the directory that is valid for this compilation is
  20242. used; they're searched in no particular order.
  20243. There are many other possibilities, limited only by your imagination,
  20244. good sense, and the constraints of your build system.
  20245. A precompiled header file can be used only when these conditions apply:
  20246. @itemize
  20247. @item
  20248. Only one precompiled header can be used in a particular compilation.
  20249. @item
  20250. A precompiled header can't be used once the first C token is seen. You
  20251. can have preprocessor directives before a precompiled header; you cannot
  20252. include a precompiled header from inside another header.
  20253. @item
  20254. The precompiled header file must be produced for the same language as
  20255. the current compilation. You can't use a C precompiled header for a C++
  20256. compilation.
  20257. @item
  20258. The precompiled header file must have been produced by the same compiler
  20259. binary as the current compilation is using.
  20260. @item
  20261. Any macros defined before the precompiled header is included must
  20262. either be defined in the same way as when the precompiled header was
  20263. generated, or must not affect the precompiled header, which usually
  20264. means that they don't appear in the precompiled header at all.
  20265. The @option{-D} option is one way to define a macro before a
  20266. precompiled header is included; using a @code{#define} can also do it.
  20267. There are also some options that define macros implicitly, like
  20268. @option{-O} and @option{-Wdeprecated}; the same rule applies to macros
  20269. defined this way.
  20270. @item If debugging information is output when using the precompiled
  20271. header, using @option{-g} or similar, the same kind of debugging information
  20272. must have been output when building the precompiled header. However,
  20273. a precompiled header built using @option{-g} can be used in a compilation
  20274. when no debugging information is being output.
  20275. @item The same @option{-m} options must generally be used when building
  20276. and using the precompiled header. @xref{Submodel Options},
  20277. for any cases where this rule is relaxed.
  20278. @item Each of the following options must be the same when building and using
  20279. the precompiled header:
  20280. @gccoptlist{-fexceptions}
  20281. @item
  20282. Some other command-line options starting with @option{-f},
  20283. @option{-p}, or @option{-O} must be defined in the same way as when
  20284. the precompiled header was generated. At present, it's not clear
  20285. which options are safe to change and which are not; the safest choice
  20286. is to use exactly the same options when generating and using the
  20287. precompiled header. The following are known to be safe:
  20288. @gccoptlist{-fmessage-length= -fpreprocessed -fsched-interblock @gol
  20289. -fsched-spec -fsched-spec-load -fsched-spec-load-dangerous @gol
  20290. -fsched-verbose=@var{number} -fschedule-insns -fvisibility= @gol
  20291. -pedantic-errors}
  20292. @end itemize
  20293. For all of these except the last, the compiler automatically
  20294. ignores the precompiled header if the conditions aren't met. If you
  20295. find an option combination that doesn't work and doesn't cause the
  20296. precompiled header to be ignored, please consider filing a bug report,
  20297. see @ref{Bugs}.
  20298. If you do use differing options when generating and using the
  20299. precompiled header, the actual behavior is a mixture of the
  20300. behavior for the options. For instance, if you use @option{-g} to
  20301. generate the precompiled header but not when using it, you may or may
  20302. not get debugging information for routines in the precompiled header.