]>
Commit | Line | Data |
---|---|---|
d7f09764 | 1 | # Top level -*- makefile -*- fragment for LTO |
85ec4feb | 2 | # Copyright (C) 2009-2018 Free Software Foundation, Inc. |
d7f09764 DN |
3 | |
4 | #This file is part of GCC. | |
5 | ||
6 | #GCC is free software; you can redistribute it and/or modify | |
7 | #it under the terms of the GNU General Public License as published by | |
8 | #the Free Software Foundation; either version 3, or (at your option) | |
9 | #any later version. | |
10 | ||
11 | #GCC is distributed in the hope that it will be useful, | |
12 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | #GNU General Public License for more details. | |
15 | ||
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with GCC; see the file COPYING3. If not see | |
18 | # <http://www.gnu.org/licenses/>. | |
19 | ||
20 | # Variables | |
21 | ||
22 | # The name of the LTO compiler. | |
23 | LTO_EXE = lto1$(exeext) | |
24 | # The LTO-specific object files inclued in $(LTO_EXE). | |
35f32ad4 | 25 | LTO_OBJS = lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o |
7c6fedd2 | 26 | lto_OBJS = $(LTO_OBJS) |
d7f09764 | 27 | |
277d7ee0 AK |
28 | # this is only useful in a LTO bootstrap, but this does not work right |
29 | # now. Should reenable after this is fixed, but only when LTO bootstrap | |
30 | # is enabled. | |
31 | ||
e9ac1f86 JJ |
32 | #ifeq ($(if $(wildcard ../stage_current),$(shell cat \ |
33 | # ../stage_current)),stageautofeedback) | |
277d7ee0 AK |
34 | #$(LTO_OBJS): CFLAGS += -fauto-profile=lto1.fda |
35 | #$(LTO_OBJS): lto1.fda | |
36 | #endif | |
37 | ||
d7f09764 DN |
38 | # Rules |
39 | ||
40 | # These hooks are used by the main GCC Makefile. Consult that | |
41 | # Makefile for documentation. | |
42 | lto.all.cross: $(LTO_EXE) | |
43 | lto.start.encap: $(LTO_EXE) | |
44 | lto.rest.encap: | |
45 | lto.tags: | |
46 | lto.install-common: | |
47 | lto.install-man: | |
48 | lto.install-info: | |
49 | lto.dvi: | |
50 | lto.pdf: | |
51 | lto.install-pdf: | |
52 | lto.html: | |
55bcd32b | 53 | lto.install-html: |
d7f09764 DN |
54 | lto.uninstall: |
55 | lto.info: | |
56 | lto.man: | |
57 | lto.srcextra: | |
58 | lto.srcman: | |
59 | lto.srcinfo: | |
60 | lto.install-plugin: | |
61 | ||
62 | lto.mostlyclean: | |
277d7ee0 | 63 | rm -f $(LTO_OBJS) $(LTO_EXE) lto1.fda |
d7f09764 DN |
64 | |
65 | lto.clean: | |
66 | lto.distclean: | |
67 | lto.maintainer-clean: | |
68 | lto.stage1: | |
69 | lto.stage2: | |
70 | lto.stage3: | |
71 | lto.stage4: | |
72 | lto.stageprofile: | |
73 | lto.stagefeedback: | |
74 | ||
75 | # LTO rules. | |
76 | ||
77 | # Use strict warnings for this front end. | |
78 | lto-warn = $(STRICT_WARN) | |
79 | ||
80 | $(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS) | |
427b248d | 81 | +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ |
6b3456d1 | 82 | $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) |
d7f09764 | 83 | |
277d7ee0 AK |
84 | lto1.fda: ../prev-gcc/lto1$(exeext) ../prev-gcc/$(PERF_DATA) |
85 | $(CREATE_GCOV) -binary ../prev-gcc/lto1$(exeext) -gcov lto1.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1 | |
86 | ||
1915c739 JJ |
87 | # LTO testing is done as part of C/C++/Fortran etc. testing. |
88 | check-lto: |