1 # $NetBSD: Makefile,v 1.23 2025/10/20 14:31:38 nat Exp $ 2 3 HOSTPROG_CXX= 1 4 LIBISPRIVATE= yes 5 6 # For ../Makefile.inc and bsd.own.mk 7 .include <bsd.init.mk> 8 9 LIB= backend 10 11 SRCS= ${G_OBJS:S,analyzer/,,:S,rtl-ssa/,,} ${G_out_file:T} regsub.cc 12 13 # XXX: something misses these. 14 CLEANDIRFILES+= ${G_OBJS:.o=.d} 15 16 # Make sure we use the pre-generated C files 17 .l.c: 18 @true 19 20 BOTH_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} 21 CPPFLAGS+= ${BOTH_CPPFLAGS} -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\" 22 HOST_CPPFLAGS+= -I${HOST_LIBIBERTYOBJ}/libiberty 23 HOST_CPPFLAGS+= ${BOTH_CPPFLAGS} -DGENERATOR_FILE 24 DPSRCS+= version.h 25 DPSRCS+= insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h 26 DPSRCS+= ${DIST}/gcc/BASE-VER 27 CPPFLAGS+= -I${DIST}/libgcc 28 CPPFLAGS+= -I${.CURDIR}/../../lib/libgcc/libgcov/arch/${MACHINE_ARCH} 29 30 CPPFLAGS.cppdefault.cc+= -DPREFIX=\"/usr\" \ 31 -DNATIVE_SYSTEM_HEADER_DIR=\"${G_NATIVE_SYSTEM_HEADER_DIR}\" 32 CPPFLAGS.lto-streamer-in.cc+= -DTARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\" 33 34 HOST_CXXFLAGS+= -std=gnu++11 35 36 HOST_LIBIBERTYOBJ!= cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR} 37 38 .include <bsd.lib.mk> 39 40 # Force using C++ for this 41 ORIGHOST_CC:= ${HOST_CC} 42 HOST_CC:= ${HOST_CXX} 43 CC:= ${CXX} 44 CFLAGS:= ${CXXFLAGS} 45 46 # Check PREPROCESSOR_DEFINES for cppbuiltin.cc and cppdefault.cc 47 CPPFLAGS.cppbuiltin.cc+= -DBASEVER="\"${BASEVER}"\" 48 49 # 50 # Independent generation programs. 51 # 52 CLEANFILES+= gengenrtl genrtl.h \ 53 gengtype gtyp-gen.h gtype-brig.h gtype-desc.cc gtype-desc.h \ 54 gtype-c.h gtype-cp.h gtype-f.h gtype-objc.h \ 55 gtype-d.h gtype-fortran.h \ 56 genflags genflags.h \ 57 gencheck tree-check.h \ 58 insn-preds.cc genpreds tm-preds.h tm_p.h cs-tm_p.h \ 59 auto-host.h \ 60 gt-*.h *.o *.lo \ 61 cs-config.h \ 62 version.h \ 63 gtype-go.h gtype.state \ 64 pass-instances.def 65 66 # XXX 67 #COPTS.varasm.cc= -Wno-error 68 69 .SUFFIXES: .lo .h .c .cc 70 71 # XXX Override the normal rule to use HOST_COMPILE.cc 72 .c.lo: 73 ${_MKTARGET_COMPILE} 74 ${HOST_COMPILE.cc} -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} 75 mv ${.TARGET}.o ${.TARGET} 76 77 # Headers that host objects depend on (except gen*rtl*) 78 HH_NORTL= ${G_tm_file_list} ${G_build_xm_include_list} 79 HH= ${HH_NORTL} genrtl.h insn-modes.h insn-modes-inline.h \ 80 gensupport.h read-md.h optabs.def 81 82 # 83 # Generate the various header files we need. 84 # 85 genrtl.h: gengenrtl 86 ${_MKTARGET_CREATE} 87 ./gengenrtl >${.TARGET} 88 gengenrtl.lo: ${HH_NORTL} 89 gengenrtl: gengenrtl.lo build-errors.lo 90 ${_MKTARGET_LINK} 91 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} 92 93 insn-preds.cc: genpreds ${G_md_file} 94 ${_MKTARGET_CREATE} 95 ./genpreds ${G_md_file} >${.TARGET} 96 tm-preds.h: genpreds ${G_md_file} 97 ${_MKTARGET_CREATE} 98 ./genpreds -h ${G_md_file} >${.TARGET} 99 tm-constrs.h: genpreds ${G_md_file} 100 ${_MKTARGET_CREATE} 101 ./genpreds -c ${G_md_file} >${.TARGET} 102 103 # be nice to generate this entirely; but difficult. 104 gtyp-input.list.tmp: ${GCCARCH}/gtyp-input.list 105 sed s#SRCDIR#${DIST}# < ${.ALLSRC} > ${.TARGET} 106 CLEANFILES+= gtyp-input.list.tmp 107 108 # XXX 109 CLEANFILES+= gtype-lto.h gtype-objcp.h tm-constrs.h gtype-jit.h 110 111 gtype-desc.cc: gtype-desc.h 112 gtype-desc.h: gengtype gtyp-input.list.tmp 113 ${_MKTARGET_CREATE} 114 rm -f auto-host.h 115 ln -s ${.CURDIR}/../gcc/arch/${GCC_MACHINE_ARCH}/auto-host.h . 116 if [ -f ${.CURDIR}/../gcc/arch/${GCC_MACHINE_ARCH}/sysroot-suffix.h ]; then \ 117 rm -f sysroot-suffix.h; \ 118 ln -s ${.CURDIR}/../gcc/arch/${GCC_MACHINE_ARCH}/sysroot-suffix.h ; \ 119 fi 120 ./gengtype -S ${DIST}/gcc -I gtyp-input.list.tmp -w gtype.state 121 ./gengtype -r gtype.state 122 # GCC 4.8 installs gtype-state and gengtype as a plugin 123 124 # gengtype is the real need for options.h 125 gengtype.lo gengtype-lex.lo gengtype-parse.lo gengtype-state.lo: ${HH} gtyp-gen.h config.h options.h version.h 126 gengtype: gengtype.lo gengtype-lex.lo gengtype-parse.lo gengtype-state.lo build-errors.lo 127 ${_MKTARGET_LINK} 128 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} 129 130 # XXX fix this by properly marking all the files that should 131 # XXX be built with -DGENERATOR_FILE 132 COPTS.gengtype-lex.cc= -UGENERATOR_FILE -DHOST_GENERATOR_FILE 133 COPTS.gengtype-parse.cc= -UGENERATOR_FILE -DHOST_GENERATOR_FILE 134 COPTS.gengtype-state.cc= -UGENERATOR_FILE -DHOST_GENERATOR_FILE 135 COPTS.gengtype.cc= -UGENERATOR_FILE -DHOST_GENERATOR_FILE 136 137 gtyp-gen.h: Makefile 138 ${_MKTARGET_CREATE} 139 (\ 140 unset empty ; \ 141 echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";" ; \ 142 echo "static const char *lang_files[] = {" ; \ 143 for f in $$empty $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done ; \ 144 echo "NULL };" ; \ 145 echo "static const char *langs_for_lang_files[] = {" ; \ 146 for f in $$empty $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done ; \ 147 echo "NULL };" ; \ 148 echo "static const char *all_files[] = {" ; \ 149 for f in $$empty $(G_GTFILES); do echo "\"$$f\", "; done ; \ 150 echo " NULL };" ; \ 151 echo "static const char *lang_dir_names[] = {" ; \ 152 for f in c $(G_GTFILES_LANG_DIR_NAMES); do echo "\"$$f\", "; done ; \ 153 echo "NULL };" ; \ 154 ) >${.TARGET} 155 156 insn-modes.cc: genmodes 157 ${_MKTARGET_CREATE} 158 ./genmodes >${.TARGET} 159 insn-modes.h-test: genmodes 160 ${_MKTARGET_CREATE} 161 ./genmodes -h >${.TARGET} 162 # Ensure that the checked in version matches 163 if ! cmp ${.TARGET} ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}/insn-modes.h; then 164 echo "Checked in insn-modes.h does not match; rerun mknative-gcc." 1>&2 165 false 166 fi 167 min-insn-modes.cc: genmodes 168 ${_MKTARGET_CREATE} 169 ./genmodes -m >${.TARGET} 170 insn-modes-inline.h: genmodes 171 ${_MKTARGET_CREATE} 172 ./genmodes -i >${.TARGET} 173 genmodes.lo: ${HH_NORTL} 174 genmodes: genmodes.lo build-errors.lo 175 ${_MKTARGET_LINK} 176 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} 177 178 CLEANFILES+= genmodes insn-modes.cc insn-modes.h-test min-insn-modes.cc insn-modes-inline.h 179 180 gimple-match.cc: genmatch cfn-operators.pd 181 ./genmatch --gimple ${GNUHOSTDIST}/gcc/match.pd > gimple-match.cc.tmp 182 mv gimple-match.cc.tmp gimple-match.cc 183 generic-match.cc: genmatch cfn-operators.pd 184 ./genmatch --generic ${GNUHOSTDIST}/gcc/match.pd > generic-match.cc.tmp 185 mv generic-match.cc.tmp generic-match.cc 186 genmatch.lo: ${HH_NORTL} ${G_GGC_H} case-cfn-macros.h 187 genmatch: genmatch.lo build-errors.lo build-vec.lo build-hash-table.lo build-sort.lo 188 ${_MKTARGET_LINK} 189 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBCPP} ${HOSTLIBIBERTY} 190 191 CLEANFILES+= genmatch gimple-match.cc generic-match.cc 192 193 .include "${.PARSEDIR}/../../Makefile.version_h" 194 .include "${.PARSEDIR}/../Makefile.isl" 195 196 tm_p.h: Makefile tm-preds.h 197 ${_MKTARGET_CREATE} 198 TARGET_CPU_DEFAULT="" \ 199 HEADERS="$(G_tm_p_include_list)" DEFINES="" \ 200 ${HOST_SH} ${GNUHOSTDIST}/gcc/mkconfig.sh ${.TARGET} 201 202 # XXX crude 203 ${G_OBJS} ${G_OBJS:.o=.d}: tm.h tm_p.h insn-opinit.h 204 205 .include "../Makefile.options" 206 .include "../../Makefile.autobuild_h" 207 208 pass-instances.def: passes.def gen-pass-instances.awk 209 ${_MKTARGET_CREATE} 210 ${TOOL_AWK} -f ${GNUHOSTDIST}/gcc/gen-pass-instances.awk \ 211 ${GNUHOSTDIST}/gcc/passes.def > pass-instances.def 212 CLEANFILES+= pass-instances.def 213 214 # 215 # These are copies of files we build for the build host that are used 216 # by the genfoo programs. 217 # 218 219 build-rtl.cc: rtl.cc \ 220 ${G_RTL_H} real.h ${G_GCC_H} ${G_RTL_BASE_H} ${G_GGC_H} errors.h 221 ${_MKTARGET_CREATE} 222 rm -f build-rtl.cc 223 ${TOOL_SED} -e 's/<config[.]h/hconfig.h/' \ 224 ${GNUHOSTDIST}/gcc/rtl.cc >${.TARGET} 225 build-rtl.lo: ${HH} insn-constants.h 226 CLEANFILES+= build-rtl.cc 227 228 build-print-rtl.cc: print-rtl.cc \ 229 ${G_RTL_BASE_H} ${G_GTM_H} hard-reg-set.h 230 ${_MKTARGET_CREATE} 231 rm -f build-print-rtl.cc 232 ${TOOL_SED} -e 's/<config[.]h/hconfig.h/' \ 233 ${GNUHOSTDIST}/gcc/print-rtl.cc >${.TARGET} 234 build-print-rtl.lo: ${HH} 235 build-print-rtl.o: print-rtl.cc $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ 236 ${GTM_H} ${G_RTL_BASE_H} 237 CLEANFILES+= build-print-rtl.cc 238 239 build-bitmap.cc: bitmap.cc \ 240 ${G_RTL_H} flags.h ${G_BASIC_BLOCK_H} ${REGS_H} ${G_GCC_H} ${G_GGC_H} 241 ${_MKTARGET_CREATE} 242 rm -f build-bitmap.cc 243 ${TOOL_SED} -e 's/<config[.]h/hconfig.h/' \ 244 ${GNUHOSTDIST}/gcc/bitmap.cc >${.TARGET} 245 build-bitmap.lo: ${HH} 246 CLEANFILES+= build-bitmap.cc 247 248 build-errors.cc: errors.cc errors.h 249 ${_MKTARGET_CREATE} 250 rm -f build-errors.cc 251 cat ${GNUHOSTDIST}/gcc/errors.cc >${.TARGET} 252 build-errors.lo: ${HH_NORTL} 253 CLEANFILES+= build-errors.cc 254 255 build-varray.cc: varray.cc \ 256 ${G_RTL_H} ${G_GCC_H} ${TREE_H} bitmap.h errors.h 257 ${_MKTARGET_CREATE} 258 rm -f build-varray.cc 259 ${TOOL_SED} -e 's/<config[.]h/hconfig.h/' \ 260 ${GNUHOSTDIST}/gcc/varray.cc >${.TARGET} 261 build-varray.lo: ${HH} gtype-desc.h 262 CLEANFILES+= build-varray.cc 263 264 build-ggc-none.cc: ggc-none.cc \ 265 ${G_GCC_H} gtype-desc.h 266 ${_MKTARGET_CREATE} 267 rm -f build-ggc-none.cc 268 ${TOOL_SED} -e 's/<config[.]h/hconfig.h/' \ 269 ${GNUHOSTDIST}/gcc/ggc-none.cc >${.TARGET} 270 build-ggc-none.lo: ${HH} 271 CLEANFILES+= build-ggc-none.cc 272 273 build-hash-table.cc: hash-table.cc hash-table.h ${G_HASH_TABLE_H} ${HH} 274 ${_MKTARGET_CREATE} 275 rm -f build-hash-table.cc 276 cat ${GNUHOSTDIST}/gcc/hash-table.cc >${.TARGET} 277 build-hash-table.lo: ${HH_NORTL} 278 CLEANFILES+= build-hash-table.cc 279 280 build-vec.cc: vec.cc vec.h ${G_HASH_TABLE_H} ${HH} 281 ${_MKTARGET_CREATE} 282 rm -f build-vec.cc 283 cat ${GNUHOSTDIST}/gcc/vec.cc >${.TARGET} 284 build-vec.lo: ${HH_NORTL} 285 CLEANFILES+= build-vec.cc 286 287 build-sort.cc: sort.cc sort.h ${G_GGC_H} 288 ${_MKTARGET_CREATE} 289 rm -f build-sort.cc 290 cat ${GNUHOSTDIST}/gcc/sort.cc >${.TARGET} 291 build-sort.lo: ${HH_NORTL} 292 CLEANFILES+= build-sort.cc 293 294 build-genattrtab.o: ${G_GGC_H} 295 296 # 297 # The normal insn-foo generators 298 # 299 .for f in gensupport.cc read-rtl.cc dummy-conditions.cc read-md.cc 300 ${f:R}.lo: ${HH} 301 .endfor 302 303 # 304 # There are 5 main classes of generator programs. Ones 305 # that are self contained, ones that use error reporting 306 # mechanisms, ones that use the MD reader, and ones that 307 # use the RTL reader. 308 # 309 GENPROG_ERROR_DEPENDS= ${G_BUILD_ERRORS:.o=.lo} 310 GENPROG_READER_DEPENDS= ${G_BUILD_MD:.o=.lo} ${GENPROG_ERROR_DEPENDS} 311 GENPROG_RTL_DEPENDS= ${G_BUILD_RTL:.o=.lo} ${GENPROG_READER_DEPENDS} ${GENPROG_ERROR_DEPENDS} 312 313 # 314 # First we generate the rules for the generators. 315 # 316 .for f in attr attr-common attrtab automata codes conditions config emit \ 317 extract flags opinit output peep preds recog mddump condmd \ 318 target-def cfn-macros 319 gen${f}.lo: ${HH} gen${f}.cc ${G_RTL_BASE_H} build-sort.lo 320 gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS} 321 ${_MKTARGET_LINK} 322 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} build-sort.lo 323 CLEANFILES+= gen${f} gen${f}.lo 324 .endfor 325 326 .for f in mddeps constants enums 327 gen${f}.lo: ${HH} gen${f}.cc ${G_RTL_BASE_H} 328 gen${f}: gen${f}.lo ${GENPROG_READER_DEPENDS} 329 ${_MKTARGET_LINK} 330 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} 331 CLEANFILES+= gen${f} gen${f}.lo 332 .endfor 333 334 .for f in check checksum 335 gen${f}.lo: ${HH} gen${f}.cc ${G_RTL_BASE_H} 336 gen${f}: gen${f}.lo 337 ${_MKTARGET_LINK} 338 ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} 339 CLEANFILES+= gen${f} gen${f}.lo 340 .endfor 341 342 .include "../../Makefile.hooks" 343 344 # 345 # Second we generate the rules for the generated files. There 346 # are 3 main classes: RTL based or not, plus special cases. 347 # 348 # The special cases are: gencheck, genattrtab, genopinit, 349 # gencondmd 350 # 351 352 # RTL based files 353 .for f in attr.h attr-common.h codes.h config.h flags.h \ 354 automata.cc emit.cc extract.cc output.cc peep.cc recog.cc \ 355 target-def.h 356 insn-${f}: gen${f:R} ${G_md_file} insn-conditions.md 357 ${_MKTARGET_CREATE} 358 ./gen${f:R} ${G_md_file} insn-conditions.md >${.TARGET} 359 CLEANFILES+= insn-${f} 360 .endfor 361 362 # normal files 363 .for f in constants.h enums.cc 364 insn-${f}: gen${f:R} ${G_md_file} 365 ${_MKTARGET_CREATE} 366 ./gen${f:R} ${G_md_file} >${.TARGET} 367 CLEANFILES+= insn-${f} 368 .endfor 369 370 # genconditions outputs gencondmd.cc 371 gencondmd.cc: genconditions ${G_md_file} 372 ${_MKTARGET_CREATE} 373 ./genconditions ${G_md_file} >${.TARGET} 374 CLEANFILES+= gencondmd.cc 375 376 # gencheck outputs tree-check.h 377 tree-check.h: gencheck 378 ${_MKTARGET_CREATE} 379 ./gencheck >${.TARGET} 380 CLEANFILES+= tree-check.h 381 382 # genattrtab has three output files 383 insn-dfatab.cc insn-latencytab.cc: insn-attrtab.cc 384 cp -p ${.TARGET}.tmp ${.TARGET} 385 insn-attrtab.cc: genattrtab ${G_md_file} insn-conditions.md 386 ${_MKTARGET_CREATE} 387 ./genattrtab ${G_md_file} insn-conditions.md \ 388 -A${.TARGET}.tmp -Dinsn-dfatab.cc.tmp -Linsn-latencytab.cc.tmp && \ 389 mv ${.TARGET}.tmp ${.TARGET} 390 CLEANFILES+= insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc \ 391 insn-dfatab.cc.tmp insn-latencytab.cc.tmp 392 393 # genopinit has two output files 394 insn-opinit.h: insn-opinit.cc 395 cp -p ${.TARGET}.tmp ${.TARGET} 396 insn-opinit.cc: genopinit ${G_md_file} insn-conditions.md 397 ${_MKTARGET_CREATE} 398 ./genopinit ${G_md_file} insn-conditions.md \ 399 -hinsn-opinit.h.tmp -c${.TARGET}.tmp && \ 400 mv ${.TARGET}.tmp ${.TARGET} 401 CLEANFILES+= insn-opinit.h insn-opinit.cc insn-opinit.h.tmp 402 403 LDFLAGS.genautomata+= -lm 404 405 # gencondmd outputs a special .md file 406 insn-conditions.md: gencondmd 407 ./gencondmd >${.TARGET} 408 CLEANFILES+= insn-conditions.md 409 410 # build case-cfn-macros.h and cfn-operators.pd 411 case-cfn-macros.h: gencfn-macros 412 ./gencfn-macros -c > case-cfn-macros.h.tmp && \ 413 mv case-cfn-macros.h.tmp case-cfn-macros.h 414 cfn-operators.pd: gencfn-macros 415 ./gencfn-macros -o > cfn-operators.pd.tmp && \ 416 mv cfn-operators.pd.tmp cfn-operators.pd 417 CLEANFILES+= case-cfn-macros.h.tmp case-cfn-macros.h \ 418 cfn-operators.pd.tmp cfn-operators.pd 419 420 CASECFNDEPS= aarch64-builtins.cc arm-builtins.cc i386.cc rs6000.cc \ 421 riscv-builtins.cc builtins.cc \ 422 fold-const.cc tree-ssa-math-opts.cc tree-ssa-reassoc.cc \ 423 tree-vect-patterns.cc tree-vrp.cc generic-match-head.cc \ 424 gimple-match-head.cc fold-const-call.cc \ 425 gimple-ssa-backprop.cc 426 ${CASECFNDEPS}: case-cfn-macros.h 427 428 aarch64-builtin-iterators.h: ${DIST}/gcc/config/aarch64/geniterators.sh \ 429 ${DIST}/gcc/config/aarch64/iterators.md 430 $(HOST_SH) ${.ALLSRC} > ${.TARGET} 431 432 CLEANFILES+= aarch-builtin-iterators.h 433 434 .if ${GCC_MACHINE_ARCH} == "powerpc" || ${GCC_MACHINE_ARCH} == "powerpc64" # { 435 436 .include "../rs6000-inc.mk" 437 gtype-desc.h: rs6000-builtins.h 438 439 .endif # } 440 441 442 # 443 # Required hard-coded dependancies. 444 # 445 aarch64-builtins.o: aarch64-builtin-iterators.h 446 tm.h: insn-constants.h 447 genextract.lo: insn-config.h 448 gencondmd.lo: tm_p.h tm-constrs.h 449 read-rtl.lo gencodes.lo genattrtab.lo genautomata.lo: tm.h gtype-desc.h 450 genattr-common.lo gensupport.lo genconditions.lo gentarget-def.lo: tm.h 451 genattr.lo genflags.lo genemit.lo genconfig.lo gencheck.lo: gtype-desc.h tm.h 452 genopinit.lo genrecog.lo genpreds.lo genoutput.lo genpeep.lo: tm.h 453 build-ggc-none.lo: gtype-desc.h 454 ggc-none.o: gtype-desc.h 455 insn-attrtab.o: insn-config.h 456 insn-extract.o: insn-config.h 457 toplev.d toplev.o: options.h 458 coverage.d: version.h 459 gcov-io.h: version.h 460 cgraph.d cgraphunit.d cgraphunit.o: gcov-io.h 461 vec.lo: gtype-desc.h 462 insn-emit.d insn-emit.o: tm-constrs.h 463 insn-attr.h: insn-attr-common.h 464 gcov-io.h: version.h 465 df-scan.d df-scan.o: target-hooks-def.h 466 read-md.d read-md.o read-md.lo: auto-build.h 467 hash-table.d hash-table.o hash-table.lo: auto-build.h gtype-desc.h 468 gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h 469 pass_manager.h passes.cc: pass-instances.def 470 context.d coverage.d lto-cgraph.d passes.d statistics.d toplev.d cgraphunit.d: pass_manager.h 471 context.o coverage.o lto-cgraph.o passes.o statistics.o toplev.o cgraphunit.o: pass_manager.h 472 insn-opinit.o insn-opinit.d: insn-flags.h 473 gensupport.o: ${G_HASH_TABLE_H} 474 vec.o: ${G_HASH_TABLE_H} 475 .for _f in insn-attrtab insn-automata insn-dfatab insn-latencytab insn-output 476 ${_f}.o ${_f}.d: insn-attr-common.h insn-attr.h 477 .endfor 478 .for _f in insn-attrtab insn-automata insn-dfatab insn-emit insn-extract \ 479 insn-latencytab insn-opinit insn-output insn-peep insn-preds \ 480 insn-recog 481 ${_f}.o ${_f}.d: insn-codes.h insn-config.h insn-constants.h insn-flags.h 482 .endfor 483 .for _f in insn-enums insn-modes 484 ${_f}.o ${_f}.d: insn-constants.h 485 .endfor 486 .for _f in data-streamer data-streamer-out coverage gcov-dump gcov-io \ 487 gcov libgcov lto-cgraph mcf modulo-sched profile value-prof 488 ${_f}.o ${_f}.d: gcov-io.h 489 .endfor 490 491 ${G_out_file:T:.cc=.o}: insn-target-def.h target-hooks-def.h tm-constrs.h 492 493 # XXX make all hooks generated for now. 494 final.o: target-hooks-def.h c-family/c-target-hooks-def.h common/common-target-hooks-def.h 495 496 #COPTS.ira-color.cc+= -Wno-error=int-in-bool-context 497 498 .if ${MACHINE_CPU} == "arm" 499 # XXX insn-recog.cc:10304:7: error: this decimal constant is unsigned only in ISO C90 [-Werror] 500 #COPTS.insn-recog.cc+=-Wno-error 501 .endif 502 503 .if ${GCC_MACHINE_ARCH} == "i386" || ${GCC_MACHINE_ARCH} == "x86_64" 504 i386.d i386.o: pass_manager.h 505 .endif 506 507 .if ${MACHINE_CPU} == "mips" 508 # XXX mips.md:3474:11: error: this decimal constant is unsigned only in ISO C90 [-Werror] 509 #COPTS.insn-recog.cc+=-Wno-error 510 .endif 511 512 .if ${GCC_MACHINE_ARCH} == "vax" 513 CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH} 514 515 COPTS.expmed.c+=-Wno-error=tautological-compare 516 COPTS.expr.c+=-Wno-error=tautological-compare 517 .endif 518 519 COPTS.tree.cc+= ${${ACTIVE_CC} == "clang" :? -O0 :} 520 521 CFLAGS+= -Wno-stack-protector 522 523 #COPTS.dwarf2out.cc+=${CC_WNO_MAYBE_UNINITIALIZED} 524 525 .if ${GCC_MACHINE_ARCH} == "m68000" || \ 526 ${GCC_MACHINE_ARCH:S/m68ksf/m68k/} == "m68k" || \ 527 ${GCC_MACHINE_ARCH} == "coldfire" 528 #COPTS.tree-loop-distribution.cc+=-O2 529 #COPTS.generic-match.cc+=-fno-jump-tables 530 #COPTS.gimple-match.cc+=-fno-jump-tables 531 .endif 532 533 # XXXGCC12 534 COPTS.diagnostic-manager.cc+= -Wno-format-extra-args -Wno-format 535 536 # Don't fight with decimal128Local.h. 537 # The GCC build only ignores the warning? 538 COPTS.dfp.cc+= -fno-strict-aliasing 539 540 CFLAGS+= -fno-exceptions -fno-rtti -fasynchronous-unwind-tables 541 542 .PATH: ${DIST}/gcc ${DIST}/libiberty ${GCCARCH} ${G_out_file:H} ${DIST}/include 543 .PATH: ${DIST}/gcc/config 544 .PATH: ${DIST}/gcc/analyzer 545 .PATH: ${DIST}/gcc/rtl-ssa 546 .if ${MACHINE_CPU} == "aarch64" 547 .PATH: ${DIST}/gcc/config/arm 548 .endif 549 550 .if ${MACHINE} == "vax" 551 CPPFLAGS+= -DNB_FIX_VAX_BACKEND 552 .endif 553