[PATCH] PR85574 - add gcc/lto$(exeext) to files compared

Richard Biener richard.guenther@gmail.com
Thu May 2 13:59:00 GMT 2019


On Thu, Jan 3, 2019 at 3:16 PM Richard Biener <rguenther@suse.de> wrote:
>
>
> This makes sure we do not regress PR85574 and thus that when
> doing LTO bootstrap the generated binaries do not differ from
> stage2 to stage3.  Note we indepenently verify the object
> files which contain just LTO bytecode do not differ (besides
> differences in the LTO options sections).
>
> This has the chance of breaking on some targets given we've
> never compared binaries before but just object files.
>
> Still it's an invariant we'd like to hold, so hopefully it
> works out.
>
> Bootstrapped on x86_64-unknown-linux-gnu, LTO bootstrapped on
> x86_64-unknown-linux-gnu.
>
> OK for trunk?

Now committed as r270798 after LTO bootstrap on x86_64-linux.

Richard.

>
> Note I picked just gcc/lto1 as a binary that will surely be
> available when doing LTO bootstrap rather than also compare
> all $(exeext) found in stageN-gcc/ (build/gen* are for example
> also LTO compiled).  The explicit list could also be amended
> of course.
>
> Thanks,
> Richard.
>
> 2019-01-03  Richard Biener  <rguenther@suse.de>
>
>         PR bootstrap/85574
>         * Makefile.tpl (compare target): Also compare extra-compare
>         files.
>         * Makefile.in: Regenerate.
>
>         config/
>         * bootstrap-lto.mk (extra-compare): Set to gcc/lto1$(exeext).
>
> Index: Makefile.in
> ===================================================================
> --- Makefile.in (revision 267551)
> +++ Makefile.in (working copy)
> @@ -53850,7 +53850,7 @@ compare:
>          sed=`echo stage3 | sed 's,^stage,,;s,.,.,g'`; \
>         files=`find stage3-* -name "*$(objext)" -print | \
>                  sed -n s,^stage$$sed-,,p`; \
> -       for file in $${files}; do \
> +       for file in $${files} ${extra-compare}; do \
>           f1=$$r/stage2-$$file; f2=$$r/stage3-$$file; \
>           if test ! -f $$f1; then continue; fi; \
>           $(do-compare) > /dev/null 2>&1; \
> @@ -54248,7 +54248,7 @@ compare3:
>          sed=`echo stage4 | sed 's,^stage,,;s,.,.,g'`; \
>         files=`find stage4-* -name "*$(objext)" -print | \
>                  sed -n s,^stage$$sed-,,p`; \
> -       for file in $${files}; do \
> +       for file in $${files} ${extra-compare}; do \
>           f1=$$r/stage3-$$file; f2=$$r/stage4-$$file; \
>           if test ! -f $$f1; then continue; fi; \
>           $(do-compare3) > /dev/null 2>&1; \
> Index: Makefile.tpl
> ===================================================================
> --- Makefile.tpl        (revision 267551)
> +++ Makefile.tpl        (working copy)
> @@ -1675,7 +1675,7 @@ do-clean: clean-stage[+id+]
>          sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \
>         files=`find stage[+id+]-* -name "*$(objext)" -print | \
>                  sed -n s,^stage$$sed-,,p`; \
> -       for file in $${files}; do \
> +       for file in $${files} ${extra-compare}; do \
>           f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
>           if test ! -f $$f1; then continue; fi; \
>           $(do-[+compare-target+]) > /dev/null 2>&1; \
> Index: config/bootstrap-lto.mk
> ===================================================================
> --- config/bootstrap-lto.mk     (revision 267551)
> +++ config/bootstrap-lto.mk     (working copy)
> @@ -15,3 +15,4 @@ LTO_EXPORTS = AR="$(LTO_AR)"; export AR;
>  LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)"
>
>  do-compare = $(SHELL) $(srcdir)/contrib/compare-lto $$f1 $$f2
> +extra-compare = gcc/lto1$(exeext)



More information about the Gcc-patches mailing list