From 093d2460fbbf789cc87a2280edd29b385d845508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Mon, 28 Jan 2013 08:49:47 +0000 Subject: [PATCH] improved some version checks in makefiles / added TODOs (nw) --- src/osd/sdl/sdl.mak | 10 ++++++---- src/osd/windows/windows.mak | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index 707843ff88c..1447caa5437 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -436,12 +436,9 @@ SDLOS_TARGETOS = $(BASE_TARGETOS) # TEST_GCC for GCC version-specific stuff #------------------------------------------------- +# TODO: needs to use $(CC) TEST_GCC = $(shell gcc --version) -ifeq ($(findstring 4.7,$(TEST_GCC)),4.7) - CCOMFLAGS += -Wno-narrowing -Wno-attributes -endif - # Ubuntu 12.10 GCC 4.7.2 autodetect ifeq ($(findstring 4.7.2-2ubuntu1,$(TEST_GCC)),4.7.2-2ubuntu1) GCC46TST = $(shell which g++-4.6 2>/dev/null) @@ -450,6 +447,11 @@ $(error Ubuntu 12.10 detected. Please install the gcc-4.6 and g++-4.6 packages) endif CC = @gcc-4.6 LD = @g++-4.6 +TEST_GCC = $(shell gcc-4.6 --version) +endif + +ifeq ($(findstring 4.7.,$(TEST_GCC)),4.7.) + CCOMFLAGS += -Wno-narrowing -Wno-attributes endif #------------------------------------------------- diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index 809fa259426..b0241502c74 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -253,8 +253,9 @@ CCOMFLAGS += -include $(WINSRC)/winprefix.h # ensure we statically link the gcc runtime lib LDFLAGS += -static-libgcc +# TODO: needs to use $(CC) TEST_GCC = $(shell gcc --version) -ifeq ($(findstring 4.4,$(TEST_GCC)),) +ifeq ($(findstring 4.4.,$(TEST_GCC)),) #if we use new tools LDFLAGS += -static-libstdc++ endif