Make MinGW test less verbose on non-Bash shells

The &> construct seems to be Bash-specific.
Supersedes #9755.
This commit is contained in:
Rémi Verschelde 2017-07-25 20:44:16 +02:00
parent 4fc60d4176
commit 9f768cb519
1 changed files with 2 additions and 9 deletions

View File

@ -48,7 +48,7 @@ def can_build():
if (os.getenv("MINGW64_PREFIX")):
mingw64 = os.getenv("MINGW64_PREFIX")
test = "gcc --version &>/dev/null"
test = "gcc --version > /dev/null 2>&1"
if (os.system(mingw + test) == 0 or os.system(mingw64 + test) == 0 or os.system(mingw32 + test) == 0):
return True
@ -65,7 +65,7 @@ def get_opts():
mingw32 = "i686-w64-mingw32-"
mingw64 = "x86_64-w64-mingw32-"
if os.system(mingw32 + "gcc --version &>/dev/null") != 0:
if os.system(mingw32 + "gcc --version > /dev/null 2>&1") != 0:
mingw32 = mingw
if (os.getenv("MINGW32_PREFIX")):
@ -252,13 +252,6 @@ def configure(env):
env.Append(LINKFLAGS=['-static'])
mingw_prefix = env["mingw_prefix_64"]
nulstr = ""
if (os.name == "posix"):
nulstr = ">/dev/null"
else:
nulstr = ">nul"
env["CC"] = mingw_prefix + "gcc"
env['AS'] = mingw_prefix + "as"
env['CXX'] = mingw_prefix + "g++"