PR modula2/126911: Build fix to prevent Python hanging

This patch fixes mktargetsrc.py if gm2 fails to run.  With this
patch mktargetsrc.py will remove any output file and any temporary
file before exiting with a non zero status.  This prevents def2doc.py
from spinning attempting to read the first 8192 bytes of a zero
length file.  mktargetsrc.py now defensively invokes gm2 with -S
preventing the driver from invoking an assembler which might not be
installed.  Bootstrapped on Debian x86_64 and FreeBSD15.  The build
fails appropriately when configured with --target=nvptx-none.

gcc/m2/ChangeLog:

	PR modula2/126911
	* tools-src/mktargetsrc.py (quietSystem): Add temporaryFile
	parameter.
	Tidy up if result is non zero by removing temporaryFile
	and args.outputfile.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
1 file changed