From: Shao Miller Date: Thu, 11 Oct 2012 15:59:37 +0000 (-0400) Subject: win: Add -mno-ms-bitfields X-Git-Tag: syslinux-4.06-pre13~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d9ee65cc9577eb69782a49a34895ae80820e9ff;p=profile%2Fivi%2Fsyslinux.git win: Add -mno-ms-bitfields 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 Signed-off-by: Matt Fleming --- diff --git a/win32/Makefile b/win32/Makefile index f960998..ef5edac 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -22,7 +22,8 @@ OSTYPE = $(shell uname -msr) 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 @@ -31,8 +32,8 @@ WINPREFIX := 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 \ diff --git a/win64/Makefile b/win64/Makefile index fe60793..744b0b3 100644 --- a/win64/Makefile +++ b/win64/Makefile @@ -21,8 +21,8 @@ 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 \