From c3f21bb6009ba58e0888304ca5a1011d7554936b Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 16 Oct 2018 15:33:23 -0500 Subject: Add ACE/build and TAO/build to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index a2aed252e6b..4a0cd8c7d6a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,8 @@ ipch/ /setenv.cmd /setenv.sh /build +/ACE/build +/TAO/build *.o *.res -- cgit v1.2.1 From 85291bed9f9e941d64e3e2b91c36e9761908f55c Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 16 Oct 2018 18:00:31 -0500 Subject: Update platform make files to support android clang --- ACE/include/makeinclude/platform_android.GNU | 245 +++++++--------------- ACE/include/makeinclude/platform_clang_common.GNU | 28 ++- 2 files changed, 97 insertions(+), 176 deletions(-) diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index 85795a9e102..773542bf2d3 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -6,197 +6,90 @@ # We always include config-android.h on Android platforms. ACE_PLATFORM_CONFIG ?= config-android.h +# Common Linux Functionality +include $(ACE_ROOT)/include/makeinclude/platform_linux_common.GNU + # The standalone gcc compilers in NDK r6-r9 have issues with the visibility. no_hidden_visibility ?= 1 # as of NDK r6 inlining is required inline ?= 1 -debug ?= 1 -optimize ?= 1 -threads ?= 1 -insure ?= 0 - -LSB_RELEASE_ID := $(shell lsb_release -i 2> /dev/null || echo Distributor ID: Unknown) -LSB_RELEASE_RELEASE := $(shell lsb_release -r 2> /dev/null || echo Release: Unknown) - -PLATFORM_XT_CPPFLAGS= -PLATFORM_XT_LIBS=-lXt -PLATFORM_XT_LDFLAGS= - -PLATFORM_FL_CPPFLAGS= -PLATFORM_FL_LIBS=-lfltk -lfltk_forms -lfltk_gl -PLATFORM_FL_LDFLAGS= - -PLATFORM_X11_CPPFLAGS=-I/usr/X11R6/include -PLATFORM_X11_LIBS=-lX11 -PLATFORM_X11_LDFLAGS=-L/usr/X11R6/lib +# as of API level 16 executables can be linked as Position Independent Executables +# as of API level 21 PIE is mandatory +PIE ?= -pie -PLATFORM_GL_CPPFLAGS=-I/usr/X11R6/include -PLATFORM_GL_LIBS =-lGL -PLATFORM_GL_LDFLAGS =-L/usr/X11R6/lib +#No rwho on Android +rwho = 0 -PLATFORM_GTK_CPPFLAGS=$(shell gtk-config --cflags) -PLATFORM_GTK_LIBS =$(shell gtk-config --libs) -PLATFORM_GTK_LDFLAGS = +# This section deals with selecting the architecture/compiler +# As of writing information on ABIs can be found at https://developer.android.com/ndk/guides/abis -PLATFORM_FOX_CPPFLAGS ?= -I/usr/include/fox -PLATFORM_FOX_LIBS ?= -lFOX -PLATFORM_FOX_LDFLAGS ?= +ifndef ANDROID_ABI + ifdef ANDROID_ARCH # Handle Possiblity of ANDROID_ARCH being passed + ifeq ($(ANDROID_ARCH),arm) + ANDROID_ABI := armeabi-v7a + else + ANDROID_ABI := $(ANDROID_ARCH) + endif + else # Else default to ARMv7 + ANDROID_ABI := armeabi-v7a + endif +endif -# NOTE: we only support wxWindows over GTK -PLATFORM_WX_CPPFLAGS= $(shell wx-config --cxxflags) $(PLATFORM_GTK_CPPFLAGS) -PLATFORM_WX_LIBS = $(shell wx-config --libs) $(PLATFORM_GTK_LIBS) -PLATFORM_WX_LDFLAGS = $(shell wx-config --ldflags) $(PLATFORM_GTK_LDFLAGS) +# Alias neon +ifeq ($(ANDROID_ABI), neon) + ANDROID_ABI := armeabi-v7a-with-neon +endif -PLATFORM_BOOST_CPPFLAGS ?= -PLATFORM_BOOST_LDLAGS ?= -PLATFORM_BOOST_UTF_LIBS ?= -lboost_unit_test_framework +# NDK says -Wl,--fix-cortex-a8 is required for working around a CPU bug +# in some Cortex-A8 implementations -ifeq ($(buildbits),64) -PLATFORM_TK_CPPFLAGS=$(shell . /usr/lib64/tkConfig.sh && echo -n $$TK_INCLUDE_SPEC $$TK_DEFS) -PLATFORM_TK_LIBS=$(shell . /usr/lib64/tkConfig.sh && echo -n $$TK_LIB_FLAG) -else -PLATFORM_TK_CPPFLAGS=$(shell . /usr/lib/tkConfig.sh && echo -n $$TK_INCLUDE_SPEC $$TK_DEFS) -PLATFORM_TK_LIBS=$(shell . /usr/lib/tkConfig.sh && echo -n $$TK_LIB_FLAG) +ifeq ($(ANDROID_ABI),armeabi-v7a) + CROSS_COMPILE := arm-linux-androideabi- + FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 + LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8 endif -PLATFORM_TK_LDFLAGS= -ifeq ($(buildbits),64) -PLATFORM_TCL_CPPFLAGS=$(shell . /usr/lib64/tclConfig.sh && echo -n $$TCL_INCLUDE_SPEC $$TCL_DEFS) -PLATFORM_TCL_LIBS=$(shell . /usr/lib64/tclConfig.sh && echo -n $$(eval echo $$TCL_LIB_FLAG)) -else -PLATFORM_TCL_CPPFLAGS=$(shell . /usr/lib/tclConfig.sh && echo -n $$TCL_INCLUDE_SPEC $$TCL_DEFS) -PLATFORM_TCL_LIBS=$(shell . /usr/lib/tclConfig.sh && echo -n $$(eval echo $$TCL_LIB_FLAG)) -endif -PLATFORM_TCL_LDFLAGS= - -PLATFORM_QT_CPPFLAGS ?= -I$(QTDIR)/include -PLATFORM_QT_LIBS ?= -lqt-mt -PLATFORM_QT_LDFLAGS ?= -L$(QTDIR)/lib - -sctp ?= -# support for OpenSS7 SCTP -ifeq ($(sctp),openss7) - PLATFORM_SCTP_CPPFLAGS+= -DACE_HAS_OPENSS7_SCTP - PLATFORM_SCTP_LDFLAGS?= - PLATFORM_SCTP_LIBS?= +ifeq ($(ANDROID_ABI),arm64-v8a) + CROSS_COMPILE := aarch64-linux-android- + FLAGS_C_CC += -march=armv8-a + LDFLAGS += -march=armv8-a endif -# support for LKSCTP (Linux Kernel 2.5) -ifeq ($(sctp),lksctp) - PLATFORM_SCTP_CPPFLAGS+= -DACE_HAS_LKSCTP - PLATFORM_SCTP_LDFLAGS?= -L/usr/local/lib - PLATFORM_SCTP_LIBS?= -lsctp +ifeq ($(ANDROID_ABI),armeabi-v7a-with-neon) + CROSS_COMPILE := arm-linux-androideabi- + FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp -mfpu=neon + LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8 endif -GNU_LIBPTHREAD_VERSION := $(shell getconf GNU_LIBPTHREAD_VERSION 2> /dev/null || echo Unknown) -ifeq (NPTL, $(word 1,$(GNU_LIBPTHREAD_VERSION))) - NPTL_VERS := $(subst ., ,$(word 2,$(GNU_LIBPTHREAD_VERSION))) - ifneq (0, $(word 1,$(NPTL_VERS))) - nptl ?= 1 - endif +ifeq ($(ANDROID_ABI),x86) + CROSS_COMPILE := i686-linux-android- endif -nptl ?= 0 -ifeq ($(nptl),0) - CPPFLAGS += -DACE_LACKS_LINUX_NPTL -endif - -ssl ?= 0 -ifeq ($(ssl),1) - # Some Linux OpenSSL installations compile in Kerberos support. Add - # the Kerberos include path to preprocessor include path. - # - # We should probably also add the Kerberos libraries to - # PLATFORM_SSL_LIBS but we can't be sure if they are needed without - # a more sophisticated check. This will only be a problem when - # statically linking the OpenSSL library. The majority of - # installations use shared OpenSSL libraries so we should be okay, - # at least until we migrate to Autoconf. - PLATFORM_SSL_CPPFLAGS += -I/usr/kerberos/include -endif # ssl - -SYSARCH := $(shell uname -m) - -# as of API level 16 executables can be linked as Position Independent Executables -# as of API level 21 PIE is mandatory -PIE ?= -pie -PIC = -fPIC -AR ?= ar -ARFLAGS ?= rsuv -RANLIB = @true -# end of: include most of platform_linux_common.GNU - -#No rwho on Android -rwho = 0 - -#Standalone toolchain required. -#Required environment variables are -#$NDK - install directory for android NDK, at least r5c -#$SDK - install directory for android SDK -#$SYSROOT - $NDK/platform/android-9 -#$TOOLCHAIN/bin in path, $TOOLCHAIN is root of standalone toolchain -# -#Optionally ANDROID_ABI can be set to select specific architecture ABIs like armeabi-v7a or neon -#ANDROID_ABI ?= arm64-v8a -# -#Toolchain defaults to arm architecture -ANDROID_ARCH ?= arm - -#SYSROOT ?= $(NDK)/platforms/android-9/arch-$(ANDROID_ARCH) - -ifeq (,$(CROSS_COMPILE)) - ifeq ($(ANDROID_ARCH),arm) - CROSS_COMPILE=arm-linux-androideabi- - else - ifeq ($(ANDROID_ARCH),x86) - CROSS_COMPILE=i686-linux-android- - else - CROSS_COMPILE=unknown-android-arch- - endif - endif +ifeq ($(ANDROID_ABI),x86_64) + CROSS_COMPILE := x86_64-linux-android- endif -# fix this -pipes ?= 1 - -# set architecture specific build flags -ifeq (arm,$(findstring arm,$(ANDROID_ARCH))) - # NDK says -Wl,--fix-cortex-a8 is required for working around a CPU bug - # in some Cortex-A8 implementations - - # Set ABI specific flags - ifeq ($(ANDROID_ABI),armeabi-v7a) - FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 - LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8 - endif - - ifeq ($(ANDROID_ABI),arm64-v8a) - CROSS_COMPILE=aarch64-linux-android- - FLAGS_C_CC += -march=armv8-a - LDFLAGS += -march=armv8-a - endif - - ifeq ($(ANDROID_ABI),neon) - FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp -mfpu=neon - LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8 - endif - +ifndef CROSS_COMPILE + $(error ANDROID_ABI passed (set to: $(ANDROID_ABI)) is not valid) endif -FLAGS_C_CC += -W -Wall -Wpointer-arith -Wno-psabi +# Determine if the g++ compiler is GCC or Clang. +# There are at least 3 assumptions being made here: +# - There is a g++ command to get the version from +# - Clang will have "clang" in the version string +# - If g++ is actually clang, then we can replace that with clang++ +gplusplus_version = $(shell $(CROSS_COMPILE)g++$(CROSS_COMPILE_SUFFIX) --version) +actually_is_clang := $(strip $(findstring clang,$(gplusplus_version))) + +FLAGS_C_CC += -W -Wall -Wpointer-arith ifeq ($(threads),1) CPPFLAGS += -D_REENTRANT $(PLATFORM_AIO_SUPPORT) endif # threads -ifeq ($(buildbits),32) - FLAGS_C_CC += -m32 - LDFLAGS += -m32 -endif -ifeq ($(buildbits),64) - FLAGS_C_CC += -m64 -endif +# Use -pipes by default +pipes ?= 1 # DT_RUNPATH is preferred over DT_RPATH, but the linker will only use it when # this extra flag option (enable-new-dtags) is present @@ -211,13 +104,16 @@ DCFLAGS += -ggdb DCCFLAGS += -ggdb DLD = $(CXX) LD = $(CXX) $(PIE) -# make sure to add the required libs for RTTI and exceptions (libsupc++) -# and a shared STL lib (libgnustl_shared by default) -static_libs_only ?= -ANDROID_STL_DLL ?= gnustl_shared -LIBS += -ldl -lsupc++ -ifneq ($(static_libs_only),1) - LIBS += -l$(ANDROID_STL_DLL) + +ifndef actually_is_clang + # make sure to add the required libs for RTTI and exceptions (libsupc++) + # and a shared STL lib (libgnustl_shared by default) + static_libs_only ?= + ANDROID_STL_DLL ?= gnustl_shared + LIBS += -ldl -lsupc++ + ifneq ($(static_libs_only),1) + LIBS += -l$(ANDROID_STL_DLL) + endif endif ifeq ($(optimize),1) @@ -229,10 +125,11 @@ SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \ $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o PRELIB = @true -# Test for template instantiation, add to SOFLAGS if SONAME set, -# add -E to LDFLAGS if using GNU ld -# -include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU +ifdef actually_is_clang + include $(ACE_ROOT)/include/makeinclude/platform_clang_common.GNU +else + include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU +endif OCFLAGS ?= -O3 OCCFLAGS ?= -O3 diff --git a/ACE/include/makeinclude/platform_clang_common.GNU b/ACE/include/makeinclude/platform_clang_common.GNU index d06e624d6cb..51ccc49feda 100644 --- a/ACE/include/makeinclude/platform_clang_common.GNU +++ b/ACE/include/makeinclude/platform_clang_common.GNU @@ -1,6 +1,30 @@ # -*- Makefile -*- -# -# Common file help turn on/off explicit template instantiation + +# Compiling TAO requires relaxing strict 2-phase name lookup rules: +CCFLAGS += -fdelayed-template-parsing + +ifneq ($(CROSS_COMPILE),) + CROSS-COMPILE = 1 + # Build using the cross-tools + CC = ${CROSS_COMPILE}clang${CROSS_COMPILE_SUFFIX} + CXX = ${CROSS_COMPILE}clang++${CROSS_COMPILE_SUFFIX} + AR = ${CROSS_COMPILE}ar${CROSS_COMPILE_SUFFIX} + # Cross-linker requires this for linked in shared libs that depend + # themselves on other shared libs (not directly linked in) + LDFLAGS += -Wl,-rpath-link,$(ACE_ROOT)/lib + ifneq (,$(HOST_ROOT)) + TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/ace_gperf + TAO_IDL = $(HOST_ROOT)/bin/tao_idl + TAO_IDL_DEP = $(TAO_IDL) + TAO_IDL3_TO_IDL2 = $(HOST_ROOT)/bin/tao_idl3_to_idl2 + TAO_IDL3_TO_IDL2_DEP = $(TAO_IDL3_TO_IDL2) + TAO_IDL3_TO_XMI = $(HOST_ROOT)/bin/tao_idl3_to_xmi + TAO_IDL3_TO_XMI_DEP = $(TAO_IDL3_TO_XMI) + # make sure to use the target compiler, not the cross-compiler + # as preprocessor for the cross-compiled idl tools + TAO_IDL_PREPROCESSOR = clang + endif +endif ifeq ($(openmp),1) FLAGS_C_CC += -fopenmp -- cgit v1.2.1 From cc9d5d4d536cc031253b986b5fbd4abd07f3652e Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Wed, 17 Oct 2018 20:24:30 -0500 Subject: config-android.h: Update for Newer NDK --- ACE/ace/config-android.h | 146 ++++++++++++++++++--------- ACE/include/makeinclude/platform_android.GNU | 12 +++ 2 files changed, 108 insertions(+), 50 deletions(-) diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h index 1d5a647d365..f0d6cffc8e1 100644 --- a/ACE/ace/config-android.h +++ b/ACE/ace/config-android.h @@ -1,11 +1,15 @@ // -*- C++ -*- -// The following configuration file is designed to work for Android -// platforms using GNU C++. +// Config Header file for Android NDK #ifndef ACE_CONFIG_ANDROID_H #define ACE_CONFIG_ANDROID_H #include /**/ "ace/pre.h" +// NOTE: We must be careful from now on to distinguish between the API level +// and NDK version. +// There is a large number of combinations of these two that can lead to +// problems. + // Location of the __ANDROID_API__ define // #include $NDK_ROOT/sysroot/usr/include/android/api-level.h #include "android/api-level.h" @@ -15,6 +19,91 @@ #endif #define ACE_ANDROID +#define ACE_PLATFORM_CONFIG config-android.h + +/* + * Android NDK Revision Macros + * + * Revsions Scheme Work Like This: + * Revision | __NDK_MAJOR__ | __NDK_MINOR__ + * r16 | 16 | 0 + * r16b | 16 | 1 + * r16c | 16 | 2 + * + * After r16, NDK version macros are defined in android/ndk-version.h Before + * that they must be defined in platform_macros.GNU before the include of + * platform_android.GNU. + */ +#define ACE_ANDROID_NDK_AT_LEAST(MAJ, MIN) \ + (__NDK_MAJOR__ > (MAJ) || (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ >= (MIN))) + +#define ACE_ANDROID_NDK_EXACTLY(MAJ, MIN) \ + (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ == (MIN)) + +#define ACE_ANDROID_NDK_LESS_THAN(MAJ, MIN) \ + (__NDK_MAJOR__ < (MAJ) || (__NDK_MAJOR__ == (MAJ) && __NDK_MINOR__ < (MIN))) + +#ifdef ACE_ANDROID_NDK_HAS_NDK_VERSION_H +# include "android/ndk-version.h" +#else +# ifndef __NDK_MAJOR__ +# error ndk-version.h is missing, __NDK_MAJOR__ for Android NDK must be defined! +# endif +# ifndef __NDK_MINOR__ +# error ndk-version.h is missing, __NDK_MINOR__ for Android NDK must be defined! +# endif +#endif + +// ucontext.h and clock_settime() were added in r10c +#if ACE_ANDROID_NDK_AT_LEAST(10, 2) +# define ACE_HAS_UCONTEXT_T +# define ACE_HAS_CLOCK_SETTIME +#else +# define ACE_LACKS_UCONTEXT_H +#endif + +// NDK has these by r12b +#if ACE_ANDROID_NDK_LESS_THAN(12, 1) +# define ACE_LACKS_GETHOSTENT +# define ACE_LACKS_LOCALECONV +# define ACE_LACKS_WCHAR_STD_NAMESPACE +#endif + +#if ACE_ANDROID_NDK_LESS_THAN(12, 1) || __ANDROID_API__ < 18 +# define ACE_LACKS_LOG2 +#endif + +#if ACE_ANDROID_NDK_LESS_THAN(12, 1) || __ANDROID_API__ < 21 +# define ACE_LACKS_SEARCH_H +# define ACE_LACKS_SYS_SEM_H +# define ACE_LACKS_SEMBUF_T +# define ACE_LACKS_SYS_MSG_H +# define ACE_LACKS_SYS_SHM_H +# define ACE_LACKS_SYSV_SHMEM +#endif + +// NDK has telldir() and seekdir() by 15c +#if ACE_ANDROID_NDK_LESS_THAN(15, 2) || __ANDROID_API__ < 23 +# define ACE_LACKS_TELLDIR +# define ACE_LACKS_SEEKDIR +#endif + +// semun was added to sys/sem.h in r15 +#if ACE_ANDROID_NDK_AT_LEAST(15, 0) || __ANDROID_API__ >= 21 +# define ACE_HAS_SEMUN +#endif + +// fd_mask was added in r17c +#if ACE_ANDROID_NDK_LESS_THAN(17, 2) +# define ACE_LACKS_FD_MASK +#endif + +#if __ANDROID_API__ < 21 +# define ACE_LACKS_RAND_R +# define ACE_LACKS_WCSTOLL +# define ACE_LACKS_WCSTOULL +# define ACE_LACKS_CONDATTR_SETCLOCK +#endif #define ACE_HAS_SSIZE_T @@ -38,35 +127,18 @@ #define ACE_USES_ULONG_FOR_STAT_TIME #define ACE_LACKS_NEW_H -#define ACE_LACKS_SEARCH_H #define ACE_LACKS_SIGINFO_H #define ACE_LACKS_STROPTS_H -#define ACE_LACKS_SYS_SEM_H -#define ACE_LACKS_SYS_MSG_H -#define ACE_LACKS_SYS_SHM_H #define ACE_LACKS_SYS_SYSCTL_H -#define ACE_LACKS_CUSERID -#define ACE_LACKS_GETHOSTENT #define ACE_LACKS_GETLOADAVG #define ACE_LACKS_ISCTYPE -#define ACE_LACKS_LOG2 -#define ACE_LACKS_LOCALECONV #define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS #define ACE_LACKS_PWD_FUNCTIONS -#define ACE_LACKS_PTHREAD_CANCEL -#define ACE_LACKS_SEEKDIR -#define ACE_LACKS_SEMBUF_T -#define ACE_LACKS_SETINHERITSCHED #define ACE_LACKS_STRRECVFD +#define ACE_LACKS_PTHREAD_CANCEL // posix_limits.h explicitly says this +#define ACE_LACKS_SETINHERITSCHED // posix_limits.h explicitly says this #define ACE_LACKS_SWAB -#define ACE_LACKS_SYSV_SHMEM -#define ACE_LACKS_TELLDIR -#define ACE_LACKS_WCHAR_STD_NAMESPACE -#define ACE_LACKS_WCSTOLL -#define ACE_LACKS_WCSTOULL - -#define ACE_LACKS_RAND_R // Android seems to have 64 keys of which Android itself use 5 #define ACE_DEFAULT_THREAD_KEYS 59 @@ -80,8 +152,6 @@ # define ACE_MT_SAFE 1 #endif -#define ACE_PLATFORM_CONFIG config-android.h - // Needed to differentiate between libc 5 and libc 6 (aka glibc). #include @@ -118,13 +188,14 @@ #define ACE_HAS_P_READ_WRITE // Use ACE's alternate cuserid() implementation since the use of the // system cuserid() is discouraged. +#define ACE_LACKS_CUSERID #define ACE_HAS_ALT_CUSERID #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) # define ACE_HAS_ISASTREAM_PROTOTYPE # define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE # define ACE_HAS_CPU_SET_T -#elif __ANDROID_API__ >= 21 +#elif ACE_ANDROID_NDK_AT_LEAST(16, 0) || __ANDROID_API__ >= 21 # define ACE_HAS_CPU_SET_T #endif /* __GLIBC__ > 2 || __GLIBC__ === 2 && __GLIBC_MINOR__ >= 3) */ @@ -330,32 +401,7 @@ #define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS #define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R #define ACE_HAS_REENTRANT_FUNCTIONS - -#if __ANDROID_API__ < 21 -# define ACE_LACKS_UCONTEXT_H -#else -# define ACE_HAS_CLOCK_SETTIME -# define ACE_HAS_UCONTEXT_T -#endif - -#define ACE_LACKS_FD_MASK - -#if __ANDROID_API__ >= 9 -# define ACE_HAS_TIMEZONE -#endif - -#if __ANDROID_API__ < 14 -# define ACE_LACKS_STD_WSTRING -# define ACE_LACKS_GETIPNODEBYADDR -# define ACE_LACKS_GETIPNODEBYNAME -#endif - -#if __ANDROID_API__ == 3 -# error Unsupported Android release 3 -#elif __ANDROID_API__ == 8 -# define ACE_LACKS_REGEX_H 1 -# define ACE_LACKS_CONDATTR 1 -#endif +#define ACE_HAS_TIMEZONE #if !defined ACE_DEFAULT_TEMP_DIR # define ACE_DEFAULT_TEMP_DIR "/data/tmp" diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index 773542bf2d3..691405263c8 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -131,6 +131,18 @@ else include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU endif +ifeq ($(shell echo '\#include "android/ndk-version.h"' | $(CXX) -E - > /dev/null 2>&1; echo $$?), 0) + CPPFLAGS += -DACE_ANDROID_NDK_HAS_NDK_VERSION_H +endif + +ifdef __NDK_MAJOR__ + CPPFLAGS += -D__NDK_MAJOR__=$(__NDK_MAJOR__) +endif + +ifdef __NDK_MINOR__ + CPPFLAGS += -D__NDK_MINOR__=$(__NDK_MINOR__) +endif + OCFLAGS ?= -O3 OCCFLAGS ?= -O3 -- cgit v1.2.1 From 6d77d231876be9f18e8e54dc4fd43d5a9c7177e5 Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Thu, 18 Oct 2018 15:22:43 -0500 Subject: Try to fix semaphores in older Android NDKs --- ACE/ace/config-android.h | 5 ++++- ACE/ace/os_include/sys/os_sem.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h index f0d6cffc8e1..62e3400b8aa 100644 --- a/ACE/ace/config-android.h +++ b/ACE/ace/config-android.h @@ -89,8 +89,11 @@ #endif // semun was added to sys/sem.h in r15 -#if ACE_ANDROID_NDK_AT_LEAST(15, 0) || __ANDROID_API__ >= 21 +#if __ANDROID_API__ >= 21 # define ACE_HAS_SEMUN +# if ACE_ANDROID_NDK_LESS_THAN(15, 0) +# define ACE_HAS_LINUX_SEM_H +# endif #endif // fd_mask was added in r17c diff --git a/ACE/ace/os_include/sys/os_sem.h b/ACE/ace/os_include/sys/os_sem.h index 7efec988f7a..91b9b4f1c70 100644 --- a/ACE/ace/os_include/sys/os_sem.h +++ b/ACE/ace/os_include/sys/os_sem.h @@ -27,6 +27,10 @@ #if !defined (ACE_LACKS_SYS_SEM_H) # include /**/ +#else +# ifdef ACE_HAS_LINUX_SEM_H +# include +# endif #endif /* !ACE_LACKS_SYS_SEM_H */ // Place all additions (especially function declarations) within extern "C" {} -- cgit v1.2.1 From baf54e97e1f00d18c90d2241e3d75ec3298c6475 Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Wed, 24 Oct 2018 21:47:18 -0500 Subject: Force Non-Versioned SOs on Android --- ACE/include/makeinclude/platform_android.GNU | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index 691405263c8..c788dc7f7aa 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -22,6 +22,9 @@ PIE ?= -pie #No rwho on Android rwho = 0 +# Android Studio does not seem to reconize so files with versions +versioned_so=0 + # This section deals with selecting the architecture/compiler # As of writing information on ABIs can be found at https://developer.android.com/ndk/guides/abis -- cgit v1.2.1 From cddb2d2bb178b0d618c3f4ea6be1a1351ad3998e Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Mon, 29 Oct 2018 16:01:49 -0500 Subject: Error if Android NDK < r15 and Android API >= 21 --- ACE/ace/config-android.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h index 62e3400b8aa..61f10b133c4 100644 --- a/ACE/ace/config-android.h +++ b/ACE/ace/config-android.h @@ -92,7 +92,7 @@ #if __ANDROID_API__ >= 21 # define ACE_HAS_SEMUN # if ACE_ANDROID_NDK_LESS_THAN(15, 0) -# define ACE_HAS_LINUX_SEM_H +# error "This combination of Android NDK < r15 and API >= 21 does is not supported. There are conflicting versions of semun" # endif #endif -- cgit v1.2.1 From ef125b3b256e85068b74f2e74755139caada6ecb Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Mon, 29 Oct 2018 17:15:48 -0500 Subject: platform_android.GNU: Force clang by default This tries to fix a problem with NDKs where the transision between GCC and clang is causing problems using g++. android_force_clang will have to be set to 0 to use g++, which can be GCC or clang. --- ACE/include/makeinclude/platform_android.GNU | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index c788dc7f7aa..d0ea482d53a 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -25,6 +25,9 @@ rwho = 0 # Android Studio does not seem to reconize so files with versions versioned_so=0 +# Only try to use clang, unless this is set to 0, then try to use g++ +android_force_clang ?= 1 + # This section deals with selecting the architecture/compiler # As of writing information on ABIs can be found at https://developer.android.com/ndk/guides/abis @@ -78,13 +81,21 @@ ifndef CROSS_COMPILE $(error ANDROID_ABI passed (set to: $(ANDROID_ABI)) is not valid) endif -# Determine if the g++ compiler is GCC or Clang. -# There are at least 3 assumptions being made here: -# - There is a g++ command to get the version from -# - Clang will have "clang" in the version string -# - If g++ is actually clang, then we can replace that with clang++ -gplusplus_version = $(shell $(CROSS_COMPILE)g++$(CROSS_COMPILE_SUFFIX) --version) -actually_is_clang := $(strip $(findstring clang,$(gplusplus_version))) +ifeq ($(android_force_clang),0) + # Determine if the g++ compiler is GCC or Clang. + # There are at least 3 assumptions being made here: + # - There is a g++ command to get the version from + # - Clang will have "clang" in the version string + # - If g++ is actually clang, then we can replace that with clang++ + gplusplus_version = $(shell $(CROSS_COMPILE)g++$(CROSS_COMPILE_SUFFIX) --version) + actually_is_clang := $(strip $(findstring clang,$(gplusplus_version))) +else + ifeq ($(android_force_clang),1) + actually_is_clang := 1 + else + $(error Invalid value for android_force_clang: $(android_force_clang)) + endif +endif FLAGS_C_CC += -W -Wall -Wpointer-arith ifeq ($(threads),1) -- cgit v1.2.1 From 02ab4d6ef4606ad7fea5f9c0a87aee3b2e06ee53 Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Mon, 29 Oct 2018 17:29:40 -0500 Subject: config-android.h: Fix error message --- ACE/ace/config-android.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h index 61f10b133c4..d8ac0bfc6da 100644 --- a/ACE/ace/config-android.h +++ b/ACE/ace/config-android.h @@ -92,7 +92,9 @@ #if __ANDROID_API__ >= 21 # define ACE_HAS_SEMUN # if ACE_ANDROID_NDK_LESS_THAN(15, 0) -# error "This combination of Android NDK < r15 and API >= 21 does is not supported. There are conflicting versions of semun" +# error \ +This combination of Android NDK < r15 and API >= 21 is not supported. \ +There are conflicting versions of semun between ACE and linux/sem.h. # endif #endif -- cgit v1.2.1 From c1f4fbaa1b07651b2e212f1bd568bb6abe6751d9 Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 30 Oct 2018 11:39:23 -0500 Subject: platform_android.GNU: Combine arm7 marcos --- ACE/include/makeinclude/platform_android.GNU | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index d0ea482d53a..fd4708fe2de 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -48,12 +48,23 @@ ifeq ($(ANDROID_ABI), neon) ANDROID_ABI := armeabi-v7a-with-neon endif +android_neon ?= 0 +ifeq ($(ANDROID_ABI),armeabi-v7a-with-neon) + ANDROID_ABI = armeabi-v7a + android_neon := 1 +endif + # NDK says -Wl,--fix-cortex-a8 is required for working around a CPU bug # in some Cortex-A8 implementations ifeq ($(ANDROID_ABI),armeabi-v7a) CROSS_COMPILE := arm-linux-androideabi- - FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 + FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp + ifeq ($(android_neon),0) + FLAGS_C_CC += -mfpu=neon + else + FLAGS_C_CC += -mfpu=vfpv3-d16 + endif LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8 endif @@ -63,12 +74,6 @@ ifeq ($(ANDROID_ABI),arm64-v8a) LDFLAGS += -march=armv8-a endif -ifeq ($(ANDROID_ABI),armeabi-v7a-with-neon) - CROSS_COMPILE := arm-linux-androideabi- - FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp -mfpu=neon - LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8 -endif - ifeq ($(ANDROID_ABI),x86) CROSS_COMPILE := i686-linux-android- endif -- cgit v1.2.1 From 36e155902a9a386ab7ac80980a30edc11539befb Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 30 Oct 2018 13:19:54 -0500 Subject: TAO-INSTALL.html: Rephrasing It makes it sound like TAO supported Windows 95 only until "recently", which is a ambiguous way to phrase it anyway. --- TAO/TAO-INSTALL.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TAO/TAO-INSTALL.html b/TAO/TAO-INSTALL.html index 3f9fb886448..a119be8a1d0 100644 --- a/TAO/TAO-INSTALL.html +++ b/TAO/TAO-INSTALL.html @@ -50,7 +50,7 @@ to run TAO on:

