https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126911
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Gaius Mulley <[email protected]>: https://gcc.gnu.org/g:dc80afc49b7a0eddaf2152379971e36d4d2bf953 commit r17-3413-gdc80afc49b7a0eddaf2152379971e36d4d2bf953 Author: Gaius Mulley <[email protected]> Date: Wed Aug 19 12:38:09 2026 +0100 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 <[email protected]>
