summaryrefslogtreecommitdiff
path: root/util/cbfstool/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/Makefile.inc')
-rw-r--r--util/cbfstool/Makefile.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc
index bd9bbeb5c2..9633ca48be 100644
--- a/util/cbfstool/Makefile.inc
+++ b/util/cbfstool/Makefile.inc
@@ -48,7 +48,7 @@ rmodobj += common.o
rmodobj += elfheaders.o
rmodobj += xdr.o
-TOOLCFLAGS ?= -std=c99 -Werror -Wall -Wextra
+TOOLCFLAGS ?= -Werror -Wall -Wextra
TOOLCFLAGS += -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow
TOOLCFLAGS += -Wstrict-prototypes -Wwrite-strings
TOOLCPPFLAGS ?= -D_DEFAULT_SOURCE # memccpy() from string.h
@@ -71,6 +71,12 @@ HOSTCFLAGS += -fms-extensions
ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32)
TOOLCFLAGS += -mno-ms-bitfields
endif
+ifeq ($(shell uname -o 2>/dev/null), Cygwin)
+TOOLCFLAGS+=-std=gnu99
+TOOLCPPFLAGS+=-D_GNU_SOURCE
+else
+TOOLCFLAGS+=-std=c99
+endif
$(objutil)/cbfstool/%.o: $(objutil)/cbfstool/%.c
printf " HOSTCC $(subst $(objutil)/,,$(@))\n"