xref: /netbsd-src/external/gpl3/gcc.old/usr.bin/backend/Makefile (revision 796c32c94f6e154afc9de0f63da35c91bb739b45)
1#	$NetBSD: Makefile,v 1.8 2017/10/08 11:08:55 joerg Exp $
2
3LIBISPRIVATE=	yes
4
5LIB=		backend
6
7SRCS=		${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
13BOTH_CPPFLAGS+=	-I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
14CPPFLAGS+=	${BOTH_CPPFLAGS} -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\"
15HOST_CPPFLAGS+=	-I${HOST_LIBIBERTYOBJ}/libiberty
16HOST_CPPFLAGS+=	${BOTH_CPPFLAGS} -DGENERATOR_FILE
17DPSRCS+=	insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h
18CPPFLAGS+=	-I${DIST}/libgcc
19CPPFLAGS+=	-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${MACHINE_ARCH}
20
21CPPFLAGS.cppdefault.c+=	-DPREFIX=\"/usr\" \
22			-DNATIVE_SYSTEM_HEADER_DIR=\"${G_NATIVE_SYSTEM_HEADER_DIR}\"
23
24HOSTPROG_CXX=	1
25
26.include <bsd.own.mk>
27
28HOST_LIBIBERTYOBJ!=	cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
29
30# XXX ${G_OBJS:.o=.c} is invalid in GCC 5.3, but work around for now
31BUILDSYMLINKS+=	${GNUHOSTDIST}/gcc/wide-int-print.cc wide-int-print.c
32BUILDSYMLINKS+=	${GNUHOSTDIST}/gcc/wide-int.cc wide-int.c
33
34.if ${MACHINE_CPU} == "sh3"
35BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-mem.cc sh-mem.c
36BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh_treg_combine.cc sh_treg_combine.c
37BUILDSYMLINKS+= ${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
43ORIGHOST_CC:=	${HOST_CC}
44HOST_CC:=	${HOST_CXX}
45CC:=		${CXX}
46CFLAGS:=	${CXXFLAGS}
47
48# Check PREPROCESSOR_DEFINES for cppbuiltin.c and cppdefault.c
49CPPFLAGS.cppbuiltin.c+=	-DBASEVER="\"${BASEVER}"\"
50
51#
52# Independent generation programs.
53#
54CLEANFILES+=	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
68COPTS.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*)
77HH_NORTL=	${G_tm_file_list} ${G_build_xm_include_list}
78HH=		${HH_NORTL} genrtl.h insn-modes.h
79
80#
81# Generate the various header files we need.
82#
83genrtl.h: gengenrtl
84	${_MKTARGET_CREATE}
85	./gengenrtl >${.TARGET}
86gengenrtl.lo: ${HH_NORTL}
87gengenrtl: gengenrtl.lo build-errors.lo
88	${_MKTARGET_LINK}
89	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
90
91insn-preds.c: genpreds ${G_md_file}
92	${_MKTARGET_CREATE}
93	./genpreds ${G_md_file} >${.TARGET}
94tm-preds.h: genpreds ${G_md_file}
95	${_MKTARGET_CREATE}
96	./genpreds -h ${G_md_file} >${.TARGET}
97tm-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.
102gtyp-input.list.tmp: ${GCCARCH}/gtyp-input.list
103	sed s#SRCDIR#${DIST}# < ${.ALLSRC} > ${.TARGET}
104CLEANFILES+=	gtyp-input.list.tmp
105
106# XXX
107CLEANFILES+=	gtype-lto.h gtype-objcp.h tm-constrs.h gtype-jit.h
108
109gtype-desc.c: gtype-desc.h
110gtype-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
123gengtype.lo gengtype-lex.lo gengtype-parse.lo gengtype-state.lo version.lo: ${HH} gtyp-gen.h config.h options.h
124gengtype: 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
130COPTS.gengtype-lex.c=	-UGENERATOR_FILE -DHOST_GENERATOR_FILE
131COPTS.gengtype-parse.c=	-UGENERATOR_FILE -DHOST_GENERATOR_FILE
132COPTS.gengtype-state.c=	-UGENERATOR_FILE -DHOST_GENERATOR_FILE
133COPTS.gengtype.c=	-UGENERATOR_FILE -DHOST_GENERATOR_FILE
134
135gtyp-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
154insn-modes.c: genmodes
155	${_MKTARGET_CREATE}
156	./genmodes >${.TARGET}
157insn-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
165min-insn-modes.c: genmodes
166	${_MKTARGET_CREATE}
167	./genmodes -m >${.TARGET}
168genmodes.lo: ${HH_NORTL}
169genmodes: genmodes.lo build-errors.lo
170	${_MKTARGET_LINK}
171	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
172
173CLEANFILES+=	genmodes insn-modes.c insn-modes.h-test min-insn-modes.c
174
175gimple-match.c: genmatch
176	./genmatch --gimple ${GNUHOSTDIST}/gcc/match.pd > gimple-match.c.tmp
177	mv gimple-match.c.tmp gimple-match.c
178generic-match.c: genmatch
179	./genmatch --generic ${GNUHOSTDIST}/gcc/match.pd > generic-match.c.tmp
180	mv generic-match.c.tmp generic-match.c
181genmatch.lo: ${HH_NORTL} ${G_GGC_H}
182genmatch: 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
186CLEANFILES+=	genmatch gimple-match.c generic-match.c
187
188gcov-iov.h: gcov-iov
189	${_MKTARGET_CREATE}
190	./gcov-iov "${BASEVER}" "${DEVPHASE}" >${.TARGET}
191gcov-iov.lo: ${HH_NORTL}
192gcov-iov: gcov-iov.lo
193	${_MKTARGET_CREATE}
194	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
195
196tm_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.
209CLEANFILES+=	auto-build.h
210HOST_CFLAGS+= -I${.OBJDIR}
211auto-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
229pass-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
233CLEANFILES+=	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
240build-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}
246build-rtl.lo: ${HH}
247CLEANFILES+=	build-rtl.c
248
249build-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}
255build-print-rtl.lo: ${HH}
256build-print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h     \
257  $(GTM_H) $(RTL_BASE_H)
258CLEANFILES+=	build-print-rtl.c
259
260build-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}
266build-bitmap.lo: ${HH}
267CLEANFILES+=	build-bitmap.c
268
269build-errors.c: errors.c errors.h
270	${_MKTARGET_CREATE}
271	rm -f build-errors.c
272	cat ${GNUHOSTDIST}/gcc/errors.c >${.TARGET}
273build-errors.lo: ${HH_NORTL}
274CLEANFILES+=	build-errors.c
275
276build-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}
282build-varray.lo: ${HH} gtype-desc.h
283CLEANFILES+=	build-varray.c
284
285build-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}
291build-ggc-none.lo: ${HH}
292CLEANFILES+=	build-ggc-none.c
293
294build-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}
298build-hash-table.lo: ${HH_NORTL}
299CLEANFILES+=	build-hash-table.c
300
301build-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}
305build-vec.lo: ${HH_NORTL}
306CLEANFILES+=	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#
321GENPROG_ERROR_DEPENDS=	${G_BUILD_ERRORS:.o=.lo}
322GENPROG_READER_DEPENDS=	${G_BUILD_MD:.o=.lo} ${GENPROG_ERROR_DEPENDS}
323GENPROG_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
330gen${f}.lo: ${HH} gen${f}.c
331gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS}
332	${_MKTARGET_LINK}
333	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
334CLEANFILES+=	gen${f} gen${f}.lo
335.endfor
336
337.for f in mddeps constants enums
338gen${f}.lo: ${HH} gen${f}.c
339gen${f}: gen${f}.lo ${GENPROG_READER_DEPENDS}
340	${_MKTARGET_LINK}
341	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
342CLEANFILES+=	gen${f} gen${f}.lo
343.endfor
344
345.for f in check checksum
346gen${f}.lo: ${HH} gen${f}.c
347gen${f}: gen${f}.lo
348	${_MKTARGET_LINK}
349	${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
350CLEANFILES+=	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
366insn-${f}: gen${f:R} ${G_md_file} insn-conditions.md
367	${_MKTARGET_CREATE}
368	./gen${f:R} ${G_md_file} insn-conditions.md >${.TARGET}
369CLEANFILES+=	insn-${f}
370.endfor
371
372# normal files
373.for f in constants.h enums.c
374insn-${f}: gen${f:R} ${G_md_file}
375	${_MKTARGET_CREATE}
376	./gen${f:R} ${G_md_file} >${.TARGET}
377CLEANFILES+=	insn-${f}
378.endfor
379
380# genconditions outputs gencondmd.c
381gencondmd.c: genconditions ${G_md_file}
382	${_MKTARGET_CREATE}
383	./genconditions ${G_md_file} >${.TARGET}
384CLEANFILES+=	gencondmd.c
385
386# gencheck outputs tree-check.h
387tree-check.h: gencheck
388	${_MKTARGET_CREATE}
389	./gencheck >${.TARGET}
390CLEANFILES+=	tree-check.h
391
392# Some generators output is not the normal name.
393BUILDSYMLINKS+= insn-check.h tree-check.h
394
395# genattrtab has three output files
396# XXX fix me
397insn-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
400CLEANFILES+=	insn-attrtab.c insn-dfatab.c insn-latencytab.c
401
402# genopinit has two output files
403insn-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
406CLEANFILES+=	insn-opinit.h insn-opinit.c
407
408LDFLAGS.genautomata+=	-lm
409
410# gencondmd outputs a special .md file
411insn-conditions.md: gencondmd
412	./gencondmd >${.TARGET}
413CLEANFILES+=	insn-conditions.md
414
415
416#
417# Required hard-coded dependancies.
418#
419genextract.lo: insn-config.h
420gencondmd.lo: tm_p.h tm-constrs.h
421read-rtl.lo gencodes.lo genattrtab.lo genautomata.lo: insn-constants.h
422genattr-common.lo gensupport.lo genconditions.lo: insn-constants.h
423genattr.lo genflags.lo genemit.lo genconfig.lo gencheck.lo: insn-constants.h
424genopinit.lo genrecog.lo genpreds.lo genoutput.lo genpeep.lo: insn-constants.h
425build-ggc-none.lo: gtype-desc.h
426ggc-none.o: gtype-desc.h
427
428insn-attrtab.o: insn-config.h
429insn-extract.o: insn-config.h
430toplev.d toplev.o: options.h
431coverage.d: gcov-iov.h
432gcov-io.h: gcov-iov.h
433alias.d alias.o: insn-constants.h tm_p.h
434cgraph.d cgraphunit.d cgraphunit.o: gcov-io.h
435vec.lo: gtype-desc.h
436gtype-desc.d gtype-desc.o: insn-constants.h
437insn-emit.d insn-emit.o: tm-constrs.h
438insn-attr.h: insn-attr-common.h
439asan.d asan.o: insn-opinit.h
440data-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
441data-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
442gcov-io.h: gcov-iov.h
443df-scan.d df-scan.o: target-hooks-def.h
444read-md.d read-md.o read-md.lo: auto-build.h
445cgraphunit.d cgraphunit.o: pass-instances.def
446
447# XXX make all hooks generated for now.
448final.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"
451alpha.d alpha.o: tm-constrs.h tm_p.h insn-opinit.h target-hooks-def.h
452alpha.d: pass-instances.def
453.endif
454
455.if ${MACHINE_CPU} == "arm"
456arm.d arm.o: insn-constants.h tm_p.h insn-opinit.h target-hooks-def.h
457arm-builtins.d arm-builtins.o: insn-opinit.h
458.endif
459
460.if ${GCC_MACHINE_ARCH} == "i386" || ${GCC_MACHINE_ARCH} == "x86_64"
461i386.d i386.o: tm-constrs.h
462.endif
463
464.if ${GCC_MACHINE_ARCH} == "vax"
465CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH}
466COPTS.builtins.c+=-O0
467COPTS.convert.c+=-O0
468COPTS.dwarf2out.c+=-O0
469COPTS.dse.c+=-O0					# XXX port-vax/51967
470COPTS.expmed.c+=-O0
471COPTS.expr.c+=-O0
472COPTS.fixed-value.c+=-O0
473COPTS.fold-const.c+=-O0
474COPTS.gimple-fold.c+=-O0
475COPTS.gimple-ssa-strength-reduction.c+=-O0
476COPTS.gimple.c+=-O0
477COPTS.internal-fn.c+=-O0
478COPTS.lto-streamer-out.c+=-O0
479COPTS.omp-low.c+=-O0
480COPTS.predict.c+=-O0
481COPTS.recog.c+=-O0
482COPTS.sanopt.c+=-O0
483COPTS.stmt.c+=-O0
484COPTS.stor-layout.c+=-O0
485COPTS.targhooks.c+=-O0
486COPTS.tree-affine.c+=-O0
487COPTS.tree-cfg.c+=-O0
488COPTS.tree-eh.c+=-O0
489COPTS.tree-object-size.c+=-O0
490COPTS.tree-predcom.c+=-O0
491COPTS.tree-pretty-print.c+=-O0
492COPTS.tree-ssa-alias.c+=-O0
493COPTS.tree-ssa-ccp.c+=-O0
494COPTS.tree-ssa-forwprop.c+=-O0
495COPTS.tree-ssa-loop-ivopts.c+=-O0
496COPTS.tree-ssa-loop-manip.c+=-O0
497COPTS.tree-ssa-loop-niter.c+=-O0
498COPTS.tree-ssa-math-opts.c+=-O0
499COPTS.tree-ssa-pre.c+=-O0
500COPTS.tree-ssa-reassoc.c+=-O0
501COPTS.tree-ssa-uninit.c+=-O0
502COPTS.tree-switch-conversion.c+=-O0
503COPTS.tree-vect-data-refs.c+=-O0
504COPTS.tree-vect-loop-manip.c+=-O0
505COPTS.tree-vect-patterns.c+=-O0
506COPTS.tree-vect-stmts.c+=-O0
507COPTS.tree-vrp.c+=-O0
508COPTS.tree.c+=-O0
509COPTS.ubsan.c+=-O0
510COPTS.varasm.c+=-O0
511COPTS.wide-int.c+=-O0
512.else
513COPTS.tree.c=	${${ACTIVE_CC} == "clang" :? -O0 :}
514.endif
515
516CFLAGS+=	-Wno-stack-protector
517
518.if ${GCC_MACHINE_ARCH} == "m68000" || ${GCC_MACHINE_ARCH} == "m68k" || \
519	${GCC_MACHINE_ARCH} == "coldfire"
520COPTS.tree-loop-distribution.c+=-O2
521COPTS.generic-match.c+=-fno-jump-tables
522COPTS.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