1# Top level -*- makefile -*- fragment for LTO 2# Copyright (C) 2009-2015 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. 23LTO_EXE = lto1$(exeext) 24# The LTO-specific object files inclued in $(LTO_EXE). 25LTO_OBJS = lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o 26lto_OBJS = $(LTO_OBJS) 27 28# Rules 29 30# These hooks are used by the main GCC Makefile. Consult that 31# Makefile for documentation. 32lto.all.cross: $(LTO_EXE) 33lto.start.encap: $(LTO_EXE) 34lto.rest.encap: 35lto.tags: 36lto.install-common: 37lto.install-man: 38lto.install-info: 39lto.dvi: 40lto.pdf: 41lto.install-pdf: 42lto.html: 43lto.install-html: 44lto.uninstall: 45lto.info: 46lto.man: 47lto.srcextra: 48lto.srcman: 49lto.srcinfo: 50lto.install-plugin: 51 52lto.mostlyclean: 53 rm -f $(LTO_OBJS) $(LTO_EXE) 54 55lto.clean: 56lto.distclean: 57lto.maintainer-clean: 58lto.stage1: 59lto.stage2: 60lto.stage3: 61lto.stage4: 62lto.stageprofile: 63lto.stagefeedback: 64 65# LTO rules. 66 67# Use strict warnings for this front end. 68lto-warn = $(STRICT_WARN) 69 70$(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS) 71 +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ 72 $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) 73 74# LTO testing is done as part of C/C++/Fortran etc. testing. 75check-lto: 76