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