From c2056bd31caa61df9f9b6ffd26479ccd85ea8f1e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 6 Oct 2014 13:19:45 +0200 Subject: gbuild: -Wnon-virtual-dtor and strict aliasing workaround for GCC < 4.6 ... is obsolete, remove that. Change-Id: I541de32ac4389d8049c25c98b63a69d084d1594d --- solenv/gbuild/platform/solaris.mk | 15 +-------------- solenv/gbuild/platform/unxgcc.mk | 28 +--------------------------- 2 files changed, 2 insertions(+), 41 deletions(-) (limited to 'solenv') diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 97f582b3a030..5e2b59f715aa 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -61,7 +61,7 @@ gb_CXXFLAGS := \ -fPIC \ -Wshadow \ -Woverloaded-virtual \ - -Wno-non-virtual-dtor \ + -Wnon-virtual-dtor \ -std=c++0x \ # enable debug STL @@ -71,19 +71,6 @@ gb_COMPILERDEFS += \ endif -ifeq ($(COM_GCC_IS_CLANG),) -gb_GccLess460 := $(shell expr $(GCC_VERSION) \< 406) - -#At least SLED 10.2 gcc 4.3 overly aggressively 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 -gb_CXXFLAGS += -fno-strict-aliasing -endif -endif - ifneq ($(strip $(SYSBASE)),) gb_CXXFLAGS += --sysroot=$(SYSBASE) gb_CFLAGS += --sysroot=$(SYSBASE) diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 4864f9c4e4af..18da25c2a649 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -43,35 +43,9 @@ gb_CXXFLAGS := \ -fPIC \ -Wshadow \ -Woverloaded-virtual \ + -Wnon-virtual-dtor \ $(CXXFLAGS_CXX11) \ -ifeq ($(COM_GCC_IS_CLANG),) -gb_GccLess460 := $(shell expr $(GCC_VERSION) \< 406) - -# Only GCC 4.6 has a fix for -# "-Wnon-virtual-dtor should't complain of protected dtor" and supports #pragma -# GCC diagnostic push/pop required e.g. in cppuhelper/propertysetmixin.hxx to -# silence warnings about a protected, non-virtual dtor in a class with virtual -# members and friends: -ifeq ($(gb_GccLess460),1) -gb_CXXFLAGS += -Wno-non-virtual-dtor -else -gb_CXXFLAGS += -Wnon-virtual-dtor -endif - -#At least SLED 10.2 gcc 4.3 overly aggressively 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 -gb_CXXFLAGS += -fno-strict-aliasing -endif - -else # Clang -gb_CXXFLAGS += -Wnon-virtual-dtor -endif - # enable debug STL ifeq ($(gb_ENABLE_DBGUTIL),$(true)) -- cgit