From c77bbe5516b478dda379a03b4a0f2f693e2ee3c5 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Jan 2021 08:57:32 +0100 Subject: Merge code for detecting whether we have c++11 support also to macosx * ACE/include/makeinclude/platform_macosx_common.GNU: --- ACE/include/makeinclude/platform_macosx_common.GNU | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/ACE/include/makeinclude/platform_macosx_common.GNU b/ACE/include/makeinclude/platform_macosx_common.GNU index 1ba6dcd5107..fe4e2c477c9 100644 --- a/ACE/include/makeinclude/platform_macosx_common.GNU +++ b/ACE/include/makeinclude/platform_macosx_common.GNU @@ -27,15 +27,15 @@ CC ?= gcc CXX ?= g++ DCCFLAGS += -g DCFLAGS += -g -DLD = $(CXX) -LD = $(CXX) +DLD = $(CXX) +LD = $(CXX) #LIBS += -lstdc++.6 -lSystem -lSystemStubs -OCFLAGS += -O2 -RANLIB = ranlib -SOEXT = dylib -SOFLAGS += -dynamiclib -SOBUILD = -o $(VSHDIR)$*.dylib $< +OCFLAGS += -O2 +RANLIB = ranlib +SOEXT = dylib +SOFLAGS += -dynamiclib +SOBUILD = -o $(VSHDIR)$*.dylib $< # Test for template instantiation, add to SOFLAGS if versioned_so set, # add -E to LDFLAGS if using GNU ld @@ -45,6 +45,15 @@ else include $(ACE_ROOT)/include/makeinclude/platform_clang_common.GNU endif +ifneq ($(findstring g++,$(CXX)),) + CXX_MAJOR_VERSION := $(shell $(CXX) -dumpversion | sed -e 's/[^0-9\.]//g' | sed -e 's/\..*$$//') + # clang5 has C++03 as default C++ version, enable this to be C++11 + # the older clang versions all return 4.2.1 as part of dumpversion + ifeq ($(findstring $(CXX_MAJOR_VERSION),4),$(CXX_MAJOR_VERSION)) + c++11 ?= 1 + endif +endif + LDFLAGS += -flat_namespace ifeq ($(universal),1) -- cgit v1.2.1