From 33d1703e35bb65f9585109e674dbd25c9ca16879 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 13:25:07 +0200 Subject: [PATCH] Changed the default to C++17 for QNX and g++ versions older as 11 (11 has C++17 as default) * ACE/include/makeinclude/platform_g++_common.GNU: * ACE/include/makeinclude/platform_qnx_gcc.GNU: --- ACE/include/makeinclude/platform_g++_common.GNU | 14 ++++++++++++++ ACE/include/makeinclude/platform_qnx_gcc.GNU | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ACE/include/makeinclude/platform_g++_common.GNU b/ACE/include/makeinclude/platform_g++_common.GNU index bed583c7f7a06..36dbcd43df074 100644 --- a/ACE/include/makeinclude/platform_g++_common.GNU +++ b/ACE/include/makeinclude/platform_g++_common.GNU @@ -74,6 +74,20 @@ endif CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version) +# Minimum C++ level is now C++17, gcc until version 11 have an older version as default +ifeq ($(findstring $(CXX_MAJOR_VERSION),7),$(CXX_MAJOR_VERSION)) + c++std ?= c++17 +endif +ifeq ($(findstring $(CXX_MAJOR_VERSION),8),$(CXX_MAJOR_VERSION)) + c++std ?= c++17 +endif +ifeq ($(findstring $(CXX_MAJOR_VERSION),9),$(CXX_MAJOR_VERSION)) + c++std ?= c++17 +endif +ifeq ($(findstring $(CXX_MAJOR_VERSION),10),$(CXX_MAJOR_VERSION)) + c++std ?= c++17 +endif + # Only modify LDFLAGS if DLD has been set. ifneq ($(DLD),) ifeq ($(DLD),$(CXX_FOR_VERSION_TEST)) # only try this is we are using ld through gcc diff --git a/ACE/include/makeinclude/platform_qnx_gcc.GNU b/ACE/include/makeinclude/platform_qnx_gcc.GNU index 0912ee9d27310..70859638db9fd 100644 --- a/ACE/include/makeinclude/platform_qnx_gcc.GNU +++ b/ACE/include/makeinclude/platform_qnx_gcc.GNU @@ -6,7 +6,7 @@ debug ?= 1 optimize ?= 0 threads ?= 1 pipes ?= 0 -c++std ?= gnu++14 +c++std ?= gnu++17 CCFLAGS += -fexceptions LDFLAGS += -fexceptions