Hello Miklós Márton,
I'd like you to do a code review. Please visit
https://review.coreboot.org/23865
to review the following change.
Change subject: Fixed mingw detection on Windows 7 (NT-6.1) and hopefully in another non XP Windows build environments too. ......................................................................
Fixed mingw detection on Windows 7 (NT-6.1) and hopefully in another non XP Windows build environments too.
Change-Id: I7f856dc4847c4ca9197b1935b7a9b9071b46c70a Signed-off-by: Miklós Márton martonmiklosqdev@gmail.com --- M Makefile 1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/65/23865/1
diff --git a/Makefile b/Makefile index 5bd7158..755fe86 100644 --- a/Makefile +++ b/Makefile @@ -97,7 +97,11 @@
# HOST_OS is only used to work around local toolchain issues. HOST_OS ?= $(shell uname) -ifeq ($(HOST_OS), MINGW32_NT-5.1) + +# Use a regexp to check if we are building in a mingw enviroment. +# uname returns MINGW32_NT-5.1 on XP, MINGW32_NT-6.1 on Windows 7 +# the regexp should support 64 bit variant of mingw if exists +ifeq ($(shell if [[ $$(uname) =~ ^MINGW[0-9]{0,2}_NT-[0-9]{1,2}.[0-9]{1,2}$$ ]]; then echo yes; else echo no; fi), yes) # Explicitly set CC = gcc on MinGW, otherwise: "cc: command not found". CC = gcc endif