- Support were dropped recently + Formally Supported Platforms Embarcadero C++ Builder, Sun/C++ 5.1 through 5.4, g++ prior to 2.95.x, HP/UX 10.x, pSoS, Chorus, DEC UNIX, SCO, UnixWare, MVS, Windows 9x/ME, Chorus, Tandem NS, OpenVMS 8.3 IA64 -- cgit v1.2.1 From d39c21045d5747b1cfec09653038c9f09fa305b1 Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 30 Oct 2018 15:24:54 -0500 Subject: config-android.h: Adjust a NDK version macro --- ACE/ace/config-android.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/config-android.h b/ACE/ace/config-android.h index d8ac0bfc6da..4a4ec25c7b8 100644 --- a/ACE/ace/config-android.h +++ b/ACE/ace/config-android.h @@ -200,7 +200,7 @@ There are conflicting versions of semun between ACE and linux/sem.h. # define ACE_HAS_ISASTREAM_PROTOTYPE # define ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE # define ACE_HAS_CPU_SET_T -#elif ACE_ANDROID_NDK_AT_LEAST(16, 0) || __ANDROID_API__ >= 21 +#elif ACE_ANDROID_NDK_AT_LEAST(15, 0) || __ANDROID_API__ >= 21 # define ACE_HAS_CPU_SET_T #endif /* __GLIBC__ > 2 || __GLIBC__ === 2 && __GLIBC_MINOR__ >= 3) */ -- cgit v1.2.1 From f50935c83e7c627ab0b17c76c825ea081a2487ce Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 30 Oct 2018 16:47:51 -0500 Subject: ACE-INSTALL.html: Update Android Section Also made other small changes throughout the file. The largest of these is changing the style of pre and code tags to stand out more with a grey background, and any changes to fix broken html revealed by that style change. --- ACE/ACE-INSTALL.html | 351 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 252 insertions(+), 99 deletions(-) diff --git a/ACE/ACE-INSTALL.html b/ACE/ACE-INSTALL.html index a3e0d6a96eb..cb20ea78a7f 100644 --- a/ACE/ACE-INSTALL.html +++ b/ACE/ACE-INSTALL.html @@ -2,9 +2,33 @@ Building and Installing ACE and Its Auxiliary Libraries and Services - - - + + + + + +


