summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2011-08-10 19:02:45 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2011-08-10 19:02:45 +0000
commit4edc056e2e12345ac05aaf0529bf1195f106fe6c (patch)
treec999fb3a4780d5533a87c28d2deea88392dafbf9
parent316fe846336dfb99912660f8f6f5c12dc96a37d7 (diff)
downloadATCD-4edc056e2e12345ac05aaf0529bf1195f106fe6c.tar.gz
Wed Aug 10 19:02:21 UTC 2011 Phil Mesnier <mesnier_p@ociweb.com>
* ACE-INSTALL.html: Updated the text related to installing for Android. * include/makeinclude/platform_android_linux.GNU: Added this file. * include/makeinclude/platform_linux_android.GNU: Removed this file. Renamed the file to be consistent with others, now the name is target platform first followed by the build-specific name. The settings for cross compilation are now configured inside this platform file, using som assumptions for architecture. The build for the arm architecture works, but it looks like x86 still needs work by the NDK team, it was just added in their r6 release. I've submitted a bug report to the android team with a suggested patch.
-rw-r--r--ACE/ACE-INSTALL.html35
-rw-r--r--ACE/ChangeLog24
-rw-r--r--ACE/include/makeinclude/platform_android_linux.GNU (renamed from ACE/include/makeinclude/platform_linux_android.GNU)40
3 files changed, 78 insertions, 21 deletions
diff --git a/ACE/ACE-INSTALL.html b/ACE/ACE-INSTALL.html
index 3b275a8ebc0..4197fda8ca3 100644
--- a/ACE/ACE-INSTALL.html
+++ b/ACE/ACE-INSTALL.html
@@ -956,16 +956,16 @@ For our build we require the packages
<br><br>
<p>
- If you want to install ACE (using "make install") and want all the <tt>.pc</tt> files generated,
+ If you want to install ACE (using "make install") and want all the <tt>.pc</tt> files generated,
set the installation prefix in platform_macros.GNU.
</p><blockquote><code></code><pre> INSTALL_PREFIX=/c/ACE
</pre></blockquote>
- 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.
- To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already
- a system-known location for shared libraries), set the make macro
+ 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.
+ To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already
+ a system-known location for shared libraries), set the make macro
install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
-
+
<br><br>
</li><li> In the MSYS shell, change to the $ACE_ROOT/ace directory and
@@ -988,7 +988,7 @@ For our build we require the packages
</pre></blockquote>
</li><li> Run make install:
-
+
<blockquote><code></code><pre> % make install
</pre></blockquote>
<p>
@@ -1774,8 +1774,8 @@ symbols are necessary when you want to debug your code.</p>
<p></p><hr align="left" width="50%">
<p></p><h2><a name="android">Building and Installing ACE on Android</a></h2>
-<p>ACE can be built for Android by using the Android Native Development
-Kit's <b>standalone toolchain</b>. The compilation creates native binaries,
+<p>ACE can be built for Android by using the Android Native Development
+Kit's <b>standalone toolchain</b>. 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.</p>
@@ -1792,7 +1792,7 @@ 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.</p>
-<p>You should be able to follow the instructions above to build ACE
+<p>You should be able to follow the instructions above to build ACE
and applications that use it. Use the
<a href="#unix_traditional">Unix traditional instructions</a> above to build
ACE and the applications that use it. Building TAO for Android requires
@@ -1807,11 +1807,20 @@ cross compiling the code.<p>
in $TAO_ROOT/TAO-INSTALL.html. Search for "Using cross compilation".</li>
<ul>
<li>Setup the Android build<ul>
- <li>Create <code>ace/config.h</code>: <i>#include "ace/config-linux-android.h"</i></li>
+ <li>Create <code>ace/config.h</code>: <i>#include "ace/config-android.h"</i></li>
<li>Create <code>include/makeinclude/platform_macros.GNU</code>:<ul>
- <li>Set the CC, CXX, AR values to the standalone toolchain compilers and archiver.</li>
- <li>Include the <code>include/makeinclude/platform_linux_android.GNU</code> file.</li>
+ <li>set options for debug and optimized builds</li>
+ <li>inline is forced on as are static libs and no-hidden-visibility</li>
+ <li>Include the <code>include/makeinclude/platform_android_linux.GNU</code> file.</li>
<li>If building TAO, set the tao idl options specified in the cross compiling instructions in <code>TAO-INSTALL.html</code></li>
+ <li>ensure the following environment variables are set:
+ <ul>
+ <li>$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.</li>
+ <li>$NDK - the path to the android native development kit</li>
+ <li>$SDK - the path to the android software development kit</li>
+ <li>$SYSROOT - the platform/arch directory. This will be set to $NDK/platforms/arch_$ANDROID_ARCH by default. </li>
+ <li>$HOST_ROOT - the path to the native TAO_IDL & gperf tools</li>
+ </ul>
</ul>
</li>
</ul>
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 6322d69bfeb..69027585c88 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,27 @@
+Wed Aug 10 19:02:21 UTC 2011 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * ACE-INSTALL.html:
+
+ Updated the text related to installing for Android.
+
+ * include/makeinclude/platform_android_linux.GNU:
+
+ Added this file.
+
+ * include/makeinclude/platform_linux_android.GNU:
+
+ Removed this file.
+
+ Renamed the file to be consistent with others, now the name is
+ target platform first followed by the build-specific name. The
+ settings for cross compilation are now configured inside this
+ platform file, using som assumptions for architecture.
+
+ The build for the arm architecture works, but it looks like x86
+ still needs work by the NDK team, it was just added in their r6
+ release. I've submitted a bug report to the android team with a
+ suggested patch.
+
Wed Aug 10 17:14:01 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/config-win32.h:
diff --git a/ACE/include/makeinclude/platform_linux_android.GNU b/ACE/include/makeinclude/platform_android_linux.GNU
index 9238d8d8be3..8184d7b0e47 100644
--- a/ACE/include/makeinclude/platform_linux_android.GNU
+++ b/ACE/include/makeinclude/platform_android_linux.GNU
@@ -4,27 +4,51 @@
# This file should allow ACE to be built for Android 2.3.1 (API Level 9)
# or greater, by cross compiling on Linux.
-# The standalone gcc compilers in NDK r5c have issues with the visibility.
-no_hidden_visibility ?= 1
+# The standalone gcc compilers in NDK r6 have issues with the visibility.
+no_hidden_visibility = 1
+
+# as of NDK r6 inlining and static libs are required
+inline = 1
+static_libs_only=1
include $(ACE_ROOT)/include/makeinclude/platform_linux_common.GNU
+#This is a cross compiled build, $HOST_ROOT must point to local build tools
+TAO_IDL := $(HOST_ROOT)/bin/tao_idl
+TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/ace_gperf
+TAO_IDL_DEP := $(HOST_ROOT)/bin/tao_idl$(EXEEXT)
+
+
+#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
+#
+#Toolchain defaults to arm architecture
+ANDROID_ARCH ?= arm
+
+SYSROOT ?= $(NDK)/platforms/android-9/arch-$(ANDROID_ARCH)
-ifeq ($(insure),0)
- CC ?= arm-linux-androideabi-gcc
- CXX ?= arm-linux-androideabi-g++
- CXX_FOR_VERSION_TEST ?= $(CXX)
- AR ?= arm-linux-androideabi-ar
+ifeq ($(ANDROID_ARCH),arm)
+ CROSS_COMPILE=arm-linux-androideabi-
else
- CXX_FOR_VERSION_TEST ?= arm-linux-androideabi-g++
+ ifeq ($(ANDROID_ARCH),x86)
+ CROSS_COMPILE=i686-android-linux-
+ else
+ CROSS_COMPILE=unknown-android-arch-
+ endif
endif
# fix this
pipes ?= 1
# NDK says required for working around a CPU bug in some Cortex-A8 implementations
+ifeq ($(ANDROID_ARCH),arm)
LDFLAGS += -Wl,--fix-cortex-a8
+endif
CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)