xref: /dragonfly/gnu/usr.bin/cc80/libbackend/Makefile (revision 97fa55c4)
1GCC_NO_LIBS=	yes
2LOCAL_CONFIG=	yes
3.include "../Makefile.inc"
4.PATH: $(srcdir)/config/i386
5
6CFLAGS+=	-DTARGET_NAME=\"${target_machine}\"
7# needed to compile hsa/brig bits
8CXXFLAGS+=	${NOEXCEPTION_FLAGS}
9
10LIB=		backend
11INTERNALLIB=	YES
12
13# almost verbatim from Makefile, objects from cc files have been pulled out
14# because the .o=.c is wrong for them
15host_hook_obj=host-default.o
16out_object_file=i386.o
17EXTRA_OBJS=	x86-tune-sched.o x86-tune-sched-bd.o \
18		x86-tune-sched-atom.o x86-tune-sched-core.o
19BACKEND_OBJS= \
20	gimple-match.o \
21	generic-match.o \
22	insn-attrtab.o \
23	insn-automata.o \
24	insn-dfatab.o \
25	insn-emit.o \
26	insn-extract.o \
27	insn-latencytab.o \
28	insn-modes.o \
29	insn-opinit.o \
30	insn-output.o \
31	insn-peep.o \
32	insn-preds.o \
33	insn-recog.o \
34	insn-enums.o \
35	ggc-page.o \
36	alias.o \
37	alloc-pool.o \
38	auto-inc-dec.o \
39	auto-profile.o \
40	bb-reorder.o \
41	bitmap.o \
42	bt-load.o \
43	builtins.o \
44	caller-save.o \
45	calls.o \
46	ccmp.o \
47	cfg.o \
48	cfganal.o \
49	cfgbuild.o \
50	cfgcleanup.o \
51	cfgexpand.o \
52	cfghooks.o \
53	cfgloop.o \
54	cfgloopanal.o \
55	cfgloopmanip.o \
56	cfgrtl.o \
57	symtab.o \
58	cgraph.o \
59	cgraphbuild.o \
60	cgraphunit.o \
61	cgraphclones.o \
62	combine.o \
63	combine-stack-adj.o \
64	compare-elim.o \
65	context.o \
66	convert.o \
67	coverage.o \
68	cppbuiltin.o \
69	cppdefault.o \
70	cprop.o \
71	cse.o \
72	cselib.o \
73	data-streamer.o \
74	data-streamer-in.o \
75	data-streamer-out.o \
76	dbxout.o \
77	dbgcnt.o \
78	dce.o \
79	ddg.o \
80	debug.o \
81	df-core.o \
82	df-problems.o \
83	df-scan.o \
84	dfp.o \
85	dojump.o \
86	dominance.o \
87	domwalk.o \
88	double-int.o \
89	dse.o \
90	dumpfile.o \
91	dwarf2asm.o \
92	dwarf2cfi.o \
93	dwarf2out.o \
94	early-remat.o \
95	emit-rtl.o \
96	et-forest.o \
97	except.o \
98	explow.o \
99	expmed.o \
100	expr.o \
101	file-prefix-map.o \
102	final.o \
103	fixed-value.o \
104	fold-const.o \
105	fold-const-call.o \
106	function.o \
107	fwprop.o \
108	gcc-rich-location.o \
109	gcse.o \
110	gcse-common.o \
111	ggc-common.o \
112	ggc-tests.o \
113	gimple.o \
114	gimple-builder.o \
115	gimple-expr.o \
116	gimple-iterator.o \
117	gimple-fold.o \
118	gimple-laddress.o \
119	gimple-loop-jam.o \
120	gimple-low.o \
121	gimple-pretty-print.o \
122	gimple-ssa-backprop.o \
123	gimple-ssa-evrp.o \
124	gimple-ssa-evrp-analyze.o \
125	gimple-ssa-isolate-paths.o \
126	gimple-ssa-nonnull-compare.o \
127	gimple-ssa-split-paths.o \
128	gimple-ssa-store-merging.o \
129	gimple-ssa-strength-reduction.o \
130	gimple-ssa-sprintf.o \
131	gimple-ssa-warn-alloca.o \
132	gimple-ssa-warn-restrict.o \
133	gimple-streamer-in.o \
134	gimple-streamer-out.o \
135	gimple-walk.o \
136	gimplify.o \
137	gimplify-me.o \
138	godump.o \
139	graph.o \
140	graphds.o \
141	graphite.o \
142	gtype-desc.o \
143	haifa-sched.o \
144	hsa-common.o \
145	hsa-gen.o \
146	hsa-regalloc.o \
147	hsa-brig.o \
148	hsa-dump.o \
149	hw-doloop.o \
150	hwint.o \
151	ifcvt.o \
152	ree.o \
153	inchash.o \
154	incpath.o \
155	init-regs.o \
156	internal-fn.o \
157	ipa-chkp.o \
158	ipa-cp.o \
159	ipa-devirt.o \
160	ipa-fnsummary.o \
161	ipa-polymorphic-call.o \
162	ipa-split.o \
163	ipa-inline.o \
164	ipa-comdats.o \
165	ipa-visibility.o \
166	ipa-inline-analysis.o \
167	ipa-inline-transform.o \
168	ipa-predicate.o \
169	ipa-profile.o \
170	ipa-prop.o \
171	ipa-param-manipulation.o \
172	ipa-pure-const.o \
173	ipa-icf.o \
174	ipa-icf-gimple.o \
175	ipa-reference.o \
176	ipa-hsa.o \
177	ipa-ref.o \
178	ipa-utils.o \
179	ipa.o \
180	ira.o \
181	ira-build.o \
182	ira-costs.o \
183	ira-conflicts.o \
184	ira-color.o \
185	ira-emit.o \
186	ira-lives.o \
187	jump.o \
188	langhooks.o \
189	lcm.o \
190	lists.o \
191	loop-doloop.o \
192	loop-init.o \
193	loop-invariant.o \
194	loop-iv.o \
195	loop-unroll.o \
196	lower-subreg.o \
197	lra.o \
198	lra-assigns.o \
199	lra-coalesce.o \
200	lra-constraints.o \
201	lra-eliminations.o \
202	lra-lives.o \
203	lra-remat.o \
204	lra-spills.o \
205	lto-cgraph.o \
206	lto-streamer.o \
207	lto-streamer-in.o \
208	lto-streamer-out.o \
209	lto-section-in.o \
210	lto-section-out.o \
211	lto-opts.o \
212	lto-compress.o \
213	mcf.o \
214	mode-switching.o \
215	modulo-sched.o \
216	multiple_target.o \
217	omp-offload.o \
218	omp-expand.o \
219	omp-general.o \
220	omp-grid.o \
221	omp-low.o \
222	omp-simd-clone.o \
223	optabs.o \
224	optabs-libfuncs.o \
225	optabs-query.o \
226	optabs-tree.o \
227	options-save.o \
228	opts-global.o \
229	passes.o \
230	plugin.o \
231	postreload-gcse.o \
232	postreload.o \
233	predict.o \
234	print-rtl.o \
235	print-rtl-function.o \
236	print-tree.o \
237	profile.o \
238	profile-count.o \
239	read-md.o \
240	read-rtl.o \
241	read-rtl-function.o \
242	real.o \
243	realmpfr.o \
244	recog.o \
245	reg-stack.o \
246	regcprop.o \
247	reginfo.o \
248	regrename.o \
249	regstat.o \
250	reload.o \
251	reload1.o \
252	reorg.o \
253	resource.o \
254	rtl-chkp.o \
255	rtl-error.o \
256	rtl.o \
257	rtlhash.o \
258	rtlanal.o \
259	rtlhooks.o \
260	rtx-vector-builder.o \
261	run-rtl-passes.o \
262	sched-deps.o \
263	sched-ebb.o \
264	sched-rgn.o \
265	sel-sched-ir.o \
266	sel-sched-dump.o \
267	sel-sched.o \
268	sese.o \
269	shrink-wrap.o \
270	simplify-rtx.o \
271	sparseset.o \
272	spellcheck.o \
273	spellcheck-tree.o \
274	sreal.o \
275	stack-ptr-mod.o \
276	statistics.o \
277	stmt.o \
278	stor-layout.o \
279	store-motion.o \
280	streamer-hooks.o \
281	stringpool.o \
282	substring-locations.o \
283	target-globals.o \
284	targhooks.o \
285	timevar.o \
286	toplev.o \
287	tracer.o \
288	trans-mem.o \
289	tree-affine.o \
290	asan.o \
291	tsan.o \
292	ubsan.o \
293	sanopt.o \
294	sancov.o \
295	tree-call-cdce.o \
296	tree-cfg.o \
297	tree-cfgcleanup.o \
298	tree-chrec.o \
299	tree-complex.o \
300	tree-data-ref.o \
301	tree-dfa.o \
302	tree-diagnostic.o \
303	tree-dump.o \
304	tree-eh.o \
305	tree-emutls.o \
306	tree-if-conv.o \
307	tree-inline.o \
308	tree-into-ssa.o \
309	tree-iterator.o \
310	tree-loop-distribution.o \
311	tree-nested.o \
312	tree-nrv.o \
313	tree-object-size.o \
314	tree-outof-ssa.o \
315	tree-parloops.o \
316	tree-phinodes.o \
317	tree-chkp.o \
318	tree-chkp-opt.o \
319	tree-predcom.o \
320	tree-pretty-print.o \
321	tree-profile.o \
322	tree-scalar-evolution.o \
323	tree-sra.o \
324	tree-switch-conversion.o \
325	tree-ssa-address.o \
326	tree-ssa-alias.o \
327	tree-ssa-ccp.o \
328	tree-ssa-coalesce.o \
329	tree-ssa-copy.o \
330	tree-ssa-dce.o \
331	tree-ssa-dom.o \
332	tree-ssa-dse.o \
333	tree-ssa-forwprop.o \
334	tree-ssa-ifcombine.o \
335	tree-ssa-live.o \
336	tree-ssa-loop-ch.o \
337	tree-ssa-loop-im.o \
338	tree-ssa-loop-ivcanon.o \
339	tree-ssa-loop-ivopts.o \
340	tree-ssa-loop-manip.o \
341	tree-ssa-loop-niter.o \
342	tree-ssa-loop-prefetch.o \
343	tree-ssa-loop-split.o \
344	tree-ssa-loop-unswitch.o \
345	tree-ssa-loop.o \
346	tree-ssa-math-opts.o \
347	tree-ssa-operands.o \
348	tree-ssa-phionlycprop.o \
349	tree-ssa-phiopt.o \
350	tree-ssa-phiprop.o \
351	tree-ssa-pre.o \
352	tree-ssa-propagate.o \
353	tree-ssa-reassoc.o \
354	tree-ssa-sccvn.o \
355	tree-ssa-scopedtables.o \
356	tree-ssa-sink.o \
357	tree-ssa-strlen.o \
358	tree-ssa-structalias.o \
359	tree-ssa-tail-merge.o \
360	tree-ssa-ter.o \
361	tree-ssa-threadbackward.o \
362	tree-ssa-threadedge.o \
363	tree-ssa-threadupdate.o \
364	tree-ssa-uncprop.o \
365	tree-ssa-uninit.o \
366	tree-ssa.o \
367	tree-ssanames.o \
368	tree-stdarg.o \
369	tree-streamer.o \
370	tree-streamer-in.o \
371	tree-streamer-out.o \
372	tree-tailcall.o \
373	tree-vect-generic.o \
374	tree-vect-patterns.o \
375	tree-vect-data-refs.o \
376	tree-vect-stmts.o \
377	tree-vect-loop.o \
378	tree-vect-loop-manip.o \
379	tree-vect-slp.o \
380	tree-vectorizer.o \
381	tree-vector-builder.o \
382	tree-vrp.o \
383	tree.o \
384	valtrack.o \
385	value-prof.o \
386	var-tracking.o \
387	varasm.o \
388	varpool.o \
389	vec-perm-indices.o \
390	vr-values.o \
391	vtable-verify.o \
392	web.o \
393	$(out_object_file) \
394	$(EXTRA_OBJS) \
395	$(host_hook_obj)
396
397.if ${CFLAGS:M-DTOOLCHAIN_CHECKING}
398BACKEND_OBJS+=	fibonacci_heap.o function-tests.o \
399		hash-map-tests.o hash-set-tests.o \
400		rtl-tests.o selftest-rtl.o \
401		selftest-run-tests.o typed-splay-tree.o
402.endif
403
404# only whwn HAVE_isl
405#BACKEND_OBJS+= \
406	graphite-isl-ast-to-gimple.o \
407	graphite-dependences.o \
408	graphite-optimize-isl.o \
409	graphite-poly.o \
410	graphite-scop-detection.o \
411	graphite-sese-to-poly.o
412
413# only when VMS_DEBUGGING_INFO
414#BACKEND_OBJS+= \
415	vmsdbgout.o
416
417# only when XCOFF_DEBUGGING_INFO
418#BACKEND_OBJS+= \
419	xcoffout.o
420
421OBJS=	${BACKEND_OBJS}
422SRCS=	gimple-loop-interchange.cc wide-int.cc wide-int-print.cc
423
424.if ${CFLAGS:M-DTOOLCHAIN_CHECKING}
425SRCS+=	unique-ptr-tests.cc
426.endif
427
428# for gimple-ssa-sprintf.c
429.if ${CCVER:Mgcc47}
430CXXFLAGS+=	-Wno-pragmas
431.endif
432
433# for tree-ssa-structalias.c, tree-vect-stmts.c
434.if ${CCVER:Mgcc80}
435CXXFLAGS+=	-Wno-narrowing
436.endif
437
438# hack to force c++ compiler to compile *.c files to create library
439.for cfile in ${BACKEND_OBJS}
440${cfile}: ${cfile:.o=.c}
441	${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
442.endfor
443
444dfp.o: gstdint.h
445
446gstdint.h:
447	echo "#include <stdint.h>" > ${.TARGET}
448
449CLEANFILES=	gstdint.h
450
451.include <bsd.lib.mk>
452