Building and Installing ACE and Its Auxiliary Libraries and Services

@@ -112,7 +136,7 @@ detailed information. For information on TAO's platform coverage and support, please also see TAO's install document.

- +
@@ -147,8 +171,10 @@ document.

- + @@ -199,8 +225,6 @@ document.

removal from ACE, please see the NEWS file.

- -
Groups Involved in ACE Development and Support
Maintains ACE on certain platforms required for their TAO software and service offerings. OCI's web site and - the TAO install document + OCI's web site, + TAO page, + and the TAO install document
Remedy IT

Although the DOC group has provided outstanding support for ACE @@ -460,7 +484,7 @@ that are for VC8 / VC9 also apply to the express edition. MFC, 64-bit, and CE/mobile options are not available with the express edition. 64-bit binaries can be built with the compiler and linker included in the Windows SDK, using nmake as the build system (generate nmake makefiles with mwc.pl -type nmake).

- +
@@ -771,13 +795,13 @@ For our build we require the packages
  • Open a MSYS shell. Set your PATH environment variable so your MinGW's bin directory is first: -
           % export PATH=/c/mingw/bin:$PATH
    +       
           % export PATH=/c/mingw/bin:$PATH
            
  • Add an ACE_ROOT environment variable pointing to the root of your ACE wrappers source tree: -
           % export ACE_ROOT=/c/work/mingw/ACE_wrappers
    +       
           % export ACE_ROOT=/c/work/mingw/ACE_wrappers
            
    From now on, we will refer to the root directory of the ACE @@ -787,13 +811,13 @@ For our build we require the packages
  • Create a file called config.h in the $ACE_ROOT/ace directory that contains: -
           #include "ace/config-win32.h"
    +       
           #include "ace/config-win32.h"
            
  • Create a file called platform_macros.GNU in the $ACE_ROOT/include/makeinclude directory containing: -
           include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
    +       
           include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
            
    In the above text, don't replace $(ACE_ROOT) with the @@ -803,7 +827,7 @@ For our build we require the packages

    If you lack Winsock 2, add the line -

           winsock2 = 0
    +       

           winsock2 = 0
            
    before the previous one. @@ -812,7 +836,7 @@ For our build we require the packages

    If you want to install ACE (using "make install") and want all the .pc files generated, set the installation prefix in platform_macros.GNU. -

          INSTALL_PREFIX=/c/ACE
    +       

          INSTALL_PREFIX=/c/ACE
            
    Headers will be installed to $INSTALL_PREFIX/include, documentation and build system files to $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. With INSTALL_PREFIX set, RPATH will be enabled. @@ -825,7 +849,7 @@ For our build we require the packages
  • In the MSYS shell, change to the $ACE_ROOT/ace directory and run make: -
           % cd $ACE_ROOT/ace
    +       
           % cd $ACE_ROOT/ace
            % make
            
    @@ -838,12 +862,12 @@ For our build we require the packages

    If you want static libs also, you may run: -

           % make static_libs_only=1
    +       

           % make static_libs_only=1
            
  • Run make install: -
           % make install
    +    
           % make install
            

    This should create ACE.pc to use with pkg-config. @@ -854,7 +878,7 @@ For our build we require the packages want to run some ACE programs from the MSYS shell, you may need to add the directory for libACE.dll to your PATH: -

           % export PATH=/c/work/mingw/ACE_wrappers/ace:$PATH
    +       
           % export PATH=/c/work/mingw/ACE_wrappers/ace:$PATH
            
  • @@ -865,7 +889,7 @@ For our build we require the packages After building the library, you can change to that directory and run make: -

           % cd $ACE_ROOT/tests
    +       

           % cd $ACE_ROOT/tests
            % make
            
    @@ -874,7 +898,7 @@ make: run_tests.pl in the tests directory to try all the tests: -

           % perl run_test.pl
    +       

           % perl run_test.pl
            

    @@ -919,12 +943,12 @@ setup selects by default:

  • Open a Cygwin shell. Set your PATH environment variable so your Cygwin bin directory is first: -
           % export PATH=//c/cygwin/bin:$PATH
    +       
           % export PATH=//c/cygwin/bin:$PATH
            
    or -
           % export PATH=/cygdrive/c/cygwin/bin:$PATH
    +       
           % export PATH=/cygdrive/c/cygwin/bin:$PATH
            

    @@ -938,7 +962,7 @@ setup selects by default:

  • Add an ACE_ROOT environment variable pointing to the root of your ACE wrappers source tree (in this example c:/work/cygwin/ACE_wrappers): -
           % export ACE_ROOT=/cygdrive/c/work/cygwin/ACE_wrappers
    +       
           % export ACE_ROOT=/cygdrive/c/work/cygwin/ACE_wrappers
            

    @@ -955,13 +979,13 @@ setup selects by default:

  • Create a file called config.h in the $ACE_ROOT/ace directory that contains: -
           #include "ace/config-cygwin32.h"
    +       
           #include "ace/config-cygwin32.h"
            
  • Create a file called platform_macros.GNU in the $ACE_ROOT/include/makeinclude directory containing: -
           include $(ACE_ROOT)/include/makeinclude/platform_cygwin32.GNU
    +       
           include $(ACE_ROOT)/include/makeinclude/platform_cygwin32.GNU
            
    In the above text, don't replace $(ACE_ROOT) with the @@ -971,7 +995,7 @@ setup selects by default:
  • On the Cygwin shell, change to the $ACE_ROOT/ace directory and run make: -
           % cd $ACE_ROOT/ace
    +       
           % cd $ACE_ROOT/ace
            % make
            
    @@ -984,7 +1008,7 @@ setup selects by default:

    If you want static libs also, you may run: -

           % make static_libs_only=1
    +       

           % make static_libs_only=1
            
  • @@ -992,14 +1016,14 @@ setup selects by default: want to run some ACE programs from the Cygwin shell, you may need to add the directory for libACE.dll to your PATH: -
           # export PATH=//c/work/cygwin/ACE_wrappers/ace:$PATH
    +       
           # export PATH=//c/work/cygwin/ACE_wrappers/ace:$PATH
            
    If you are using MPC-generated Makefiles, then the DLLs have been placed in the lib directory instead of ace and thus your PATH addition would need to look like this: -
           # export PATH=//c/work/mingw/ACE_wrappers/lib:$PATH
    +       
           # export PATH=//c/work/mingw/ACE_wrappers/lib:$PATH
            
    @@ -1011,7 +1035,7 @@ setup selects by default: After building the library, you can change to that directory and run make: -

           % cd $ACE_ROOT/tests
    +       

           % cd $ACE_ROOT/tests
            % make
            
    @@ -1020,7 +1044,7 @@ make: run_tests.pl in the tests directory to try all the tests: -

           % perl run_test.pl
    +       

           % perl run_test.pl
            

    @@ -1061,7 +1085,7 @@ $(ACE_ROOT)/include/makeinclude/platform_win32_interix.GNU

    other options may not work.

    ACE TESTS

    The tests are located in $ACE_ROOT/tests. After building the library, you can -change to that directory and run make:

    +change to that directory and run make:

    % cd $ACE_ROOT/tests
    % make

    Once you build all the tests, you can run run_test.pl in the tests directory to try all the tests:

    % run_test.pl

    @@ -1289,7 +1313,7 @@ Makefile. Then, build the kernel using make exe.

    Using the one-button ACE tests with VxWorks.

    It is possible to generate a script to execute all ACE tests. You can do this by executing -

    % perl run_test.pl -v -o > run_test.vxworks
    +

    % perl run_test.pl -v -o > run_test.vxworks
     
    The ACE tests write their output files in a directory named @@ -1627,73 +1651,187 @@ symbols are necessary when you want to debug your code.


    Building and Installing ACE on Android

    -

    ACE can be built for Android by using the Android Native Development -Kit's standalone toolchain. Testing has been performed with -NDK6 and NDK8e. The compilation creates native binaries, -not the standard Android Java applications. The native binary applications -that use ACE can be run by either a shell or using the Java Runtime exec -operation.

    - -

    The standalone toolchain must configured for a platform of android API level 8, 9, or 14. From your NDK root directory you can use their -make-standalone-toolchain.sh script to set this up. For example:

    -./build/tools/make-standalone-toolchain.sh --toolchain=arm-linux-androideabi-4.4.3 --arch=arm --platform=android-9 --install-dir=../arm_tools -

    To set up an arm-specific tool chain. With the release of NDK r6, x86 targets are supported, so the setup command for that would be:

    -./build/tools/make-standalone-toolchain.sh --toolchain=x86-4.4.3 --arch=x86 --platform=android-9 --install-dir=../x86_tools -

    -The bin directory under the installed standalone toolchain dir must be added to your $PATH

    -

    -When using the Android NDK on a 64bit Linux system you have to install the -following 32bit packages: libstdc++.i686 glibc.i686 ncurses-libs.i686 zlib.i686 +

    ACE can be built for Android by using the Android Native Development Kit +(NDK). This is different than the standard way of writing Android +applications in Java which run the on Android Runtime or the older Dalvik +Virtual Machine. Applications built using the NDK are native Linux applications +written in C or C++ specifically compiled to run on Android systems. In +addition, applications built using the NDK have access to Android-specific APIs +much like on Java-based Android applications.

    -

    Starting with NDK8e it is possible to use shared libraries on Android.

    -

    Compilation requires using the NDK's standalone toolchain for it's -exception and RTTI support. The standard NDK compiler is not identified -as supporting exceptions or RTTI, as of NDK r5c.

    +

    Generating a Toolchain

    + +

    To build ACE for Android you need to download the NDK and generate a +toolchain for the specific Android target you want. The specific target is +defined by two things:

    + +
    +
    - The minimal API level to target.
    +
    A lower level means larger amount of potential users but also + potentially less features. Android has many API levels + to target. They roughly correspond to the versions of Android. +
    +
    - The CPU architecture to target (Also called the Application Binary + Interface or ABI by the NDK documentation).
    +
    In addition to ARM, Android also supports x86 and MIPS, + although support for MIPS has been dropped from the NDK. This is the official + documentation on the ABIs. These are the ABIs that ACE supports at the + time of writing and must be passed to ACE as ANDROID_ABI: + +
    +
    armeabi-v7a
    +
    32-bit ARM, The default ABI for both the NDK and ACE.
    +
    armeabi-v7a-with-neon
    +
    armeabi-v7a with NEON extentions enabled.
    +
    arm64-v8a
    +
    64-bit ARM, Sometimes referred to as aarch64.
    +
    x86
    +
    32-bit x86
    +
    x86_64
    +
    64-bit x86
    +
    +

    + It should be noted that starting in August 2019, the Google Play + Store will require new apps to have 64-bit libraries if they have native + libraries. 32-bit native libraries will still supported but they must also + have 64-bit libraries. Look up any restrictions that may affect + apps you want to publish on the Play Store, including minimum API + level. +

    +
    +
  • + -

    It is not recommended to perform the build on a Windows host. Using the -NDK r5c, compilation issues were encountered on Windows XP, when the compiler -failed to recognize the name difference between the ACE file Signal.h and -the system file signal.h.

    -

    You should be able to follow the instructions above to build ACE -and applications that use it. Use the -Unix traditional instructions above to build -ACE and the applications that use it. Building TAO for Android requires -cross compiling the code.

    +

    To generate a toolchain, one use must use +build/tools/make_standalone_toolchain.py in the NDK. A destination must be +chosen and is denoted here as $TOOLCHAIN. For example, to generate a +toolchain targeting 32-bit ARM Android 7.0 "Nougat" (API Level 24) and later:

    +

    +./make_standalone_toolchain.py --arch arm --api 24 --install-dir $TOOLCHAIN +

    +

    $TOOLCHAIN/bin must be in your $PATH when building ACE and +applications using ACE.

    -

    Basic steps to build +

    This table shows how the ANDROID_ABI variable and the --arch argument correlate:

    +
    Mapping of Platform to Solution/Project File Name
    + + + + + + + + + + + + + + + + + + + + + + + + +
    ANDROID_ABI--arch
    armeabi-v7aarm
    armeabi-v7a-with-neonarm
    arm64-v8aarm64
    x86x86
    x86_64x86_64
    + + +

    Using Older NDKs (Skip if Using NDK r18 or Later)

    +

    +It is highly recommended to use the latest NDK available assuming +that it works with ACE. It is possible to use NDKs older than r18, but these +have caveats: +

      -
    • Setup up the standalone compiler toolchain by following the - instructions provided with the Android NDK.
    • -
    • If building TAO, build the ACE and TAO tools (ace_gperf and - tao_idl) for the compiling host. Follow the cross compilation setup instructions provide - in $TAO_ROOT/TAO-INSTALL.html. Search for "Using cross compilation".
    • -
        -
      • Setup the Android build
          -
        • Create ace/config.h: #include "ace/config-android.h"
        • -
        • Create include/makeinclude/platform_macros.GNU: -
            -
          • set options for debug and optimized builds
          • -
          • inline is forced on and no-hidden-visibility
          • -
          • if you want to compile static, add static_libs_only=1
          • -
          • Include the include/makeinclude/platform_android.GNU file.
          • +
          • + In NDK r16, a file called ndk-version.h was added that + contains the version of the NDK. If using an earlier NDK, you must + define the macros __NDK_MAJOR__ and __NDK_MINOR__ + in ace/config.h before + #include "ace/config-android.h". + The scheme works like this: + + + + + + + + + + + + + + + + + + + + + +
            Revision__NDK_MAJOR____NDK_MINOR__
            r16160
            r16a161
            r16b162
            +
          • +
          • + As of NDK r18, the only compiler that comes with the NDK is clang and by + default the build system assumes that clang is available and will use it. + However there was a transitional period between r12 and r17 where GCC and + clang both exist in the NDK. In some cases GCC should be used if linking + errors occur with these NDKs (For example missing references to + stderr). To let the build system decide between them, set + android_force_clang:=0 in + include/makeinclude/platform_macros.GNU before including + platform_android.GNU. This should be set for NDKs before r15. +
          • +
          • + There is an unresolved name conflict involving the semun union + when using NDK's r14 or earlier and Android API Levels 21 or greater. These + combinations are not supported. +
          • +
          • + There are probably unknown conflicts, especially in the minor revisions + before the last minor revision. +
          • +
          + +

          Building

          + +
            +
          • + If building TAO, build the ACE and TAO tools (ace_gperf and + tao_idl) for the host. Follow the cross compilation setup instructions provide + in TAO-INSTALL.html.
          • +
          • Setup the Android build
              +
            • Create ace/config.h: #include "ace/config-android.h"
            • +
            • Create include/makeinclude/platform_macros.GNU: +
                +
              • + Set ANDROID_ABI to one of the options above. This + must match the toolchain --arch argument used according to the table above. +
              • +
              • Set options for debug and optimization options as desired.
              • +
              • If you want to compile static, add static_libs_only:=1
              • +
              • Must include include $(ACE_ROOT)/include/makeinclude/platform_android.GNU.
              • If building TAO, set the tao idl options specified in the cross compiling instructions in TAO-INSTALL.html
              -
            • Ensure the following environment variables are set: -
                -
              • $ANDROID_ARCH - either arm or x86. Note that x86 is only available in r6 and greater, and is still experimental. ANDROID_ARCH will be set to arm by default.
              • -
              • $NDK - the path to the android native development kit
              • -
              • $SYSROOT - the platform/arch directory. This defaults to $NDK/platforms/android-9/arch-$ANDROID_ARCH.
              • -
              • $HOST_ROOT - the path to the native TAO_IDL & gperf tools
              • -
              • $PATH - must include $NDK_TOOLS/bin.
              • -
          • Generate makefiles (if necessary).
          • Build with GNU make.
          • -

        @@ -1707,8 +1845,6 @@ Development Kit's ADB tool. This method requires uploading the native application to a directory that allows execution and having any output directed to a writable directory.

        -


        -

        Building and Installing ACE Network Services

        @@ -2598,46 +2734,58 @@ well, try 'make realclean'.


      -

      General MPC information

      +

      General MPC information

      +

      The Makefile Project Creator (MPC) is a tool that takes platform and building tool generic files (mpc files) as input, which describe basic information needed to generate a "project" file for various build tools, including Make, NMake, Visual C++ 6, Visual C++ 7, etc. Please see USAGE, README for documentation on MPC.

      +href="MPC/docs/README">README for documentation on MPC. +

      +

      A common usage for creating a Windows workspace containing just the core ACE and TAO libraries and executables is the following: +

      
       C:> cd %TAO_ROOT%
       C:> %ACE_ROOT%\bin\mwc.pl -type vc71 TAO_ACE.mwc
       
      +

      Replace vc71 with whatever project type you want to use. On Linux and -other UNIX platform use the gnuace type:

      +other UNIX platform use the gnuace type: +

      
       % cd $TAO_ROOT
       % $ACE_ROOT/bin/mwc.pl -type gnuace TAO_ACE.mwc
       
      -this creates the appropriate GNUmakefiles. Additional information on +

      +This creates the appropriate GNUmakefiles. Additional information on how to obtain, configuration, and build ACE+TAO using MPC appear at the OCI FAQ.

      +HREF="http://www.theaceorb.com/faq/index.html#HowToBuildACEandTAOonWindows">FAQ. +

      +

      If you are attempting to generate project files using MPC, and you get -the following error message:
      +the following error message: +

      ERROR: Unable to find the MPC modules in /builds/ACE_wrappers/MPC.
       You can set the MPC_ROOT environment variable to the location of MPC.
       
      +

      You need to do one of the following: +

      1. If you have already obtained MPC, either move it underneath the @@ -2647,17 +2795,22 @@ to the full path of MPC.
      2. and set your MPC_ROOT environment variable.
      +

      You can check out MPC from the DOCGroup git repository using the following command. +

      git clone https://github.com/DOCGroup/MPC.git MPC
       
      +

      The README and USAGE files in the MPC/docs directory are an up-to-date source of documentation, however it is not a complete set of documentation. The TAO Developer's Guide from OCI starting with the -1.3a version contains more information about MPC.

      +1.3a version contains more information about MPC. +

      +

      The MPC chapter from the TAO Developer's Guide is available at http://downloads.ociweb.com/MPC/. Some of MPC has changed since @@ -2665,8 +2818,8 @@ this version, but it is largely accurate. An updated version will be available as newer versions of the TAO Developer's Guide are released. In the meantime, please see the README and USAGE files in the MPC directory. -

      +

      Working with ACE in Eclipse

      -- cgit v1.2.1 From 55dfd83e68b0bdd90b0d29c1ee20a3906156a02e Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 30 Oct 2018 17:13:01 -0500 Subject: TAO-INSTALL.html: Formerly not Formally --- TAO/TAO-INSTALL.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TAO/TAO-INSTALL.html b/TAO/TAO-INSTALL.html index a119be8a1d0..a5d55a46a10 100644 --- a/TAO/TAO-INSTALL.html +++ b/TAO/TAO-INSTALL.html @@ -50,7 +50,7 @@ to run TAO on:

      - Formally Supported Platforms + Formerly Supported Platforms Embarcadero C++ Builder, Sun/C++ 5.1 through 5.4, g++ prior to 2.95.x, HP/UX 10.x, pSoS, Chorus, DEC UNIX, SCO, UnixWare, MVS, Windows 9x/ME, Chorus, Tandem NS, OpenVMS 8.3 IA64 -- cgit v1.2.1 From 40af509ec08305295db1db5e8c4ed6b74eb13ec8 Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 30 Oct 2018 17:19:29 -0500 Subject: platform_android.GNU: Fix android_neon --- ACE/include/makeinclude/platform_android.GNU | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU index fd4708fe2de..813d56ba29b 100644 --- a/ACE/include/makeinclude/platform_android.GNU +++ b/ACE/include/makeinclude/platform_android.GNU @@ -50,7 +50,7 @@ endif android_neon ?= 0 ifeq ($(ANDROID_ABI),armeabi-v7a-with-neon) - ANDROID_ABI = armeabi-v7a + ANDROID_ABI := armeabi-v7a android_neon := 1 endif @@ -60,7 +60,7 @@ endif ifeq ($(ANDROID_ABI),armeabi-v7a) CROSS_COMPILE := arm-linux-androideabi- FLAGS_C_CC += -march=armv7-a -mfloat-abi=softfp - ifeq ($(android_neon),0) + ifeq ($(android_neon),1) FLAGS_C_CC += -mfpu=neon else FLAGS_C_CC += -mfpu=vfpv3-d16 -- cgit v1.2.1