diff options
author | Adam Mitz <mitza@ociweb.com> | 2016-09-22 16:10:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-22 16:10:14 -0500 |
commit | 784a25d9950a1c5587a1ca51c41ca6f84b9e3e60 (patch) | |
tree | 6ae62aa4f0cbaa167778e2fc49154a6ad12c1991 | |
parent | 688a39c1edaa36714a33c088cb3d6b0273796534 (diff) | |
parent | 9979d94aaf9ced72f193f2197dd3fa2901958363 (diff) | |
download | ATCD-784a25d9950a1c5587a1ca51c41ca6f84b9e3e60.tar.gz |
Merge pull request #298 from huangminghuang/macosx_elcapitan
Better Mac OSX support
-rw-r--r-- | ACE/ace/config-macosx-jaguar.h | 178 | ||||
-rw-r--r-- | ACE/ace/config-macosx-leopard.h | 5 | ||||
-rw-r--r-- | ACE/ace/config-macosx.h | 197 | ||||
-rw-r--r-- | ACE/bin/MakeProjectCreator/templates/gnu.mpd | 3 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_macosx.GNU | 69 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_macosx_elcapitan.GNU | 10 | ||||
-rw-r--r-- | ACE/include/makeinclude/platform_macosx_jaguar.GNU | 42 |
7 files changed, 291 insertions, 213 deletions
diff --git a/ACE/ace/config-macosx-jaguar.h b/ACE/ace/config-macosx-jaguar.h new file mode 100644 index 00000000000..729c7ffe190 --- /dev/null +++ b/ACE/ace/config-macosx-jaguar.h @@ -0,0 +1,178 @@ +/* -*- C++ -*- */ +// This configuration file is designed to work with the MacOS X operating system, version 10.2 (Jaguar). + +#ifndef ACE_CONFIG_MACOSX_H +#define ACE_CONFIG_MACOSX_H + +#if ! defined (__ACE_INLINE__) +#define __ACE_INLINE__ +#endif /* ! __ACE_INLINE__ */ + +#if defined (__GNUG__) +# include "ace/config-g++-common.h" +#endif /* __GNUG__ */ + +#define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" + +#if defined (ACE_HAS_PENTIUM) +# undef ACE_HAS_PENTIUM +#endif /* ACE_HAS_PENTIUM */ + +#if !defined (_THREAD_SAFE) +#define _THREAD_SAFE +#endif /* _THREAD_SAFE */ + +#define ACE_HAS_GPERF +#define ACE_HAS_POSIX_SEM + +//#define ACE_HAS_SVR4_TLI + +#define ACE_LACKS_STROPTS_H +#define ACE_LACKS_WCHAR_H + +#define ACE_SYS_SELECT_NEEDS_UNISTD_H + +// +// Compiler/platform defines the sig_atomic_t typedef. +#define ACE_HAS_SIG_ATOMIC_T + +// Compiler/platform supports SVR4 signal typedef +#define ACE_HAS_SVR4_SIGNAL_T + +//Platform/compiler has the sigwait(2) prototype +#define ACE_HAS_SIGWAIT + +//Platform supports sigsuspend() +#define ACE_HAS_SIGSUSPEND + +//#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS +#define ACE_LACKS_GETPGID +#define ACE_LACKS_RWLOCK_T + +#define ACE_HAS_SIOCGIFCONF + +// Optimize ACE_Handle_Set for select(). +#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT + +#define ACE_HAS_NONCONST_SELECT_TIMEVAL + +#define ACE_HAS_SYSCTL + +#define ACE_NEEDS_SCHED_H + +#define ACE_LACKS_MALLOC_H + +#define ACE_HAS_ALT_CUSERID + +// Platform supports POSIX timers via struct timespec. +#define ACE_HAS_POSIX_TIME +#define ACE_HAS_UALARM + +// Platform defines struct timespec but not timespec_t +#define ACE_LACKS_TIMESPEC_T + +#define ACE_LACKS_STRRECVFD + +#define ACE_HAS_SOCKADDR_IN6_SIN6_LEN + +// Compiler/platform contains the <sys/syscall.h> file. +#define ACE_HAS_SYS_SYSCALL_H + +#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES + +// Compiler/platform supports alloca(). +// Although ACE does have alloca() on this compiler/platform combination, it is +// disabled by default since it can be dangerous. Uncomment the following line +// if you ACE to use it. +//#define ACE_HAS_ALLOCA + +// Compiler/platform correctly calls init()/fini() for shared libraries. +#define ACE_HAS_AUTOMATIC_INIT_FINI + +// Explicit dynamic linking permits "lazy" symbol resolution +//#define ACE_HAS_RTLD_LAZY_V + +// platform supports POSIX O_NONBLOCK semantics +#define ACE_HAS_POSIX_NONBLOCK + +// platform supports IP multicast +#define ACE_HAS_IP_MULTICAST +#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 + +// Compiler/platform has the getrusage() system call. +#define ACE_HAS_GETRUSAGE + +// Compiler supports the ssize_t typedef. +#define ACE_HAS_SSIZE_T + +// Compiler/platform provides the sockio.h file. +#define ACE_HAS_SYS_SOCKIO_H + +// Defines the page size of the system. +#define ACE_HAS_GETPAGESIZE + +// Platform provides <sys/filio.h> header. +#define ACE_HAS_SYS_FILIO_H + +// Platform/compiler supports timezone * as second parameter to gettimeofday(). +#define ACE_HAS_TIMEZONE_GETTIMEOFDAY + +#define ACE_LACKS_SYS_MSG_H +#define ACE_LACKS_SYSV_MSQ_PROTOS +#define ACE_HAS_MSG +#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG +#define ACE_HAS_NONCONST_MSGSND + +#if !defined (ACE_MT_SAFE) +# define ACE_MT_SAFE 1 +#endif + +#if ACE_MT_SAFE == 1 +// Yes, we do have threads. +# define ACE_HAS_THREADS +// And they're even POSIX pthreads +# define ACE_HAS_PTHREADS +# define ACE_HAS_THREAD_SPECIFIC_STORAGE +# define ACE_LACKS_THREAD_PROCESS_SCOPING +#endif /* ACE_MT_SAFE == 1 */ + +#define ACE_HAS_DIRENT +#define ACE_LACKS_POLL_H +#define ACE_LACKS_SEARCH_H + +#define ACE_LACKS_SETSCHED +//#define ACE_HAS_RECURSIVE_MUTEXES + +// Platform has POSIX terminal interface. +#define ACE_HAS_TERMIOS + +#define ACE_HAS_SEMUN +#define ACE_HAS_SIGINFO_T +#define ACE_LACKS_SIGINFO_H +#define ACE_HAS_UCONTEXT_T +#define ACE_HAS_GETIFADDRS +#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES +#define ACE_LACKS_UNNAMED_SEMAPHORE + +// dlcompat package (not part of base Darwin) is needed for dlopen(). +// You may download directly from sourceforge and install or use fink +// Fink installer puts libraries in /sw/lib and headers in /sw/include +// In order to install dlcompat do the following: +// - download fink from http://fink.sf.net +// - type: +// fink install dlcompat +// as of Dec 2002, if you use fink you will need to uncomment the next line +//#define ACE_NEEDS_DL_UNDERSCORE +#define ACE_HAS_SVR4_DYNAMIC_LINKING +#define ACE_LD_SEARCH_PATH ACE_TEXT ("DYLD_LIBRARY_PATH") +#define ACE_DLL_SUFFIX ACE_TEXT (".dylib") +#define ACE_LACKS_DLCLOSE + +// gperf seems to need this +#define ACE_HAS_NONSTATIC_OBJECT_MANAGER + +#if defined(__APPLE_CC__) && (__APPLE_CC__ < 1173) +#error "Compiler must be upgraded, see http://developer.apple.com" +#endif /* __APPLE_CC__ */ + +#endif /* ACE_CONFIG_MACOSX_H */ diff --git a/ACE/ace/config-macosx-leopard.h b/ACE/ace/config-macosx-leopard.h index 1b9b90d1344..60fe9851162 100644 --- a/ACE/ace/config-macosx-leopard.h +++ b/ACE/ace/config-macosx-leopard.h @@ -4,6 +4,8 @@ #ifndef ACE_CONFIG_MACOSX_LEOPARD_H #define ACE_CONFIG_MACOSX_LEOPARD_H +#include <Availability.h> + #define ACE_HAS_MAC_OSX #define ACE_HAS_NET_IF_DL_H @@ -205,10 +207,11 @@ #endif #define ACE_LACKS_CONDATTR_SETCLOCK +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200 #define ACE_LACKS_CLOCKID_T #define ACE_LACKS_CLOCK_MONOTONIC #define ACE_LACKS_CLOCK_REALTIME - +#endif // dlcompat package (not part of base Darwin) is needed for dlopen(). // You may download directly from sourceforge and install or use fink // Fink installer puts libraries in /sw/lib and headers in /sw/include diff --git a/ACE/ace/config-macosx.h b/ACE/ace/config-macosx.h index 729c7ffe190..afd4819f518 100644 --- a/ACE/ace/config-macosx.h +++ b/ACE/ace/config-macosx.h @@ -1,178 +1,23 @@ -/* -*- C++ -*- */ -// This configuration file is designed to work with the MacOS X operating system, version 10.2 (Jaguar). - -#ifndef ACE_CONFIG_MACOSX_H -#define ACE_CONFIG_MACOSX_H - -#if ! defined (__ACE_INLINE__) -#define __ACE_INLINE__ -#endif /* ! __ACE_INLINE__ */ - -#if defined (__GNUG__) -# include "ace/config-g++-common.h" -#endif /* __GNUG__ */ - -#define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" - -#if defined (ACE_HAS_PENTIUM) -# undef ACE_HAS_PENTIUM -#endif /* ACE_HAS_PENTIUM */ - -#if !defined (_THREAD_SAFE) -#define _THREAD_SAFE -#endif /* _THREAD_SAFE */ - -#define ACE_HAS_GPERF -#define ACE_HAS_POSIX_SEM - -//#define ACE_HAS_SVR4_TLI - -#define ACE_LACKS_STROPTS_H -#define ACE_LACKS_WCHAR_H - -#define ACE_SYS_SELECT_NEEDS_UNISTD_H - -// -// Compiler/platform defines the sig_atomic_t typedef. -#define ACE_HAS_SIG_ATOMIC_T - -// Compiler/platform supports SVR4 signal typedef -#define ACE_HAS_SVR4_SIGNAL_T - -//Platform/compiler has the sigwait(2) prototype -#define ACE_HAS_SIGWAIT - -//Platform supports sigsuspend() -#define ACE_HAS_SIGSUSPEND - -//#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS -#define ACE_LACKS_GETPGID -#define ACE_LACKS_RWLOCK_T - -#define ACE_HAS_SIOCGIFCONF - -// Optimize ACE_Handle_Set for select(). -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -#define ACE_HAS_SYSCTL - -#define ACE_NEEDS_SCHED_H - -#define ACE_LACKS_MALLOC_H - -#define ACE_HAS_ALT_CUSERID - -// Platform supports POSIX timers via struct timespec. -#define ACE_HAS_POSIX_TIME -#define ACE_HAS_UALARM - -// Platform defines struct timespec but not timespec_t -#define ACE_LACKS_TIMESPEC_T - -#define ACE_LACKS_STRRECVFD - -#define ACE_HAS_SOCKADDR_IN6_SIN6_LEN - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Compiler/platform supports alloca(). -// Although ACE does have alloca() on this compiler/platform combination, it is -// disabled by default since it can be dangerous. Uncomment the following line -// if you ACE to use it. -//#define ACE_HAS_ALLOCA - -// Compiler/platform correctly calls init()/fini() for shared libraries. -#define ACE_HAS_AUTOMATIC_INIT_FINI - -// Explicit dynamic linking permits "lazy" symbol resolution -//#define ACE_HAS_RTLD_LAZY_V - -// platform supports POSIX O_NONBLOCK semantics -#define ACE_HAS_POSIX_NONBLOCK - -// platform supports IP multicast -#define ACE_HAS_IP_MULTICAST -#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 - -// Compiler/platform has the getrusage() system call. -#define ACE_HAS_GETRUSAGE - -// Compiler supports the ssize_t typedef. -#define ACE_HAS_SSIZE_T - -// Compiler/platform provides the sockio.h file. -#define ACE_HAS_SYS_SOCKIO_H - -// Defines the page size of the system. -#define ACE_HAS_GETPAGESIZE - -// Platform provides <sys/filio.h> header. -#define ACE_HAS_SYS_FILIO_H - -// Platform/compiler supports timezone * as second parameter to gettimeofday(). -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY - -#define ACE_LACKS_SYS_MSG_H -#define ACE_LACKS_SYSV_MSQ_PROTOS -#define ACE_HAS_MSG -#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG -#define ACE_HAS_NONCONST_MSGSND - -#if !defined (ACE_MT_SAFE) -# define ACE_MT_SAFE 1 +#ifndef ACE_CONFIG_MACOSX_ALL_H +#define ACE_CONFIG_MACOSX_ALL_H +#include <Availability.h> + +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 100900 +#include "ace/config-macosx-mavericks.h" +#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 100800 +#include "config-macosx-mountainlion.h" +#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 100700 +#include "config-macosx-lion.h" +#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 100600 +#include "config-macosx-snowleopard.h" +#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 100500 +#include "config-macosx-leopard.h" +#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 100400 +#include "config-macosx-tigher.h" +#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 100300 +#include "config-macosx-pather.h" +#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 100200 +#include "config-macosx.h" #endif -#if ACE_MT_SAFE == 1 -// Yes, we do have threads. -# define ACE_HAS_THREADS -// And they're even POSIX pthreads -# define ACE_HAS_PTHREADS -# define ACE_HAS_THREAD_SPECIFIC_STORAGE -# define ACE_LACKS_THREAD_PROCESS_SCOPING -#endif /* ACE_MT_SAFE == 1 */ - -#define ACE_HAS_DIRENT -#define ACE_LACKS_POLL_H -#define ACE_LACKS_SEARCH_H - -#define ACE_LACKS_SETSCHED -//#define ACE_HAS_RECURSIVE_MUTEXES - -// Platform has POSIX terminal interface. -#define ACE_HAS_TERMIOS - -#define ACE_HAS_SEMUN -#define ACE_HAS_SIGINFO_T -#define ACE_LACKS_SIGINFO_H -#define ACE_HAS_UCONTEXT_T -#define ACE_HAS_GETIFADDRS -#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES -#define ACE_LACKS_UNNAMED_SEMAPHORE - -// dlcompat package (not part of base Darwin) is needed for dlopen(). -// You may download directly from sourceforge and install or use fink -// Fink installer puts libraries in /sw/lib and headers in /sw/include -// In order to install dlcompat do the following: -// - download fink from http://fink.sf.net -// - type: -// fink install dlcompat -// as of Dec 2002, if you use fink you will need to uncomment the next line -//#define ACE_NEEDS_DL_UNDERSCORE -#define ACE_HAS_SVR4_DYNAMIC_LINKING -#define ACE_LD_SEARCH_PATH ACE_TEXT ("DYLD_LIBRARY_PATH") -#define ACE_DLL_SUFFIX ACE_TEXT (".dylib") -#define ACE_LACKS_DLCLOSE - -// gperf seems to need this -#define ACE_HAS_NONSTATIC_OBJECT_MANAGER - -#if defined(__APPLE_CC__) && (__APPLE_CC__ < 1173) -#error "Compiler must be upgraded, see http://developer.apple.com" -#endif /* __APPLE_CC__ */ - -#endif /* ACE_CONFIG_MACOSX_H */ +#endif // ACE_CONFIG_MACOSX_ALL_H diff --git a/ACE/bin/MakeProjectCreator/templates/gnu.mpd b/ACE/bin/MakeProjectCreator/templates/gnu.mpd index bf5278c0d14..bed9ed41422 100644 --- a/ACE/bin/MakeProjectCreator/templates/gnu.mpd +++ b/ACE/bin/MakeProjectCreator/templates/gnu.mpd @@ -93,6 +93,9 @@ IDL_DEPS<%forcount%> = <%idl_file%> <%endif%> <%vpath%> + +LIBPATHS := <%libpaths%> + #---------------------------------------------------------------------------- # Include macros and targets #---------------------------------------------------------------------------- diff --git a/ACE/include/makeinclude/platform_macosx.GNU b/ACE/include/makeinclude/platform_macosx.GNU index 303a317c1dd..9f931101f02 100644 --- a/ACE/include/makeinclude/platform_macosx.GNU +++ b/ACE/include/makeinclude/platform_macosx.GNU @@ -1,42 +1,39 @@ -# -*- Makefile -*- +# include the platform_macosx_*.GNU based on the detected MacOS version -# support for Mac OS X 10.2 (jaguar), 10.3 (panther) -# Note: /sw/lib & /sw/include are inserted for the convience of Fink -# users. Non-Fink users should simply create these directories to -# eliminate the warnings. +MACOS_RELEASE_VERSION=$(shell sw_vers -productVersion) +MACOS_REL_WORDS := $(subst ., ,${MACOS_RELEASE_VERSION}) +MACOS_MAJOR_VERSION = $(word 1,${MACOS_REL_WORDS}) +MACOS_MINOR_VERSION = $(word 2,${MACOS_REL_WORDS}) +MACOS_BUILD_VERSION = $(word 3,${MACOS_REL_WORDS}) -threads ?= 1 -debug ?= 1 -optimize ?= 0 -versioned_so ?= 0 -with_ld = macosx -CC = gcc -CXX = g++ -CFLAGS += -Wno-long-double -I/sw/include +MACOS_CODENAME_VER_10_2 := +MACOS_CODENAME_VER_10_3 := panther +MACOS_CODENAME_VER_10_4 := tigher +MACOS_CODENAME_VER_10_5 := leopard +MACOS_CODENAME_VER_10_6 := snowleopard +MACOS_CODENAME_VER_10_7 := lion +MACOS_CODENAME_VER_10_8 := mountainlion +MACOS_CODENAME_VER_10_9 := mavericks +MACOS_CODENAME_VER_10_10 := yosemite +MACOS_CODENAME_VER_10_11 := elcapitan +MACOS_CODENAME_VER_latest := elcapitan -DCFLAGS += -g -DLD = libtool -LD = $(CXX) -LDFLAGS += -L/sw/lib -flat_namespace -undefined warning -LIBS += -lcc_dynamic -lstdc++ -lSystem +MACOS_CODENAME = $(MACOS_CODENAME_VER_$(MACOS_MAJOR_VERSION)_$(MACOS_MINOR_VERSION)) -## dlcompat package (not part of base Darwin) is needed for dlopen() on 10.2. -## Fink installer puts libraries in /sw/lib and headers in /sw/include -## In order to install dlcompat do the following: -## - download fink from http://fink.sf.net -## - type: -## fink install dlcompat -## 10.3 does not need this package. -LIBS += -ldl -# 10.3 cannot do -03, this could be version dependent (probably on gcc) -OCFLAGS += -O2 -RANLIB = ranlib -SOEXT = dylib -SOFLAGS += -dynamic -SOBUILD = -o $(VSHDIR)$*.dylib $< +ifeq ($(MACOS_MAJOR_VERSION),10) + ifeq ($(shell test $(MACOS_MINOR_VERSION) -gt 11; echo $$?),0) + ## if the detected version is greater than the lastest know version, + ## just use the lastest known version + MACOS_CODENAME = $(MACOS_CODENAME_VER_latest) + else ifeq ($(shell test $(MACOS_MINOR_VERSION) -lt 2; echo $$?),0) + ## Unsupoorted minor version + $(error Unsupported MacOS version $(MACOS_RELEASE_VERSION)) + endif +else + ## Unsupoorted major version + $(error Unsupported MacOS version $(MACOS_RELEASE_VERSION)) +endif + +include $(ACE_ROOT)/include/makeinclude/platform_macosx_$(MACOS_CODENAME).GNU -# Test for template instantiation, add to SOFLAGS if versioned_so set, -# add -E to LDFLAGS if using GNU ld -# -include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU diff --git a/ACE/include/makeinclude/platform_macosx_elcapitan.GNU b/ACE/include/makeinclude/platform_macosx_elcapitan.GNU index 9d3c12028a2..d50bd5f5fe8 100644 --- a/ACE/include/makeinclude/platform_macosx_elcapitan.GNU +++ b/ACE/include/makeinclude/platform_macosx_elcapitan.GNU @@ -1,3 +1,13 @@ +ssl?=0 include $(ACE_ROOT)/include/makeinclude/platform_macosx_yosemite.GNU +## The following is to circumvent the restriction of System Integrity Protection (SIP) on Mac OS X El Capitan +## by embedding the path information of dynamic libraries into the executables. + +SOFLAGS += -install_name @rpath/$@ +space := $(subst ,, ) + +LDFLAGS += $(foreach libpath,$(LIBPATHS),-rpath $(if $(filter "/%,$(subst $(space),;,$(libpath))),$(libpath),@executable_path/$(libpath))) + + diff --git a/ACE/include/makeinclude/platform_macosx_jaguar.GNU b/ACE/include/makeinclude/platform_macosx_jaguar.GNU new file mode 100644 index 00000000000..303a317c1dd --- /dev/null +++ b/ACE/include/makeinclude/platform_macosx_jaguar.GNU @@ -0,0 +1,42 @@ +# -*- Makefile -*- + +# support for Mac OS X 10.2 (jaguar), 10.3 (panther) +# Note: /sw/lib & /sw/include are inserted for the convience of Fink +# users. Non-Fink users should simply create these directories to +# eliminate the warnings. + +threads ?= 1 +debug ?= 1 +optimize ?= 0 +versioned_so ?= 0 +with_ld = macosx + +CC = gcc +CXX = g++ +CFLAGS += -Wno-long-double -I/sw/include + +DCFLAGS += -g +DLD = libtool +LD = $(CXX) +LDFLAGS += -L/sw/lib -flat_namespace -undefined warning +LIBS += -lcc_dynamic -lstdc++ -lSystem + +## dlcompat package (not part of base Darwin) is needed for dlopen() on 10.2. +## Fink installer puts libraries in /sw/lib and headers in /sw/include +## In order to install dlcompat do the following: +## - download fink from http://fink.sf.net +## - type: +## fink install dlcompat +## 10.3 does not need this package. +LIBS += -ldl +# 10.3 cannot do -03, this could be version dependent (probably on gcc) +OCFLAGS += -O2 +RANLIB = ranlib +SOEXT = dylib +SOFLAGS += -dynamic +SOBUILD = -o $(VSHDIR)$*.dylib $< + +# Test for template instantiation, add to SOFLAGS if versioned_so set, +# add -E to LDFLAGS if using GNU ld +# +include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU |