From 1c67e69c0dea67fab1ef32e8b78bf24cc1b3f06a Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 9 Apr 2019 10:49:14 +0200 Subject: Come up with bootstrap-lto-lean config. 2019-04-09 Martin Liska * Makefile.in: Regenerate. * Makefile.tpl: Pass GENERATOR_CFLAGS in all stages. 2019-04-09 Martin Liska * bootstrap-lto-lean.mk: New file. 2019-04-09 Martin Liska * Makefile.in: Use GENERATOR_CFLAGS for all generators. * doc/install.texi: Document the new config. From-SVN: r270223 --- config/ChangeLog | 4 ++++ config/bootstrap-lto-lean.mk | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 config/bootstrap-lto-lean.mk (limited to 'config') diff --git a/config/ChangeLog b/config/ChangeLog index 7c56e294e6f..258dcb128f2 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2019-04-09 Martin Liska + + * bootstrap-lto-lean.mk: New file. + 2019-03-02 Johannes Pfau * mh-mingw: Also set __USE_MINGW_ACCESS flag for C++ code. diff --git a/config/bootstrap-lto-lean.mk b/config/bootstrap-lto-lean.mk new file mode 100644 index 00000000000..ee36f6fe544 --- /dev/null +++ b/config/bootstrap-lto-lean.mk @@ -0,0 +1,16 @@ +# This option enables LTO for stage4 and LTO for generators in stage3 with profiledbootstrap. +# Otherwise, LTO is used in only stage3. + +STAGE3_CFLAGS += -flto=jobserver +STAGEtrain_GENERATOR_CFLAGS += -flto=jobserver +STAGEfeedback_CFLAGS += -flto=jobserver + +# assumes the host supports the linker plugin +LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ +LTO_RANLIB = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ranlib$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ + +LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \ + RANLIB="$(LTO_RANLIB)"; export RANLIB; +LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" + +do-compare = /bin/true -- cgit v1.2.1