Makefile 150 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983
  1. # Makefile for GNU Compiler Collection
  2. # Run 'configure' to generate Makefile from Makefile.in
  3. # Copyright (C) 1987-2015 Free Software Foundation, Inc.
  4. #This file is part of GCC.
  5. #GCC is free software; you can redistribute it and/or modify
  6. #it under the terms of the GNU General Public License as published by
  7. #the Free Software Foundation; either version 3, or (at your option)
  8. #any later version.
  9. #GCC is distributed in the hope that it will be useful,
  10. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. #GNU General Public License for more details.
  13. #You should have received a copy of the GNU General Public License
  14. #along with GCC; see the file COPYING3. If not see
  15. #<http://www.gnu.org/licenses/>.
  16. # The targets for external use include:
  17. # all, doc, install, install-cross, install-cross-rest, install-strip,
  18. # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean.
  19. # This is the default target.
  20. # Set by autoconf to "all.internal" for a native build, or
  21. # "all.cross" to build a cross compiler.
  22. all: all.internal
  23. # Depend on this to specify a phony target portably.
  24. force:
  25. # This tells GNU make version 3 not to export the variables
  26. # defined in this file into the environment (and thus recursive makes).
  27. .NOEXPORT:
  28. # And this tells it not to automatically pass command-line variables
  29. # to recursive makes.
  30. MAKEOVERRIDES =
  31. # Suppress smart makes who think they know how to automake yacc and flex file
  32. .y.c:
  33. .l.c:
  34. # The only suffixes we want for implicit rules are .c and .o, so clear
  35. # the list and add them. This speeds up GNU Make, and allows -r to work.
  36. # For i18n support, we also need .gmo, .po, .pox.
  37. # This must come before the language makefile fragments to allow them to
  38. # add suffixes and rules of their own.
  39. .SUFFIXES:
  40. .SUFFIXES: .c .cc .o .po .pox .gmo
  41. # -------------------------------
  42. # Standard autoconf-set variables
  43. # -------------------------------
  44. build=x86_64-unknown-linux-gnu
  45. host=x86_64-unknown-linux-gnu
  46. target=x86_64-unknown-linux-gnu
  47. target_noncanonical:=x86_64-unknown-linux-gnu
  48. # Normally identical to target_noncanonical, except for compilers built
  49. # as accelerator targets.
  50. real_target_noncanonical:=x86_64-unknown-linux-gnu
  51. accel_dir_suffix =
  52. # Sed command to transform gcc to installed name.
  53. program_transform_name := s,x,x,
  54. # -----------------------------
  55. # Directories used during build
  56. # -----------------------------
  57. # Directory where sources are, from where we are.
  58. srcdir = ..
  59. gcc_docdir = ../doc
  60. # Directory where sources are, absolute.
  61. abs_srcdir = /home/nnesse/gcc-5.2.0/gcc/build/..
  62. abs_docdir = /home/nnesse/gcc-5.2.0/gcc/build/../doc
  63. # Top build directory for this package, relative to here.
  64. top_builddir = .
  65. # The absolute path to the current directory.
  66. objdir := $(shell pwd)
  67. host_subdir=.
  68. build_subdir=build-x86_64-unknown-linux-gnu
  69. target_subdir=x86_64-unknown-linux-gnu
  70. build_libsubdir=build-x86_64-unknown-linux-gnu
  71. # Top build directory for the "Cygnus tree", relative to $(top_builddir).
  72. ifeq ($(host_subdir),.)
  73. toplevel_builddir := ..
  74. else
  75. toplevel_builddir := ../..
  76. endif
  77. build_objdir := $(toplevel_builddir)/$(build_subdir)
  78. build_libobjdir := $(toplevel_builddir)/$(build_libsubdir)
  79. target_objdir := $(toplevel_builddir)/$(target_subdir)
  80. # --------
  81. # Defined vpaths
  82. # --------
  83. # Directory where sources are, from where we are.
  84. VPATH = ..
  85. # We define a vpath for the sources of the .texi files here because they
  86. # are split between multiple directories and we would rather use one implicit
  87. # pattern rule for everything.
  88. # This vpath could be extended within the Make-lang fragments.
  89. vpath %.texi $(gcc_docdir)
  90. vpath %.texi $(gcc_docdir)/include
  91. # --------
  92. # UNSORTED
  93. # --------
  94. # Extra flags to pass to indicate cross compilation, which
  95. # might be used or tested by Make-lang fragments.
  96. CROSS=
  97. # Variables that exist for you to override.
  98. # See below for how to change them for certain systems.
  99. # List of language subdirectories.
  100. SUBDIRS = ada c cp fortran go java jit lto objc objcp build
  101. # Selection of languages to be made.
  102. CONFIG_LANGUAGES = c
  103. LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) gcov-tool$(exeext) \
  104. $(CONFIG_LANGUAGES)
  105. # Default values for variables overridden in Makefile fragments.
  106. # CFLAGS is for the user to override to, e.g., do a cross build with -O2.
  107. # TCFLAGS is used for compilations with the GCC just built.
  108. # T_CFLAGS is used for all compilations and is overridden by t-* files.
  109. T_CFLAGS =
  110. TCFLAGS =
  111. CFLAGS = -g
  112. CXXFLAGS = -g
  113. LDFLAGS =
  114. # Should we build position-independent host code?
  115. PICFLAG =
  116. # Flags to determine code coverage. When coverage is disabled, this will
  117. # contain the optimization flags, as you normally want code coverage
  118. # without optimization.
  119. COVERAGE_FLAGS =
  120. coverageexts = .{gcda,gcno}
  121. # The warning flags are separate from CFLAGS because people tend to
  122. # override optimization flags and we'd like them to still have warnings
  123. # turned on. These flags are also used to pass other stage dependent
  124. # flags from configure. The user is free to explicitly turn these flags
  125. # off if they wish.
  126. # LOOSE_WARN are the warning flags to use when compiling something
  127. # which is only compiled with gcc, such as libgcc.
  128. # C_LOOSE_WARN is similar, but with C-only warnings.
  129. # STRICT_WARN are the additional warning flags to
  130. # apply to the back end and some front ends, which may be compiled
  131. # with other compilers.
  132. # C_STRICT_WARN is similar, with C-only warnings.
  133. LOOSE_WARN = -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
  134. C_LOOSE_WARN = -Wstrict-prototypes -Wmissing-prototypes
  135. STRICT_WARN = -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
  136. C_STRICT_WARN = -Wold-style-definition -Wc++-compat
  137. # This is set by --enable-checking. The idea is to catch forgotten
  138. # "extern" tags in header files.
  139. NOCOMMON_FLAG =
  140. NOEXCEPTION_FLAGS = -fno-exceptions -fno-rtti -fasynchronous-unwind-tables
  141. # This is set by --disable-maintainer-mode (default) to "#"
  142. # FIXME: 'MAINT' will always be set to an empty string, no matter if
  143. # --disable-maintainer-mode is used or not. This is because the
  144. # following will expand to "MAINT := " in maintainer mode, and to
  145. # "MAINT := #" in non-maintainer mode, but because '#' starts a comment,
  146. # they mean exactly the same thing for make.
  147. MAINT := #
  148. # The following provides the variable ENABLE_MAINTAINER_RULES that can
  149. # be used in language Make-lang.in makefile fragments to enable
  150. # maintainer rules. So, ENABLE_MAINTAINER_RULES is 'true' in
  151. # maintainer mode, and '' otherwise.
  152. # ENABLE_MAINTAINER_RULES = true
  153. # These are set by --enable-checking=valgrind.
  154. RUN_GEN =
  155. VALGRIND_DRIVER_DEFINES =
  156. # This is how we control whether or not the additional warnings are applied.
  157. .-warn = $(STRICT_WARN)
  158. build-warn = $(STRICT_WARN)
  159. GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn) $(if $(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN)) $(NOCOMMON_FLAG) $($@-warn)
  160. GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
  161. # These files are to have specific diagnostics suppressed, or are not to
  162. # be subject to -Werror:
  163. # flex output may yield harmless "no previous prototype" warnings
  164. build/gengtype-lex.o-warn = -Wno-error
  165. gengtype-lex.o-warn = -Wno-error
  166. libgcov-util.o-warn = -Wno-error
  167. libgcov-driver-tool.o-warn = -Wno-error
  168. libgcov-merge-tool.o-warn = -Wno-error
  169. gimple-match.o-warn = -Wno-unused
  170. generic-match.o-warn = -Wno-unused
  171. # All warnings have to be shut off in stage1 if the compiler used then
  172. # isn't gcc; configure determines that. WARN_CFLAGS will be either
  173. # $(GCC_WARN_CFLAGS), or nothing. Similarly, WARN_CXXFLAGS will be
  174. # either $(GCC_WARN_CXXFLAGS), or nothing.
  175. WARN_CFLAGS = $(GCC_WARN_CFLAGS)
  176. WARN_CXXFLAGS = $(GCC_WARN_CXXFLAGS)
  177. CPPFLAGS =
  178. AWK = gawk
  179. CC = gcc
  180. CXX = g++
  181. BISON = bison
  182. BISONFLAGS =
  183. FLEX = flex
  184. FLEXFLAGS =
  185. AR = ar
  186. AR_FLAGS = rc
  187. NM = nm
  188. RANLIB = ranlib
  189. RANLIB_FLAGS =
  190. # Libraries to use on the host.
  191. HOST_LIBS =
  192. # The name of the compiler to use.
  193. COMPILER = $(CXX)
  194. COMPILER_FLAGS = $(CXXFLAGS)
  195. # If HOST_LIBS is set, then the user is controlling the libraries to
  196. # link against. In that case, link with $(CC) so that the -lstdc++
  197. # library is not introduced. If HOST_LIBS is not set, link with
  198. # $(CXX) to pick up -lstdc++.
  199. ifeq ($(HOST_LIBS),)
  200. LINKER = $(CXX)
  201. LINKER_FLAGS = $(CXXFLAGS)
  202. else
  203. LINKER = $(CC)
  204. LINKER_FLAGS = $(CFLAGS)
  205. endif
  206. # Like LINKER, but use a mutex for serializing front end links.
  207. ifeq (false,true)
  208. LLINKER = $(SHELL) $(srcdir)/lock-and-run.sh linkfe.lck $(LINKER)
  209. else
  210. LLINKER = $(LINKER)
  211. endif
  212. # -------------------------------------------
  213. # Programs which operate on the build machine
  214. # -------------------------------------------
  215. SHELL = /bin/sh
  216. # pwd command to use. Allow user to override default by setting PWDCMD in
  217. # the environment to account for automounters. The make variable must not
  218. # be called PWDCMD, otherwise the value set here is passed to make
  219. # subprocesses and overrides the setting from the user's environment.
  220. # Don't use PWD since it is a common shell environment variable and we
  221. # don't want to corrupt it.
  222. PWD_COMMAND = $${PWDCMD-pwd}
  223. # on sysV, define this as cp.
  224. INSTALL = /usr/bin/ginstall -c
  225. # Some systems may be missing symbolic links, regular links, or both.
  226. # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate.
  227. LN=ln
  228. LN_S=ln -s
  229. # These permit overriding just for certain files.
  230. INSTALL_PROGRAM = ${INSTALL}
  231. INSTALL_DATA = ${INSTALL} -m 644
  232. INSTALL_SCRIPT = /usr/bin/ginstall -c
  233. install_sh = $(SHELL) $(srcdir)/../install-sh
  234. INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
  235. MAKEINFO = makeinfo
  236. MAKEINFOFLAGS = --no-split
  237. TEXI2DVI = texi2dvi
  238. TEXI2PDF = texi2pdf
  239. TEXI2HTML = $(MAKEINFO) --html
  240. TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl
  241. POD2MAN = pod2man --center="GNU" --release="gcc-$(version)" --date=$(shell sed 's/\(....\)\(..\)\(..\)/\1-\2-\3/' <$(DATESTAMP))
  242. # Some versions of `touch' (such as the version on Solaris 2.8)
  243. # do not correctly set the timestamp due to buggy versions of `utime'
  244. # in the kernel. So, we use `echo' instead.
  245. STAMP = echo timestamp >
  246. # If necessary (e.g., when using the MSYS shell on Microsoft Windows)
  247. # translate the shell's notion of absolute pathnames to the native
  248. # spelling.
  249. build_file_translate =
  250. # Make sure the $(MAKE) variable is defined.
  251. # Locate mkinstalldirs.
  252. mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs
  253. # write_entries_to_file - writes each entry in a list
  254. # to the specified file. Entries are written in chunks of
  255. # $(write_entries_to_file_split) to accommodate systems with
  256. # severe command-line-length limitations.
  257. # Parameters:
  258. # $(1): variable containing entries to iterate over
  259. # $(2): output file
  260. write_entries_to_file_split = 50
  261. write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
  262. $(foreach range, \
  263. $(shell i=1; while test $$i -le $(words $(1)); do \
  264. echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \
  265. $(shell echo "$(wordlist $(range), \
  266. $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1))" \
  267. | tr ' ' '\012' >> $(2)))
  268. # The jit documentation looks better if built with sphinx, but can be
  269. # built with texinfo if sphinx is not available.
  270. # configure sets "doc_build_sys" to "sphinx" or "texinfo" accordingly
  271. doc_build_sys=texinfo
  272. # --------
  273. # UNSORTED
  274. # --------
  275. # Dependency tracking stuff.
  276. CXXDEPMODE = depmode=gcc3
  277. DEPDIR = .deps
  278. depcomp = $(SHELL) $(srcdir)/../depcomp
  279. # In the past we used AC_PROG_CC_C_O and set this properly, but
  280. # it was discovered that this hadn't worked in a long time, so now
  281. # we just hard-code.
  282. OUTPUT_OPTION = -o $@
  283. # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
  284. # -I../zlib, unless we were configured with --with-system-zlib, in which
  285. # case both are empty.
  286. ZLIB = -L../zlib -lz
  287. ZLIBINC = -I$(srcdir)/../zlib
  288. # How to find GMP
  289. GMPLIBS =
  290. GMPINC =
  291. # How to find ISL
  292. ISLLIBS =
  293. ISLINC =
  294. # Set to 'yes' if the LTO front end is enabled.
  295. enable_lto =
  296. # Compiler and flags needed for plugin support
  297. PLUGINCC = g++
  298. PLUGINCFLAGS = -g
  299. # Libs and linker options needed for plugin support
  300. PLUGINLIBS = -rdynamic -ldl
  301. enable_plugin = yes
  302. enable_host_shared =
  303. enable_as_accelerator =
  304. CPPLIB = ../libcpp/libcpp.a
  305. CPPINC = -I$(srcdir)/../libcpp/include
  306. # Where to find decNumber
  307. enable_decimal_float = bid
  308. DECNUM = $(srcdir)/../libdecnumber
  309. DECNUMFMT = $(srcdir)/../libdecnumber/$(enable_decimal_float)
  310. DECNUMINC = -I$(DECNUM) -I$(DECNUMFMT) -I../libdecnumber
  311. LIBDECNUMBER = ../libdecnumber/libdecnumber.a
  312. # The backtrace library.
  313. BACKTRACE = $(srcdir)/../libbacktrace
  314. BACKTRACEINC = -I$(BACKTRACE)
  315. LIBBACKTRACE = ../libbacktrace/.libs/libbacktrace.a
  316. # Target to use when installing include directory. Either
  317. # install-headers-tar, install-headers-cpio or install-headers-cp.
  318. INSTALL_HEADERS_DIR = install-headers-tar
  319. # Header files that are made available under the same name
  320. # to programs compiled with GCC.
  321. USER_H = $(srcdir)/ginclude/float.h \
  322. $(srcdir)/ginclude/iso646.h \
  323. $(srcdir)/ginclude/stdarg.h \
  324. $(srcdir)/ginclude/stdbool.h \
  325. $(srcdir)/ginclude/stddef.h \
  326. $(srcdir)/ginclude/varargs.h \
  327. $(srcdir)/ginclude/stdfix.h \
  328. $(srcdir)/ginclude/stdnoreturn.h \
  329. $(srcdir)/ginclude/stdalign.h \
  330. $(srcdir)/ginclude/stdatomic.h \
  331. $(EXTRA_HEADERS)
  332. USER_H_INC_NEXT_PRE =
  333. USER_H_INC_NEXT_POST =
  334. # The GCC to use for compiling crt*.o.
  335. # Usually the one we just built.
  336. # Don't use this as a dependency--use $(GCC_PASSES).
  337. GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -L$(objdir)/../ld
  338. # Set if the compiler was configured with --with-build-sysroot.
  339. SYSROOT_CFLAGS_FOR_TARGET =
  340. # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  341. # It specifies -B./.
  342. # It also specifies -isystem ./include to find, e.g., stddef.h.
  343. GCC_CFLAGS=$(CFLAGS_FOR_TARGET) $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) $(C_LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
  344. # ---------------------------------------------------
  345. # Programs which produce files for the target machine
  346. # ---------------------------------------------------
  347. AR_FOR_TARGET := $(shell \
  348. if [ -f $(objdir)/../binutils/ar ] ; then \
  349. echo $(objdir)/../binutils/ar ; \
  350. else \
  351. if [ "$(host)" = "$(target)" ] ; then \
  352. echo $(AR); \
  353. else \
  354. t='$(program_transform_name)'; echo ar | sed -e "$$t" ; \
  355. fi; \
  356. fi)
  357. AR_FLAGS_FOR_TARGET =
  358. AR_CREATE_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) rc
  359. AR_EXTRACT_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) x
  360. LIPO_FOR_TARGET = lipo
  361. ORIGINAL_AS_FOR_TARGET = ./as
  362. RANLIB_FOR_TARGET := $(shell \
  363. if [ -f $(objdir)/../binutils/ranlib ] ; then \
  364. echo $(objdir)/../binutils/ranlib ; \
  365. else \
  366. if [ "$(host)" = "$(target)" ] ; then \
  367. echo $(RANLIB); \
  368. else \
  369. t='$(program_transform_name)'; echo ranlib | sed -e "$$t" ; \
  370. fi; \
  371. fi)
  372. ORIGINAL_LD_FOR_TARGET = ./collect-ld
  373. ORIGINAL_NM_FOR_TARGET = ./nm
  374. NM_FOR_TARGET = ./nm
  375. STRIP_FOR_TARGET := $(shell \
  376. if [ -f $(objdir)/../binutils/strip-new ] ; then \
  377. echo $(objdir)/../binutils/strip-new ; \
  378. else \
  379. if [ "$(host)" = "$(target)" ] ; then \
  380. echo strip; \
  381. else \
  382. t='$(program_transform_name)'; echo strip | sed -e "$$t" ; \
  383. fi; \
  384. fi)
  385. # --------
  386. # UNSORTED
  387. # --------
  388. # Where to find some libiberty headers.
  389. HASHTAB_H = $(srcdir)/../include/hashtab.h
  390. OBSTACK_H = $(srcdir)/../include/obstack.h
  391. SPLAY_TREE_H= $(srcdir)/../include/splay-tree.h
  392. MD5_H = $(srcdir)/../include/md5.h
  393. XREGEX_H = $(srcdir)/../include/xregex.h
  394. FNMATCH_H = $(srcdir)/../include/fnmatch.h
  395. # Linker plugin API headers
  396. LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
  397. # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
  398. NATIVE_SYSTEM_HEADER_DIR = /usr/include
  399. # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
  400. CROSS_SYSTEM_HEADER_DIR = $(gcc_tooldir)/sys-include
  401. # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  402. # Purge it of unnecessary internal relative paths
  403. # to directories that might not exist yet.
  404. # The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  405. # Use single quotes here to avoid nested double- and backquotes, this
  406. # macro is also used in a double-quoted context.
  407. SYSTEM_HEADER_DIR = `echo $(NATIVE_SYSTEM_HEADER_DIR) | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`
  408. # Control whether to run fixincludes.
  409. STMP_FIXINC = stmp-fixinc
  410. # Test to see whether <limits.h> exists in the system header files.
  411. LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
  412. # Directory for prefix to system directories, for
  413. # each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
  414. TARGET_SYSTEM_ROOT =
  415. TARGET_SYSTEM_ROOT_DEFINE =
  416. xmake_file= $(srcdir)/config/i386/x-i386 $(srcdir)/config/x-linux
  417. tmake_file= $(srcdir)/config/t-slibgcc $(srcdir)/config/t-linux $(srcdir)/config/t-glibc $(srcdir)/config/i386/t-linux64 $(srcdir)/config/i386/t-pmm_malloc $(srcdir)/config/i386/t-i386 $(srcdir)/config/i386/t-linux
  418. TM_ENDIAN_CONFIG=
  419. TM_MULTILIB_CONFIG=m64,m32
  420. TM_MULTILIB_EXCEPTIONS_CONFIG=
  421. out_file=$(srcdir)/config/i386/i386.c
  422. out_object_file=i386.o
  423. common_out_file=$(srcdir)/common/config/i386/i386-common.c
  424. common_out_object_file=i386-common.o
  425. md_file=$(srcdir)/common.md $(srcdir)/config/i386/i386.md
  426. tm_file_list=options.h $(srcdir)/config/vxworks-dummy.h $(srcdir)/config/i386/biarch64.h $(srcdir)/config/i386/i386.h $(srcdir)/config/i386/unix.h $(srcdir)/config/i386/att.h $(srcdir)/config/dbxelf.h $(srcdir)/config/elfos.h $(srcdir)/config/gnu-user.h $(srcdir)/config/glibc-stdint.h $(srcdir)/config/i386/x86-64.h $(srcdir)/config/i386/gnu-user-common.h $(srcdir)/config/i386/gnu-user64.h $(srcdir)/config/linux.h $(srcdir)/config/linux-android.h $(srcdir)/config/i386/linux-common.h $(srcdir)/config/i386/linux64.h $(srcdir)/config/initfini-array.h $(srcdir)/defaults.h
  427. tm_include_list=options.h insn-constants.h config/vxworks-dummy.h config/i386/biarch64.h config/i386/i386.h config/i386/unix.h config/i386/att.h config/dbxelf.h config/elfos.h config/gnu-user.h config/glibc-stdint.h config/i386/x86-64.h config/i386/gnu-user-common.h config/i386/gnu-user64.h config/linux.h config/linux-android.h config/i386/linux-common.h config/i386/linux64.h config/initfini-array.h defaults.h
  428. tm_defines= LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 DEFAULT_LIBC=LIBC_GLIBC ANDROID_DEFAULT=0
  429. tm_p_file_list= $(srcdir)/config/i386/i386-protos.h $(srcdir)/config/linux-protos.h tm-preds.h
  430. tm_p_include_list= config/i386/i386-protos.h config/linux-protos.h tm-preds.h
  431. build_xm_file_list= auto-host.h $(srcdir)/../include/ansidecl.h
  432. build_xm_include_list= auto-host.h ansidecl.h
  433. build_xm_defines=
  434. host_xm_file_list= auto-host.h $(srcdir)/../include/ansidecl.h
  435. host_xm_include_list= auto-host.h ansidecl.h
  436. host_xm_defines=
  437. xm_file_list= auto-host.h $(srcdir)/../include/ansidecl.h
  438. xm_include_list= auto-host.h ansidecl.h
  439. xm_defines=
  440. lang_checks=
  441. lang_checks_parallelized=
  442. # Upper limit to which it is useful to parallelize this lang target.
  443. # It doesn't make sense to try e.g. 128 goals for small testsuites
  444. # like objc or go.
  445. check_gcc_parallelize=10000
  446. lang_opt_files= ../ada/gcc-interface/lang.opt ../fortran/lang.opt ../go/lang.opt ../java/lang.opt ../lto/lang.opt $(srcdir)/c-family/c.opt $(srcdir)/common.opt
  447. lang_specs_files=
  448. lang_tree_files= ../ada/gcc-interface/ada-tree.def ../cp/cp-tree.def ../java/java-tree.def ../objc/objc-tree.def
  449. target_cpu_default=
  450. OBJC_BOEHM_GC=
  451. extra_modes_file=$(srcdir)/config/i386/i386-modes.def
  452. extra_opt_files= $(srcdir)/config/fused-madd.opt $(srcdir)/config/i386/i386.opt $(srcdir)/config/gnu-user.opt $(srcdir)/config/linux.opt $(srcdir)/config/linux-android.opt
  453. host_hook_obj=host-linux.o
  454. # Multiarch support
  455. enable_multiarch = auto
  456. with_cpu = generic
  457. with_float =
  458. ifeq ($(enable_multiarch),yes)
  459. if_multiarch = $(1)
  460. else
  461. ifeq ($(enable_multiarch),auto)
  462. # SYSTEM_HEADER_DIR is makefile syntax, cannot be evaluated in configure.ac
  463. if_multiarch = $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib/*/crti.o),$(1))
  464. else
  465. if_multiarch =
  466. endif
  467. endif
  468. # ------------------------
  469. # Installation directories
  470. # ------------------------
  471. # Common prefix for installation directories.
  472. # NOTE: This directory must exist when you start installation.
  473. prefix = /opt/gcc52
  474. # Directory in which to put localized header files. On the systems with
  475. # gcc as the native cc, `local_prefix' may not be `prefix' which is
  476. # `/usr'.
  477. # NOTE: local_prefix *should not* default from prefix.
  478. local_prefix = /usr/local
  479. # Directory in which to put host dependent programs and libraries
  480. exec_prefix = ${prefix}
  481. # Directory in which to put the executable for the command `gcc'
  482. bindir = ${exec_prefix}/bin
  483. # Directory in which to put the directories used by the compiler.
  484. libdir = ${exec_prefix}/lib
  485. # Directory in which GCC puts its executables.
  486. libexecdir = ${exec_prefix}/libexec
  487. # --------
  488. # UNSORTED
  489. # --------
  490. # Directory in which the compiler finds libraries etc.
  491. libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
  492. # Directory in which the compiler finds executables
  493. libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
  494. # Directory in which all plugin resources are installed
  495. plugin_resourcesdir = $(libsubdir)/plugin
  496. # Directory in which plugin headers are installed
  497. plugin_includedir = $(plugin_resourcesdir)/include
  498. # Directory in which plugin specific executables are installed
  499. plugin_bindir = $(libexecsubdir)/plugin
  500. # Used to produce a relative $(gcc_tooldir) in gcc.o
  501. ifeq ($(enable_as_accelerator),yes)
  502. unlibsubdir = ../../../../..
  503. else
  504. unlibsubdir = ../../..
  505. endif
  506. # $(prefix), expressed as a path relative to $(libsubdir).
  507. #
  508. # An explanation of the sed strings:
  509. # -e 's|^$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
  510. # -e 's|/$$||' match a trailing forward slash and eliminates it
  511. # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
  512. # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
  513. #
  514. # (*) Note this pattern overwrites the first character of the string
  515. # with a forward slash if one is not already present. This is not a
  516. # problem because the exact names of the sub-directories concerned is
  517. # unimportant, just the number of them matters.
  518. #
  519. # The practical upshot of these patterns is like this:
  520. #
  521. # prefix exec_prefix result
  522. # ------ ----------- ------
  523. # /foo /foo/bar ../
  524. # /foo/ /foo/bar ../
  525. # /foo /foo/bar/ ../
  526. # /foo/ /foo/bar/ ../
  527. # /foo /foo/bar/ugg ../../
  528. libsubdir_to_prefix := \
  529. $(unlibsubdir)/$(shell echo "$(libdir)" | \
  530. sed -e 's|^$(prefix)||' -e 's|/$$||' -e 's|^[^/]|/|' \
  531. -e 's|/[^/]*|../|g')
  532. # $(exec_prefix), expressed as a path relative to $(prefix).
  533. prefix_to_exec_prefix := \
  534. $(shell echo "$(exec_prefix)" | \
  535. sed -e 's|^$(prefix)||' -e 's|^/||' -e '/./s|$$|/|')
  536. # Directory in which to find other cross-compilation tools and headers.
  537. dollar =
  538. # Used in install-cross.
  539. gcc_tooldir = $(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)
  540. # Since gcc_tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
  541. build_tooldir = $(exec_prefix)/$(target_noncanonical)
  542. # Directory in which the compiler finds target-independent g++ includes.
  543. gcc_gxx_include_dir = $(libsubdir)/$(libsubdir_to_prefix)include/c++/$(version)
  544. gcc_gxx_include_dir_add_sysroot = 0
  545. # Directory to search for site-specific includes.
  546. local_includedir = $(local_prefix)/include
  547. includedir = $(prefix)/include
  548. # where the info files go
  549. infodir = ${datarootdir}/info
  550. # Where cpp should go besides $prefix/bin if necessary
  551. cpp_install_dir =
  552. # where the locale files go
  553. datadir = ${datarootdir}
  554. localedir = $(datadir)/locale
  555. # Extension (if any) to put in installed man-page filename.
  556. man1ext = .1
  557. man7ext = .7
  558. objext = .o
  559. exeext =
  560. build_exeext =
  561. # Directory in which to put man pages.
  562. mandir = ${datarootdir}/man
  563. man1dir = $(mandir)/man1
  564. man7dir = $(mandir)/man7
  565. # Dir for temp files.
  566. tmpdir = /tmp
  567. datarootdir = ${prefix}/share
  568. docdir = ${datarootdir}/doc/${PACKAGE}
  569. # Directory in which to build HTML
  570. build_htmldir = $(objdir)/HTML/gcc-$(version)
  571. # Directory in which to put HTML
  572. htmldir = ${docdir}
  573. # Whether we were configured with NLS.
  574. USE_NLS = no
  575. # Internationalization library.
  576. LIBINTL =
  577. LIBINTL_DEP =
  578. # Character encoding conversion library.
  579. LIBICONV =
  580. LIBICONV_DEP =
  581. # If a supplementary library is being used for the GC.
  582. GGC_LIB=
  583. # "true" if the target C library headers are unavailable; "false"
  584. # otherwise.
  585. inhibit_libc = false
  586. ifeq ($(inhibit_libc),true)
  587. INHIBIT_LIBC_CFLAGS = -Dinhibit_libc
  588. endif
  589. # List of extra executables that should be compiled for this target machine
  590. # that are used when linking.
  591. # The rules for compiling them should be in the t-* file for the machine.
  592. EXTRA_PROGRAMS =
  593. # List of extra object files that should be compiled and linked with
  594. # compiler proper (cc1, cc1obj, cc1plus).
  595. EXTRA_OBJS = linux.o
  596. # List of extra object files that should be compiled and linked with
  597. # the gcc driver.
  598. EXTRA_GCC_OBJS =driver-i386.o
  599. # List of extra libraries that should be linked with the gcc driver.
  600. EXTRA_GCC_LIBS =
  601. # List of additional header files to install.
  602. EXTRA_HEADERS = $(srcdir)/config/i386/cpuid.h $(srcdir)/config/i386/mmintrin.h $(srcdir)/config/i386/mm3dnow.h $(srcdir)/config/i386/xmmintrin.h $(srcdir)/config/i386/emmintrin.h $(srcdir)/config/i386/pmmintrin.h $(srcdir)/config/i386/tmmintrin.h $(srcdir)/config/i386/ammintrin.h $(srcdir)/config/i386/smmintrin.h $(srcdir)/config/i386/nmmintrin.h $(srcdir)/config/i386/bmmintrin.h $(srcdir)/config/i386/fma4intrin.h $(srcdir)/config/i386/wmmintrin.h $(srcdir)/config/i386/immintrin.h $(srcdir)/config/i386/x86intrin.h $(srcdir)/config/i386/avxintrin.h $(srcdir)/config/i386/xopintrin.h $(srcdir)/config/i386/ia32intrin.h $(srcdir)/config/i386/cross-stdarg.h $(srcdir)/config/i386/lwpintrin.h $(srcdir)/config/i386/popcntintrin.h $(srcdir)/config/i386/lzcntintrin.h $(srcdir)/config/i386/bmiintrin.h $(srcdir)/config/i386/tbmintrin.h $(srcdir)/config/i386/bmi2intrin.h $(srcdir)/config/i386/avx2intrin.h $(srcdir)/config/i386/avx512fintrin.h $(srcdir)/config/i386/fmaintrin.h $(srcdir)/config/i386/f16cintrin.h $(srcdir)/config/i386/rtmintrin.h $(srcdir)/config/i386/xtestintrin.h $(srcdir)/config/i386/rdseedintrin.h $(srcdir)/config/i386/prfchwintrin.h $(srcdir)/config/i386/adxintrin.h $(srcdir)/config/i386/fxsrintrin.h $(srcdir)/config/i386/xsaveintrin.h $(srcdir)/config/i386/xsaveoptintrin.h $(srcdir)/config/i386/avx512cdintrin.h $(srcdir)/config/i386/avx512erintrin.h $(srcdir)/config/i386/avx512pfintrin.h $(srcdir)/config/i386/shaintrin.h $(srcdir)/config/i386/clflushoptintrin.h $(srcdir)/config/i386/xsavecintrin.h $(srcdir)/config/i386/xsavesintrin.h $(srcdir)/config/i386/avx512dqintrin.h $(srcdir)/config/i386/avx512bwintrin.h $(srcdir)/config/i386/avx512vlintrin.h $(srcdir)/config/i386/avx512vlbwintrin.h $(srcdir)/config/i386/avx512vldqintrin.h $(srcdir)/config/i386/avx512ifmaintrin.h $(srcdir)/config/i386/avx512ifmavlintrin.h $(srcdir)/config/i386/avx512vbmiintrin.h $(srcdir)/config/i386/avx512vbmivlintrin.h $(srcdir)/config/i386/clwbintrin.h $(srcdir)/config/i386/pcommitintrin.h $(srcdir)/config/i386/mwaitxintrin.h
  603. # How to handle <stdint.h>.
  604. USE_GCC_STDINT = wrap
  605. # The configure script will set this to collect2$(exeext), except on a
  606. # (non-Unix) host which can not build collect2, for which it will be
  607. # set to empty.
  608. COLLECT2 = collect2$(exeext)
  609. # Program to convert libraries.
  610. LIBCONVERT =
  611. # Control whether header files are installed.
  612. INSTALL_HEADERS=install-headers install-mkheaders
  613. # Control whether Info documentation is built and installed.
  614. BUILD_INFO = info
  615. # Control whether manpages generated by texi2pod.pl can be rebuilt.
  616. GENERATED_MANPAGES = generated-manpages
  617. # Additional directories of header files to run fixincludes on.
  618. # These should be directories searched automatically by default
  619. # just as /usr/include is.
  620. # *Do not* use this for directories that happen to contain
  621. # header files, but are not searched automatically by default.
  622. # On most systems, this is empty.
  623. OTHER_FIXINCLUDES_DIRS=
  624. # A list of all the language-specific executables.
  625. COMPILERS = gnat1$(exeext) cc1$(exeext) cc1plus$(exeext) f951$(exeext) go1$(exeext) jc1$(exeext) jvgenmain$(exeext) lto1$(exeext) cc1obj$(exeext) cc1objplus$(exeext)
  626. # List of things which should already be built whenever we try to use xgcc
  627. # to compile anything (without linking).
  628. GCC_PASSES=xgcc$(exeext) specs
  629. # Directory to link to, when using the target `maketest'.
  630. DIR = ../gcc
  631. # Native compiler for the build machine and its switches.
  632. CC_FOR_BUILD = $(CC)
  633. CXX_FOR_BUILD = $(CXX)
  634. BUILD_CFLAGS= $(ALL_CFLAGS) -DGENERATOR_FILE
  635. BUILD_CXXFLAGS = $(ALL_CXXFLAGS) -DGENERATOR_FILE
  636. # Native compiler that we use. This may be C++ some day.
  637. COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
  638. BUILD_COMPILERFLAGS = $(BUILD_CXXFLAGS)
  639. # Native linker that we use.
  640. LINKER_FOR_BUILD = $(CXX_FOR_BUILD)
  641. BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS)
  642. # Native linker and preprocessor flags. For x-fragment overrides.
  643. BUILD_LDFLAGS=$(LDFLAGS)
  644. BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
  645. -I$(srcdir)/../include $(CPPINC) $(CPPFLAGS)
  646. # Actual name to use when installing a native compiler.
  647. GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
  648. GCC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcc|sed '$(program_transform_name)')
  649. CPP_INSTALL_NAME := $(shell echo cpp|sed '$(program_transform_name)')
  650. GCOV_INSTALL_NAME := $(shell echo gcov|sed '$(program_transform_name)')
  651. GCOV_TOOL_INSTALL_NAME := $(shell echo gcov-tool|sed '$(program_transform_name)')
  652. # Setup the testing framework, if you have one
  653. EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
  654. echo $${rootme}/../expect/expect ; \
  655. else echo expect ; fi`
  656. RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
  657. echo $${srcdir}/../dejagnu/runtest ; \
  658. else echo runtest; fi`
  659. RUNTESTFLAGS =
  660. # This should name the specs file that we're going to install. Target
  661. # Makefiles may override it and name another file to be generated from
  662. # the built-in specs and installed as the default spec, as long as
  663. # they also introduce a rule to generate a file name specs, to be used
  664. # at build time.
  665. SPECS = specs
  666. # Extra include files that are defined by HeaderInclude directives in
  667. # the .opt files
  668. OPTIONS_H_EXTRA =
  669. # Extra include files that are defined by SourceInclude directives in
  670. # the .opt files
  671. OPTIONS_C_EXTRA = $(PRETTY_PRINT_H)
  672. OPTIONS_H_EXTRA += $(srcdir)/config/i386/i386-opts.h
  673. # End of variables for you to override.
  674. # GTM_H lists the config files that the generator files depend on,
  675. # while TM_H lists the ones ordinary gcc files depend on, which
  676. # includes several files generated by those generators.
  677. BCONFIG_H = bconfig.h $(build_xm_file_list)
  678. CONFIG_H = config.h $(host_xm_file_list)
  679. TCONFIG_H = tconfig.h $(xm_file_list)
  680. TM_P_H = tm_p.h $(tm_p_file_list)
  681. GTM_H = tm.h $(tm_file_list) insn-constants.h
  682. TM_H = $(GTM_H) insn-flags.h $(OPTIONS_H)
  683. # Variables for version information.
  684. BASEVER := $(srcdir)/BASE-VER # 4.x.y
  685. DEVPHASE := $(srcdir)/DEV-PHASE # experimental, prerelease, ""
  686. DATESTAMP := $(srcdir)/DATESTAMP # YYYYMMDD or empty
  687. REVISION := $(srcdir)/REVISION # [BRANCH revision XXXXXX]
  688. BASEVER_c := $(shell cat $(BASEVER))
  689. DEVPHASE_c := $(shell cat $(DEVPHASE))
  690. DATESTAMP_c := $(shell cat $(DATESTAMP))
  691. ifeq (,$(wildcard $(REVISION)))
  692. REVISION_c :=
  693. REVISION :=
  694. else
  695. REVISION_c := $(shell cat $(REVISION))
  696. endif
  697. version := $(BASEVER_c)
  698. PATCHLEVEL_c := \
  699. $(shell echo $(BASEVER_c) | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$$/\1/')
  700. # For use in version.c - double quoted strings, with appropriate
  701. # surrounding punctuation and spaces, and with the datestamp and
  702. # development phase collapsed to the empty string in release mode
  703. # (i.e. if DEVPHASE_c is empty and PATCHLEVEL_c is 0). The space
  704. # immediately after the comma in the $(if ...) constructs is
  705. # significant - do not remove it.
  706. BASEVER_s := "\"$(BASEVER_c)\""
  707. DEVPHASE_s := "\"$(if $(DEVPHASE_c), ($(DEVPHASE_c)))\""
  708. DATESTAMP_s := \
  709. "\"$(if $(DEVPHASE_c)$(filter-out 0,$(PATCHLEVEL_c)), $(DATESTAMP_c))\""
  710. PKGVERSION_s:= "\"(GCC) \""
  711. BUGURL_s := "\"<http://gcc.gnu.org/bugs.html>\""
  712. PKGVERSION := (GCC)
  713. BUGURL_TEXI := @uref{http://gcc.gnu.org/bugs.html}
  714. ifdef REVISION_c
  715. REVISION_s := \
  716. "\"$(if $(DEVPHASE_c)$(filter-out 0,$(PATCHLEVEL_c)), $(REVISION_c))\""
  717. else
  718. REVISION_s := "\"\""
  719. endif
  720. # Shorthand variables for dependency lists.
  721. DUMPFILE_H = $(srcdir)/../libcpp/include/line-map.h dumpfile.h
  722. VEC_H = vec.h statistics.h $(GGC_H)
  723. HASH_TABLE_H = $(HASHTAB_H) hash-table.h
  724. EXCEPT_H = except.h $(HASHTAB_H)
  725. TARGET_DEF = target.def target-hooks-macros.h
  726. C_TARGET_DEF = c-family/c-target.def target-hooks-macros.h
  727. COMMON_TARGET_DEF = common/common-target.def target-hooks-macros.h
  728. TARGET_H = $(TM_H) target.h $(TARGET_DEF) insn-modes.h insn-codes.h
  729. C_TARGET_H = c-family/c-target.h $(C_TARGET_DEF)
  730. COMMON_TARGET_H = common/common-target.h $(INPUT_H) $(COMMON_TARGET_DEF)
  731. MACHMODE_H = machmode.h mode-classes.def insn-modes.h
  732. HOOKS_H = hooks.h $(MACHMODE_H)
  733. HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOKS_H)
  734. LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H)
  735. TARGET_DEF_H = target-def.h target-hooks-def.h $(HOOKS_H) targhooks.h
  736. C_TARGET_DEF_H = c-family/c-target-def.h c-family/c-target-hooks-def.h \
  737. $(TREE_H) $(C_COMMON_H) $(HOOKS_H) common/common-targhooks.h
  738. RTL_BASE_H = coretypes.h rtl.h rtl.def $(MACHMODE_H) reg-notes.def \
  739. insn-notes.def $(INPUT_H) $(REAL_H) statistics.h $(VEC_H) \
  740. $(FIXED_VALUE_H) alias.h $(HASHTAB_H)
  741. FIXED_VALUE_H = fixed-value.h $(MACHMODE_H) double-int.h
  742. RTL_H = $(RTL_BASE_H) $(FLAGS_H) genrtl.h
  743. READ_MD_H = $(OBSTACK_H) $(HASHTAB_H) read-md.h
  744. PARAMS_H = params.h params.def
  745. BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def \
  746. gtm-builtins.def sanitizer.def cilkplus.def cilk-builtins.def
  747. INTERNAL_FN_DEF = internal-fn.def
  748. INTERNAL_FN_H = internal-fn.h $(INTERNAL_FN_DEF)
  749. TREE_CORE_H = tree-core.h coretypes.h all-tree.def tree.def \
  750. c-family/c-common.def $(lang_tree_files) $(MACHMODE_H) \
  751. $(BUILTINS_DEF) $(INPUT_H) statistics.h \
  752. $(VEC_H) treestruct.def $(HASHTAB_H) \
  753. double-int.h alias.h $(SYMTAB_H) $(FLAGS_H) \
  754. $(REAL_H) $(FIXED_VALUE_H)
  755. TREE_H = tree.h $(TREE_CORE_H) tree-check.h
  756. REGSET_H = regset.h $(BITMAP_H) hard-reg-set.h
  757. BASIC_BLOCK_H = basic-block.h $(PREDICT_H) $(VEC_H) $(FUNCTION_H) \
  758. cfg-flags.def cfghooks.h
  759. GIMPLE_H = gimple.h gimple.def gsstruct.def $(VEC_H) \
  760. $(GGC_H) $(BASIC_BLOCK_H) $(TREE_H) tree-ssa-operands.h \
  761. tree-ssa-alias.h $(INTERNAL_FN_H) $(HASH_TABLE_H) is-a.h
  762. GCOV_IO_H = gcov-io.h gcov-iov.h auto-host.h gcov-counter.def
  763. RECOG_H = recog.h
  764. EMIT_RTL_H = emit-rtl.h
  765. FLAGS_H = flags.h flag-types.h $(OPTIONS_H)
  766. OPTIONS_H = options.h flag-types.h $(OPTIONS_H_EXTRA)
  767. FUNCTION_H = function.h $(HASHTAB_H) $(TM_H) hard-reg-set.h \
  768. $(VEC_H) $(INPUT_H) $(MACHMODE_H)
  769. EXPR_H = expr.h insn-config.h $(FUNCTION_H) $(RTL_H) $(FLAGS_H) $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H)
  770. OPTABS_H = optabs.h insn-codes.h insn-opinit.h
  771. REGS_H = regs.h $(MACHMODE_H) hard-reg-set.h
  772. CFGLOOP_H = cfgloop.h $(BASIC_BLOCK_H) double-int.h \
  773. $(BITMAP_H) sbitmap.h
  774. IPA_UTILS_H = ipa-utils.h $(TREE_H) $(CGRAPH_H)
  775. IPA_REFERENCE_H = ipa-reference.h $(BITMAP_H) $(TREE_H)
  776. CGRAPH_H = cgraph.h $(VEC_H) $(TREE_H) $(BASIC_BLOCK_H) $(FUNCTION_H) \
  777. cif-code.def ipa-ref.h $(LINKER_PLUGIN_API_H) is-a.h
  778. DF_H = df.h $(BITMAP_H) $(REGSET_H) sbitmap.h $(BASIC_BLOCK_H) \
  779. alloc-pool.h $(TIMEVAR_H)
  780. RESOURCE_H = resource.h hard-reg-set.h $(DF_H)
  781. GCC_H = gcc.h version.h $(DIAGNOSTIC_CORE_H)
  782. GGC_H = ggc.h gtype-desc.h statistics.h
  783. TIMEVAR_H = timevar.h timevar.def
  784. INSN_ATTR_H = insn-attr.h insn-attr-common.h $(INSN_ADDR_H)
  785. INSN_ADDR_H = $(srcdir)/insn-addr.h
  786. C_COMMON_H = c-family/c-common.h c-family/c-common.def $(TREE_H) \
  787. $(SPLAY_TREE_H) $(CPPLIB_H) $(GGC_H) $(DIAGNOSTIC_CORE_H)
  788. C_PRAGMA_H = c-family/c-pragma.h $(CPPLIB_H)
  789. C_TREE_H = c/c-tree.h $(C_COMMON_H) $(DIAGNOSTIC_H)
  790. SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h \
  791. $(srcdir)/../include/safe-ctype.h $(srcdir)/../include/filenames.h
  792. PREDICT_H = predict.h predict.def
  793. CPPLIB_H = $(srcdir)/../libcpp/include/line-map.h \
  794. $(srcdir)/../libcpp/include/cpplib.h
  795. INPUT_H = $(srcdir)/../libcpp/include/line-map.h input.h
  796. OPTS_H = $(INPUT_H) $(VEC_H) opts.h $(OBSTACK_H)
  797. SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h $(OBSTACK_H)
  798. CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h
  799. CPP_INTERNAL_H = $(srcdir)/../libcpp/internal.h $(CPP_ID_DATA_H)
  800. TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) $(DUMPFILE_H)
  801. TREE_PASS_H = tree-pass.h $(TIMEVAR_H) $(DUMPFILE_H)
  802. TREE_SSA_H = tree-ssa.h tree-ssa-operands.h \
  803. $(BITMAP_H) sbitmap.h $(BASIC_BLOCK_H) $(GIMPLE_H) \
  804. $(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H) \
  805. tree-ssa-alias.h
  806. PRETTY_PRINT_H = pretty-print.h $(INPUT_H) $(OBSTACK_H) wide-int-print.h
  807. TREE_PRETTY_PRINT_H = tree-pretty-print.h $(PRETTY_PRINT_H)
  808. GIMPLE_PRETTY_PRINT_H = gimple-pretty-print.h $(TREE_PRETTY_PRINT_H)
  809. DIAGNOSTIC_CORE_H = diagnostic-core.h $(INPUT_H) bversion.h diagnostic.def
  810. DIAGNOSTIC_H = diagnostic.h $(DIAGNOSTIC_CORE_H) $(PRETTY_PRINT_H)
  811. C_PRETTY_PRINT_H = c-family/c-pretty-print.h $(PRETTY_PRINT_H) \
  812. $(C_COMMON_H) $(TREE_H)
  813. TREE_INLINE_H = tree-inline.h
  814. REAL_H = real.h $(MACHMODE_H)
  815. LTO_STREAMER_H = lto-streamer.h $(LINKER_PLUGIN_API_H) $(TARGET_H) \
  816. $(CGRAPH_H) $(VEC_H) $(HASH_TABLE_H) $(TREE_H) $(GIMPLE_H) \
  817. $(GCOV_IO_H) $(DIAGNOSTIC_H) alloc-pool.h
  818. IPA_PROP_H = ipa-prop.h $(TREE_H) $(VEC_H) $(CGRAPH_H) $(GIMPLE_H) alloc-pool.h
  819. BITMAP_H = bitmap.h $(HASHTAB_H) statistics.h
  820. GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h plugin.def \
  821. $(CONFIG_H) $(SYSTEM_H) $(HASHTAB_H)
  822. PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
  823. PLUGIN_VERSION_H = plugin-version.h configargs.h
  824. CONTEXT_H = context.h
  825. #
  826. # Now figure out from those variables how to compile and link.
  827. # IN_GCC distinguishes between code compiled into GCC itself and other
  828. # programs built during a bootstrap.
  829. # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a
  830. # cross compiler which does not use the native headers and libraries.
  831. INTERNAL_CFLAGS = -DIN_GCC $(PICFLAG)
  832. # This is the variable actually used when we compile. If you change this,
  833. # you probably want to update BUILD_CFLAGS in configure.ac
  834. ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \
  835. $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) -DHAVE_CONFIG_H
  836. # The C++ version.
  837. ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \
  838. $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) -DHAVE_CONFIG_H
  839. # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro
  840. # puts -I options in CPPFLAGS, our include files in the srcdir will always
  841. # win against random include files in /usr/include.
  842. ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
  843. # This is the variable to use when using $(COMPILER).
  844. ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
  845. # This is the variable to use when using $(LINKER).
  846. ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
  847. # Build and host support libraries.
  848. # Use the "pic" build of libiberty if --enable-host-shared.
  849. ifeq ($(enable_host_shared),yes)
  850. LIBIBERTY = ../libiberty/pic/libiberty.a
  851. BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/pic/libiberty.a
  852. else
  853. LIBIBERTY = ../libiberty/libiberty.a
  854. BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
  855. endif
  856. # Dependencies on the intl and portability libraries.
  857. LIBDEPS= libcommon.a $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) \
  858. $(LIBDECNUMBER) $(LIBBACKTRACE)
  859. # Likewise, for use in the tools that must run on this machine
  860. # even if we are cross-building GCC.
  861. BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
  862. # How to link with both our special library facilities
  863. # and the system's installed libraries.
  864. LIBS = libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
  865. $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
  866. BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
  867. $(ZLIB)
  868. # Any system libraries needed just for GNAT.
  869. SYSLIBS =
  870. # Used from ada/gcc-interface/Make-lang.in
  871. GNATBIND = gnatbind
  872. GNATMAKE = gnatmake
  873. # Libs needed (at present) just for jcf-dump.
  874. LDEXP_LIB =
  875. # Likewise, for use in the tools that must run on this machine
  876. # even if we are cross-building GCC.
  877. BUILD_LIBS = $(BUILD_LIBIBERTY)
  878. BUILD_RTL = build/rtl.o build/read-rtl.o build/ggc-none.o \
  879. build/vec.o build/min-insn-modes.o build/gensupport.o \
  880. build/print-rtl.o
  881. BUILD_MD = build/read-md.o
  882. BUILD_ERRORS = build/errors.o
  883. # Specify the directories to be searched for header files.
  884. # Both . and srcdir are used, in that order,
  885. # so that *config.h will be found in the compilation
  886. # subdirectory rather than in the source directory.
  887. # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file
  888. # currently being compiled, in both source trees, to be examined as well.
  889. # libintl.h will be found in ../intl if we are using the included libintl.
  890. INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
  891. -I$(srcdir)/../include \
  892. $(CPPINC) $(GMPINC) $(DECNUMINC) $(BACKTRACEINC) \
  893. $(ISLINC)
  894. COMPILE.base = $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) -o $@
  895. ifeq ($(CXXDEPMODE),depmode=gcc3)
  896. # Note a subtlety here: we use $(@D) for the directory part, to make
  897. # things like the go/%.o rule work properly; but we use $(*F) for the
  898. # file part, as we just want the file part of the stem, not the entire
  899. # file name.
  900. COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo
  901. POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
  902. else
  903. COMPILE = source='$<' object='$@' libtool=no \
  904. DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) $(COMPILE.base)
  905. POSTCOMPILE =
  906. endif
  907. .cc.o .c.o:
  908. $(COMPILE) $<
  909. $(POSTCOMPILE)
  910. #
  911. # Support for additional languages (other than C).
  912. # C can be supported this way too (leave for later).
  913. LANG_MAKEFRAGS = $(srcdir)/ada/gcc-interface/Make-lang.in $(srcdir)/c/Make-lang.in $(srcdir)/cp/Make-lang.in $(srcdir)/fortran/Make-lang.in $(srcdir)/go/Make-lang.in $(srcdir)/java/Make-lang.in $(srcdir)/jit/Make-lang.in $(srcdir)/lto/Make-lang.in $(srcdir)/objc/Make-lang.in $(srcdir)/objcp/Make-lang.in
  914. # Flags to pass to recursive makes.
  915. # CC is set by configure.
  916. # ??? The choices here will need some experimenting with.
  917. export AR_FOR_TARGET
  918. export AR_CREATE_FOR_TARGET
  919. export AR_FLAGS_FOR_TARGET
  920. export AR_EXTRACT_FOR_TARGET
  921. export AWK
  922. export DESTDIR
  923. export GCC_FOR_TARGET
  924. export INCLUDES
  925. export INSTALL_DATA
  926. export LIPO_FOR_TARGET
  927. export MACHMODE_H
  928. export NM_FOR_TARGET
  929. export STRIP_FOR_TARGET
  930. export RANLIB_FOR_TARGET
  931. export libsubdir
  932. FLAGS_TO_PASS = \
  933. "ADA_CFLAGS=$(ADA_CFLAGS)" \
  934. "BISON=$(BISON)" \
  935. "BISONFLAGS=$(BISONFLAGS)" \
  936. "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
  937. "LDFLAGS=$(LDFLAGS)" \
  938. "FLEX=$(FLEX)" \
  939. "FLEXFLAGS=$(FLEXFLAGS)" \
  940. "INSTALL=$(INSTALL)" \
  941. "INSTALL_DATA=$(INSTALL_DATA)" \
  942. "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
  943. "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
  944. "LN=$(LN)" \
  945. "LN_S=$(LN_S)" \
  946. "MAKEINFO=$(MAKEINFO)" \
  947. "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
  948. "MAKEOVERRIDES=" \
  949. "SHELL=$(SHELL)" \
  950. "exeext=$(exeext)" \
  951. "build_exeext=$(build_exeext)" \
  952. "objext=$(objext)" \
  953. "exec_prefix=$(exec_prefix)" \
  954. "prefix=$(prefix)" \
  955. "local_prefix=$(local_prefix)" \
  956. "gxx_include_dir=$(gcc_gxx_include_dir)" \
  957. "build_tooldir=$(build_tooldir)" \
  958. "gcc_tooldir=$(gcc_tooldir)" \
  959. "bindir=$(bindir)" \
  960. "libexecsubdir=$(libexecsubdir)" \
  961. "datarootdir=$(datarootdir)" \
  962. "datadir=$(datadir)" \
  963. "localedir=$(localedir)"
  964. #
  965. # Lists of files for various purposes.
  966. # All option source files
  967. ALL_OPT_FILES=$(lang_opt_files) $(extra_opt_files)
  968. # Target specific, C specific object file
  969. C_TARGET_OBJS=i386-c.o glibc-c.o
  970. # Target specific, C++ specific object file
  971. CXX_TARGET_OBJS=i386-c.o glibc-c.o
  972. # Target specific, Fortran specific object file
  973. FORTRAN_TARGET_OBJS=
  974. # Object files for gcc many-languages driver.
  975. GCC_OBJS = gcc.o gcc-main.o ggc-none.o
  976. c-family-warn = $(STRICT_WARN)
  977. # Language-specific object files shared by all C-family front ends.
  978. C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
  979. c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o \
  980. c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o \
  981. c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o \
  982. c-family/c-semantics.o c-family/c-ada-spec.o \
  983. c-family/c-cilkplus.o \
  984. c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o
  985. # Language-independent object files.
  986. # We put the insn-*.o files first so that a parallel make will build
  987. # them sooner, because they are large and otherwise tend to be the
  988. # last objects to finish building.
  989. OBJS = \
  990. insn-attrtab.o \
  991. insn-automata.o \
  992. insn-dfatab.o \
  993. insn-emit.o \
  994. insn-extract.o \
  995. insn-latencytab.o \
  996. insn-modes.o \
  997. insn-opinit.o \
  998. insn-output.o \
  999. insn-peep.o \
  1000. insn-preds.o \
  1001. insn-recog.o \
  1002. insn-enums.o \
  1003. ggc-page.o \
  1004. alias.o \
  1005. alloc-pool.o \
  1006. auto-inc-dec.o \
  1007. auto-profile.o \
  1008. bb-reorder.o \
  1009. bitmap.o \
  1010. bt-load.o \
  1011. builtins.o \
  1012. caller-save.o \
  1013. calls.o \
  1014. ccmp.o \
  1015. cfg.o \
  1016. cfganal.o \
  1017. cfgbuild.o \
  1018. cfgcleanup.o \
  1019. cfgexpand.o \
  1020. cfghooks.o \
  1021. cfgloop.o \
  1022. cfgloopanal.o \
  1023. cfgloopmanip.o \
  1024. cfgrtl.o \
  1025. symtab.o \
  1026. cgraph.o \
  1027. cgraphbuild.o \
  1028. cgraphunit.o \
  1029. cgraphclones.o \
  1030. cilk-common.o \
  1031. combine.o \
  1032. combine-stack-adj.o \
  1033. compare-elim.o \
  1034. context.o \
  1035. convert.o \
  1036. coverage.o \
  1037. cppbuiltin.o \
  1038. cppdefault.o \
  1039. cprop.o \
  1040. cse.o \
  1041. cselib.o \
  1042. data-streamer.o \
  1043. data-streamer-in.o \
  1044. data-streamer-out.o \
  1045. dbxout.o \
  1046. dbgcnt.o \
  1047. dce.o \
  1048. ddg.o \
  1049. debug.o \
  1050. df-core.o \
  1051. df-problems.o \
  1052. df-scan.o \
  1053. dfp.o \
  1054. dojump.o \
  1055. dominance.o \
  1056. domwalk.o \
  1057. double-int.o \
  1058. dse.o \
  1059. dumpfile.o \
  1060. dwarf2asm.o \
  1061. dwarf2cfi.o \
  1062. dwarf2out.o \
  1063. emit-rtl.o \
  1064. et-forest.o \
  1065. except.o \
  1066. explow.o \
  1067. expmed.o \
  1068. expr.o \
  1069. final.o \
  1070. fixed-value.o \
  1071. fold-const.o \
  1072. function.o \
  1073. fwprop.o \
  1074. gcse.o \
  1075. gcse-common.o \
  1076. ggc-common.o \
  1077. gimple.o \
  1078. gimple-builder.o \
  1079. gimple-expr.o \
  1080. gimple-iterator.o \
  1081. gimple-fold.o \
  1082. gimple-low.o \
  1083. gimple-match.o \
  1084. generic-match.o \
  1085. gimple-pretty-print.o \
  1086. gimple-ssa-isolate-paths.o \
  1087. gimple-ssa-strength-reduction.o \
  1088. gimple-streamer-in.o \
  1089. gimple-streamer-out.o \
  1090. gimple-walk.o \
  1091. gimplify.o \
  1092. gimplify-me.o \
  1093. godump.o \
  1094. graph.o \
  1095. graphds.o \
  1096. graphite.o \
  1097. graphite-blocking.o \
  1098. graphite-isl-ast-to-gimple.o \
  1099. graphite-dependences.o \
  1100. graphite-interchange.o \
  1101. graphite-optimize-isl.o \
  1102. graphite-poly.o \
  1103. graphite-scop-detection.o \
  1104. graphite-sese-to-poly.o \
  1105. gtype-desc.o \
  1106. haifa-sched.o \
  1107. hw-doloop.o \
  1108. hwint.o \
  1109. ifcvt.o \
  1110. ree.o \
  1111. inchash.o \
  1112. incpath.o \
  1113. init-regs.o \
  1114. internal-fn.o \
  1115. ipa-chkp.o \
  1116. ipa-cp.o \
  1117. ipa-devirt.o \
  1118. ipa-polymorphic-call.o \
  1119. ipa-split.o \
  1120. ipa-inline.o \
  1121. ipa-comdats.o \
  1122. ipa-visibility.o \
  1123. ipa-inline-analysis.o \
  1124. ipa-inline-transform.o \
  1125. ipa-profile.o \
  1126. ipa-prop.o \
  1127. ipa-pure-const.o \
  1128. ipa-icf.o \
  1129. ipa-icf-gimple.o \
  1130. ipa-reference.o \
  1131. ipa-ref.o \
  1132. ipa-utils.o \
  1133. ipa.o \
  1134. ira.o \
  1135. ira-build.o \
  1136. ira-costs.o \
  1137. ira-conflicts.o \
  1138. ira-color.o \
  1139. ira-emit.o \
  1140. ira-lives.o \
  1141. jump.o \
  1142. langhooks.o \
  1143. lcm.o \
  1144. lists.o \
  1145. loop-doloop.o \
  1146. loop-init.o \
  1147. loop-invariant.o \
  1148. loop-iv.o \
  1149. loop-unroll.o \
  1150. lower-subreg.o \
  1151. lra.o \
  1152. lra-assigns.o \
  1153. lra-coalesce.o \
  1154. lra-constraints.o \
  1155. lra-eliminations.o \
  1156. lra-lives.o \
  1157. lra-remat.o \
  1158. lra-spills.o \
  1159. lto-cgraph.o \
  1160. lto-streamer.o \
  1161. lto-streamer-in.o \
  1162. lto-streamer-out.o \
  1163. lto-section-in.o \
  1164. lto-section-out.o \
  1165. lto-opts.o \
  1166. lto-compress.o \
  1167. mcf.o \
  1168. mode-switching.o \
  1169. modulo-sched.o \
  1170. omega.o \
  1171. omp-low.o \
  1172. optabs.o \
  1173. options-save.o \
  1174. opts-global.o \
  1175. passes.o \
  1176. plugin.o \
  1177. postreload-gcse.o \
  1178. postreload.o \
  1179. predict.o \
  1180. print-rtl.o \
  1181. print-tree.o \
  1182. profile.o \
  1183. real.o \
  1184. realmpfr.o \
  1185. recog.o \
  1186. reg-stack.o \
  1187. regcprop.o \
  1188. reginfo.o \
  1189. regrename.o \
  1190. regstat.o \
  1191. reload.o \
  1192. reload1.o \
  1193. reorg.o \
  1194. resource.o \
  1195. rtl-chkp.o \
  1196. rtl-error.o \
  1197. rtl.o \
  1198. rtlhash.o \
  1199. rtlanal.o \
  1200. rtlhooks.o \
  1201. sbitmap.o \
  1202. sched-deps.o \
  1203. sched-ebb.o \
  1204. sched-rgn.o \
  1205. sched-vis.o \
  1206. sdbout.o \
  1207. sel-sched-ir.o \
  1208. sel-sched-dump.o \
  1209. sel-sched.o \
  1210. sese.o \
  1211. shrink-wrap.o \
  1212. simplify-rtx.o \
  1213. sparseset.o \
  1214. sreal.o \
  1215. stack-ptr-mod.o \
  1216. statistics.o \
  1217. stmt.o \
  1218. stor-layout.o \
  1219. store-motion.o \
  1220. streamer-hooks.o \
  1221. stringpool.o \
  1222. target-globals.o \
  1223. targhooks.o \
  1224. timevar.o \
  1225. toplev.o \
  1226. tracer.o \
  1227. trans-mem.o \
  1228. tree-affine.o \
  1229. asan.o \
  1230. tsan.o \
  1231. ubsan.o \
  1232. sanopt.o \
  1233. tree-call-cdce.o \
  1234. tree-cfg.o \
  1235. tree-cfgcleanup.o \
  1236. tree-chrec.o \
  1237. tree-complex.o \
  1238. tree-data-ref.o \
  1239. tree-dfa.o \
  1240. tree-diagnostic.o \
  1241. tree-dump.o \
  1242. tree-eh.o \
  1243. tree-emutls.o \
  1244. tree-if-conv.o \
  1245. tree-inline.o \
  1246. tree-into-ssa.o \
  1247. tree-iterator.o \
  1248. tree-loop-distribution.o \
  1249. tree-nested.o \
  1250. tree-nrv.o \
  1251. tree-object-size.o \
  1252. tree-outof-ssa.o \
  1253. tree-parloops.o \
  1254. tree-phinodes.o \
  1255. tree-chkp.o \
  1256. tree-chkp-opt.o \
  1257. tree-predcom.o \
  1258. tree-pretty-print.o \
  1259. tree-profile.o \
  1260. tree-scalar-evolution.o \
  1261. tree-sra.o \
  1262. tree-switch-conversion.o \
  1263. tree-ssa-address.o \
  1264. tree-ssa-alias.o \
  1265. tree-ssa-ccp.o \
  1266. tree-ssa-coalesce.o \
  1267. tree-ssa-copy.o \
  1268. tree-ssa-copyrename.o \
  1269. tree-ssa-dce.o \
  1270. tree-ssa-dom.o \
  1271. tree-ssa-dse.o \
  1272. tree-ssa-forwprop.o \
  1273. tree-ssa-ifcombine.o \
  1274. tree-ssa-live.o \
  1275. tree-ssa-loop-ch.o \
  1276. tree-ssa-loop-im.o \
  1277. tree-ssa-loop-ivcanon.o \
  1278. tree-ssa-loop-ivopts.o \
  1279. tree-ssa-loop-manip.o \
  1280. tree-ssa-loop-niter.o \
  1281. tree-ssa-loop-prefetch.o \
  1282. tree-ssa-loop-unswitch.o \
  1283. tree-ssa-loop.o \
  1284. tree-ssa-math-opts.o \
  1285. tree-ssa-operands.o \
  1286. tree-ssa-phiopt.o \
  1287. tree-ssa-phiprop.o \
  1288. tree-ssa-pre.o \
  1289. tree-ssa-propagate.o \
  1290. tree-ssa-reassoc.o \
  1291. tree-ssa-sccvn.o \
  1292. tree-ssa-sink.o \
  1293. tree-ssa-strlen.o \
  1294. tree-ssa-structalias.o \
  1295. tree-ssa-tail-merge.o \
  1296. tree-ssa-ter.o \
  1297. tree-ssa-threadedge.o \
  1298. tree-ssa-threadupdate.o \
  1299. tree-ssa-uncprop.o \
  1300. tree-ssa-uninit.o \
  1301. tree-ssa.o \
  1302. tree-ssanames.o \
  1303. tree-stdarg.o \
  1304. tree-streamer.o \
  1305. tree-streamer-in.o \
  1306. tree-streamer-out.o \
  1307. tree-tailcall.o \
  1308. tree-vect-generic.o \
  1309. tree-vect-patterns.o \
  1310. tree-vect-data-refs.o \
  1311. tree-vect-stmts.o \
  1312. tree-vect-loop.o \
  1313. tree-vect-loop-manip.o \
  1314. tree-vect-slp.o \
  1315. tree-vectorizer.o \
  1316. tree-vrp.o \
  1317. tree.o \
  1318. valtrack.o \
  1319. value-prof.o \
  1320. var-tracking.o \
  1321. varasm.o \
  1322. varpool.o \
  1323. vmsdbgout.o \
  1324. vtable-verify.o \
  1325. web.o \
  1326. wide-int.o \
  1327. wide-int-print.o \
  1328. xcoffout.o \
  1329. $(out_object_file) \
  1330. $(EXTRA_OBJS) \
  1331. $(host_hook_obj)
  1332. # Objects in libcommon.a, potentially used by all host binaries and with
  1333. # no target dependencies.
  1334. OBJS-libcommon = diagnostic.o diagnostic-color.o pretty-print.o intl.o \
  1335. vec.o input.o version.o
  1336. # Objects in libcommon-target.a, used by drivers and by the core
  1337. # compiler and containing target-dependent code.
  1338. OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
  1339. opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
  1340. hash-table.o file-find.o
  1341. # This lists all host objects for the front ends.
  1342. ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
  1343. ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
  1344. $(OBJS-libcommon-target) main.o c-family/cppspec.o \
  1345. $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
  1346. $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \
  1347. lto-wrapper.o collect-utils.o
  1348. # This lists all host object files, whether they are included in this
  1349. # compilation or not.
  1350. ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS)
  1351. BACKEND = libbackend.a main.o libcommon-target.a libcommon.a \
  1352. $(CPPLIB) $(LIBDECNUMBER)
  1353. # This is defined to "yes" if Tree checking is enabled, which roughly means
  1354. # front-end checking.
  1355. TREECHECKING =
  1356. # The full name of the driver on installation
  1357. FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext)
  1358. MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  1359. insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  1360. insn-attr.h insn-attr-common.h insn-attrtab.c insn-dfatab.c \
  1361. insn-latencytab.c insn-opinit.c insn-opinit.h insn-preds.c insn-constants.h \
  1362. tm-preds.h tm-constrs.h checksum-options gimple-match.c generic-match.c \
  1363. tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \
  1364. genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
  1365. xgcc$(exeext) cpp$(exeext) $(FULL_DRIVER_NAME) \
  1366. $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
  1367. $(SPECS) collect2$(exeext) gcc-ar$(exeext) gcc-nm$(exeext) \
  1368. gcc-ranlib$(exeext) \
  1369. gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  1370. gcov-tool$(exeect) \
  1371. gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
  1372. libcommon-target.a libcommon.a libgcc.mk
  1373. # This symlink makes the full installation name of the driver be available
  1374. # from within the *build* directory, for use when running the JIT library
  1375. # from there (e.g. when running its testsuite).
  1376. $(FULL_DRIVER_NAME): ./xgcc
  1377. rm -f $@
  1378. $(LN_S) $< $@
  1379. #
  1380. # Language makefile fragments.
  1381. # The following targets define the interface between us and the languages.
  1382. #
  1383. # all.cross, start.encap, rest.encap,
  1384. # install-common, install-info, install-man,
  1385. # uninstall,
  1386. # mostlyclean, clean, distclean, maintainer-clean,
  1387. #
  1388. # Each language is linked in with a series of hooks. The name of each
  1389. # hooked is "lang.${target_name}" (eg: lang.info). Configure computes
  1390. # and adds these here. We use double-colon rules for some of the hooks;
  1391. # double-colon rules should be preferred for any new hooks.
  1392. # language hooks, generated by configure
  1393. lang.all.cross: c.all.cross
  1394. lang.start.encap: c.start.encap
  1395. lang.rest.encap: c.rest.encap
  1396. lang.tags: c.tags
  1397. lang.install-common: c.install-common
  1398. lang.install-man: c.install-man
  1399. lang.install-info: c.install-info
  1400. lang.install-pdf: c.install-pdf
  1401. lang.install-html: c.install-html
  1402. lang.dvi: c.dvi
  1403. lang.pdf: c.pdf
  1404. lang.html: c.html
  1405. lang.uninstall: c.uninstall
  1406. lang.info: c.info
  1407. lang.man: c.man
  1408. lang.srcextra: c.srcextra
  1409. lang.srcman: c.srcman
  1410. lang.srcinfo: c.srcinfo
  1411. lang.mostlyclean: c.mostlyclean
  1412. lang.clean: c.clean
  1413. lang.distclean: c.distclean
  1414. lang.maintainer-clean: c.maintainer-clean
  1415. lang.install-plugin: c.install-plugin
  1416. # per-language makefile fragments
  1417. ifneq ($(LANG_MAKEFRAGS),)
  1418. include $(LANG_MAKEFRAGS)
  1419. endif
  1420. # target and host overrides must follow the per-language makefile fragments
  1421. # so they can override or augment language-specific variables
  1422. # target overrides
  1423. ifneq ($(tmake_file),)
  1424. include $(tmake_file)
  1425. endif
  1426. # host overrides
  1427. ifneq ($(xmake_file),)
  1428. include $(xmake_file)
  1429. endif
  1430. # all-tree.def includes all the tree.def files.
  1431. all-tree.def: s-alltree; @true
  1432. s-alltree: Makefile
  1433. rm -f tmp-all-tree.def
  1434. echo '#include "tree.def"' > tmp-all-tree.def
  1435. echo 'END_OF_BASE_TREE_CODES' >> tmp-all-tree.def
  1436. echo '#include "c-family/c-common.def"' >> tmp-all-tree.def
  1437. ltf="$(lang_tree_files)"; for f in $$ltf; do \
  1438. echo "#include \"$$f\""; \
  1439. done | sed 's|$(srcdir)/||' >> tmp-all-tree.def
  1440. $(SHELL) $(srcdir)/../move-if-change tmp-all-tree.def all-tree.def
  1441. $(STAMP) s-alltree
  1442. # Now that LANG_MAKEFRAGS are included, we can add special flags to the
  1443. # objects that belong to the front ends. We add an extra define that
  1444. # causes back-end specific include files to be poisoned, in the hope that
  1445. # we can avoid introducing dependencies of the front ends on things that
  1446. # no front end should ever look at (e.g. everything RTL related).
  1447. $(foreach file,$(ALL_HOST_FRONTEND_OBJS),$(eval CFLAGS-$(file) += -DIN_GCC_FRONTEND))
  1448. #
  1449. # -----------------------------
  1450. # Rebuilding this configuration
  1451. # -----------------------------
  1452. # On the use of stamps:
  1453. # Consider the example of tree-check.h. It is constructed with build/gencheck.
  1454. # A simple rule to build tree-check.h would be
  1455. # tree-check.h: build/gencheck$(build_exeext)
  1456. # $(RUN_GEN) build/gencheck$(build_exeext) > tree-check.h
  1457. #
  1458. # but tree-check.h doesn't change every time gencheck changes. It would the
  1459. # nice if targets that depend on tree-check.h wouldn't be rebuild
  1460. # unnecessarily when tree-check.h is unchanged. To make this, tree-check.h
  1461. # must not be overwritten with a identical copy. One solution is to use a
  1462. # temporary file
  1463. # tree-check.h: build/gencheck$(build_exeext)
  1464. # $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
  1465. # $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
  1466. #
  1467. # This solution has a different problem. Since the time stamp of tree-check.h
  1468. # is unchanged, make will try to update tree-check.h every time it runs.
  1469. # To prevent this, one can add a stamp
  1470. # tree-check.h: s-check
  1471. # s-check : build/gencheck$(build_exeext)
  1472. # $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
  1473. # $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
  1474. # $(STAMP) s-check
  1475. #
  1476. # The problem with this solution is that make thinks that tree-check.h is
  1477. # always unchanged. Make must be deceived into thinking that tree-check.h is
  1478. # rebuild by the "tree-check.h: s-check" rule. To do this, add a dummy command:
  1479. # tree-check.h: s-check; @true
  1480. # s-check : build/gencheck$(build_exeext)
  1481. # $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
  1482. # $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
  1483. # $(STAMP) s-check
  1484. #
  1485. # This is what is done in this makefile. Note that mkconfig.sh has a
  1486. # move-if-change built-in
  1487. Makefile: config.status $(srcdir)/Makefile.in $(LANG_MAKEFRAGS)
  1488. LANGUAGES="$(CONFIG_LANGUAGES)" \
  1489. CONFIG_HEADERS= \
  1490. CONFIG_SHELL="$(SHELL)" \
  1491. CONFIG_FILES=$@ $(SHELL) config.status
  1492. config.h: cs-config.h ; @true
  1493. bconfig.h: cs-bconfig.h ; @true
  1494. tconfig.h: cs-tconfig.h ; @true
  1495. tm.h: cs-tm.h ; @true
  1496. tm_p.h: cs-tm_p.h ; @true
  1497. cs-config.h: Makefile
  1498. TARGET_CPU_DEFAULT="" \
  1499. HEADERS="$(host_xm_include_list)" DEFINES="$(host_xm_defines)" \
  1500. $(SHELL) $(srcdir)/mkconfig.sh config.h
  1501. cs-bconfig.h: Makefile
  1502. TARGET_CPU_DEFAULT="" \
  1503. HEADERS="$(build_xm_include_list)" DEFINES="$(build_xm_defines)" \
  1504. $(SHELL) $(srcdir)/mkconfig.sh bconfig.h
  1505. cs-tconfig.h: Makefile
  1506. TARGET_CPU_DEFAULT="" \
  1507. HEADERS="$(xm_include_list)" DEFINES="USED_FOR_TARGET $(xm_defines)" \
  1508. $(SHELL) $(srcdir)/mkconfig.sh tconfig.h
  1509. cs-tm.h: Makefile
  1510. TARGET_CPU_DEFAULT="$(target_cpu_default)" \
  1511. HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \
  1512. $(SHELL) $(srcdir)/mkconfig.sh tm.h
  1513. cs-tm_p.h: Makefile
  1514. TARGET_CPU_DEFAULT="" \
  1515. HEADERS="$(tm_p_include_list)" DEFINES="" \
  1516. $(SHELL) $(srcdir)/mkconfig.sh tm_p.h
  1517. # Don't automatically run autoconf, since configure.ac might be accidentally
  1518. # newer than configure. Also, this writes into the source directory which
  1519. # might be on a read-only file system. If configured for maintainer mode
  1520. # then do allow autoconf to be run.
  1521. AUTOCONF = autoconf
  1522. ACLOCAL = aclocal
  1523. ACLOCAL_AMFLAGS = -I ../config -I ..
  1524. aclocal_deps = \
  1525. $(srcdir)/../libtool.m4 \
  1526. $(srcdir)/../ltoptions.m4 \
  1527. $(srcdir)/../ltsugar.m4 \
  1528. $(srcdir)/../ltversion.m4 \
  1529. $(srcdir)/../lt~obsolete.m4 \
  1530. $(srcdir)/../config/acx.m4 \
  1531. $(srcdir)/../config/codeset.m4 \
  1532. $(srcdir)/../config/extensions.m4 \
  1533. $(srcdir)/../config/gettext-sister.m4 \
  1534. $(srcdir)/../config/gcc-plugin.m4 \
  1535. $(srcdir)/../config/iconv.m4 \
  1536. $(srcdir)/../config/lcmessage.m4 \
  1537. $(srcdir)/../config/lib-ld.m4 \
  1538. $(srcdir)/../config/lib-link.m4 \
  1539. $(srcdir)/../config/lib-prefix.m4 \
  1540. $(srcdir)/../config/override.m4 \
  1541. $(srcdir)/../config/progtest.m4 \
  1542. $(srcdir)/../config/stdint.m4 \
  1543. $(srcdir)/../config/unwind_ipinfo.m4 \
  1544. $(srcdir)/../config/warnings.m4 \
  1545. $(srcdir)/../config/dfp.m4 \
  1546. $(srcdir)/../config/mmap.m4 \
  1547. $(srcdir)/acinclude.m4
  1548. $(srcdir)/configure: # $(srcdir)/configure.ac $(srcdir)/aclocal.m4
  1549. (cd $(srcdir) && $(AUTOCONF))
  1550. $(srcdir)/aclocal.m4 : # $(aclocal_deps)
  1551. (cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS))
  1552. # cstamp-h.in controls rebuilding of config.in.
  1553. # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
  1554. # delete it. A stamp file is needed as autoheader won't update the file if
  1555. # nothing has changed.
  1556. # It remains in the source directory and is part of the distribution.
  1557. # This follows what is done in shellutils, fileutils, etc.
  1558. # "echo timestamp" is used instead of touch to be consistent with other
  1559. # packages that use autoconf (??? perhaps also to avoid problems with patch?).
  1560. # ??? Newer versions have a maintainer mode that may be useful here.
  1561. # Don't run autoheader automatically either.
  1562. # Only run it if maintainer mode is enabled.
  1563. # AUTOHEADER = autoheader
  1564. # $(srcdir)/config.in: $(srcdir)/cstamp-h.in
  1565. # $(srcdir)/cstamp-h.in: $(srcdir)/configure.ac
  1566. # (cd $(srcdir) && $(AUTOHEADER))
  1567. # @rm -f $(srcdir)/cstamp-h.in
  1568. # echo timestamp > $(srcdir)/cstamp-h.in
  1569. auto-host.h: cstamp-h ; @true
  1570. cstamp-h: config.in config.status
  1571. CONFIG_HEADERS=auto-host.h:config.in \
  1572. CONFIG_FILES= \
  1573. LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
  1574. # Really, really stupid make features, such as SUN's KEEP_STATE, may force
  1575. # a target to build even if it is up-to-date. So we must verify that
  1576. # config.status does not exist before failing.
  1577. config.status: $(srcdir)/configure $(srcdir)/config.gcc
  1578. @if [ ! -f config.status ] ; then \
  1579. echo You must configure gcc. Look at http://gcc.gnu.org/install/ for details.; \
  1580. false; \
  1581. else \
  1582. LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status --recheck; \
  1583. fi
  1584. # --------
  1585. # UNSORTED
  1586. # --------
  1587. # Provide quickstrap as a target that people can type into the gcc directory,
  1588. # and that fails if you're not into it.
  1589. quickstrap: all
  1590. cd $(toplevel_builddir) && $(MAKE) all-target-libgcc
  1591. all.internal: start.encap rest.encap doc
  1592. # This is what to compile if making a cross-compiler.
  1593. all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \
  1594. libgcc-support lang.all.cross doc # srcextra
  1595. # This is what must be made before installing GCC and converting libraries.
  1596. start.encap: native xgcc$(exeext) cpp$(exeext) specs \
  1597. libgcc-support lang.start.encap # srcextra
  1598. # These can't be made until after GCC can run.
  1599. rest.encap: lang.rest.encap
  1600. # This is what is made with the host's compiler
  1601. # whether making a cross compiler or not.
  1602. native: config.status auto-host.h build- $(LANGUAGES) \
  1603. $(EXTRA_PROGRAMS) $(COLLECT2) lto-wrapper$(exeext) \
  1604. gcc-ar$(exeext) gcc-nm$(exeext) gcc-ranlib$(exeext)
  1605. ifeq ($(enable_plugin),yes)
  1606. native: gengtype$(exeext)
  1607. endif
  1608. # On the target machine, finish building a cross compiler.
  1609. # This does the things that can't be done on the host machine.
  1610. rest.cross: specs
  1611. # Recompile all the language-independent object files.
  1612. # This is used only if the user explicitly asks for it.
  1613. compilations: $(BACKEND)
  1614. # This archive is strictly for the host.
  1615. libbackend.a: $(OBJS)
  1616. -rm -rf libbackend.a
  1617. $(AR) $(AR_FLAGS) libbackend.a $(OBJS)
  1618. -$(RANLIB) $(RANLIB_FLAGS) libbackend.a
  1619. libcommon-target.a: $(OBJS-libcommon-target)
  1620. -rm -rf libcommon-target.a
  1621. $(AR) $(AR_FLAGS) libcommon-target.a $(OBJS-libcommon-target)
  1622. -$(RANLIB) $(RANLIB_FLAGS) libcommon-target.a
  1623. libcommon.a: $(OBJS-libcommon)
  1624. -rm -rf libcommon.a
  1625. $(AR) $(AR_FLAGS) libcommon.a $(OBJS-libcommon)
  1626. -$(RANLIB) $(RANLIB_FLAGS) libcommon.a
  1627. # We call this executable `xgcc' rather than `gcc'
  1628. # to avoid confusion if the current directory is in the path
  1629. # and CC is `gcc'. It is renamed to `gcc' when it is installed.
  1630. xgcc$(exeext): $(GCC_OBJS) c/gccspec.o libcommon-target.a $(LIBDEPS) \
  1631. $(EXTRA_GCC_OBJS)
  1632. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \
  1633. c/gccspec.o $(EXTRA_GCC_OBJS) libcommon-target.a \
  1634. $(EXTRA_GCC_LIBS) $(LIBS)
  1635. # cpp is to cpp0 as e.g. g++ is to cc1plus: Just another driver.
  1636. # It is part of c-family because the handled extensions are hard-coded
  1637. # and only contain c-family extensions (see known_suffixes).
  1638. cpp$(exeext): $(GCC_OBJS) c-family/cppspec.o libcommon-target.a $(LIBDEPS) \
  1639. $(EXTRA_GCC_OBJS)
  1640. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) \
  1641. c-family/cppspec.o $(EXTRA_GCC_OBJS) libcommon-target.a \
  1642. $(EXTRA_GCC_LIBS) $(LIBS)
  1643. # Dump a specs file to make -B./ read these specs over installed ones.
  1644. $(SPECS): xgcc$(exeext)
  1645. $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
  1646. mv tmp-specs $(SPECS)
  1647. # We do want to create an executable named `xgcc', so we can use it to
  1648. # compile libgcc2.a.
  1649. # Also create gcc-cross, so that install-common will install properly.
  1650. gcc-cross$(exeext): xgcc$(exeext)
  1651. cp xgcc$(exeext) gcc-cross$(exeext)
  1652. checksum-options:
  1653. echo "$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS)" > checksum-options.tmp \
  1654. && $(srcdir)/../move-if-change checksum-options.tmp checksum-options
  1655. #
  1656. # Build libgcc.a.
  1657. libgcc-support: libgcc.mvars stmp-int-hdrs $(TCONFIG_H) \
  1658. $(MACHMODE_H) gcov-iov.h
  1659. libgcc.mvars: config.status Makefile specs xgcc$(exeext)
  1660. : > tmp-libgcc.mvars
  1661. echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars
  1662. echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars
  1663. echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars
  1664. mv tmp-libgcc.mvars libgcc.mvars
  1665. # Use the genmultilib shell script to generate the information the gcc
  1666. # driver program needs to select the library directory based on the
  1667. # switches.
  1668. multilib.h: s-mlib; @true
  1669. s-mlib: $(srcdir)/genmultilib Makefile
  1670. if test no = yes \
  1671. || test -n "$(MULTILIB_OSDIRNAMES)"; then \
  1672. $(SHELL) $(srcdir)/genmultilib \
  1673. "$(MULTILIB_OPTIONS)" \
  1674. "$(MULTILIB_DIRNAMES)" \
  1675. "$(MULTILIB_MATCHES)" \
  1676. "$(MULTILIB_EXCEPTIONS)" \
  1677. "$(MULTILIB_EXTRA_OPTS)" \
  1678. "$(MULTILIB_EXCLUSIONS)" \
  1679. "$(MULTILIB_OSDIRNAMES)" \
  1680. "$(MULTILIB_REQUIRED)" \
  1681. "$(if $(MULTILIB_OSDIRNAMES),,$(MULTIARCH_DIRNAME))" \
  1682. "$(MULTILIB_REUSE)" \
  1683. "no" \
  1684. > tmp-mlib.h; \
  1685. else \
  1686. $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' '' \
  1687. "$(MULTIARCH_DIRNAME)" '' no \
  1688. > tmp-mlib.h; \
  1689. fi
  1690. $(SHELL) $(srcdir)/../move-if-change tmp-mlib.h multilib.h
  1691. $(STAMP) s-mlib
  1692. #
  1693. # Compiling object files from source files.
  1694. # Note that dependencies on obstack.h are not written
  1695. # because that file is not part of GCC.
  1696. srcextra: gcc.srcextra lang.srcextra
  1697. gcc.srcextra: gengtype-lex.c
  1698. -cp -p $^ $(srcdir)
  1699. AR_OBJS = file-find.o
  1700. AR_LIBS =
  1701. gcc-ar$(exeext): gcc-ar.o $(AR_OBJS) $(LIBDEPS)
  1702. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) gcc-ar.o -o $@ \
  1703. $(AR_OBJS) $(LIBS) $(AR_LIBS)
  1704. gcc-nm$(exeext): gcc-nm.o $(AR_OBJS) $(LIBDEPS)
  1705. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) gcc-nm.o -o $@ \
  1706. $(AR_OBJS) $(LIBS) $(AR_LIBS)
  1707. gcc-ranlib$(exeext): gcc-ranlib.o $(AR_OBJS) $(LIBDEPS)
  1708. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) gcc-ranlib.o -o $@ \
  1709. $(AR_OBJS) $(LIBS) $(AR_LIBS)
  1710. CFLAGS-gcc-ar.o += $(DRIVER_DEFINES) \
  1711. -DTARGET_MACHINE=\"$(target_noncanonical)\" \
  1712. -DPERSONALITY=\"ar\"
  1713. CFLAGS-gcc-ranlib.o += $(DRIVER_DEFINES) \
  1714. -DTARGET_MACHINE=\"$(target_noncanonical)\" \
  1715. -DPERSONALITY=\"ranlib\"
  1716. CFLAGS-gcc-nm.o += $(DRIVER_DEFINES) \
  1717. -DTARGET_MACHINE=\"$(target_noncanonical)\" \
  1718. -DPERSONALITY=\"nm\"
  1719. # ??? the implicit rules dont trigger if the source file has a different name
  1720. # so copy instead
  1721. gcc-ranlib.c: gcc-ar.c
  1722. cp $^ $@
  1723. gcc-nm.c: gcc-ar.c
  1724. cp $^ $@
  1725. COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o vec.o ggc-none.o \
  1726. collect-utils.o file-find.o
  1727. COLLECT2_LIBS =
  1728. collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
  1729. # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  1730. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o T$@ \
  1731. $(COLLECT2_OBJS) $(LIBS) $(COLLECT2_LIBS)
  1732. mv -f T$@ $@
  1733. CFLAGS-collect2.o += -DTARGET_MACHINE=\"$(target_noncanonical)\" \
  1734. LTO_WRAPPER_OBJS = lto-wrapper.o collect-utils.o ggc-none.o
  1735. lto-wrapper$(exeext): $(LTO_WRAPPER_OBJS) libcommon-target.a $(LIBDEPS)
  1736. +$(LINKER) $(ALL_COMPILERFLAGS) $(LDFLAGS) -o T$@ \
  1737. $(LTO_WRAPPER_OBJS) libcommon-target.a $(LIBS)
  1738. mv -f T$@ $@
  1739. # Files used by all variants of C or by the stand-alone pre-processor.
  1740. CFLAGS-c-family/c-opts.o +=
  1741. CFLAGS-c-family/c-pch.o += -DHOST_MACHINE=\"$(host)\" \
  1742. -DTARGET_MACHINE=\"$(target)\"
  1743. default-c.o: config/default-c.c
  1744. $(COMPILE) $<
  1745. $(POSTCOMPILE)
  1746. # Files used by all variants of C and some other languages.
  1747. CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s)
  1748. prefix.o: $(BASEVER)
  1749. # Language-independent files.
  1750. DRIVER_DEFINES = \
  1751. -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
  1752. -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
  1753. -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
  1754. -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  1755. -DDEFAULT_REAL_TARGET_MACHINE=\"$(real_target_noncanonical)\" \
  1756. -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
  1757. -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
  1758. -DTOOLDIR_BASE_PREFIX=\"$(libsubdir_to_prefix)$(prefix_to_exec_prefix)\" \
  1759. -DACCEL_DIR_SUFFIX=\"$(accel_dir_suffix)\" \
  1760. \
  1761. $(VALGRIND_DRIVER_DEFINES) \
  1762. $(if $(SHLIB),$(if $(filter yes,yes),-DENABLE_SHARED_LIBGCC)) \
  1763. -DCONFIGURE_SPECS="\"\""
  1764. CFLAGS-gcc.o += $(DRIVER_DEFINES)
  1765. specs.h : s-specs ; @true
  1766. s-specs : Makefile
  1767. lsf="$(lang_specs_files)"; for f in $$lsf; do \
  1768. echo "#include \"$$f\""; \
  1769. done | sed 's|$(srcdir)/||' > tmp-specs.h
  1770. $(SHELL) $(srcdir)/../move-if-change tmp-specs.h specs.h
  1771. $(STAMP) s-specs
  1772. optionlist: s-options ; @true
  1773. s-options: $(ALL_OPT_FILES) Makefile $(srcdir)/opt-gather.awk
  1774. $(AWK) -f $(srcdir)/opt-gather.awk $(ALL_OPT_FILES) > tmp-optionlist
  1775. $(SHELL) $(srcdir)/../move-if-change tmp-optionlist optionlist
  1776. $(STAMP) s-options
  1777. options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opt-read.awk \
  1778. $(srcdir)/optc-gen.awk
  1779. $(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/opt-read.awk \
  1780. -f $(srcdir)/optc-gen.awk \
  1781. -v header_name="config.h system.h coretypes.h options.h tm.h" < $< > $@
  1782. options-save.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opt-read.awk \
  1783. $(srcdir)/optc-save-gen.awk
  1784. $(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/opt-read.awk \
  1785. -f $(srcdir)/optc-save-gen.awk \
  1786. -v header_name="config.h system.h coretypes.h tm.h" < $< > $@
  1787. options.h: s-options-h ; @true
  1788. s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opt-read.awk \
  1789. $(srcdir)/opth-gen.awk
  1790. $(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/opt-read.awk \
  1791. -f $(srcdir)/opth-gen.awk \
  1792. < $< > tmp-options.h
  1793. $(SHELL) $(srcdir)/../move-if-change tmp-options.h options.h
  1794. $(STAMP) $@
  1795. dumpvers: dumpvers.c
  1796. CFLAGS-version.o += -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
  1797. -DREVISION=$(REVISION_s) \
  1798. -DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
  1799. -DBUGURL=$(BUGURL_s)
  1800. version.o: $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
  1801. # lto-compress.o needs $(ZLIBINC) added to the include flags.
  1802. CFLAGS-lto-compress.o += $(ZLIBINC)
  1803. bversion.h: s-bversion; @true
  1804. s-bversion: BASE-VER
  1805. echo "#define BUILDING_GCC_MAJOR `echo $(BASEVER_c) | sed -e 's/^\([0-9]*\).*$$/\1/'`" > bversion.h
  1806. echo "#define BUILDING_GCC_MINOR `echo $(BASEVER_c) | sed -e 's/^[0-9]*\.\([0-9]*\).*$$/\1/'`" >> bversion.h
  1807. echo "#define BUILDING_GCC_PATCHLEVEL `echo $(BASEVER_c) | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$$/\1/'`" >> bversion.h
  1808. echo "#define BUILDING_GCC_VERSION (BUILDING_GCC_MAJOR * 1000 + BUILDING_GCC_MINOR)" >> bversion.h
  1809. $(STAMP) s-bversion
  1810. CFLAGS-toplev.o += -DTARGET_NAME=\"$(target_noncanonical)\"
  1811. pass-instances.def: $(srcdir)/passes.def $(srcdir)/gen-pass-instances.awk
  1812. $(AWK) -f $(srcdir)/gen-pass-instances.awk \
  1813. $(srcdir)/passes.def > pass-instances.def
  1814. $(out_object_file): $(out_file)
  1815. $(COMPILE) $<
  1816. $(POSTCOMPILE)
  1817. $(common_out_object_file): $(common_out_file)
  1818. $(COMPILE) $<
  1819. $(POSTCOMPILE)
  1820. #
  1821. # Generate header and source files from the machine description,
  1822. # and compile them.
  1823. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
  1824. insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  1825. insn-attr.h insn-attr-common.h insn-attrtab.c insn-dfatab.c \
  1826. insn-latencytab.c insn-preds.c gimple-match.c generic-match.c
  1827. # Dependencies for the md file. The first time through, we just assume
  1828. # the md file itself and the generated dependency file (in order to get
  1829. # it built). The second time through we have the dependency file.
  1830. -include mddeps.mk
  1831. MD_DEPS = s-mddeps $(md_file) $(MD_INCLUDES)
  1832. s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
  1833. $(RUN_GEN) build/genmddeps$(build_exeext) $(md_file) > tmp-mddeps
  1834. $(SHELL) $(srcdir)/../move-if-change tmp-mddeps mddeps.mk
  1835. $(STAMP) s-mddeps
  1836. # For each of the files generated by running a generator program over
  1837. # the machine description, the following static pattern rules run the
  1838. # generator program only if the machine description has changed,
  1839. # but touch the target file only when its contents actually change.
  1840. # The "; @true" construct forces Make to recheck the timestamp on
  1841. # the target file.
  1842. simple_rtl_generated_h = insn-attr.h insn-attr-common.h insn-codes.h \
  1843. insn-config.h insn-flags.h
  1844. simple_rtl_generated_c = insn-automata.c insn-emit.c \
  1845. insn-extract.c insn-output.c \
  1846. insn-peep.c insn-recog.c
  1847. simple_generated_h = $(simple_rtl_generated_h) insn-constants.h
  1848. simple_generated_c = $(simple_rtl_generated_c) insn-enums.c
  1849. $(simple_generated_h:insn-%.h=s-%) \
  1850. $(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
  1851. $(simple_rtl_generated_h:insn-%.h=s-%) \
  1852. $(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
  1853. $(simple_generated_h): insn-%.h: s-%; @true
  1854. $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
  1855. $(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
  1856. $(filter insn-conditions.md,$^) > tmp-$*.h
  1857. $(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
  1858. $(STAMP) s-$*
  1859. $(simple_generated_c): insn-%.c: s-%; @true
  1860. $(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
  1861. $(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
  1862. $(filter insn-conditions.md,$^) > tmp-$*.c
  1863. $(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
  1864. $(STAMP) s-$*
  1865. # gencheck doesn't read the machine description, and the file produced
  1866. # doesn't use the insn-* convention.
  1867. tree-check.h: s-check ; @true
  1868. s-check : build/gencheck$(build_exeext)
  1869. $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
  1870. $(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
  1871. $(STAMP) s-check
  1872. # genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
  1873. insn-attrtab.c insn-dfatab.c insn-latencytab.c: s-attrtab ; @true
  1874. s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
  1875. insn-conditions.md
  1876. $(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
  1877. -Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
  1878. $(SHELL) $(srcdir)/../move-if-change tmp-attrtab.c insn-attrtab.c
  1879. $(SHELL) $(srcdir)/../move-if-change tmp-dfatab.c insn-dfatab.c
  1880. $(SHELL) $(srcdir)/../move-if-change tmp-latencytab.c insn-latencytab.c
  1881. $(STAMP) s-attrtab
  1882. # genopinit produces two files.
  1883. insn-opinit.c insn-opinit.h: s-opinit ; @true
  1884. s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
  1885. $(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
  1886. insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
  1887. $(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
  1888. $(SHELL) $(srcdir)/../move-if-change tmp-opinit.c insn-opinit.c
  1889. $(STAMP) s-opinit
  1890. # gencondmd doesn't use the standard naming convention.
  1891. build/gencondmd.c: s-conditions; @true
  1892. s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
  1893. $(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
  1894. $(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.c
  1895. $(STAMP) s-conditions
  1896. insn-conditions.md: s-condmd; @true
  1897. s-condmd: build/gencondmd$(build_exeext)
  1898. $(RUN_GEN) build/gencondmd$(build_exeext) > tmp-cond.md
  1899. $(SHELL) $(srcdir)/../move-if-change tmp-cond.md insn-conditions.md
  1900. $(STAMP) s-condmd
  1901. # These files are generated by running the same generator more than
  1902. # once with different options, so they have custom rules. The
  1903. # stampfile idiom is the same.
  1904. genrtl.h: s-genrtl-h; @true
  1905. s-genrtl-h: build/gengenrtl$(build_exeext)
  1906. $(RUN_GEN) build/gengenrtl$(build_exeext) > tmp-genrtl.h
  1907. $(SHELL) $(srcdir)/../move-if-change tmp-genrtl.h genrtl.h
  1908. $(STAMP) s-genrtl-h
  1909. insn-modes.c: s-modes; @true
  1910. insn-modes.h: s-modes-h; @true
  1911. min-insn-modes.c: s-modes-m; @true
  1912. s-modes: build/genmodes$(build_exeext)
  1913. $(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
  1914. $(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.c
  1915. $(STAMP) s-modes
  1916. s-modes-h: build/genmodes$(build_exeext)
  1917. $(RUN_GEN) build/genmodes$(build_exeext) -h > tmp-modes.h
  1918. $(SHELL) $(srcdir)/../move-if-change tmp-modes.h insn-modes.h
  1919. $(STAMP) s-modes-h
  1920. s-modes-m: build/genmodes$(build_exeext)
  1921. $(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
  1922. $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
  1923. $(STAMP) s-modes-m
  1924. insn-preds.c: s-preds; @true
  1925. tm-preds.h: s-preds-h; @true
  1926. tm-constrs.h: s-constrs-h; @true
  1927. .PHONY: mddump
  1928. mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
  1929. $(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
  1930. s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
  1931. $(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
  1932. $(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.c
  1933. $(STAMP) s-preds
  1934. s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
  1935. $(RUN_GEN) build/genpreds$(build_exeext) -h $(md_file) > tmp-preds.h
  1936. $(SHELL) $(srcdir)/../move-if-change tmp-preds.h tm-preds.h
  1937. $(STAMP) s-preds-h
  1938. s-constrs-h: $(MD_DEPS) build/genpreds$(build_exeext)
  1939. $(RUN_GEN) build/genpreds$(build_exeext) -c $(md_file) > tmp-constrs.h
  1940. $(SHELL) $(srcdir)/../move-if-change tmp-constrs.h tm-constrs.h
  1941. $(STAMP) s-constrs-h
  1942. target-hooks-def.h: s-target-hooks-def-h; @true
  1943. # make sure that when we build info files, the used tm.texi is up to date.
  1944. $(srcdir)/doc/tm.texi: s-tm-texi; @true
  1945. s-target-hooks-def-h: build/genhooks$(build_exeext)
  1946. $(RUN_GEN) build/genhooks$(build_exeext) "Target Hook" \
  1947. > tmp-target-hooks-def.h
  1948. $(SHELL) $(srcdir)/../move-if-change tmp-target-hooks-def.h \
  1949. target-hooks-def.h
  1950. $(STAMP) s-target-hooks-def-h
  1951. c-family/c-target-hooks-def.h: s-c-target-hooks-def-h; @true
  1952. s-c-target-hooks-def-h: build/genhooks$(build_exeext)
  1953. $(RUN_GEN) build/genhooks$(build_exeext) "C Target Hook" \
  1954. > tmp-c-target-hooks-def.h
  1955. $(SHELL) $(srcdir)/../move-if-change tmp-c-target-hooks-def.h \
  1956. c-family/c-target-hooks-def.h
  1957. $(STAMP) s-c-target-hooks-def-h
  1958. common/common-target-hooks-def.h: s-common-target-hooks-def-h; @true
  1959. s-common-target-hooks-def-h: build/genhooks$(build_exeext)
  1960. $(RUN_GEN) build/genhooks$(build_exeext) "Common Target Hook" \
  1961. > tmp-common-target-hooks-def.h
  1962. $(SHELL) $(srcdir)/../move-if-change tmp-common-target-hooks-def.h \
  1963. common/common-target-hooks-def.h
  1964. $(STAMP) s-common-target-hooks-def-h
  1965. # check if someone mistakenly only changed tm.texi.
  1966. # We use a different pathname here to avoid a circular dependency.
  1967. s-tm-texi: $(srcdir)/doc/../doc/tm.texi
  1968. # The tm.texi we want to compare against / check into svn should have
  1969. # unix-style line endings. To make this work on MinGW, remove \r.
  1970. # \r is not portable to Solaris tr, therefore we have a special
  1971. # case for ASCII. We use \r for other encodings like EBCDIC.
  1972. s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in
  1973. $(RUN_GEN) build/genhooks$(build_exeext) -d \
  1974. $(srcdir)/doc/tm.texi.in > tmp-tm.texi
  1975. case `echo X|tr X '\101'` in \
  1976. A) tr -d '\015' < tmp-tm.texi > tmp2-tm.texi ;; \
  1977. *) tr -d '\r' < tmp-tm.texi > tmp2-tm.texi ;; \
  1978. esac
  1979. mv tmp2-tm.texi tmp-tm.texi
  1980. $(SHELL) $(srcdir)/../move-if-change tmp-tm.texi tm.texi
  1981. @if cmp -s $(srcdir)/doc/tm.texi tm.texi; then \
  1982. $(STAMP) $@; \
  1983. elif test $(srcdir)/doc/tm.texi -nt $(srcdir)/doc/tm.texi.in \
  1984. && ( test $(srcdir)/doc/tm.texi -nt $(srcdir)/target.def \
  1985. || test $(srcdir)/doc/tm.texi -nt $(srcdir)/c-family/c-target.def \
  1986. || test $(srcdir)/doc/tm.texi -nt $(srcdir)/common/common-target.def \
  1987. ); then \
  1988. echo >&2 ; \
  1989. echo You should edit $(srcdir)/doc/tm.texi.in rather than $(srcdir)/doc/tm.texi . >&2 ; \
  1990. false; \
  1991. else \
  1992. echo >&2 ; \
  1993. echo Verify that you have permission to grant a GFDL license for all >&2 ; \
  1994. echo new text in tm.texi, then copy it to $(srcdir)/doc/tm.texi. >&2 ; \
  1995. false; \
  1996. fi
  1997. gimple-match.c: s-match gimple-match-head.c ; @true
  1998. generic-match.c: s-match generic-match-head.c ; @true
  1999. s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd
  2000. $(RUN_GEN) build/genmatch$(build_exeext) --gimple $(srcdir)/match.pd \
  2001. > tmp-gimple-match.c
  2002. $(RUN_GEN) build/genmatch$(build_exeext) --generic $(srcdir)/match.pd \
  2003. > tmp-generic-match.c
  2004. $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match.c \
  2005. gimple-match.c
  2006. $(SHELL) $(srcdir)/../move-if-change tmp-generic-match.c \
  2007. generic-match.c
  2008. $(STAMP) s-match
  2009. GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
  2010. $(host_xm_file_list) \
  2011. $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
  2012. $(srcdir)/wide-int.h $(srcdir)/alias.h $(srcdir)/coverage.c $(srcdir)/rtl.h \
  2013. $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/tree-core.h \
  2014. $(srcdir)/libfuncs.h $(SYMTAB_H) \
  2015. $(srcdir)/real.h $(srcdir)/function.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
  2016. $(srcdir)/fixed-value.h \
  2017. $(srcdir)/output.h $(srcdir)/cfgloop.h $(srcdir)/cfg.h \
  2018. $(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/ipa-ref.h $(srcdir)/cgraph.h \
  2019. $(srcdir)/reload.h $(srcdir)/caller-save.c $(srcdir)/symtab.c \
  2020. $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
  2021. $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-utils.h \
  2022. $(srcdir)/dbxout.c \
  2023. $(srcdir)/signop.h \
  2024. $(srcdir)/dwarf2out.h \
  2025. $(srcdir)/dwarf2asm.c \
  2026. $(srcdir)/dwarf2cfi.c \
  2027. $(srcdir)/dwarf2out.c \
  2028. $(srcdir)/tree-vect-generic.c \
  2029. $(srcdir)/dojump.c \
  2030. $(srcdir)/emit-rtl.c $(srcdir)/except.h $(srcdir)/explow.c $(srcdir)/expr.c \
  2031. $(srcdir)/expr.h \
  2032. $(srcdir)/function.c $(srcdir)/except.c \
  2033. $(srcdir)/gcse.c $(srcdir)/godump.c \
  2034. $(srcdir)/lists.c $(srcdir)/optabs.c \
  2035. $(srcdir)/profile.c $(srcdir)/mcf.c \
  2036. $(srcdir)/reg-stack.c $(srcdir)/cfgrtl.c \
  2037. $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
  2038. $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
  2039. $(srcdir)/gimple.h \
  2040. $(srcdir)/gimple-ssa.h \
  2041. $(srcdir)/tree-chkp.c \
  2042. $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
  2043. $(srcdir)/tree-cfg.c \
  2044. $(srcdir)/tree-dfa.c \
  2045. $(srcdir)/tree-iterator.c $(srcdir)/gimple-expr.c \
  2046. $(srcdir)/tree-chrec.h \
  2047. $(srcdir)/tree-scalar-evolution.c \
  2048. $(srcdir)/tree-ssa-operands.h \
  2049. $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
  2050. $(srcdir)/omp-low.c \
  2051. $(srcdir)/omp-low.h \
  2052. $(srcdir)/targhooks.c $(out_file) $(srcdir)/passes.c $(srcdir)/cgraphunit.c \
  2053. $(srcdir)/cgraphclones.c \
  2054. $(srcdir)/tree-phinodes.c \
  2055. $(srcdir)/tree-ssa-alias.h \
  2056. $(srcdir)/tree-ssanames.h \
  2057. $(srcdir)/ipa-prop.h \
  2058. $(srcdir)/trans-mem.c \
  2059. $(srcdir)/lto-streamer.h \
  2060. $(srcdir)/target-globals.h \
  2061. $(srcdir)/ipa-inline.h \
  2062. $(srcdir)/vtable-verify.c \
  2063. $(srcdir)/asan.c \
  2064. $(srcdir)/ubsan.c \
  2065. $(srcdir)/tsan.c \
  2066. $(srcdir)/sanopt.c \
  2067. $(srcdir)/ipa-devirt.c \
  2068. $(srcdir)/internal-fn.h \
  2069. [ada] $(srcdir)/ada/gcc-interface/ada-tree.h $(srcdir)/ada/gcc-interface/gigi.h $(srcdir)/ada/gcc-interface/decl.c $(srcdir)/ada/gcc-interface/trans.c $(srcdir)/ada/gcc-interface/utils.c $(srcdir)/ada/gcc-interface/misc.c [c] $(srcdir)/c/c-lang.c $(srcdir)/c/c-tree.h $(srcdir)/c/c-decl.c $(srcdir)/c-family/c-common.c $(srcdir)/c-family/c-common.h $(srcdir)/c-family/c-objc.h $(srcdir)/c-family/c-cppbuiltin.c $(srcdir)/c-family/c-pragma.h $(srcdir)/c-family/c-pragma.c $(srcdir)/c/c-objc-common.c $(srcdir)/c/c-parser.c $(srcdir)/c/c-lang.h [cp] $(srcdir)/cp/rtti.c $(srcdir)/cp/mangle.c $(srcdir)/cp/name-lookup.h $(srcdir)/cp/name-lookup.c $(srcdir)/cp/cp-tree.h $(srcdir)/cp/decl.h $(srcdir)/cp/call.c $(srcdir)/cp/decl.c $(srcdir)/cp/decl2.c $(srcdir)/cp/pt.c $(srcdir)/cp/repo.c $(srcdir)/cp/semantics.c $(srcdir)/cp/tree.c $(srcdir)/cp/parser.h $(srcdir)/cp/parser.c $(srcdir)/cp/method.c $(srcdir)/cp/typeck2.c $(srcdir)/c-family/c-common.c $(srcdir)/c-family/c-common.h $(srcdir)/c-family/c-objc.h $(srcdir)/c-family/c-lex.c $(srcdir)/c-family/c-pragma.h $(srcdir)/c-family/c-pragma.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-objcp-common.c $(srcdir)/cp/cp-lang.c $(srcdir)/cp/except.c $(srcdir)/cp/vtable-class-hierarchy.c $(srcdir)/cp/constexpr.c [fortran] $(srcdir)/fortran/f95-lang.c $(srcdir)/fortran/trans-decl.c $(srcdir)/fortran/trans-intrinsic.c $(srcdir)/fortran/trans-io.c $(srcdir)/fortran/trans-stmt.c $(srcdir)/fortran/trans-types.c $(srcdir)/fortran/trans-types.h $(srcdir)/fortran/trans.h $(srcdir)/fortran/trans-const.h [go] $(srcdir)/go/go-lang.c $(srcdir)/go/go-c.h [java] $(srcdir)/java/java-tree.h $(srcdir)/java/jcf.h $(srcdir)/java/parse.h $(srcdir)/java/builtins.c $(srcdir)/java/class.c $(srcdir)/java/constants.c $(srcdir)/java/decl.c $(srcdir)/java/expr.c $(srcdir)/java/jcf-parse.c $(srcdir)/java/lang.c $(srcdir)/java/mangle.c $(srcdir)/java/resource.c [jit] $(srcdir)/jit/dummy-frontend.c [lto] $(srcdir)/lto/lto-tree.h $(srcdir)/lto/lto-lang.c $(srcdir)/lto/lto.c $(srcdir)/lto/lto.h [objc] $(srcdir)/objc/objc-map.h $(srcdir)/c-family/c-objc.h $(srcdir)/objc/objc-act.h $(srcdir)/objc/objc-act.c $(srcdir)/objc/objc-runtime-shared-support.c $(srcdir)/objc/objc-gnu-runtime-abi-01.c $(srcdir)/objc/objc-next-runtime-abi-01.c $(srcdir)/objc/objc-next-runtime-abi-02.c $(srcdir)/c/c-parser.c $(srcdir)/c/c-tree.h $(srcdir)/c/c-decl.c $(srcdir)/c/c-lang.h $(srcdir)/c/c-objc-common.c $(srcdir)/c-family/c-common.c $(srcdir)/c-family/c-common.h $(srcdir)/c-family/c-cppbuiltin.c $(srcdir)/c-family/c-pragma.h $(srcdir)/c-family/c-pragma.c [objcp] $(srcdir)/cp/rtti.c $(srcdir)/cp/mangle.c $(srcdir)/cp/name-lookup.h $(srcdir)/cp/name-lookup.c $(srcdir)/cp/cp-tree.h $(srcdir)/cp/decl.h $(srcdir)/cp/call.c $(srcdir)/cp/decl.c $(srcdir)/cp/decl2.c $(srcdir)/cp/pt.c $(srcdir)/cp/repo.c $(srcdir)/cp/semantics.c $(srcdir)/cp/tree.c $(srcdir)/cp/parser.h $(srcdir)/cp/parser.c $(srcdir)/cp/method.c $(srcdir)/cp/typeck2.c $(srcdir)/c-family/c-common.c $(srcdir)/c-family/c-common.h $(srcdir)/c-family/c-objc.h $(srcdir)/c-family/c-lex.c $(srcdir)/c-family/c-pragma.h $(srcdir)/c-family/c-pragma.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-objcp-common.c $(srcdir)/cp/except.c $(srcdir)/cp/vtable-class-hierarchy.c $(srcdir)/cp/constexpr.c $(srcdir)/objc/objc-map.h $(srcdir)/objc/objc-act.h $(srcdir)/objc/objc-act.c $(srcdir)/objc/objc-runtime-shared-support.c $(srcdir)/objc/objc-gnu-runtime-abi-01.c $(srcdir)/objc/objc-next-runtime-abi-01.c $(srcdir)/objc/objc-next-runtime-abi-02.c $(srcdir)/c-family/c-cppbuiltin.c
  2070. # Compute the list of GT header files from the corresponding C sources,
  2071. # possibly nested within config or language subdirectories. Match gengtype's
  2072. # behavior in this respect: gt-LANG-file.h for "file" anywhere within a LANG
  2073. # language subdir, gt-file.h otherwise (no subdir indication for config/
  2074. # related sources).
  2075. GTFILES_H = $(subst /,-, \
  2076. $(shell echo $(patsubst $(srcdir)/%,gt-%, \
  2077. $(patsubst %.c,%.h, \
  2078. $(filter %.c, $(GTFILES)))) \
  2079. | sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
  2080. GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
  2081. ALL_GTFILES_H := $(sort $(GTFILES_H) $(GTFILES_LANG_H))
  2082. # $(GTFILES) may be too long to put on a command line, so we have to
  2083. # write it out to a file (taking care not to do that in a way that
  2084. # overflows a command line!) and then have gengtype read the file in.
  2085. $(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gtype.state: s-gtype ; @true
  2086. ### Common flags to gengtype [e.g. -v or -B backupdir]
  2087. GENGTYPE_FLAGS=
  2088. gtyp-input.list: s-gtyp-input ; @true
  2089. s-gtyp-input: Makefile
  2090. @: $(call write_entries_to_file,$(GTFILES),tmp-gi.list)
  2091. $(SHELL) $(srcdir)/../move-if-change tmp-gi.list gtyp-input.list
  2092. $(STAMP) s-gtyp-input
  2093. s-gtype: build/gengtype$(build_exeext) $(filter-out [%], $(GTFILES)) \
  2094. gtyp-input.list
  2095. # First, parse all files and save a state file.
  2096. $(RUN_GEN) build/gengtype$(build_exeext) $(GENGTYPE_FLAGS) \
  2097. -S $(srcdir) -I gtyp-input.list -w tmp-gtype.state
  2098. # Second, read the state file and generate all files. This ensure that
  2099. # gtype.state is correctly read:
  2100. $(SHELL) $(srcdir)/../move-if-change tmp-gtype.state gtype.state
  2101. $(RUN_GEN) build/gengtype$(build_exeext) $(GENGTYPE_FLAGS) \
  2102. -r gtype.state
  2103. $(STAMP) s-gtype
  2104. generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
  2105. $(simple_generated_h) specs.h \
  2106. tree-check.h genrtl.h insn-modes.h tm-preds.h tm-constrs.h \
  2107. $(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gcov-iov.h \
  2108. options.h target-hooks-def.h insn-opinit.h \
  2109. common/common-target-hooks-def.h pass-instances.def \
  2110. c-family/c-target-hooks-def.h
  2111. #
  2112. # How to compile object files to run on the build machine.
  2113. build/%.o : # dependencies provided by explicit rule later
  2114. $(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) \
  2115. -o $@ $<
  2116. ## build/version.o is compiled by the $(COMPILER_FOR_BUILD) but needs
  2117. ## several C macro definitions, just like version.o
  2118. build/version.o: version.c version.h \
  2119. $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
  2120. $(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) \
  2121. -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
  2122. -DREVISION=$(REVISION_s) \
  2123. -DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
  2124. -DBUGURL=$(BUGURL_s) -o $@ $<
  2125. # Header dependencies for the programs that generate source code.
  2126. # These are library modules...
  2127. build/errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
  2128. build/gensupport.o: gensupport.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
  2129. $(GTM_H) $(RTL_BASE_H) $(OBSTACK_H) errors.h $(HASHTAB_H) \
  2130. $(READ_MD_H) gensupport.h
  2131. build/ggc-none.o : ggc-none.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
  2132. $(GGC_H)
  2133. build/min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) $(SYSTEM_H) \
  2134. $(MACHMODE_H)
  2135. build/print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
  2136. $(GTM_H) $(RTL_BASE_H)
  2137. build/read-md.o: read-md.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
  2138. $(HASHTAB_H) errors.h $(READ_MD_H)
  2139. build/read-rtl.o: read-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
  2140. $(GTM_H) $(RTL_BASE_H) $(OBSTACK_H) $(HASHTAB_H) $(READ_MD_H) \
  2141. gensupport.h
  2142. build/rtl.o: rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) \
  2143. $(RTL_H) $(GGC_H) errors.h
  2144. build/vec.o : vec.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(VEC_H) \
  2145. $(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
  2146. build/hash-table.o : hash-table.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
  2147. $(HASH_TABLE_H) $(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
  2148. build/gencondmd.o : build/gencondmd.c $(BCONFIG_H) $(SYSTEM_H) \
  2149. coretypes.h $(GTM_H) insn-constants.h \
  2150. $(filter-out insn-flags.h, $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(REGS_H) \
  2151. $(RECOG_H) output.h $(FLAGS_H) $(RESOURCE_H) toplev.h $(DIAGNOSTIC_CORE_H) reload.h \
  2152. $(EXCEPT_H) tm-constrs.h)
  2153. # This pulls in tm-pred.h which contains inline functions wrapping up
  2154. # predicates from the back-end so those functions must be discarded.
  2155. # No big deal since gencondmd.c is a dummy file for non-GCC compilers.
  2156. build/gencondmd.o : \
  2157. BUILD_CFLAGS := $(filter-out -fkeep-inline-functions, $(BUILD_CFLAGS))
  2158. # ...these are the programs themselves.
  2159. build/genattr.o : genattr.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2160. coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2161. build/genattr-common.o : genattr-common.c $(RTL_BASE_H) $(BCONFIG_H) \
  2162. $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2163. build/genattrtab.o : genattrtab.c $(RTL_BASE_H) $(OBSTACK_H) \
  2164. $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(GGC_H) \
  2165. $(READ_MD_H) gensupport.h $(FNMATCH_H)
  2166. build/genautomata.o : genautomata.c $(RTL_BASE_H) $(OBSTACK_H) \
  2167. $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(VEC_H) \
  2168. $(HASHTAB_H) gensupport.h $(FNMATCH_H)
  2169. build/gencheck.o : gencheck.c all-tree.def $(BCONFIG_H) $(GTM_H) \
  2170. $(SYSTEM_H) coretypes.h tree.def c-family/c-common.def \
  2171. $(lang_tree_files) gimple.def
  2172. build/genchecksum.o : genchecksum.c $(BCONFIG_H) $(SYSTEM_H) $(MD5_H)
  2173. build/gencodes.o : gencodes.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2174. coretypes.h $(GTM_H) errors.h gensupport.h
  2175. build/genconditions.o : genconditions.c $(RTL_BASE_H) $(BCONFIG_H) \
  2176. $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(HASHTAB_H) $(READ_MD_H) \
  2177. gensupport.h
  2178. build/genconfig.o : genconfig.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2179. coretypes.h $(GTM_H) errors.h gensupport.h
  2180. build/genconstants.o : genconstants.c $(BCONFIG_H) $(SYSTEM_H) \
  2181. coretypes.h errors.h $(READ_MD_H)
  2182. build/genemit.o : genemit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2183. coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2184. build/genenums.o : genenums.c $(BCONFIG_H) $(SYSTEM_H) \
  2185. coretypes.h errors.h $(READ_MD_H)
  2186. build/genextract.o : genextract.c $(RTL_BASE_H) $(BCONFIG_H) \
  2187. $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2188. build/genflags.o : genflags.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \
  2189. $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2190. build/gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def
  2191. # The gengtype generator program is special: Two versions are built.
  2192. # One is for the build machine, and one is for the host to allow
  2193. # plugins to define their types and generate the supporting GGC
  2194. # datastructures and routines with GTY markers.
  2195. # The host object files depend on CONFIG_H, and the build objects
  2196. # on BCONFIG_H. For the build objects, add -DGENERATOR_FILE manually,
  2197. # the build-%: rule doesn't apply to them.
  2198. GENGTYPE_OBJS = gengtype.o gengtype-parse.o gengtype-state.o \
  2199. gengtype-lex.o errors.o
  2200. gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H)
  2201. CFLAGS-gengtype-lex.o += -DHOST_GENERATOR_FILE
  2202. build/gengtype-lex.o: $(BCONFIG_H)
  2203. gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \
  2204. $(SYSTEM_H)
  2205. CFLAGS-gengtype-parse.o += -DHOST_GENERATOR_FILE
  2206. build/gengtype-parse.o: $(BCONFIG_H)
  2207. gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
  2208. gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
  2209. $(XREGEX_H)
  2210. CFLAGS-gengtype-state.o += -DHOST_GENERATOR_FILE
  2211. build/gengtype-state.o: $(BCONFIG_H)
  2212. gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \
  2213. rtl.def insn-notes.def errors.h double-int.h version.h \
  2214. $(HASHTAB_H) $(OBSTACK_H) $(XREGEX_H)
  2215. CFLAGS-gengtype.o += -DHOST_GENERATOR_FILE
  2216. build/gengtype.o: $(BCONFIG_H)
  2217. CFLAGS-errors.o += -DHOST_GENERATOR_FILE
  2218. build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
  2219. errors.h $(READ_MD_H)
  2220. build/genmodes.o : genmodes.c $(BCONFIG_H) $(SYSTEM_H) errors.h \
  2221. $(HASHTAB_H) machmode.def $(extra_modes_file)
  2222. build/genopinit.o : genopinit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2223. coretypes.h $(GTM_H) errors.h gensupport.h optabs.def
  2224. build/genoutput.o : genoutput.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2225. coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2226. build/genpeep.o : genpeep.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2227. coretypes.h $(GTM_H) errors.h gensupport.h toplev.h $(DIAGNOSTIC_CORE_H)
  2228. build/genpreds.o : genpreds.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2229. coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h $(OBSTACK_H)
  2230. build/genrecog.o : genrecog.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2231. coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2232. build/genhooks.o : genhooks.c $(TARGET_DEF) $(C_TARGET_DEF) \
  2233. $(COMMON_TARGET_DEF) $(BCONFIG_H) $(SYSTEM_H) errors.h
  2234. build/genmddump.o : genmddump.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
  2235. coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
  2236. build/genmatch.o : genmatch.c $(BCONFIG_H) $(SYSTEM_H) \
  2237. coretypes.h errors.h $(HASH_TABLE_H) hash-map.h $(GGC_H)
  2238. # Compile the programs that generate insn-* from the machine description.
  2239. # They are compiled with $(COMPILER_FOR_BUILD), and associated libraries,
  2240. # since they need to run on this machine
  2241. # even if GCC is being compiled to run on some other machine.
  2242. # All these programs use the RTL reader ($(BUILD_RTL)).
  2243. genprogrtl = attr attr-common attrtab automata codes conditions config emit \
  2244. extract flags opinit output peep preds recog mddump
  2245. $(genprogrtl:%=build/gen%$(build_exeext)): $(BUILD_RTL)
  2246. # All these programs use the MD reader ($(BUILD_MD)).
  2247. genprogmd = $(genprogrtl) mddeps constants enums
  2248. $(genprogmd:%=build/gen%$(build_exeext)): $(BUILD_MD)
  2249. # All these programs need to report errors.
  2250. genprogerr = $(genprogmd) genrtl modes gtype hooks
  2251. $(genprogerr:%=build/gen%$(build_exeext)): $(BUILD_ERRORS)
  2252. # Remaining build programs.
  2253. genprog = $(genprogerr) check checksum condmd match
  2254. # These programs need libs over and above what they get from the above list.
  2255. build/genautomata$(build_exeext) : BUILD_LIBS += -lm
  2256. # For stage1 and when cross-compiling use the build libcpp which is
  2257. # built with NLS disabled. For stage2+ use the host library and
  2258. # its dependencies.
  2259. ifeq ($(build_objdir),$(build_libobjdir))
  2260. BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
  2261. else
  2262. BUILD_CPPLIB = $(CPPLIB) $(LIBIBERTY)
  2263. build/genmatch$(build_exeext): BUILD_LIBDEPS += $(LIBINTL_DEP) $(LIBICONV_DEP)
  2264. build/genmatch$(build_exeext): BUILD_LIBS += $(LIBINTL) $(LIBICONV)
  2265. endif
  2266. build/genmatch$(build_exeext) : $(BUILD_CPPLIB) \
  2267. $(BUILD_ERRORS) build/vec.o build/hash-table.o
  2268. # These programs are not linked with the MD reader.
  2269. build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
  2270. build/gengtype-state.o build/version.o build/errors.o
  2271. gengtype$(exeext) : gengtype.o gengtype-lex.o gengtype-parse.o \
  2272. gengtype-state.o version.o errors.o $(LIBDEPS)
  2273. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
  2274. $(filter-out ($LIBDEPS), $^) $(LIBS)
  2275. # Rule for the generator programs:
  2276. $(genprog:%=build/gen%$(build_exeext)): build/gen%$(build_exeext): build/gen%.o $(BUILD_LIBDEPS)
  2277. +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \
  2278. $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS)
  2279. # Generated source files for gengtype. Prepend inclusion of
  2280. # bconfig.h because AIX requires _LARGE_FILES to be defined before
  2281. # any system header is included.
  2282. gengtype-lex.c : gengtype-lex.l
  2283. -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \
  2284. echo '#include "bconfig.h"' > $@.tmp; \
  2285. cat $@ >> $@.tmp; \
  2286. mv $@.tmp $@; \
  2287. }
  2288. #
  2289. # Remake internationalization support.
  2290. CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
  2291. #
  2292. # Remake cpp.
  2293. PREPROCESSOR_DEFINES = \
  2294. -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  2295. -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
  2296. -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
  2297. -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
  2298. -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
  2299. -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
  2300. -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
  2301. -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
  2302. -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  2303. -DNATIVE_SYSTEM_HEADER_DIR=\"$(NATIVE_SYSTEM_HEADER_DIR)\" \
  2304. -DPREFIX=\"$(prefix)/\" \
  2305. -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
  2306. CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s)
  2307. cppbuiltin.o: $(BASEVER)
  2308. CFLAGS-cppdefault.o += $(PREPROCESSOR_DEFINES)
  2309. # Note for the stamp targets, we run the program `true' instead of
  2310. # having an empty command (nothing following the semicolon).
  2311. # gcov-iov.c is run on the build machine to generate gcov-iov.h from version.c
  2312. build/gcov-iov.o: gcov-iov.c $(BCONFIG_H) coretypes.h $(GTM_H) \
  2313. $(SYSTEM_H) coretypes.h $(TM_H)
  2314. build/gcov-iov$(build_exeext): build/gcov-iov.o
  2315. +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) \
  2316. build/gcov-iov.o -o $@
  2317. gcov-iov.h: s-iov
  2318. s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE)
  2319. build/gcov-iov$(build_exeext) '$(BASEVER_c)' '$(DEVPHASE_c)' \
  2320. > tmp-gcov-iov.h
  2321. $(SHELL) $(srcdir)/../move-if-change tmp-gcov-iov.h gcov-iov.h
  2322. $(STAMP) s-iov
  2323. GCOV_OBJS = gcov.o
  2324. gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
  2325. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@
  2326. GCOV_DUMP_OBJS = gcov-dump.o
  2327. gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
  2328. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) \
  2329. $(LIBS) -o $@
  2330. GCOV_TOOL_DEP_FILES = $(srcdir)/../libgcc/libgcov-util.c gcov-io.c $(GCOV_IO_H) \
  2331. $(srcdir)/../libgcc/libgcov-driver.c $(srcdir)/../libgcc/libgcov-driver-system.c \
  2332. $(srcdir)/../libgcc/libgcov-merge.c $(srcdir)/../libgcc/libgcov.h \
  2333. $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H) version.h intl.h $(DIAGNOSTIC_H)
  2334. libgcov-util.o: $(srcdir)/../libgcc/libgcov-util.c $(GCOV_TOOL_DEP_FILES)
  2335. +$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -o $@ $<
  2336. libgcov-driver-tool.o: $(srcdir)/../libgcc/libgcov-driver.c $(GCOV_TOOL_DEP_FILES)
  2337. +$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  2338. -DIN_GCOV_TOOL=1 -o $@ $<
  2339. libgcov-merge-tool.o: $(srcdir)/../libgcc/libgcov-merge.c $(GCOV_TOOL_DEP_FILES)
  2340. +$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  2341. -DIN_GCOV_TOOL=1 -o $@ $<
  2342. GCOV_TOOL_OBJS = gcov-tool.o libgcov-util.o libgcov-driver-tool.o libgcov-merge-tool.o
  2343. gcov-tool$(exeext): $(GCOV_TOOL_OBJS) $(LIBDEPS)
  2344. +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_TOOL_OBJS) $(LIBS) -o $@
  2345. #
  2346. # Build the include directories. The stamp files are stmp-* rather than
  2347. # s-* so that mostlyclean does not force the include directory to
  2348. # be rebuilt.
  2349. # Build the include directories.
  2350. stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) fixinc_list
  2351. # Copy in the headers provided with gcc.
  2352. #
  2353. # The sed command gets just the last file name component;
  2354. # this is necessary because VPATH could add a dirname.
  2355. # Using basename would be simpler, but some systems don't have it.
  2356. #
  2357. # The touch command is here to workaround an AIX/Linux NFS bug.
  2358. #
  2359. # The move-if-change + cp -p twists for limits.h are intended to preserve
  2360. # the time stamp when we regenerate, to prevent pointless rebuilds during
  2361. # e.g. install-no-fixedincludes.
  2362. -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
  2363. -if [ -d include-fixed ] ; then true; else mkdir include-fixed; chmod a+rx include-fixed; fi
  2364. for file in .. $(USER_H); do \
  2365. if [ X$$file != X.. ]; then \
  2366. realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
  2367. $(STAMP) include/$$realfile; \
  2368. rm -f include/$$realfile; \
  2369. cp $$file include; \
  2370. chmod a+r include/$$realfile; \
  2371. fi; \
  2372. done
  2373. for file in .. $(USER_H_INC_NEXT_PRE); do \
  2374. if [ X$$file != X.. ]; then \
  2375. mv include/$$file include/x_$$file; \
  2376. echo "#include_next <$$file>" >include/$$file; \
  2377. cat include/x_$$file >>include/$$file; \
  2378. rm -f include/x_$$file; \
  2379. chmod a+r include/$$file; \
  2380. fi; \
  2381. done
  2382. for file in .. $(USER_H_INC_NEXT_POST); do \
  2383. if [ X$$file != X.. ]; then \
  2384. echo "#include_next <$$file>" >>include/$$file; \
  2385. chmod a+r include/$$file; \
  2386. fi; \
  2387. done
  2388. rm -f include/stdint.h
  2389. if [ $(USE_GCC_STDINT) = wrap ]; then \
  2390. rm -f include/stdint-gcc.h; \
  2391. cp $(srcdir)/ginclude/stdint-gcc.h include/stdint-gcc.h; \
  2392. chmod a+r include/stdint-gcc.h; \
  2393. cp $(srcdir)/ginclude/stdint-wrap.h include/stdint.h; \
  2394. chmod a+r include/stdint.h; \
  2395. elif [ $(USE_GCC_STDINT) = provide ]; then \
  2396. cp $(srcdir)/ginclude/stdint-gcc.h include/stdint.h; \
  2397. chmod a+r include/stdint.h; \
  2398. fi
  2399. set -e; for ml in `cat fixinc_list`; do \
  2400. sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
  2401. multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
  2402. fix_dir=include-fixed$${multi_dir}; \
  2403. if $(LIMITS_H_TEST) ; then \
  2404. cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
  2405. else \
  2406. cat $(srcdir)/glimits.h > tmp-xlimits.h; \
  2407. fi; \
  2408. $(mkinstalldirs) $${fix_dir}; \
  2409. chmod a+rx $${fix_dir} || true; \
  2410. $(SHELL) $(srcdir)/../move-if-change \
  2411. tmp-xlimits.h tmp-limits.h; \
  2412. rm -f $${fix_dir}/limits.h; \
  2413. cp -p tmp-limits.h $${fix_dir}/limits.h; \
  2414. chmod a+r $${fix_dir}/limits.h; \
  2415. done
  2416. # Install the README
  2417. rm -f include-fixed/README
  2418. cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
  2419. chmod a+r include-fixed/README
  2420. $(STAMP) $@
  2421. .PHONY: install-gcc-tooldir
  2422. install-gcc-tooldir:
  2423. $(mkinstalldirs) $(DESTDIR)$(gcc_tooldir)
  2424. macro_list: s-macro_list; @true
  2425. s-macro_list : $(GCC_PASSES) cc1$(exeext)
  2426. echo | $(GCC_FOR_TARGET) -E -dM - | \
  2427. sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
  2428. -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
  2429. sort -u > tmp-macro_list
  2430. $(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list
  2431. $(STAMP) s-macro_list
  2432. fixinc_list: s-fixinc_list; @true
  2433. s-fixinc_list : $(GCC_PASSES)
  2434. # Build up a list of multilib directories and corresponding sysroot
  2435. # suffixes, in form sysroot;multilib.
  2436. if $(GCC_FOR_TARGET) -print-sysroot-headers-suffix > /dev/null 2>&1; then \
  2437. set -e; for ml in `$(GCC_FOR_TARGET) -print-multi-lib`; do \
  2438. multi_dir=`echo $${ml} | sed -e 's/;.*$$//'`; \
  2439. flags=`echo $${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
  2440. sfx=`$(GCC_FOR_TARGET) $${flags} -print-sysroot-headers-suffix`; \
  2441. if [ "$${multi_dir}" = "." ]; \
  2442. then multi_dir=""; \
  2443. else \
  2444. multi_dir=/$${multi_dir}; \
  2445. fi; \
  2446. echo "$${sfx};$${multi_dir}"; \
  2447. done; \
  2448. else \
  2449. echo ";"; \
  2450. fi > tmp-fixinc_list
  2451. $(SHELL) $(srcdir)/../move-if-change tmp-fixinc_list fixinc_list
  2452. $(STAMP) s-fixinc_list
  2453. # The line below is supposed to avoid accidentally matching the
  2454. # built-in suffix rule `.o:' to build fixincl out of fixincl.o. You'd
  2455. # expect fixincl to be newer than fixincl.o, such that this situation
  2456. # would never come up. As it turns out, if you use ccache with
  2457. # CCACHE_HARDLINK enabled, the compiler doesn't embed the current
  2458. # working directory in object files (-g absent, or -fno-working-dir
  2459. # present), and build and host are the same, fixincl for the host will
  2460. # build after fixincl for the build machine, getting a cache hit,
  2461. # thereby updating the timestamp of fixincl.o in the host tree.
  2462. # Because of CCACHE_HARDLINK, this will also update the timestamp in
  2463. # the build tree, and so fixincl in the build tree will appear to be
  2464. # out of date. Yuck.
  2465. ../$(build_subdir)/fixincludes/fixincl: ; @ :
  2466. # Build fixed copies of system files.
  2467. # Abort if no system headers available, unless building a crosscompiler.
  2468. # FIXME: abort unless building --without-headers would be more accurate and less ugly
  2469. stmp-fixinc: gsyslimits.h macro_list fixinc_list \
  2470. $(build_objdir)/fixincludes/fixincl \
  2471. $(build_objdir)/fixincludes/fixinc.sh
  2472. rm -rf include-fixed; mkdir include-fixed
  2473. -chmod a+rx include-fixed
  2474. if [ -d ../prev-gcc ]; then \
  2475. cd ../prev-gcc && \
  2476. $(MAKE) real-$(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
  2477. libsubdir=. ; \
  2478. else \
  2479. set -e; for ml in `cat fixinc_list`; do \
  2480. sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
  2481. multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
  2482. fix_dir=include-fixed$${multi_dir}; \
  2483. if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
  2484. echo The directory that should contain system headers does not exist: >&2 ; \
  2485. echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
  2486. tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
  2487. if test "x${SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \
  2488. then sleep 1; else exit 1; fi; \
  2489. fi; \
  2490. $(mkinstalldirs) $${fix_dir}; \
  2491. chmod a+rx $${fix_dir} || true; \
  2492. (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
  2493. SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
  2494. gcc_dir=`${PWD_COMMAND}` ; \
  2495. export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
  2496. cd $(build_objdir)/fixincludes && \
  2497. $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
  2498. $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
  2499. rm -f $${fix_dir}/syslimits.h; \
  2500. if [ -f $${fix_dir}/limits.h ]; then \
  2501. mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \
  2502. else \
  2503. cp $(srcdir)/gsyslimits.h $${fix_dir}/syslimits.h; \
  2504. fi; \
  2505. chmod a+r $${fix_dir}/syslimits.h; \
  2506. done; \
  2507. fi
  2508. $(STAMP) stmp-fixinc
  2509. #
  2510. # Install with the gcc headers files, not the fixed include files, which we
  2511. # are typically not allowed to distribute. The general idea is to:
  2512. # - Get to "install" with a bare set of internal headers, not the
  2513. # fixed system ones,
  2514. # - Prevent rebuilds of what normally depends on the headers, which is
  2515. # useless for installation purposes and would rely on improper headers.
  2516. # - Restore as much of the original state as possible.
  2517. .PHONY: install-no-fixedincludes
  2518. install-no-fixedincludes:
  2519. # Stash the current set of headers away, save stamps we're going to
  2520. # alter explicitly, and arrange for fixincludes not to run next time
  2521. # we trigger a headers rebuild.
  2522. -rm -rf tmp-include
  2523. -mv include tmp-include 2>/dev/null
  2524. -mv include-fixed tmp-include-fixed 2>/dev/null
  2525. -mv stmp-int-hdrs tmp-stmp-int-hdrs 2>/dev/null
  2526. -mv stmp-fixinc tmp-stmp-fixinc 2>/dev/null
  2527. -mkdir include
  2528. -cp -p $(srcdir)/gsyslimits.h include/syslimits.h
  2529. -touch stmp-fixinc
  2530. # Rebuild our internal headers, restore the original stamps so that
  2531. # "install" doesn't trigger pointless rebuilds because of that update,
  2532. # then do install
  2533. $(MAKE) $(FLAGS_TO_PASS) stmp-int-hdrs
  2534. -mv tmp-stmp-int-hdrs stmp-int-hdrs 2>/dev/null
  2535. -mv tmp-stmp-fixinc stmp-fixinc 2>/dev/null
  2536. $(MAKE) $(FLAGS_TO_PASS) install
  2537. # Restore the original set of maybe-fixed headers
  2538. -rm -rf include; mv tmp-include include 2>/dev/null
  2539. -rm -rf include-fixed; mv tmp-include-fixed include-fixed 2>/dev/null
  2540. # Remake the info files.
  2541. doc: $(BUILD_INFO) $(GENERATED_MANPAGES)
  2542. INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \
  2543. doc/gccinstall.info doc/cppinternals.info
  2544. info: $(INFOFILES) lang.info # srcinfo lang.srcinfo
  2545. srcinfo: $(INFOFILES)
  2546. -cp -p $^ $(srcdir)/doc
  2547. TEXI_CPP_FILES = cpp.texi fdl.texi cppenv.texi cppopts.texi \
  2548. gcc-common.texi gcc-vers.texi
  2549. TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi \
  2550. standards.texi invoke.texi extend.texi md.texi objc.texi \
  2551. gcov.texi trouble.texi bugreport.texi service.texi \
  2552. contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi \
  2553. fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi \
  2554. implement-c.texi implement-cxx.texi gcov-tool.texi
  2555. # we explicitly use $(srcdir)/doc/tm.texi here to avoid confusion with
  2556. # the generated tm.texi; the latter might have a more recent timestamp,
  2557. # but we don't want to rebuild the info files unless the contents of
  2558. # the *.texi files have changed.
  2559. TEXI_GCCINT_FILES = gccint.texi gcc-common.texi gcc-vers.texi \
  2560. contribute.texi makefile.texi configterms.texi options.texi \
  2561. portability.texi interface.texi passes.texi rtl.texi md.texi \
  2562. $(srcdir)/doc/tm.texi hostconfig.texi fragments.texi \
  2563. configfiles.texi collect2.texi headerdirs.texi funding.texi \
  2564. gnu.texi gpl_v3.texi fdl.texi contrib.texi languages.texi \
  2565. sourcebuild.texi gty.texi libgcc.texi cfg.texi tree-ssa.texi \
  2566. loop.texi generic.texi gimple.texi plugins.texi optinfo.texi \
  2567. match-and-simplify.texi
  2568. TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi \
  2569. gcc-common.texi gcc-vers.texi
  2570. TEXI_CPPINT_FILES = cppinternals.texi gcc-common.texi gcc-vers.texi
  2571. # gcc-vers.texi is generated from the version files.
  2572. gcc-vers.texi: $(BASEVER) $(DEVPHASE)
  2573. (echo "@set version-GCC $(BASEVER_c)"; \
  2574. if [ "$(DEVPHASE_c)" = "experimental" ]; \
  2575. then echo "@set DEVELOPMENT"; \
  2576. else echo "@clear DEVELOPMENT"; \
  2577. fi) > $@T
  2578. $(build_file_translate) echo @set srcdir $(abs_srcdir) >> $@T
  2579. if [ -n "$(PKGVERSION)" ]; then \
  2580. echo "@set VERSION_PACKAGE $(PKGVERSION)" >> $@T; \
  2581. fi
  2582. echo "@set BUGURL $(BUGURL_TEXI)" >> $@T; \
  2583. mv -f $@T $@
  2584. # The *.1, *.7, *.info, *.dvi, and *.pdf files are being generated from implicit
  2585. # patterns. To use them, put each of the specific targets with its
  2586. # specific dependencies but no build commands.
  2587. doc/cpp.info: $(TEXI_CPP_FILES)
  2588. doc/gcc.info: $(TEXI_GCC_FILES)
  2589. doc/gccint.info: $(TEXI_GCCINT_FILES)
  2590. doc/cppinternals.info: $(TEXI_CPPINT_FILES)
  2591. doc/%.info: %.texi
  2592. if [ x$(BUILD_INFO) = xinfo ]; then \
  2593. $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
  2594. -I $(gcc_docdir)/include -o $@ $<; \
  2595. fi
  2596. # Duplicate entry to handle renaming of gccinstall.info
  2597. doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
  2598. if [ x$(BUILD_INFO) = xinfo ]; then \
  2599. $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
  2600. -I $(gcc_docdir)/include -o $@ $<; \
  2601. fi
  2602. doc/cpp.dvi: $(TEXI_CPP_FILES)
  2603. doc/gcc.dvi: $(TEXI_GCC_FILES)
  2604. doc/gccint.dvi: $(TEXI_GCCINT_FILES)
  2605. doc/cppinternals.dvi: $(TEXI_CPPINT_FILES)
  2606. doc/cpp.pdf: $(TEXI_CPP_FILES)
  2607. doc/gcc.pdf: $(TEXI_GCC_FILES)
  2608. doc/gccint.pdf: $(TEXI_GCCINT_FILES)
  2609. doc/cppinternals.pdf: $(TEXI_CPPINT_FILES)
  2610. $(build_htmldir)/cpp/index.html: $(TEXI_CPP_FILES)
  2611. $(build_htmldir)/gcc/index.html: $(TEXI_GCC_FILES)
  2612. $(build_htmldir)/gccint/index.html: $(TEXI_GCCINT_FILES)
  2613. $(build_htmldir)/cppinternals/index.html: $(TEXI_CPPINT_FILES)
  2614. dvi:: doc/gcc.dvi doc/gccint.dvi doc/gccinstall.dvi doc/cpp.dvi \
  2615. doc/cppinternals.dvi lang.dvi
  2616. doc/%.dvi: %.texi
  2617. $(TEXI2DVI) -I . -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
  2618. # Duplicate entry to handle renaming of gccinstall.dvi
  2619. doc/gccinstall.dvi: $(TEXI_GCCINSTALL_FILES)
  2620. $(TEXI2DVI) -I . -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
  2621. PDFFILES = doc/gcc.pdf doc/gccint.pdf doc/gccinstall.pdf doc/cpp.pdf \
  2622. doc/cppinternals.pdf
  2623. pdf:: $(PDFFILES) lang.pdf
  2624. doc/%.pdf: %.texi
  2625. $(TEXI2PDF) -I . -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
  2626. # Duplicate entry to handle renaming of gccinstall.pdf
  2627. doc/gccinstall.pdf: $(TEXI_GCCINSTALL_FILES)
  2628. $(TEXI2PDF) -I . -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
  2629. # List the directories or single hmtl files which are installed by
  2630. # install-html. The lang.html file triggers language fragments to build
  2631. # html documentation.
  2632. HTMLS_INSTALL=$(build_htmldir)/cpp $(build_htmldir)/gcc \
  2633. $(build_htmldir)/gccinstall $(build_htmldir)/gccint \
  2634. $(build_htmldir)/cppinternals
  2635. # List the html file targets.
  2636. HTMLS_BUILD=$(build_htmldir)/cpp/index.html $(build_htmldir)/gcc/index.html \
  2637. $(build_htmldir)/gccinstall/index.html $(build_htmldir)/gccint/index.html \
  2638. $(build_htmldir)/cppinternals/index.html lang.html
  2639. html:: $(HTMLS_BUILD)
  2640. $(build_htmldir)/%/index.html: %.texi
  2641. $(mkinstalldirs) $(@D)
  2642. rm -f $(@D)/*
  2643. $(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $<
  2644. # Duplicate entry to handle renaming of gccinstall
  2645. $(build_htmldir)/gccinstall/index.html: $(TEXI_GCCINSTALL_FILES)
  2646. $(mkinstalldirs) $(@D)
  2647. echo rm -f $(@D)/*
  2648. SOURCEDIR=$(abs_docdir) \
  2649. DESTDIR=$(@D) \
  2650. $(SHELL) $(srcdir)/doc/install.texi2html
  2651. MANFILES = doc/gcov.1 doc/cpp.1 doc/gcc.1 doc/gfdl.7 doc/gpl.7 \
  2652. doc/fsf-funding.7 doc/gcov-tool.1
  2653. generated-manpages: man
  2654. man: $(MANFILES) lang.man # srcman lang.srcman
  2655. srcman: $(MANFILES)
  2656. -cp -p $^ $(srcdir)/doc
  2657. doc/%.1: %.pod
  2658. $(STAMP) $@
  2659. -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \
  2660. mv -f $(@).T$$$$ $@) || \
  2661. (rm -f $(@).T$$$$ && exit 1)
  2662. doc/%.7: %.pod
  2663. $(STAMP) $@
  2664. -($(POD2MAN) --section=7 $< > $(@).T$$$$ && \
  2665. mv -f $(@).T$$$$ $@) || \
  2666. (rm -f $(@).T$$$$ && exit 1)
  2667. %.pod: %.texi
  2668. $(STAMP) $@
  2669. -$(TEXI2POD) -DBUGURL="$(BUGURL_TEXI)" $< > $@
  2670. .INTERMEDIATE: cpp.pod gcc.pod gfdl.pod fsf-funding.pod
  2671. cpp.pod: cpp.texi cppenv.texi cppopts.texi
  2672. # These next rules exist because the output name is not the same as
  2673. # the input name, so our implicit %.pod rule will not work.
  2674. gcc.pod: invoke.texi cppenv.texi cppopts.texi gcc-vers.texi
  2675. $(STAMP) $@
  2676. -$(TEXI2POD) $< > $@
  2677. gfdl.pod: fdl.texi
  2678. $(STAMP) $@
  2679. -$(TEXI2POD) $< > $@
  2680. fsf-funding.pod: funding.texi
  2681. $(STAMP) $@
  2682. -$(TEXI2POD) $< > $@
  2683. gpl.pod: gpl_v3.texi
  2684. $(STAMP) $@
  2685. -$(TEXI2POD) $< > $@
  2686. #
  2687. # Deletion of files made during compilation.
  2688. # There are four levels of this:
  2689. # `mostlyclean', `clean', `distclean' and `maintainer-clean'.
  2690. # `mostlyclean' is useful while working on a particular type of machine.
  2691. # It deletes most, but not all, of the files made by compilation.
  2692. # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
  2693. # `clean' deletes everything made by running `make all'.
  2694. # `distclean' also deletes the files made by config.
  2695. # `maintainer-clean' also deletes everything that could be regenerated
  2696. # automatically, except for `configure'.
  2697. # We remove as much from the language subdirectories as we can
  2698. # (less duplicated code).
  2699. mostlyclean: lang.mostlyclean
  2700. -rm -f $(MOSTLYCLEANFILES)
  2701. -rm -f *$(objext) c-family/*$(objext)
  2702. -rm -f *$(coverageexts)
  2703. # Delete build programs
  2704. -rm -f build/*
  2705. -rm -f mddeps.mk
  2706. # Delete other built files.
  2707. -rm -f specs.h options.c options.h options-save.c
  2708. # Delete the stamp and temporary files.
  2709. -rm -f s-* tmp-* stamp-* stmp-*
  2710. -rm -f */stamp-* */tmp-*
  2711. # Delete debugging dump files.
  2712. -rm -f *.[0-9][0-9].* */*.[0-9][0-9].*
  2713. # Delete some files made during installation.
  2714. -rm -f specs $(SPECS)
  2715. -rm -f collect collect2 mips-tfile mips-tdump
  2716. # Delete unwanted output files from TeX.
  2717. -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
  2718. -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
  2719. # Delete sorted indices we don't actually use.
  2720. -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
  2721. # Delete core dumps.
  2722. -rm -f core */core
  2723. # Delete file generated for gengtype
  2724. -rm -f gtyp-input.list
  2725. # Delete files generated by gengtype
  2726. -rm -f gtype-*
  2727. -rm -f gt-*
  2728. -rm -f gtype.state
  2729. # Delete genchecksum outputs
  2730. -rm -f *-checksum.c
  2731. # Delete lock-and-run bits
  2732. -rm -rf linkfe.lck lock-stamp.*
  2733. # Delete all files made by compilation
  2734. # that don't exist in the distribution.
  2735. clean: mostlyclean lang.clean
  2736. -rm -f libgcc.a libgcc_eh.a libgcov.a
  2737. -rm -f libgcc_s*
  2738. -rm -f libunwind*
  2739. -rm -f config.h tconfig.h bconfig.h tm_p.h tm.h
  2740. -rm -f options.c options.h optionlist
  2741. -rm -f cs-*
  2742. -rm -f doc/*.dvi
  2743. -rm -f doc/*.pdf
  2744. # Delete the include directories.
  2745. -rm -rf include include-fixed
  2746. # Delete files used by the "multilib" facility (including libgcc subdirs).
  2747. -rm -f multilib.h tmpmultilib*
  2748. -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
  2749. rm -rf $(MULTILIB_DIRNAMES); \
  2750. else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
  2751. rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
  2752. fi ; fi
  2753. # Delete all files that users would normally create
  2754. # while building and installing GCC.
  2755. distclean: clean lang.distclean
  2756. -rm -f auto-host.h auto-build.h
  2757. -rm -f cstamp-h
  2758. -rm -f config.status config.run config.cache config.bak
  2759. -rm -f Make-lang Make-hooks Make-host Make-target
  2760. -rm -f Makefile *.oaux
  2761. -rm -f gthr-default.h
  2762. -rm -f TAGS */TAGS
  2763. -rm -f *.asm
  2764. -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
  2765. -rm -f testsuite/*.log testsuite/*.sum
  2766. -cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
  2767. -cd testsuite && rm -f *.out *.gcov *$(coverageexts)
  2768. -rm -rf ${QMTEST_DIR} stamp-qmtest
  2769. -rm -f cxxmain.c
  2770. -rm -f .gdbinit configargs.h
  2771. -rm -f gcov.pod
  2772. # Delete po/*.gmo only if we are not building in the source directory.
  2773. -if [ ! -f po/exgettext ]; then rm -f po/*.gmo; fi
  2774. -rmdir ada cp f java objc intl po testsuite plugin 2>/dev/null
  2775. # Get rid of every file that's generated from some other file, except for `configure'.
  2776. # Most of these files ARE PRESENT in the GCC distribution.
  2777. maintainer-clean:
  2778. @echo 'This command is intended for maintainers to use; it'
  2779. @echo 'deletes files that may need special tools to rebuild.'
  2780. $(MAKE) lang.maintainer-clean distclean
  2781. -rm -f cpp.??s cpp.*aux
  2782. -rm -f gcc.??s gcc.*aux
  2783. -rm -f $(gcc_docdir)/*.info $(gcc_docdir)/*.1 $(gcc_docdir)/*.7 $(gcc_docdir)/*.dvi $(gcc_docdir)/*.pdf
  2784. #
  2785. # Entry points `install', `install-strip', and `uninstall'.
  2786. # Also use `install-collect2' to install collect2 when the config files don't.
  2787. # Copy the compiler files into directories where they will be run.
  2788. # Install the driver last so that the window when things are
  2789. # broken is small.
  2790. install: install-common $(INSTALL_HEADERS) \
  2791. install-cpp install-man install-info install- \
  2792. install-driver install-lto-wrapper install-gcc-ar
  2793. ifeq ($(enable_plugin),yes)
  2794. install: install-plugin
  2795. endif
  2796. install-strip: override INSTALL_PROGRAM = $(INSTALL_STRIP_PROGRAM)
  2797. ifneq ($(STRIP),)
  2798. install-strip: STRIPPROG = $(STRIP)
  2799. export STRIPPROG
  2800. endif
  2801. install-strip: install
  2802. # Handle cpp installation.
  2803. install-cpp: installdirs cpp$(exeext)
  2804. -if test "$(enable_as_accelerator)" != "yes" ; then \
  2805. rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
  2806. $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \
  2807. if [ x$(cpp_install_dir) != x ]; then \
  2808. rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
  2809. $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
  2810. else true; fi; \
  2811. fi
  2812. # Create the installation directories.
  2813. # $(libdir)/gcc/include isn't currently searched by cpp.
  2814. installdirs:
  2815. $(mkinstalldirs) $(DESTDIR)$(libsubdir)
  2816. $(mkinstalldirs) $(DESTDIR)$(libexecsubdir)
  2817. $(mkinstalldirs) $(DESTDIR)$(bindir)
  2818. $(mkinstalldirs) $(DESTDIR)$(includedir)
  2819. $(mkinstalldirs) $(DESTDIR)$(infodir)
  2820. $(mkinstalldirs) $(DESTDIR)$(man1dir)
  2821. $(mkinstalldirs) $(DESTDIR)$(man7dir)
  2822. PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
  2823. toplev.h $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) $(HASH_TABLE_H) \
  2824. tree-ssa-alias.h $(INTERNAL_FN_H) gimple-fold.h tree-eh.h gimple-expr.h \
  2825. gimple.h is-a.h $(TREE_PASS_H) $(GCC_PLUGIN_H) \
  2826. $(GGC_H) $(TREE_DUMP_H) $(PRETTY_PRINT_H) $(OPTS_H) $(PARAMS_H) \
  2827. $(tm_file_list) $(tm_include_list) $(tm_p_file_list) $(tm_p_include_list) \
  2828. $(host_xm_file_list) $(host_xm_include_list) $(xm_include_list) \
  2829. intl.h $(PLUGIN_VERSION_H) $(DIAGNOSTIC_H) ${C_TREE_H} \
  2830. $(C_COMMON_H) c-family/c-objc.h $(C_PRETTY_PRINT_H) \
  2831. tree-iterator.h $(PLUGIN_H) $(TREE_SSA_H) langhooks.h incpath.h debug.h \
  2832. $(EXCEPT_H) tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \
  2833. $(C_PRAGMA_H) $(CPPLIB_H) $(FUNCTION_H) \
  2834. cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \
  2835. $(GIMPLE_PRETTY_PRINT_H) realmpfr.h \
  2836. $(IPA_PROP_H) $(TARGET_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) \
  2837. version.h stringpool.h gimplify.h gimple-iterator.h gimple-ssa.h \
  2838. fold-const.h tree-cfg.h tree-into-ssa.h tree-ssanames.h print-tree.h \
  2839. varasm.h context.h tree-phinodes.h stor-layout.h ssa-iterators.h \
  2840. $(RESOURCE_H) tree-cfgcleanup.h attribs.h calls.h cfgexpand.h \
  2841. diagnostic-color.h gcc-symtab.h gimple-builder.h gimple-low.h \
  2842. gimple-walk.h gimplify-me.h pass_manager.h print-rtl.h stmt.h \
  2843. tree-dfa.h tree-hasher.h tree-nested.h tree-object-size.h tree-outof-ssa.h \
  2844. tree-parloops.h tree-ssa-address.h tree-ssa-coalesce.h tree-ssa-dom.h \
  2845. tree-ssa-loop.h tree-ssa-loop-ivopts.h tree-ssa-loop-manip.h \
  2846. tree-ssa-loop-niter.h tree-ssa-ter.h tree-ssa-threadedge.h \
  2847. tree-ssa-threadupdate.h inchash.h wide-int.h signop.h hash-map.h \
  2848. hash-set.h dominance.h cfg.h cfgrtl.h cfganal.h cfgbuild.h cfgcleanup.h \
  2849. lcm.h cfgloopmanip.h builtins.def chkp-builtins.def pass-instances.def
  2850. # generate the 'build fragment' b-header-vars
  2851. s-header-vars: Makefile
  2852. rm -f tmp-header-vars
  2853. # The first sed gets the list "header variables" as the list variables
  2854. # assigned in Makefile and having _H at the end of the name. "sed -n" proved
  2855. # more portable than a trailing "-e d" to filter out the uninteresting lines,
  2856. # in particular on ia64-hpux where "s/.../p" only prints if -n was requested
  2857. # as well.
  2858. $(foreach header_var,$(shell sed < Makefile -n -e 's/^\([A-Z0-9_]*_H\)[ ]*=.*/\1/p'),echo $(header_var)=$(shell echo $($(header_var):$(srcdir)/%=.../%) | sed -e 's~\.\.\./config/~config/~' -e 's~\.\.\..*/~~') >> tmp-header-vars;) \
  2859. $(SHELL) $(srcdir)/../move-if-change tmp-header-vars b-header-vars
  2860. $(STAMP) s-header-vars
  2861. # Install gengtype
  2862. install-gengtype: installdirs gengtype$(exeext) gtype.state
  2863. $(mkinstalldirs) $(DESTDIR)$(plugin_resourcesdir)
  2864. $(INSTALL_DATA) gtype.state $(DESTDIR)$(plugin_resourcesdir)/gtype.state
  2865. $(mkinstalldirs) $(DESTDIR)$(plugin_bindir)
  2866. $(INSTALL_PROGRAM) gengtype$(exeext) $(DESTDIR)$(plugin_bindir)/gengtype$(exeext)
  2867. # Install the headers needed to build a plugin.
  2868. install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
  2869. # We keep the directory structure for files in config or c-family and .def
  2870. # files. All other files are flattened to a single directory.
  2871. $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
  2872. headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
  2873. srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
  2874. for file in $$headers; do \
  2875. if [ -f $$file ] ; then \
  2876. path=$$file; \
  2877. elif [ -f $(srcdir)/$$file ]; then \
  2878. path=$(srcdir)/$$file; \
  2879. else continue; \
  2880. fi; \
  2881. case $$path in \
  2882. "$(srcdir)"/config/* | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
  2883. base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
  2884. *) base=`basename $$path` ;; \
  2885. esac; \
  2886. dest=$(plugin_includedir)/$$base; \
  2887. echo $(INSTALL_DATA) $$path $(DESTDIR)$$dest; \
  2888. dir=`dirname $$dest`; \
  2889. $(mkinstalldirs) $(DESTDIR)$$dir; \
  2890. $(INSTALL_DATA) $$path $(DESTDIR)$$dest; \
  2891. done
  2892. $(INSTALL_DATA) b-header-vars $(DESTDIR)$(plugin_includedir)/b-header-vars
  2893. # Install the compiler executables built during cross compilation.
  2894. install-common: native lang.install-common installdirs
  2895. for file in $(COMPILERS); do \
  2896. if [ -f $$file ] ; then \
  2897. rm -f $(DESTDIR)$(libexecsubdir)/$$file; \
  2898. $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libexecsubdir)/$$file; \
  2899. else true; \
  2900. fi; \
  2901. done
  2902. for file in $(EXTRA_PROGRAMS) $(COLLECT2) ..; do \
  2903. if [ x"$$file" != x.. ]; then \
  2904. rm -f $(DESTDIR)$(libexecsubdir)/$$file; \
  2905. $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libexecsubdir)/$$file; \
  2906. else true; fi; \
  2907. done
  2908. # We no longer install the specs file because its presence makes the
  2909. # driver slower, and because people who need it can recreate it by
  2910. # using -dumpspecs. We remove any old version because it would
  2911. # otherwise override the specs built into the driver.
  2912. rm -f $(DESTDIR)$(libsubdir)/specs
  2913. # Install gcov if it was compiled.
  2914. -if test "$(enable_as_accelerator)" != "yes" ; then \
  2915. if [ -f gcov$(exeext) ]; \
  2916. then \
  2917. rm -f $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
  2918. $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
  2919. fi; \
  2920. fi
  2921. # Install gcov-tool if it was compiled.
  2922. -if test "$(enable_as_accelerator)" != "yes" ; then \
  2923. if [ -f gcov-tool$(exeext) ]; \
  2924. then \
  2925. rm -f $(DESTDIR)$(bindir)/$(GCOV_TOOL_INSTALL_NAME)$(exeext); \
  2926. $(INSTALL_PROGRAM) \
  2927. gcov-tool$(exeext) $(DESTDIR)$(bindir)/$(GCOV_TOOL_INSTALL_NAME)$(exeext); \
  2928. fi; \
  2929. fi
  2930. # Install the driver program as $(target_noncanonical)-gcc,
  2931. # $(target_noncanonical)-gcc-$(version), and also as gcc if native.
  2932. install-driver: installdirs xgcc$(exeext)
  2933. -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
  2934. -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
  2935. -if test "$(enable_as_accelerator)" != "yes" ; then \
  2936. if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \
  2937. rm -f $(DESTDIR)$(bindir)/$(FULL_DRIVER_NAME); \
  2938. ( cd $(DESTDIR)$(bindir) && \
  2939. $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \
  2940. fi; \
  2941. if [ ! -f gcc-cross$(exeext) ] \
  2942. && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \
  2943. rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
  2944. ( cd $(DESTDIR)$(bindir) && \
  2945. $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
  2946. mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
  2947. fi; \
  2948. fi
  2949. # Install the info files.
  2950. # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
  2951. # to do the install.
  2952. install-info:: doc installdirs \
  2953. $(DESTDIR)$(infodir)/cpp.info \
  2954. $(DESTDIR)$(infodir)/gcc.info \
  2955. $(DESTDIR)$(infodir)/cppinternals.info \
  2956. $(DESTDIR)$(infodir)/gccinstall.info \
  2957. $(DESTDIR)$(infodir)/gccint.info \
  2958. lang.install-info
  2959. $(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
  2960. rm -f $@
  2961. if [ -f $< ]; then \
  2962. for f in $(<)*; do \
  2963. realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
  2964. $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \
  2965. chmod a-x $(DESTDIR)$(infodir)/$$realfile; \
  2966. done; \
  2967. else true; fi
  2968. -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
  2969. if [ -f $@ ]; then \
  2970. install-info --dir-file=$(DESTDIR)$(infodir)/dir $@; \
  2971. else true; fi; \
  2972. else true; fi;
  2973. pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
  2974. install-pdf: $(PDFFILES) lang.install-pdf
  2975. @$(NORMAL_INSTALL)
  2976. test -z "$(pdfdir)/gcc" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)/gcc"
  2977. @list='$(PDFFILES)'; for p in $$list; do \
  2978. if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  2979. f=$(pdf__strip_dir) \
  2980. echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/gcc/$$f'"; \
  2981. $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/gcc/$$f"; \
  2982. done
  2983. html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
  2984. install-html: $(HTMLS_BUILD) lang.install-html
  2985. @$(NORMAL_INSTALL)
  2986. test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
  2987. @list='$(HTMLS_INSTALL)'; for p in $$list; do \
  2988. if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
  2989. f=$(html__strip_dir) \
  2990. if test -d "$$d$$p"; then \
  2991. echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
  2992. $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
  2993. echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
  2994. $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
  2995. else \
  2996. echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
  2997. $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
  2998. fi; \
  2999. done
  3000. # Install the man pages.
  3001. install-man: lang.install-man \
  3002. $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) \
  3003. $(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext) \
  3004. $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext) \
  3005. $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) \
  3006. $(DESTDIR)$(man7dir)/gfdl$(man7ext) \
  3007. $(DESTDIR)$(man7dir)/gpl$(man7ext)
  3008. $(DESTDIR)$(man7dir)/%$(man7ext): doc/%.7 installdirs
  3009. -rm -f $@
  3010. -$(INSTALL_DATA) $< $@
  3011. -chmod a-x $@
  3012. $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext): doc/gcc.1 installdirs
  3013. -rm -f $@
  3014. -$(INSTALL_DATA) $< $@
  3015. -chmod a-x $@
  3016. $(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext): doc/cpp.1 installdirs
  3017. -rm -f $@
  3018. -$(INSTALL_DATA) $< $@
  3019. -chmod a-x $@
  3020. $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext): doc/gcov.1 installdirs
  3021. -rm -f $@
  3022. -$(INSTALL_DATA) $< $@
  3023. -chmod a-x $@
  3024. $(DESTDIR)$(man1dir)/$(GCOV_TOOL_INSTALL_NAME)$(man1ext): doc/gcov-tool.1 installdirs
  3025. -rm -f $@
  3026. -$(INSTALL_DATA) $< $@
  3027. -chmod a-x $@
  3028. # Install all the header files built in the include subdirectory.
  3029. install-headers: $(INSTALL_HEADERS_DIR)
  3030. # Fix symlinks to absolute paths in the installed include directory to
  3031. # point to the installed directory, not the build directory.
  3032. # Don't need to use LN_S here since we really do need ln -s and no substitutes.
  3033. -files=`cd $(DESTDIR)$(libsubdir)/include-fixed; find . -type l -print 2>/dev/null`; \
  3034. if [ $$? -eq 0 ]; then \
  3035. dir=`cd include-fixed; ${PWD_COMMAND}`; \
  3036. for i in $$files; do \
  3037. dest=`ls -ld $(DESTDIR)$(libsubdir)/include-fixed/$$i | sed -n 's/.*-> //p'`; \
  3038. if expr "$$dest" : "$$dir.*" > /dev/null; then \
  3039. rm -f $(DESTDIR)$(libsubdir)/include-fixed/$$i; \
  3040. ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include-fixed/$$i; \
  3041. fi; \
  3042. done; \
  3043. fi
  3044. # Create or recreate the gcc private include file directory.
  3045. install-include-dir: installdirs
  3046. $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
  3047. -rm -rf $(DESTDIR)$(libsubdir)/include-fixed
  3048. mkdir $(DESTDIR)$(libsubdir)/include-fixed
  3049. -chmod a+rx $(DESTDIR)$(libsubdir)/include-fixed
  3050. # Create or recreate the install-tools include file directory.
  3051. itoolsdir = $(libexecsubdir)/install-tools
  3052. itoolsdatadir = $(libsubdir)/install-tools
  3053. install-itoolsdirs: installdirs
  3054. $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include
  3055. $(mkinstalldirs) $(DESTDIR)$(itoolsdir)
  3056. # Install the include directory using tar.
  3057. install-headers-tar: stmp-int-hdrs install-include-dir
  3058. # We use `pwd`/include instead of just include to problems with CDPATH
  3059. # Unless a full pathname is provided, some shells would print the new CWD,
  3060. # found in CDPATH, corrupting the output. We could just redirect the
  3061. # output of `cd', but some shells lose on redirection within `()'s
  3062. (cd `${PWD_COMMAND}`/include ; \
  3063. tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
  3064. (cd `${PWD_COMMAND}`/include-fixed ; \
  3065. tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
  3066. # /bin/sh on some systems returns the status of the first tar,
  3067. # and that can lose with GNU tar which always writes a full block.
  3068. # So use `exit 0' to ignore its exit status.
  3069. # Install the include directory using cpio.
  3070. install-headers-cpio: stmp-int-hdrs install-include-dir
  3071. # See discussion about the use of `pwd` above
  3072. cd `${PWD_COMMAND}`/include ; \
  3073. find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include
  3074. cd `${PWD_COMMAND}`/include-fixed ; \
  3075. find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include-fixed
  3076. # Install the include directory using cp.
  3077. install-headers-cp: stmp-int-hdrs install-include-dir
  3078. cp -p -r include $(DESTDIR)$(libsubdir)
  3079. cp -p -r include-fixed $(DESTDIR)$(libsubdir)
  3080. # Targets without dependencies, for use in prev-gcc during bootstrap.
  3081. real-install-headers-tar:
  3082. (cd `${PWD_COMMAND}`/include-fixed ; \
  3083. tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
  3084. real-install-headers-cpio:
  3085. cd `${PWD_COMMAND}`/include-fixed ; \
  3086. find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include-fixed
  3087. real-install-headers-cp:
  3088. cp -p -r include-fixed $(DESTDIR)$(libsubdir)
  3089. # Install supporting files for fixincludes to be run later.
  3090. install-mkheaders: stmp-int-hdrs install-itoolsdirs \
  3091. macro_list fixinc_list
  3092. $(INSTALL_DATA) $(srcdir)/gsyslimits.h \
  3093. $(DESTDIR)$(itoolsdatadir)/gsyslimits.h
  3094. $(INSTALL_DATA) macro_list $(DESTDIR)$(itoolsdatadir)/macro_list
  3095. $(INSTALL_DATA) fixinc_list $(DESTDIR)$(itoolsdatadir)/fixinc_list
  3096. set -e; for ml in `cat fixinc_list`; do \
  3097. multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
  3098. $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}; \
  3099. $(INSTALL_DATA) include-fixed$${multidir}/limits.h $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}/limits.h; \
  3100. done
  3101. $(INSTALL_SCRIPT) $(srcdir)/../mkinstalldirs \
  3102. $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
  3103. sysroot_headers_suffix='$${sysroot_headers_suffix}'; \
  3104. echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
  3105. > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
  3106. echo 'OTHER_FIXINCLUDES_DIRS="$(OTHER_FIXINCLUDES_DIRS)"' \
  3107. >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
  3108. echo 'STMP_FIXINC="$(STMP_FIXINC)"' \
  3109. >> $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
  3110. # Use this target to install the program `collect2' under the name `collect2'.
  3111. install-collect2: collect2 installdirs
  3112. $(INSTALL_PROGRAM) collect2$(exeext) $(DESTDIR)$(libexecsubdir)/collect2$(exeext)
  3113. # Install the driver program as $(libsubdir)/gcc for collect2.
  3114. $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(libexecsubdir)/gcc$(exeext)
  3115. # Install lto-wrapper.
  3116. install-lto-wrapper: lto-wrapper$(exeext)
  3117. $(INSTALL_PROGRAM) lto-wrapper$(exeext) $(DESTDIR)$(libexecsubdir)/lto-wrapper$(exeext)
  3118. install-gcc-ar: installdirs gcc-ar$(exeext) gcc-nm$(exeext) gcc-ranlib$(exeext)
  3119. if test "$(enable_as_accelerator)" != "yes" ; then \
  3120. for i in gcc-ar gcc-nm gcc-ranlib; do \
  3121. install_name=`echo $$i|sed '$(program_transform_name)'` ;\
  3122. target_install_name=$(target_noncanonical)-`echo $$i|sed '$(program_transform_name)'` ; \
  3123. rm -f $(DESTDIR)$(bindir)/$$install_name$(exeext) ; \
  3124. $(INSTALL_PROGRAM) $$i$(exeext) $(DESTDIR)$(bindir)/$$install_name$(exeext) ;\
  3125. if test -f gcc-cross$(exeext); then \
  3126. :; \
  3127. else \
  3128. rm -f $(DESTDIR)$(bindir)/$$target_install_name$(exeext); \
  3129. ( cd $(DESTDIR)$(bindir) && \
  3130. $(LN) $$install_name$(exeext) $$target_install_name$(exeext) ) ; \
  3131. fi ; \
  3132. done; \
  3133. fi
  3134. # Cancel installation by deleting the installed files.
  3135. uninstall: lang.uninstall
  3136. -rm -rf $(DESTDIR)$(libsubdir)
  3137. -rm -rf $(DESTDIR)$(libexecsubdir)
  3138. -rm -rf $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
  3139. -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
  3140. -if [ x$(cpp_install_dir) != x ]; then \
  3141. rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \
  3142. else true; fi
  3143. -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
  3144. -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
  3145. -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
  3146. -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
  3147. -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
  3148. for i in ar nm ranlib ; do \
  3149. install_name=`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ;\
  3150. target_install_name=$(target_noncanonical)-`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ; \
  3151. rm -f $(DESTDIR)$(bindir)/$$install_name ; \
  3152. rm -f $(DESTDIR)$(bindir)/$$target_install_name ; \
  3153. done
  3154. #
  3155. # These targets are for the dejagnu testsuites. The file site.exp
  3156. # contains global variables that all the testsuites will use.
  3157. target_subdir = x86_64-unknown-linux-gnu
  3158. site.exp: ./config.status Makefile
  3159. @echo "Making a new config file..."
  3160. -@rm -f ./site.tmp
  3161. @$(STAMP) site.exp
  3162. -@mv site.exp site.bak
  3163. @echo "## these variables are automatically generated by make ##" > ./site.tmp
  3164. @echo "# Do not edit here. If you wish to override these values" >> ./site.tmp
  3165. @echo "# add them to the last section" >> ./site.tmp
  3166. @echo "set rootme \"`${PWD_COMMAND}`\"" >> ./site.tmp
  3167. @echo "set srcdir \"`cd ${srcdir}; ${PWD_COMMAND}`\"" >> ./site.tmp
  3168. @echo "set host_triplet $(host)" >> ./site.tmp
  3169. @echo "set build_triplet $(build)" >> ./site.tmp
  3170. @echo "set target_triplet $(target)" >> ./site.tmp
  3171. @echo "set target_alias $(target_noncanonical)" >> ./site.tmp
  3172. @echo "set libiconv \"$(LIBICONV)\"" >> ./site.tmp
  3173. # CFLAGS is set even though it's empty to show we reserve the right to set it.
  3174. @echo "set CFLAGS \"\"" >> ./site.tmp
  3175. @echo "set CXXFLAGS \"\"" >> ./site.tmp
  3176. @echo "set HOSTCC \"$(CC)\"" >> ./site.tmp
  3177. @echo "set HOSTCFLAGS \"$(CFLAGS)\"" >> ./site.tmp
  3178. # TEST_ALWAYS_FLAGS are flags that should be passed to every compilation.
  3179. # They are passed first to allow individual tests to override them.
  3180. @echo "set TEST_ALWAYS_FLAGS \"$(SYSROOT_CFLAGS_FOR_TARGET)\"" >> ./site.tmp
  3181. # When running the tests we set GCC_EXEC_PREFIX to the install tree so that
  3182. # files that have already been installed there will be found. The -B option
  3183. # overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files
  3184. # from the install tree.
  3185. @echo "set TEST_GCC_EXEC_PREFIX \"$(libdir)/gcc/\"" >> ./site.tmp
  3186. @echo "set TESTING_IN_BUILD_TREE 1" >> ./site.tmp
  3187. @echo "set HAVE_LIBSTDCXX_V3 1" >> ./site.tmp
  3188. @if test "yes" = "yes" ; then \
  3189. echo "set ENABLE_PLUGIN 1" >> ./site.tmp; \
  3190. echo "set PLUGINCC \"$(PLUGINCC)\"" >> ./site.tmp; \
  3191. echo "set PLUGINCFLAGS \"$(PLUGINCFLAGS)\"" >> ./site.tmp; \
  3192. echo "set GMPINC \"$(GMPINC)\"" >> ./site.tmp; \
  3193. fi
  3194. # If newlib has been configured, we need to pass -B to gcc so it can find
  3195. # newlib's crt0.o if it exists. This will cause a "path prefix not used"
  3196. # message if it doesn't, but the testsuite is supposed to ignore the message -
  3197. # it's too difficult to tell when to and when not to pass -B (not all targets
  3198. # have crt0's). We could only add the -B if ../newlib/crt0.o exists, but that
  3199. # seems like too selective a test.
  3200. # ??? Another way to solve this might be to rely on linker scripts. Then
  3201. # theoretically the -B won't be needed.
  3202. # We also need to pass -L ../ld so that the linker can find ldscripts.
  3203. @if [ -d $(objdir)/../$(target_subdir)/newlib ] \
  3204. && [ "${host}" != "${target}" ]; then \
  3205. echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)/newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./site.tmp; \
  3206. echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)/newlib/\"" >> ./site.tmp; \
  3207. echo "append CFLAGS \" \$$newlib_cflags\"" >> ./site.tmp; \
  3208. echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./site.tmp; \
  3209. echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./site.tmp; \
  3210. else true; \
  3211. fi
  3212. @if [ -d $(objdir)/../ld ] ; then \
  3213. echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./site.tmp; \
  3214. else true; \
  3215. fi
  3216. echo "set tmpdir $(objdir)/testsuite" >> ./site.tmp
  3217. @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./site.tmp
  3218. @if [ "X$(ALT_CC_UNDER_TEST)" != "X" ] ; then \
  3219. echo "set ALT_CC_UNDER_TEST \"$(ALT_CC_UNDER_TEST)\"" >> ./site.tmp; \
  3220. else true; \
  3221. fi
  3222. @if [ "X$(ALT_CXX_UNDER_TEST)" != "X" ] ; then \
  3223. echo "set ALT_CXX_UNDER_TEST \"$(ALT_CXX_UNDER_TEST)\"" >> ./site.tmp; \
  3224. else true; \
  3225. fi
  3226. @if [ "X$(COMPAT_OPTIONS)" != "X" ] ; then \
  3227. echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./site.tmp; \
  3228. else true; \
  3229. fi
  3230. @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./site.tmp
  3231. @cat ./site.tmp > site.exp
  3232. @cat site.bak | sed \
  3233. -e '1,/^## All variables above are.*##/ d' >> site.exp
  3234. -@rm -f ./site.tmp
  3235. CHECK_TARGETS = check-c
  3236. check: $(CHECK_TARGETS)
  3237. check-subtargets: $(patsubst %,%-subtargets,$(CHECK_TARGETS))
  3238. # The idea is to parallelize testing of multilibs, for example:
  3239. # make -j3 check-gcc//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}
  3240. # will run 3 concurrent sessions of check-gcc, eventually testing
  3241. # all 10 combinations. GNU make is required, as is a shell that expands
  3242. # alternations within braces.
  3243. lang_checks_parallel = $(lang_checks:=//%)
  3244. $(lang_checks_parallel): site.exp
  3245. target=`echo "$@" | sed 's,//.*,,'`; \
  3246. variant=`echo "$@" | sed 's,^[^/]*//,,'`; \
  3247. vardots=`echo "$$variant" | sed 's,/,.,g'`; \
  3248. $(MAKE) TESTSUITEDIR="testsuite.$$vardots" \
  3249. RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
  3250. "$$target"
  3251. TESTSUITEDIR = testsuite
  3252. $(TESTSUITEDIR)/site.exp: site.exp
  3253. -test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR)
  3254. -rm -f $@
  3255. sed '/set tmpdir/ s|testsuite$$|$(TESTSUITEDIR)|' < site.exp > $@
  3256. # This is only used for check-% targets that aren't parallelized.
  3257. $(filter-out $(lang_checks_parallelized),$(lang_checks)): check-% : site.exp
  3258. -test -d plugin || mkdir plugin
  3259. -test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR)
  3260. test -d $(TESTSUITEDIR)/$* || mkdir $(TESTSUITEDIR)/$*
  3261. -(rootme=`${PWD_COMMAND}`; export rootme; \
  3262. srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
  3263. cd $(TESTSUITEDIR)/$*; \
  3264. rm -f tmp-site.exp; \
  3265. sed '/set tmpdir/ s|testsuite$$|$(TESTSUITEDIR)/$*|' \
  3266. < ../../site.exp > tmp-site.exp; \
  3267. $(SHELL) $${srcdir}/../move-if-change tmp-site.exp site.exp; \
  3268. EXPECT=${EXPECT} ; export EXPECT ; \
  3269. if [ -f $${rootme}/../expect/expect ] ; then \
  3270. TCL_LIBRARY=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
  3271. export TCL_LIBRARY ; fi ; \
  3272. $(RUNTEST) --tool $* $(RUNTESTFLAGS))
  3273. $(patsubst %,%-subtargets,$(lang_checks)): check-%-subtargets:
  3274. @echo check-$*
  3275. check_p_tool=$(firstword $(subst _, ,$*))
  3276. check_p_count=$(check_$(check_p_tool)_parallelize)
  3277. check_p_subno=$(word 2,$(subst _, ,$*))
  3278. check_p_numbers0:=1 2 3 4 5 6 7 8 9
  3279. check_p_numbers1:=0 $(check_p_numbers0)
  3280. check_p_numbers2:=$(foreach i,$(check_p_numbers0),$(addprefix $(i),$(check_p_numbers1)))
  3281. check_p_numbers3:=$(addprefix 0,$(check_p_numbers1)) $(check_p_numbers2)
  3282. check_p_numbers4:=$(foreach i,$(check_p_numbers0),$(addprefix $(i),$(check_p_numbers3)))
  3283. check_p_numbers5:=$(addprefix 0,$(check_p_numbers3)) $(check_p_numbers4)
  3284. check_p_numbers6:=$(foreach i,$(check_p_numbers0),$(addprefix $(i),$(check_p_numbers5)))
  3285. check_p_numbers:=$(check_p_numbers0) $(check_p_numbers2) $(check_p_numbers4) $(check_p_numbers6)
  3286. check_p_subdir=$(subst _,,$*)
  3287. check_p_subdirs=$(wordlist 1,$(check_p_count),$(wordlist 1, \
  3288. $(if $(GCC_TEST_PARALLEL_SLOTS),$(GCC_TEST_PARALLEL_SLOTS),128), \
  3289. $(check_p_numbers)))
  3290. # For parallelized check-% targets, this decides whether parallelization
  3291. # is desirable (if -jN is used). If desirable, recursive make is run with
  3292. # check-parallel-$lang{,1,2,3,4,5} etc. goals, which can be executed in
  3293. # parallel, as they are run in separate directories.
  3294. # check-parallel-$lang{,1,2,3,4,5} etc. goals invoke runtest with
  3295. # GCC_RUNTEST_PARALLELIZE_DIR var in the environment and runtest_file_p
  3296. # dejaGNU procedure is overridden to additionally synchronize through
  3297. # a $lang-parallel directory which tests will be run by which runtest instance.
  3298. # Afterwards contrib/dg-extract-results.sh is used to merge the sum and log
  3299. # files. If parallelization isn't desirable, only one recursive make
  3300. # is run with check-parallel-$lang goal and check_$lang_parallelize variable
  3301. # cleared to say that no additional arguments beyond $(RUNTESTFLAGS)
  3302. # should be passed to runtest.
  3303. #
  3304. # To parallelize some language check, add the corresponding check-$lang
  3305. # to lang_checks_parallelized variable and define check_$lang_parallelize
  3306. # variable (see above check_gcc_parallelize description).
  3307. $(lang_checks_parallelized): check-% : site.exp
  3308. -rm -rf $(TESTSUITEDIR)/$*-parallel
  3309. @if [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \
  3310. test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR) || true; \
  3311. test -d $(TESTSUITEDIR)/$*-parallel || mkdir $(TESTSUITEDIR)/$*-parallel || true; \
  3312. GCC_RUNTEST_PARALLELIZE_DIR=`${PWD_COMMAND}`/$(TESTSUITEDIR)/$(check_p_tool)-parallel ; \
  3313. export GCC_RUNTEST_PARALLELIZE_DIR ; \
  3314. $(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \
  3315. check-parallel-$* \
  3316. $(patsubst %,check-parallel-$*_%, $(check_p_subdirs)); \
  3317. sums= ; logs= ; \
  3318. for dir in $(TESTSUITEDIR)/$* \
  3319. $(patsubst %,$(TESTSUITEDIR)/$*%,$(check_p_subdirs));\
  3320. do \
  3321. if [ -d $$dir ]; then \
  3322. mv -f $$dir/$*.sum $$dir/$*.sum.sep; mv -f $$dir/$*.log $$dir/$*.log.sep; \
  3323. sums="$$sums $$dir/$*.sum.sep"; logs="$$logs $$dir/$*.log.sep"; \
  3324. fi; \
  3325. done; \
  3326. $(SHELL) $(srcdir)/../contrib/dg-extract-results.sh $$sums \
  3327. > $(TESTSUITEDIR)/$*/$*.sum; \
  3328. $(SHELL) $(srcdir)/../contrib/dg-extract-results.sh -L $$logs \
  3329. > $(TESTSUITEDIR)/$*/$*.log; \
  3330. rm -rf $(TESTSUITEDIR)/$*-parallel || true; \
  3331. else \
  3332. $(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \
  3333. check_$*_parallelize= check-parallel-$*; \
  3334. fi
  3335. check-parallel-% : site.exp
  3336. -@test -d plugin || mkdir plugin
  3337. -@test -d $(TESTSUITEDIR) || mkdir $(TESTSUITEDIR)
  3338. @test -d $(TESTSUITEDIR)/$(check_p_subdir) || mkdir $(TESTSUITEDIR)/$(check_p_subdir)
  3339. -$(if $(check_p_subno),@)(rootme=`${PWD_COMMAND}`; export rootme; \
  3340. srcdir=`cd ${srcdir}; ${PWD_COMMAND}` ; export srcdir ; \
  3341. if [ -n "$(check_p_subno)" ] \
  3342. && [ -n "$$GCC_RUNTEST_PARALLELIZE_DIR" ] \
  3343. && [ -f $(TESTSUITEDIR)/$(check_p_tool)-parallel/finished ]; then \
  3344. rm -rf $(TESTSUITEDIR)/$(check_p_subdir); \
  3345. else \
  3346. cd $(TESTSUITEDIR)/$(check_p_subdir); \
  3347. rm -f tmp-site.exp; \
  3348. sed '/set tmpdir/ s|testsuite$$|$(TESTSUITEDIR)/$(check_p_subdir)|' \
  3349. < ../../site.exp > tmp-site.exp; \
  3350. $(SHELL) $${srcdir}/../move-if-change tmp-site.exp site.exp; \
  3351. EXPECT=${EXPECT} ; export EXPECT ; \
  3352. if [ -f $${rootme}/../expect/expect ] ; then \
  3353. TCL_LIBRARY=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \
  3354. export TCL_LIBRARY ; \
  3355. fi ; \
  3356. $(RUNTEST) --tool $(check_p_tool) $(RUNTESTFLAGS); \
  3357. if [ -n "$$GCC_RUNTEST_PARALLELIZE_DIR" ] ; then \
  3358. touch $${rootme}/$(TESTSUITEDIR)/$(check_p_tool)-parallel/finished; \
  3359. fi ; \
  3360. fi )
  3361. # QMTest targets
  3362. # The path to qmtest.
  3363. QMTEST_PATH=qmtest
  3364. # The flags to pass to qmtest.
  3365. QMTESTFLAGS=
  3366. # The flags to pass to "qmtest run".
  3367. QMTESTRUNFLAGS=-f none --result-stream dejagnu_stream.DejaGNUStream
  3368. # The command to use to invoke qmtest.
  3369. QMTEST=${QMTEST_PATH} ${QMTESTFLAGS}
  3370. # The tests (or suites) to run.
  3371. QMTEST_GPP_TESTS=g++
  3372. # The subdirectory of the OBJDIR that will be used to store the QMTest
  3373. # test database configuration and that will be used for temporary
  3374. # scratch space during QMTest's execution.
  3375. QMTEST_DIR=qmtestsuite
  3376. # Create the QMTest database configuration.
  3377. ${QMTEST_DIR} stamp-qmtest:
  3378. ${QMTEST} -D ${QMTEST_DIR} create-tdb \
  3379. -c gcc_database.GCCDatabase \
  3380. -a srcdir=`cd ${srcdir}/testsuite && ${PWD_COMMAND}` && \
  3381. $(STAMP) stamp-qmtest
  3382. # Create the QMTest context file.
  3383. ${QMTEST_DIR}/context: stamp-qmtest
  3384. rm -f $@
  3385. echo "CompilerTable.languages=c cplusplus" >> $@
  3386. echo "CompilerTable.c_kind=GCC" >> $@
  3387. echo "CompilerTable.c_path=${objdir}/xgcc" >> $@
  3388. echo "CompilerTable.c_options=-B${objdir}/" >> $@
  3389. echo "CompilerTable.cplusplus_kind=GCC" >> $@
  3390. echo "CompilerTable.cplusplus_path=${objdir}/xg++" >> $@
  3391. echo "CompilerTable.cplusplus_options=-B${objdir}/" >> $@
  3392. echo "DejaGNUTest.target=${target_noncanonical}" >> $@
  3393. # Run the G++ testsuite using QMTest.
  3394. qmtest-g++: ${QMTEST_DIR}/context
  3395. cd ${QMTEST_DIR} && ${QMTEST} run ${QMTESTRUNFLAGS} -C context \
  3396. -o g++.qmr ${QMTEST_GPP_TESTS}
  3397. # Use the QMTest GUI.
  3398. qmtest-gui: ${QMTEST_DIR}/context
  3399. cd ${QMTEST_DIR} && ${QMTEST} gui -C context
  3400. .PHONY: qmtest-g++
  3401. # Run Paranoia on real.c.
  3402. paranoia.o: $(srcdir)/../contrib/paranoia.cc $(CONFIG_H) $(SYSTEM_H) $(TREE_H)
  3403. g++ -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
  3404. paranoia: paranoia.o real.o $(LIBIBERTY)
  3405. g++ -o $@ paranoia.o real.o $(LIBIBERTY)
  3406. # These exist for maintenance purposes.
  3407. # Update the tags table.
  3408. TAGS: lang.tags
  3409. (cd $(srcdir); \
  3410. incs= ; \
  3411. list='$(SUBDIRS)'; for dir in $$list; do \
  3412. if test -f $$dir/TAGS; then \
  3413. incs="$$incs --include $$dir/TAGS.sub"; \
  3414. fi; \
  3415. done; \
  3416. etags -o TAGS.sub c-family/*.h c-family/*.c *.h *.c *.cc \
  3417. ../include/*.h \
  3418. --language=none --regex="/\(char\|unsigned int\|int\|bool\|void\|HOST_WIDE_INT\|enum [A-Za-z_0-9]+\) [*]?\([A-Za-z_0-9]+\)/\2/" common.opt \
  3419. --language=none --regex="/\(DEF_RTL_EXPR\|DEFTREECODE\|DEFGSCODE\).*(\([A-Za-z_0-9]+\)/\2/" rtl.def tree.def gimple.def \
  3420. --language=none --regex="/DEFTIMEVAR (\([A-Za-z_0-9]+\)/\1/" timevar.def \
  3421. ; \
  3422. etags --include TAGS.sub $$incs)
  3423. # -----------------------------------------------------
  3424. # Rules for generating translated message descriptions.
  3425. # Disabled by autoconf if the tools are not available.
  3426. # -----------------------------------------------------
  3427. XGETTEXT =
  3428. GMSGFMT =
  3429. MSGMERGE = msgmerge
  3430. CATALOGS = $(patsubst %,po/%,)
  3431. .PHONY: build- install- build-po install-po update-po
  3432. # Dummy rules to deal with dependencies produced by use of
  3433. # "build-" and "install-" above, when NLS is disabled.
  3434. build-: ; @true
  3435. install-: ; @true
  3436. build-po: $(CATALOGS)
  3437. # This notation should be acceptable to all Make implementations used
  3438. # by people who are interested in updating .po files.
  3439. update-po: $(CATALOGS:.gmo=.pox)
  3440. # N.B. We do not attempt to copy these into $(srcdir). The snapshot
  3441. # script does that.
  3442. .po.gmo:
  3443. $(mkinstalldirs) po
  3444. $(GMSGFMT) --statistics -o $@ $<
  3445. # The new .po has to be gone over by hand, so we deposit it into
  3446. # build/po with a different extension.
  3447. # If build/po/gcc.pot exists, use it (it was just created),
  3448. # else use the one in srcdir.
  3449. .po.pox:
  3450. $(mkinstalldirs) po
  3451. $(MSGMERGE) $< `if test -f po/gcc.pot; \
  3452. then echo po/gcc.pot; \
  3453. else echo $(srcdir)/po/gcc.pot; fi` -o $@
  3454. # This rule has to look for .gmo modules in both srcdir and
  3455. # the cwd, and has to check that we actually have a catalog
  3456. # for each language, in case they weren't built or included
  3457. # with the distribution.
  3458. install-po:
  3459. $(mkinstalldirs) $(DESTDIR)$(datadir)
  3460. cats="$(CATALOGS)"; for cat in $$cats; do \
  3461. lang=`basename $$cat | sed 's/\.gmo$$//'`; \
  3462. if [ -f $$cat ]; then :; \
  3463. elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
  3464. else continue; \
  3465. fi; \
  3466. dir=$(localedir)/$$lang/LC_MESSAGES; \
  3467. echo $(mkinstalldirs) $(DESTDIR)$$dir; \
  3468. $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
  3469. echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
  3470. $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
  3471. done
  3472. # Rule for regenerating the message template (gcc.pot).
  3473. # Instead of forcing everyone to edit POTFILES.in, which proved impractical,
  3474. # this rule has no dependencies and always regenerates gcc.pot. This is
  3475. # relatively harmless since the .po files do not directly depend on it.
  3476. # Note that exgettext has an awk script embedded in it which requires a
  3477. # fairly modern (POSIX-compliant) awk.
  3478. # The .pot file is left in the build directory.
  3479. gcc.pot: po/gcc.pot
  3480. po/gcc.pot: force
  3481. $(mkinstalldirs) po
  3482. $(MAKE) srcextra
  3483. AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \
  3484. $(XGETTEXT) gcc $(srcdir)
  3485. #
  3486. # Dependency information.
  3487. # In order for parallel make to really start compiling the expensive
  3488. # objects from $(OBJS) as early as possible, build all their
  3489. # prerequisites strictly before all objects.
  3490. $(ALL_HOST_OBJS) : | $(generated_files)
  3491. # Include the auto-generated dependencies for all host objects.
  3492. DEPFILES = \
  3493. $(foreach obj,$(ALL_HOST_OBJS),\
  3494. $(dir $(obj))$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $(obj))))
  3495. -include $(DEPFILES)