瀏覽代碼

Fix bitfield problem when compiling in native mingw

Fred Sundvik 8 年之前
父節點
當前提交
7f67abd7d7
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      tmk_core/native.mk

+ 5 - 0
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