Recent MinGW GCCs now have -mms-bitfields on by default, but it
appears to break our intentions with __attribute__((packed)).
See GCC bug 52991,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991
The undesired behaviour was noticed when the win32 installer
had troubles identifying the media type field of a boot sector.
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
ifeq ($(findstring CYGWIN,$(OSTYPE)),CYGWIN)
## Compiling on Cygwin
WINPREFIX :=
-WINCFLAGS := -mno-cygwin $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
+WINCFLAGS := -mno-cygwin -mno-ms-bitfields $(GCCWARN) -Os \
+ -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
WINLDFLAGS := -mno-cygwin -Os -s
else
## Compiling on some variant of MinGW
else
WINPREFIX := $(shell ./find-mingw32.sh gcc)
endif
-WINCFLAGS := $(GCCWARN) -Wno-sign-compare -Os -fomit-frame-pointer \
- -D_FILE_OFFSET_BITS=64
+WINCFLAGS := -mno-ms-bitfields $(GCCWARN) -Wno-sign-compare -Os \
+ -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
WINLDFLAGS := -Os -s
endif
WINCFLAGS += -I. -I../win -I.. -I../libfat -I../libinstaller \
OSTYPE = $(shell uname -msr)
# Don't know how to do a native compile here...
WINPREFIX := $(shell ./find-mingw64.sh gcc)
-WINCFLAGS := $(GCCWARN) -Wno-sign-compare -Os -fomit-frame-pointer \
- -D_FILE_OFFSET_BITS=64
+WINCFLAGS := -mno-ms-bitfields $(GCCWARN) -Wno-sign-compare -Os \
+ -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
WINLDFLAGS := -Os -s
WINCFLAGS += -I. -I../win -I.. -I../libfat -I../libinstaller \