NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: toolchain/53137: Non-deterministic gcc build (build fails sometimes)



The following reply was made to PR toolchain/53137; it has been noted by GNATS.

From: matthew green <mrg%eterna.com.au@localhost>
To: Robert Elz <kre%munnari.OZ.AU@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, toolchain-manager%netbsd.org@localhost,
    gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: re: toolchain/53137: Non-deterministic gcc build (build fails sometimes)
Date: Wed, 28 Mar 2018 16:40:59 +1100

 Robert Elz writes:
 >     Date:        Wed, 28 Mar 2018 11:08:13 +1100
 >     From:        matthew green <mrg%eterna.com.au@localhost>
 >     Message-ID:  <17891.1522195693%splode.eterna.com.au@localhost>
 > =
 
 >   | i think this is caused by this rule:
 > =
 
 > It very well could be.   All the failures I have seen are in files that
 > could be related to that - all seem related to instruction generation,
 > and are reported as xxx.md file names (though that may come from
 > #file or something in the actual file being processed.)
 > =
 
 > Assuming that is it, how should the
 > 	# XXX fix me
 > be done properly?
 
 i've been using this patch, seems to work though i couldn't reproduce
 the issue myself.  i *think* it uses well defined semantics, it would
 be nice if others would confirm.
 
 this needs to be applied to gcc.old, and netbsd-7/8 too.  netbsd-6's
 GCC has no >1 output generators.
 
 
 .mrg.
 
 Index: external/gpl3/gcc/usr.bin/backend/Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/external/gpl3/gcc/usr.bin/backend/Makefile,v
 retrieving revision 1.43
 diff -p -u -r1.43 Makefile
 --- external/gpl3/gcc/usr.bin/backend/Makefile	11 Feb 2018 02:12:28 -0000	=
 1.43
 +++ external/gpl3/gcc/usr.bin/backend/Makefile	28 Mar 2018 05:38:11 -0000
 @@ -398,16 +398,23 @@ CLEANFILES+=3D	tree-check.h
  BUILDSYMLINKS+=3D insn-check.h tree-check.h
  =
 
  # genattrtab has three output files
 -# XXX fix me
 -insn-attrtab.c insn-dfatab.c insn-latencytab.c: genattrtab ${G_md_file} i=
 nsn-conditions.md =
 
 +insn-dfatab.c insn-latencytab.c: insn-attrtab.c
 +	cp -p ${.TARGET}.tmp ${.TARGET}
 +insn-attrtab.c: genattrtab ${G_md_file} insn-conditions.md =
 
  	${_MKTARGET_CREATE}
 -	./genattrtab ${G_md_file} insn-conditions.md -Ainsn-attrtab.c -Dinsn-dfa=
 tab.c -Linsn-latencytab.c
 +	./genattrtab ${G_md_file} insn-conditions.md \
 +		-A${.TARGET}.tmp -Dinsn-dfatab.c.tmp -Linsn-latencytab.c.tmp && \
 +	mv ${.TARGET}.tmp ${.TARGET}
  CLEANFILES+=3D	insn-attrtab.c insn-dfatab.c insn-latencytab.c
  =
 
  # genopinit has two output files
 -insn-opinit.c insn-opinit.h: genopinit ${G_md_file} insn-conditions.md
 +insn-opinit.h: insn-opinit.c
 +	cp -p ${.TARGET}.tmp ${.TARGET}
 +insn-opinit.c: genopinit ${G_md_file} insn-conditions.md
  	${_MKTARGET_CREATE}
 -	./genopinit ${G_md_file} insn-conditions.md -hinsn-opinit.h -cinsn-opini=
 t.c
 +	./genopinit ${G_md_file} insn-conditions.md \
 +		-hinsn-opinit.h.tmp -c${.TARGET}.tmp && \
 +	mv ${.TARGET}.tmp ${.TARGET}
  CLEANFILES+=3D	insn-opinit.h insn-opinit.c
  =
 
  LDFLAGS.genautomata+=3D	-lm
 


Home | Main Index | Thread Index | Old Index