summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-07-11 22:05:01 +0300
committerFred Sundvik <fsundvik@gmail.com>2017-07-11 22:05:01 +0300
commit7f67abd7d7f5d393894a34faba51108301381266 (patch)
treecb47e3ef98c6ff4e4fdd89ece8da8187a344ffc8
parent78545b95090816767bf3e17c4745bb0c3db01a5f (diff)
Fix bitfield problem when compiling in native mingw
-rw-r--r--tmk_core/native.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/native.mk b/tmk_core/native.mk
index 50232ee9b7..530b50b84a 100644
--- a/tmk_core/native.mk
+++ b/tmk_core/native.mk
@@ -1,3 +1,5 @@
+SYSTEM_TYPE := $(shell gcc -dumpmachine)
+
CC = gcc
OBJCOPY =
OBJDUMP =
@@ -14,6 +16,9 @@ COMPILEFLAGS += -funsigned-bitfields
COMPILEFLAGS += -ffunction-sections
COMPILEFLAGS += -fdata-sections
COMPILEFLAGS += -fshort-enums
+ifneq ($(findstring mingw, ${SYSTEM_TYPE}),)
+COMPILEFLAGS += -mno-ms-bitfields
+endif
CFLAGS += $(COMPILEFLAGS)
CFLAGS += -fno-inline-small-functions