Makefile.in 143 KB

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