finish tool: untested improvements to the GCC detection logic

This commit is contained in:
Andreas Rumpf 2017-01-26 10:38:50 +01:00
commit 5421ec8dae

View file

@ -90,9 +90,9 @@ when defined(windows):
let arch = execProcess(gccExe, ["-dumpmachine"], nil, {poStdErrToStdOut, let arch = execProcess(gccExe, ["-dumpmachine"], nil, {poStdErrToStdOut,
poUsePath}) poUsePath})
when hostCPU == "i386": when hostCPU == "i386":
result = arch.contains("i686-") result = arch.contains("i686-") and not arch.contains("w64")
elif hostCPU == "amd64": elif hostCPU == "amd64":
result = arch.contains("x86_64-") result = arch.contains("x86_64-") or arch.contains("i686-w64-mingw32")
else: else:
{.error: "Unknown CPU for Windows.".} {.error: "Unknown CPU for Windows.".}
except OSError, IOError: except OSError, IOError: