[syslinux] Syslinux 4.06-pre12
Matt Fleming
matt at console-pimps.org
Wed Oct 10 11:58:34 PDT 2012
On Wed, 2012-10-10 at 14:02 -0300, Paulo Alcantara wrote:
> Hi Matt,
>
> From: Matt Fleming <matt at console-pimps.org>
> Date: Wed, 10 Oct 2012 09:41:45 +0100
>
> > Yeah, I think this is the bug that snuck into one of the 4.06
> > prereleases that broken the win* installers. The Syslinux build
> > infrastructure is now running F16, for instance.
>
> Given that issue, I think we should use one of those workarounds proposed by
> Shao Miller. I don't think it'd be correct to let people having Syslinux
> binaries compiled with MinGW GCC 4.7.0 (along with that issue) and not getting
> things working fine.
Agreed.
> Shao Miller have added a workaround globally to avoid that compiler
> breakage. What about applying something like that in Syslinux ?
Since the default has changed for mingw targets in gcc 4.7 from
-mno-ms-bitfields to -mms-bitfields, and we were implicitly relying upon
this old default, the best solution would seem to be adding
-mno-ms-bitfields to the win* Makefiles to make the requirement
explicit.
How does everyone feel about this? (Could someone please test that the
fix actually works?)
---
>From 84280780499bff897d9b733fede77c45a9e409fa Mon Sep 17 00:00:00 2001
From: Matt Fleming <matt.fleming at intel.com>
Date: Wed, 10 Oct 2012 19:43:40 +0100
Subject: [PATCH] win: Add mingw-gcc flag to make bitfield layout
explicit
The GCC developers changed the default bitfield option in version 4.7
from -mno-ms-bitfields to -mms-bitfields. This in turn broke the win*
code. The following bug reports documents it further,
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991
Since we were previously relying on the default behaviour of
-mno-ms-bitfields, make it explicit by adding it to $WINCFLAGS so that
the win* code doesn't break when compiled with GCC 4.7.
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---
win32/Makefile | 2 +-
win64/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/win32/Makefile b/win32/Makefile
index f960998..c674581 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -32,7 +32,7 @@ else
WINPREFIX := $(shell ./find-mingw32.sh gcc)
endif
WINCFLAGS := $(GCCWARN) -Wno-sign-compare -Os -fomit-frame-pointer \
- -D_FILE_OFFSET_BITS=64
+ -D_FILE_OFFSET_BITS=64 -mno-ms-bitfields
WINLDFLAGS := -Os -s
endif
WINCFLAGS += -I. -I../win -I.. -I../libfat -I../libinstaller \
diff --git a/win64/Makefile b/win64/Makefile
index fe60793..019148b 100644
--- a/win64/Makefile
+++ b/win64/Makefile
@@ -22,7 +22,7 @@ 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
+ -D_FILE_OFFSET_BITS=64 -mno-ms-bitfields
WINLDFLAGS := -Os -s
WINCFLAGS += -I. -I../win -I.. -I../libfat -I../libinstaller \
--
1.7.11.4
--
Matt Fleming, Intel Open Source Technology Center
More information about the Syslinux
mailing list