From 4f1ed5b17fec1440584c88f1aecdd0c8743dcb4e Mon Sep 17 00:00:00 2001 From: hainque Date: Tue, 28 Nov 2017 14:23:36 +0000 Subject: 2017-11-28 Olivier Hainque * Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null on mingw build hosts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255200 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/Makefile.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/Makefile.in') diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f821b00d742..0baa29221f3 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1912,9 +1912,12 @@ rest.cross: specs # Specify -o /dev/null so the output of -S is discarded. More importantly # It does not try to create a file with the name "null.s" on POSIX and # "nul.s" on Windows. Because on Windows "nul" is a reserved file name. +# Beware that /dev/null is not available to mingw tools, so directly use +# "nul" instead of "/dev/null" if we're building on a mingw machine. # Specify the path to gcc/testsuite/selftests within the srcdir # as an argument to -fself-test. -SELFTEST_FLAGS = -nostdinc /dev/null -S -o /dev/null \ +DEVNULL=$(if $(findstring mingw,$(build)),nul,/dev/null) +SELFTEST_FLAGS = -nostdinc $(DEVNULL) -S -o $(DEVNULL) \ -fself-test=$(srcdir)/testsuite/selftests C_SELFTEST_FLAGS = -xc $(SELFTEST_FLAGS) -- cgit v1.2.1