mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 15:33:42 +02:00
Fix mingw detection on Windows 7 (NT-6.1)
Hopefully also for other non-XP Windows build environments. Change-Id: I7f856dc4847c4ca9197b1935b7a9b9071b46c70a Signed-off-by: Miklós Márton <martonmiklosqdev@gmail.com> Reviewed-on: https://review.coreboot.org/23865 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
0b59b0dafc
commit
a75a2edc05
3
Makefile
3
Makefile
@ -93,10 +93,11 @@ debug_shell = $(shell export LC_ALL=C ; { echo 'exec: export LC_ALL=C ; { $(1) ;
|
|||||||
|
|
||||||
# HOST_OS is only used to work around local toolchain issues.
|
# HOST_OS is only used to work around local toolchain issues.
|
||||||
HOST_OS ?= $(shell uname)
|
HOST_OS ?= $(shell uname)
|
||||||
ifeq ($(HOST_OS), MINGW32_NT-5.1)
|
ifeq ($(findstring MINGW, $(HOST_OS)), MINGW)
|
||||||
# Explicitly set CC = gcc on MinGW, otherwise: "cc: command not found".
|
# Explicitly set CC = gcc on MinGW, otherwise: "cc: command not found".
|
||||||
CC = gcc
|
CC = gcc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(HOST_OS), SunOS)
|
ifneq ($(HOST_OS), SunOS)
|
||||||
STRIP_ARGS = -s
|
STRIP_ARGS = -s
|
||||||
endif
|
endif
|
||||||
|
@ -22,6 +22,16 @@ CC ?= gcc
|
|||||||
# completely ignored by gnumake.
|
# completely ignored by gnumake.
|
||||||
CFLAGS ?= -Os -Wall -Wshadow
|
CFLAGS ?= -Os -Wall -Wshadow
|
||||||
|
|
||||||
|
HOST_OS ?= $(shell uname)
|
||||||
|
ifeq ($(findstring MINGW, $(HOST_OS)), MINGW)
|
||||||
|
# Explicitly set CC = gcc on MinGW, otherwise: "cc: command not found".
|
||||||
|
CC = gcc
|
||||||
|
EXEC_SUFFIX := .exe
|
||||||
|
# Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that
|
||||||
|
# for MinGW. See http://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/ */
|
||||||
|
FLASHROM_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
|
||||||
|
endif
|
||||||
|
|
||||||
override TARGET_OS := $(shell $(CC) $(CPPFLAGS) -E $(SHAREDSRCDIR)/os.h | grep -v '^\#' | grep '"' | \
|
override TARGET_OS := $(shell $(CC) $(CPPFLAGS) -E $(SHAREDSRCDIR)/os.h | grep -v '^\#' | grep '"' | \
|
||||||
cut -f 2 -d'"')
|
cut -f 2 -d'"')
|
||||||
|
|
||||||
@ -31,13 +41,6 @@ EXEC_SUFFIX := .exe
|
|||||||
CFLAGS += -Wno-format
|
CFLAGS += -Wno-format
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(TARGET_OS), MinGW)
|
|
||||||
EXEC_SUFFIX := .exe
|
|
||||||
# Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that
|
|
||||||
# for MinGW. See http://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/ */
|
|
||||||
FLASHROM_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(WARNERROR), yes)
|
ifeq ($(WARNERROR), yes)
|
||||||
CFLAGS += -Werror
|
CFLAGS += -Werror
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user