diff --git a/ACE/include/makeinclude/platform_clang_common.GNU b/ACE/include/makeinclude/platform_clang_common.GNU index 667d394e1da0e..0f53f913a3951 100644 --- a/ACE/include/makeinclude/platform_clang_common.GNU +++ b/ACE/include/makeinclude/platform_clang_common.GNU @@ -30,7 +30,6 @@ else endif CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion) - CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version) # Only modify LDFLAGS if DLD has been set. diff --git a/ACE/include/makeinclude/platform_g++_common.GNU b/ACE/include/makeinclude/platform_g++_common.GNU index 6ce9bc5ce2433..7f6b8e7252f18 100644 --- a/ACE/include/makeinclude/platform_g++_common.GNU +++ b/ACE/include/makeinclude/platform_g++_common.GNU @@ -59,20 +59,18 @@ else CXX_FOR_VERSION_TEST ?= $(CXX) endif -CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion) -CXX_MACHINE := $(shell $(CXX_FOR_VERSION_TEST) -dumpmachine) -ifeq (cmd,$(findstring cmd,$(SHELL))) -CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION))) -else -CXX_MAJOR_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion | sed -e 's/[^0-9\.]//g' | sed -e 's/\..*$$//') +ifndef CXX_VERSION + CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion) endif -ifeq (cmd,$(findstring cmd,$(SHELL))) -CXX_MINOR_VERSION := $(word 2,$(subst ., ,$(CXX_VERSION))) -else -CXX_MINOR_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion | sed -e 's/[^0-9\.]//g' | sed -e 's/^[0-9]*\.//' | sed -e 's/\..*$$//') +ifndef CXX_MACHINE + CXX_MACHINE := $(shell $(CXX_FOR_VERSION_TEST) -dumpmachine) +endif +ifndef CXX_FULL_VERSION + CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version) endif -CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version) +CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION))) +CXX_MINOR_VERSION := $(word 2,$(subst ., ,$(CXX_VERSION))) # Minimum C++ level is now C++17, gcc until version 11 have an older version as default ifeq ($(CXX_MAJOR_VERSION),7) diff --git a/ACE/include/makeinclude/platform_gcc_clang_common.GNU b/ACE/include/makeinclude/platform_gcc_clang_common.GNU index 214da114ec62a..62c9dc23bf3fd 100644 --- a/ACE/include/makeinclude/platform_gcc_clang_common.GNU +++ b/ACE/include/makeinclude/platform_gcc_clang_common.GNU @@ -55,8 +55,6 @@ else ifeq ($(c++20),1) CCFLAGS += -std=c++20 else ifeq ($(c++17),1) CCFLAGS += -std=c++17 -else ifeq ($(c++14),1) - CCFLAGS += -std=c++14 endif # If no option has been specified, set templates to automatic diff --git a/ACE/include/makeinclude/platform_linux.GNU b/ACE/include/makeinclude/platform_linux.GNU index 466fb28661369..574a65462685f 100644 --- a/ACE/include/makeinclude/platform_linux.GNU +++ b/ACE/include/makeinclude/platform_linux.GNU @@ -10,16 +10,11 @@ else CXX_FOR_VERSION_TEST ?= g++ endif -CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version) -CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion) - -ifeq (Ubuntu, $(findstring Ubuntu,$(LSB_RELEASE_ID))) - ifeq (7.10, $(findstring 7.10,$(LSB_RELEASE_RELEASE))) - no_hidden_visibility ?= 1 - endif - ifeq (7.04, $(findstring 7.04,$(LSB_RELEASE_RELEASE))) - no_hidden_visibility ?= 1 - endif +ifndef CXX_FULL_VERSION + CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version) +endif +ifndef CXX_VERSION + CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion) endif ifeq ($(buildbits),32) @@ -52,15 +47,8 @@ endif # include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU -# TAO with GCC 4.0.2 and -O3 seems to result in runtime issues, for example -# the ForwardRequest PI test will fail. For GCC 4.0.2 we default to -O2 -ifeq ($(CXX_VERSION),4.0.2) - OCFLAGS ?= -O2 - OCCFLAGS ?=-O2 -else - OCFLAGS ?= -O3 - OCCFLAGS ?= -O3 -endif +OCFLAGS ?= -O3 +OCCFLAGS ?= -O3 #### GNU gas has a string limit of 4096 characters. On Alphas, #### builds will fail due to running over that limit. There are diff --git a/ACE/include/makeinclude/platform_linux_clang.GNU b/ACE/include/makeinclude/platform_linux_clang.GNU index 2f251d0858675..4eaf019d9d5d8 100644 --- a/ACE/include/makeinclude/platform_linux_clang.GNU +++ b/ACE/include/makeinclude/platform_linux_clang.GNU @@ -12,12 +12,7 @@ endif ifndef CXX_VERSION CXX_VERSION := $(shell $(CXX) -dumpversion) endif -ifeq (cmd,$(findstring cmd,$(SHELL))) CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION))) -else -CXX_MAJOR_DOT = $(word $2,$(subst ., ,$1)) -CXX_MAJOR_VERSION := $(call CXX_MAJOR_DOT,$(CXX_VERSION),1) -endif # clang 16 and newer default to C++17 ifeq ($(CXX_MAJOR_VERSION),$(filter $(CXX_MAJOR_VERSION),4 5 6 7 8 9 10 11 12 13 14 15)) @@ -47,8 +42,6 @@ else ifeq ($(c++20),1) CCFLAGS += -std=c++20 else ifeq ($(c++17),1) CCFLAGS += -std=c++17 -else ifeq ($(c++14),1) - CCFLAGS += -std=c++14 endif ifeq ($(no_deprecated),1)