summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-23 21:27:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-26 10:18:38 +0100
commit19549cfc22e9a5d442153d596d5db80efe819da7 (patch)
treedcfa9f63817bc619527d19d7e730673917611029 /solenv/gbuild
parent51dcb469c013d3a8a301ca8e86dde3a420b5417f (diff)
take pity on the gcc 4.5.X users
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/platform/unxgcc.mk19
1 files changed, 18 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 22e3835c7d59..f1c19897b978 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -108,7 +108,11 @@ endif
endif
gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- '{ print $$1*10000+$$2*100+$$3 }')
-gb_StrictAliasingUnsafe := $(shell expr $(gb_CCVER) \< 40600)
+gb_GccLess460 := $(shell expr $(gb_CCVER) \< 40600)
+
+#At least SLED 10.2 gcc 4.3 overly agressively optimizes uno::Sequence into
+#junk, so only strict-alias on >= 4.6.0
+gb_StrictAliasingUnsafe := $(gb_GccLess460)
ifeq ($(gb_StrictAliasingUnsafe),1)
gb_CFLAGS += -fno-strict-aliasing
@@ -121,7 +125,20 @@ gb_CXXFLAGS_WERROR := -Werror
endif
ifeq ($(HAVE_CXX0X),TRUE)
+#Currently, as well as for its own merits, c++11/c++0x mode allows use to use
+#a template for SAL_N_ELEMENTS to detect at compiler time its misuse
gb_CXXFLAGS += -std=c++0x
+
+#We have so many std::auto_ptr uses that we need to be able to disable
+#warnings for those so that -Werror continues to be useful, seeing as moving
+#to unique_ptr isn't an option when we must support different compilers
+
+#When we are using 4.6.0 we can use gcc pragmas to selectively silence auto_ptr
+#warnings in isolation, but for <= 4.5.X we need to globally disable
+#deprecation
+ifeq ($(gb_GccLess460),1)
+gb_CXXFLAGS += -Wno-deprecated-declarations
+endif
endif
ifeq ($(ENABLE_LTO),TRUE)