summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-10-14 04:06:20 -0700
committerSteven Noonan <steven@uplinklabs.net>2009-10-14 04:07:31 -0700
commiteb61c8b8f8610c5720ac992db7d390e7f2283ffe (patch)
tree245b2a63f02d366ae7d9e008f4eae07490e7bbc3 /crawl-ref/source/makefile
parent97ac9424c4676f6dee9c9e2e8fd7cec93b5e37ce (diff)
downloadcrawl-ref-eb61c8b8f8610c5720ac992db7d390e7f2283ffe.tar.gz
crawl-ref-eb61c8b8f8610c5720ac992db7d390e7f2283ffe.zip
makefile: detect if GCC is >= 4.3.0 before adding -Wno-array-bounds
GCC versions less than 4.3.0 had a compiler error because the -Wno-array-bounds flag wasn't valid. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index a6246b1b0a..3fdb42db58 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -213,6 +213,8 @@ GCC := gcc
GXX := g++
endif
+GCC_GTE_4_3_0 := $(shell util/gcc-gte.pl $(GCC) 4.3.0)
+
RLTILES = rltiles
#
@@ -340,9 +342,14 @@ endif # MacOS
endif # TILES
-CFWARN_L := -D_FORTIFY_SOURCE=0 -Wno-array-bounds -Wno-parentheses -Wwrite-strings -Wshadow -pedantic
+CFWARN_L := -D_FORTIFY_SOURCE=0 -Wno-parentheses -Wwrite-strings -Wshadow -pedantic
CFOTHERS_L = $(EXTERNAL_FLAGS) $(EXTRA_FLAGS) $(DEFINES) -DCLUA_BINDINGS $(SDL_CFLAGS)
+ifeq ($(GCC_GTE_4_3_0),Yes)
+CFWARN_L += -Wno-array-bounds
+endif
+
+
#
# Figure out the build settings for this type of build
#