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