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