[PATCH][GCC] Fix native Windows x86 bootstrap failure with self test

Tamar Christina Tamar.Christina@arm.com
Fri Nov 4 13:22:00 GMT 2016


Hi all,

The GCC self-test added in r237144 breaks the
native Windows x86 builds (e.g. mingw-w64).
This fixes (PR78196) by explicitly adding /dev/null as
the output file to the GCC self test.

The test essentially does `-xc -S -c /dev/null -fself-test`

`/dev/null` is then converted into the Windows null device `nul`
by the MSYS shell, which is correct. But then the driver adds a
filename to the name, trying to write the output to `nul.s`.
`nul` is a reserved filename on Windows. As such it's invalid
to create this file and the call always fails using CreateFile.

Checked with x86_64-w64-mingw32 and build gets passed self tests
but dies at unrelated libstdc++ and libvtv errors.

Ok for trunk?

Thanks,
Tamar

gcc/

2016-11-03  Tamar Christina  <tamar.christina@arm.com>

	PR driver/78196
	* Makefile.in (SELFTEST_FLAGS): Added -o /dev/null.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-windows-selftest-fix.patch
Type: text/x-patch
Size: 882 bytes
Desc: gcc-windows-selftest-fix.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161104/53e9e5a2/attachment.bin>


More information about the Gcc-patches mailing list