From f23a3ef0011ca5f353b08d865c9af3e63c04415a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 15 Dec 2011 08:17:18 +0000 Subject: [PATCH] Added GCC check in windows.mak and win32 part of sdl.mak and also did silence of gcc 4.6 in win32 specific video.c (no whatsnew) --- src/osd/sdl/sdl.mak | 5 +++++ src/osd/sdl/video.c | 1 + src/osd/windows/windows.mak | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index b4d6cb7a74e..ff3e12ba590 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -398,6 +398,11 @@ endif # Static linking LDFLAGS += -static-libgcc +TEST_GCC = $(shell gcc --version) +ifeq ($(findstring 4.4,$(TEST_GCC)),) + #if we use new tools + LDFLAGS += -static-libstdc++ +endif LIBS += -lSDL.dll LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi diff --git a/src/osd/sdl/video.c b/src/osd/sdl/video.c index f507a37bf9b..7972342b5b9 100644 --- a/src/osd/sdl/video.c +++ b/src/osd/sdl/video.c @@ -397,6 +397,7 @@ static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, info.cbSize = sizeof(info); result = GetMonitorInfo(handle, (LPMONITORINFO)&info); assert(result); + result++; // to silence gcc 4.6 // allocate a new monitor info monitor = global_alloc_clear(sdl_monitor_info); diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index 0ef0a94da62..2103cfce255 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -246,6 +246,11 @@ endif # ensure we statically link the gcc runtime lib LDFLAGS += -static-libgcc +TEST_GCC = $(shell gcc --version) +ifeq ($(findstring 4.4,$(TEST_GCC)),) + #if we use new tools + LDFLAGS += -static-libstdc++ +endif # add the windows libraries LIBS += -luser32 -lgdi32 -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi -ldinput8 -lwsock32