]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/lto/Make-lang.in
Update copyright years.
[thirdparty/gcc.git] / gcc / lto / Make-lang.in
1 # Top level -*- makefile -*- fragment for LTO
2 # Copyright (C) 2009-2021 Free Software Foundation, Inc.
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 LTO_DUMP_EXE = lto-dump$(exeext)
25 LTO_DUMP_INSTALL_NAME := $(shell echo lto-dump|sed '$(program_transform_name)')
26 # The LTO-specific object files inclued in $(LTO_EXE).
27 LTO_OBJS = lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o lto/lto-common.o
28 lto_OBJS = $(LTO_OBJS)
29 LTO_DUMP_OBJS = lto/lto-lang.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o lto/lto-dump.o lto/lto-common.o
30 lto_dump_OBJS = $(LTO_DUMP_OBJS)
31
32 # this is only useful in a LTO bootstrap, but this does not work right
33 # now. Should reenable after this is fixed, but only when LTO bootstrap
34 # is enabled.
35
36 #ifeq ($(if $(wildcard ../stage_current),$(shell cat \
37 # ../stage_current)),stageautofeedback)
38 #$(LTO_OBJS): CFLAGS += -fauto-profile=lto1.fda
39 #$(LTO_OBJS): lto1.fda
40 #endif
41
42 # Rules
43
44 lto: $(LTO_EXE) $(LTO_DUMP_EXE)
45 lto1.serial = $(LTO_EXE)
46 lto2.serial = $(LTO_DUMP_EXE)
47
48 .PHONY: lto
49
50 # These hooks are used by the main GCC Makefile. Consult that
51 # Makefile for documentation.
52 lto.all.cross:
53 lto.start.encap:
54 lto.rest.encap:
55 lto.tags:
56 lto.install-common: installdirs
57 $(INSTALL_PROGRAM) $(LTO_DUMP_EXE) \
58 $(DESTDIR)$(bindir)/$(LTO_DUMP_INSTALL_NAME)$(exeext)
59
60 lto.install-man:
61 lto.install-info:
62 lto.dvi:
63 lto.pdf:
64 lto.install-pdf:
65 lto.html:
66 lto.install-html:
67 lto.uninstall:
68 lto.info:
69 lto.man:
70 lto.srcextra:
71 lto.srcman:
72 lto.srcinfo:
73 lto.install-plugin:
74
75 lto.mostlyclean:
76 rm -f $(LTO_OBJS) $(LTO_EXE) lto1.fda $(LTO_DUMP_OBJS) $(LTO_DUMP_EXE) lto-dump.fda
77
78 lto.clean:
79 lto.distclean:
80 lto.maintainer-clean:
81 lto.stage1:
82 lto.stage2:
83 lto.stage3:
84 lto.stage4:
85 lto.stageprofile:
86 lto.stagefeedback:
87
88 # LTO rules.
89
90 # Use strict warnings for this front end.
91 lto-warn = $(STRICT_WARN)
92
93 $(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS) $(lto1.prev)
94 @$(call LINK_PROGRESS,$(INDEX.lto1),start)
95 +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
96 $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS)
97 @$(call LINK_PROGRESS,$(INDEX.lto1),end)
98
99 $(LTO_DUMP_EXE): $(LTO_DUMP_OBJS) $(BACKEND) $(LIBDEPS) $(lto2.prev)
100 @$(call LINK_PROGRESS,$(INDEX.lto2),start)
101 +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
102 $(LTO_DUMP_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS)
103 @$(call LINK_PROGRESS,$(INDEX.lto2),end)
104
105 lto/lto-dump.o: $(LTO_OBJS)
106
107 lto1.fda: ../prev-gcc/lto1$(exeext) ../prev-gcc/$(PERF_DATA)
108 $(CREATE_GCOV) -binary ../prev-gcc/lto1$(exeext) -gcov lto1.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1
109
110 # LTO testing is done as part of C/C++/Fortran etc. testing.
111 check-lto:
112
113 # No LTO-specific selftests
114 selftest-lto: