diff options
-rw-r--r-- | ACE/include/makeinclude/platform_macosx_common.GNU | 23 |
1 files 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) |