Skip to content

Instantly share code, notes, and snippets.

@muojp
Created November 1, 2013 12:37
Show Gist options
  • Save muojp/7264813 to your computer and use it in GitHub Desktop.
Save muojp/7264813 to your computer and use it in GitHub Desktop.
Android NDK r9bでの、RenderScript以外の変更点をひとまずdiff取ったのであとで見る用に貼り
diff --git a/android-ndk-r9/docs/APPLICATION-MK.html b/android-ndk-r9b/docs/APPLICATION-MK.html
index ecdd3ac..004c59a 100644
--- a/android-ndk-r9/docs/APPLICATION-MK.html
+++ b/android-ndk-r9b/docs/APPLICATION-MK.html
@@ -242,8 +242,8 @@ define a few variables:</p>
<hr />
<p><code>NDK_TOOLCHAIN_VERSION</code></p>
<blockquote>
-<p>Define this variable to either 4.4.3 or 4.6 to select version of GCC compiler.
- 4.6 is the default</p>
+<p>Define this variable to either 4.6, 4.7 or 4.8 to select version of
+ the GCC compiler. 4.6 is the default</p>
</blockquote>
<hr />
<p><code>APP_PIE</code></p>
diff --git a/android-ndk-r9/docs/CHANGES.html b/android-ndk-r9b/docs/CHANGES.html
index 4bbc43b..c4c30bf 100644
--- a/android-ndk-r9/docs/CHANGES.html
+++ b/android-ndk-r9b/docs/CHANGES.html
@@ -1,4 +1,192 @@
-<p>Android NDK ChangeLog:</p>
+<hr />
+<h1>android-ndk-r9b</h1>
+<h2>IMPORTANT CHANGES:</h2>
+<ul>
+<li>
+<p>Updated include/android/*h and math.h for all API up to 18, add API level 13,
+ 15, 16 and 17 in the process.
+ See commit message in <a href="https://android-review.googlesource.com/#/c/68012">r/68012</a>
+ and <a href="https://android-review.googlesource.com/#/c/68014">r/68014</a> for added APIs.
+ Issues <a href="http://b.android.com/47150">b/47150</a>, <a href="http://b.android.com/58528">b/58528</a>, and
+ <a href="http://b.android.com/38423">b/38423</a></p>
+</li>
+<li>
+<p>Added API19 for Renderscript binding support</p>
+</li>
+<li>
+<p>Supported <code>-mhard-float</code> in the existing "armeabi-v7a" ABI. See
+ tests/device/hard-float/jni/Android.mk for details and current
+ restriction on Clang.</p>
+</li>
+<li>
+<p>Rebased GCC 4.8 to 4.8.2, and add diagnostic color support. To enable
+ it, set <code>-fdiagnostics-color=auto</code> or <code>-fdiagnostics-color=always,</code> or
+ simply export GCC_COLORS, eg.</p>
+<blockquote>
+<p>export <code>GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'</code></p>
+</blockquote>
+</li>
+</ul>
+<blockquote>
+<p>See <a href="http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html">http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html</a></p>
+</blockquote>
+<ul>
+<li>
+<p>Added two new samples to demostrate OpenGL ES3 features: Teapot and MoreTeapots.
+ Run on devices with API&gt;=16 (Don't run on emulator)</p>
+</li>
+<li>
+<p>Both GCC 4.7 and Clang 3.2 are deprecated, and will be removed from the next release.</p>
+</li>
+</ul>
+<h2>IMPORTANT BUG FIXES:</h2>
+<ul>
+<li>
+<p>Fixed ARM GCC 4.6 thumb2 fails to generate 16bit relative jump table.
+ See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48328">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48328</a></p>
+</li>
+<li>
+<p>Fixed GCC 4.8 ICE on g++.dg/cpp0x/lambda/lambda-defarg3.C
+ See <a href="https://android-review.googlesource.com/#/c/62770">r/62770</a> and <a href="http://gcc.gnu.org/ml/gcc/2013-07/msg00424.html">http://gcc.gnu.org/ml/gcc/2013-07/msg00424.html</a></p>
+</li>
+<li>
+<p>Fixed Windows 32-bit *-gdb.exe fail to launch.
+ See <a href="http://b.android.com/58975">b/58975</a></p>
+</li>
+<li>
+<p>Fixed GCC 4.8 ICE when building bullet library with error message reads:</p>
+<blockquote>
+<p>internal compiler error: verify_flow_info failed</p>
+</blockquote>
+</li>
+</ul>
+<blockquote>
+<p>See <a href="http://b.android.com/58916">b/58916</a> and <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165</a></p>
+</blockquote>
+<ul>
+<li>
+<p>Fixed GDB/ARM to skip ARM.exidx data for unwinding in prologue code.
+ Add a command "set arm exidx-unwinding" to control exidx-based stack
+ unwinding.
+ See <a href="http://b.android.com/55826">b/55826</a></p>
+</li>
+<li>
+<p>Fixed Clang 3.3 MIPS where HI and LO registers are incorrectly reused.</p>
+</li>
+<li>
+<p>Fixed MIPS 4.7 ICE with erro reads:</p>
+<blockquote>
+<p>external/icu4c/i18n/decimfmt.cpp:1322:1: internal compiler error: in dbx_reg_number, at dwarf2out.c:10185</p>
+</blockquote>
+</li>
+</ul>
+<blockquote>
+<p>See <a href="http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00830.html">http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00830.html</a></p>
+</blockquote>
+<h2>OTHER BUG FIXES:</h2>
+<ul>
+<li>
+<p>Fixed headers</p>
+<blockquote>
+<ol>
+<li>Fixed ARM's WCHAR_MIN / WCHAR_MAX to be unsigned according to spec. (X86/MIPS'
+ are signed). Define _WCHAR_IS_ALWAYS_SIGNED to restore old behavior.
+ See <a href="http://b.android.com/57749">b/57749</a></li>
+<li>Fixed include/netinet/tcp.h to contain TCP_INFO state enum.
+ See <a href="http://b.android.com/38881">b/38881</a></li>
+<li>Fixed cdefs_elh.h _C_LABEL_STRING macro generates warnings with gcc 4.8 toolchain in c++11 mode.
+ See <a href="http://b.android.com/58135">b/58135</a>, <a href="http://b.android.com/58652">b/58652</a></li>
+<li>Removed non-existence functions imaxabs and imaxdiv from header inttypes.h</li>
+<li>Marked pthread_exit() as <strong>noreturn, and pthread_self() as </strong>pure2.
+ See <a href="http://b.android.com/60686">b/60686</a></li>
+<li>Added missing mkdtemp() already exists in bionic in stdlib.h </li>
+</ol>
+</blockquote>
+</li>
+<li>
+<p>Fixed samples/gles3jni build with Clang at android-11</p>
+</li>
+<li>
+<p>Fixed mclinker to allow mulitple occurrences of the following options: <code>-gc-sections</code> and --eh-frame-hdr.</p>
+</li>
+<li>
+<p>Fixed mclinker to accept --no-warn-mismatch</p>
+</li>
+<li>
+<p>Fixed cpu-features not to assume all VFPv4 devices support IDIV.
+ Now it only adds IDIV to white-listed devices (Nexus 4 at this moment)
+ b.android.com/57637</p>
+</li>
+<li>
+<p>Fixed android_native_app_glue.c to stop errors being logged erroneously on event predispatch</p>
+</li>
+<li>
+<p>Fixed all operations on gabi++ terminate and unexpected_handler to be thread-safe</p>
+</li>
+<li>
+<p>More fixes on Clang <code>-integrated-as</code> to pass tests ssax-instructions and fenv</p>
+</li>
+<li>
+<p>Fixed GCC 4.6/4.7/4.8 to pass linker option --eh-frame-hdr even for
+ static executable. See <a href="http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00969.html.">http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00969.html.</a></p>
+</li>
+<li>
+<p>Fixed extra apostrophe in <a href="CPU-ARCH-ABIS.html">CPU-ARCH-ABIS</a>
+ See <a href="NDK-DEPENDS.html">NDK-DEPENDS</a>, <a href="http://b.android.com/60142">b/60142</a></p>
+</li>
+<li>
+<p>Fixed extra quotes in ndk-build output on Windows
+ See <a href="http://b.android.com/60649">b/60649</a></p>
+</li>
+<li>
+<p>Fixed Clang 3.3 to compile ARM atomic builtin <code>__atomic_fetch_add</code>/sub/or/...</p>
+</li>
+<li>
+<p>Fixed Clang 3.3 ICE on customized vfprintf. See
+ <a href="http://llvm.org/bugs/show_bug.cgi?id=16344">http://llvm.org/bugs/show_bug.cgi?id=16344</a></p>
+</li>
+</ul>
+<h2>OTHER CHANGES:</h2>
+<ul>
+<li>
+<p>Enabled OpenMP for all GCC: Add the following flags: "LOCAL_CFLAGS += <code>-fopenmp"</code>
+ and "LOCAL_LDFLAGS += <code>-fopenmp".</code>
+ Please find examples in tests/device/test-openmp</p>
+</li>
+<li>
+<p>Significantly reduced the size of ld.mcld (1.5MB vs. ld.bfd 3.5MB and ld.gold 7.5MB)
+ and result in ~20% speed up too.</p>
+</li>
+<li>
+<p>Added <code>LOCAL_CONLYFLAGS</code> and <code>APP_CONLYFLAGS</code> to specify options applicable to C only
+ but not C++. The reason being that the existing <code>LOCAL_CFLAGS</code> and <code>APP_CFLAGS</code> are
+ also used for C++ compilation (to save trouble of specifying most options twice),
+ option like <code>-std=gnu99</code> may fail g++ (warning) and clang++ (error).</p>
+</li>
+<li>
+<p>Added gabi++ array helper functions</p>
+</li>
+<li>
+<p>All libgcc.a in gcc are built with <code>-funwind-tables</code> to allow stack to unwind past <code>__aeabi_idiv0</code>
+ for example</p>
+</li>
+<li>
+<p>Added Ingenic MXU support in MIPS GCC 4.6/4.7/4.8 with new option <code>-mmxu</code></p>
+</li>
+<li>
+<p>Extended MIPS GCC 4.6/4.7/4.8 <code>-mldc1-sdc1</code> to control ldxc1/sdxc1 too</p>
+</li>
+<li>
+<p>Added crazy linker. See sources/android/crazy_linker/README.TXT</p>
+</li>
+<li>
+<p>Fixed bitmap-plasma to draw on full screen rather than 200x200</p>
+</li>
+<li>
+<p>Reduced linux and darwin toolchain size by 25% (by symlink to
+ identical files)</p>
+</li>
+</ul>
<hr />
<h1>android-ndk-r9</h1>
<h2>IMPORTANT CHANGES:</h2>
@@ -73,7 +261,7 @@
</li>
<li>
<p>Fixed GCC 4.6 ARM broken <code>-Os</code> on boost 1.52.0.
- See <a href="http://b.andriod.com/42891">http://b.andriod.com/42891</a></p>
+ See <a href="http://b.android.com/42891">b/42891</a></p>
</li>
<li>
<p>Fixed libc.so and libc.a to contain wait4 already exist in header.
@@ -84,7 +272,8 @@
</li>
<li>
<p>Fixed <code>LOCAL_SHORT_COMMANDS</code> bug where linker.list file is empty and not
- used.</p>
+ used.
+ See <a href="http://b.android.com/57105">b/57105</a></p>
</li>
<li>
<p>Fixed GCC MIPS on darwin to use CFI directives. Without this,
@@ -137,7 +326,8 @@ Command not found</p>
<li>
<p>Fixed ndk-build to ensure that built libraries actually are removed on
ndk-build clean, from projects that include prebuilt static libraries.
- See <a href="https://android-review.googlesource.com/#/c/54461">r/54461</a>/ and
+ See See <a href="http://b.android.com/53527">b/53527</a>,
+ <a href="https://android-review.googlesource.com/#/c/54461">r/54461</a>/ and
<a href="https://android-review.googlesource.com/#/c/54480">r/54480</a></p>
</li>
<li>
@@ -189,11 +379,11 @@ error: backward_warning.h: No such file or directory</p>
<p>Fixed ld.gold to enable "--sort-section=name" option</p>
</li>
<li>
-<p>Fixed GCC4.4.3/4.6/4.7 to supress <code>-export-dynamic</code> for statically linked
+<p>Fixed GCC 4.4.3/4.6/4.7 to supress <code>-export-dynamic</code> for statically linked
programs. GCC no longer adds .interp section for statically linked programs.</p>
</li>
<li>
-<p>Fixed GCC4.4.3 stlport compilation error about inconsistent typedef of
+<p>Fixed GCC 4.4.3 stlport compilation error about inconsistent typedef of
_Unwind_Control_Block.
See <a href="https://android-review.googlesource.com/#/c/54426">r/54426</a></p>
</li>
@@ -224,7 +414,7 @@ error: backward_warning.h: No such file or directory</p>
</li>
</ul>
<blockquote>
-<p>clang: for the <code>-arm-enable-ehabi</code> option: may only occur zero or one times! </p>
+<p>clang: for the <code>-arm-enable-ehabi</code> option: may only occur zero or one times!</p>
</blockquote>
<ul>
<li>Fixed NDK fails to build if there's no uses-sdk element in AndroidManifest.xml.
@@ -269,7 +459,7 @@ error: backward_warning.h: No such file or directory</p>
<li>
<p>Script <code>make-standalone-toolchain.sh</code> now supports stlport
in addition to gnustl, with --stl=stlport.
- See <a href="STANDALONE-TOOLCHAIN.html">STANDALONE-TOOLCHAIN</a></p>
+ See <a href="http://b.android.com/53472">b/53472</a> and <a href="STANDALONE-TOOLCHAIN.html">STANDALONE-TOOLCHAIN</a></p>
</li>
<li>
<p>Script <code>make-standalone-toolchain.sh</code> --llvm-version= now also
@@ -632,7 +822,8 @@ error: backward_warning.h: No such file or directory</p>
detect <code>-cc1</code> and don't specify "-target" when found</p>
</li>
<li>
-<p>Fixed ndk-build to observe <code>NDK_APP_OUT</code> set in Application.mk</p>
+<p>Fixed ndk-build to observe <code>NDK_APP_OUT</code> set in Application.mk
+ See <a href="http://b.android.com/42477">b/42477</a></p>
</li>
<li>
<p>Fixed X86 libc.so/lib.a missing sigsetjmp/siglongjmp already
diff --git a/android-ndk-r9/docs/CPU-ARCH-ABIS.html b/android-ndk-r9b/docs/CPU-ARCH-ABIS.html
index 9b1c155..7560f0e 100644
--- a/android-ndk-r9/docs/CPU-ARCH-ABIS.html
+++ b/android-ndk-r9b/docs/CPU-ARCH-ABIS.html
@@ -201,11 +201,11 @@ hints on x86 GCC please refer to the following article:</p>
<p>By default, the NDK will generate machine code for the 'armeabi' ABI.
You can however add the following line to your Application.mk to generate
ARMv7-a compatible machine code instead:</p>
-<pre><code> `APP_ABI` := armeabi-v7a
+<pre><code> APP_ABI := armeabi-v7a
</code></pre>
<p>It is also possible to build machine code for two or more distinct ABIs,
for example:</p>
-<pre><code> `APP_ABI` := armeabi armeabi-v7a
+<pre><code> APP_ABI := armeabi armeabi-v7a
</code></pre>
<p>This will instruct the NDK to build two versions of your machine code: one for
each ABI listed on this line. Both libraries will be copied to your application
@@ -215,7 +215,7 @@ machine code for more than one CPU architecture. At installation time, the
package manager will only unpack the most appropriate machine code for the
target device. See below for details.</p>
<p>Also you can use:</p>
-<pre><code> `APP_ABI` := all
+<pre><code> APP_ABI := all
</code></pre>
<p>which will generate machine code for all supported ABIs with this NDK. Doing so
will ensure that your application package contains libraries for all target ABIs.
diff --git a/android-ndk-r9/docs/DEVELOPMENT.html b/android-ndk-r9b/docs/DEVELOPMENT.html
index 272ef2f..8c810cf 100644
--- a/android-ndk-r9/docs/DEVELOPMENT.html
+++ b/android-ndk-r9b/docs/DEVELOPMENT.html
@@ -135,7 +135,7 @@ and place them in a directory named:</p>
<ul>
<li>
<p>host-specific toolchain binaries. e.g.
- <code>arm-linux-androideabi-4.4.3-linux-x86.tar.bz2</code>.</p>
+ <code>arm-linux-androideabi-4.6-linux-x86.tar.bz2</code>.</p>
</li>
<li>
<p>toolchain specific device binaries, e.g.
diff --git a/android-ndk-r9/docs/STANDALONE-TOOLCHAIN.html b/android-ndk-r9b/docs/STANDALONE-TOOLCHAIN.html
index ae9817f..beaca08 100644
--- a/android-ndk-r9/docs/STANDALONE-TOOLCHAIN.html
+++ b/android-ndk-r9b/docs/STANDALONE-TOOLCHAIN.html
@@ -48,7 +48,14 @@ using the NDK r5 toolchain, you would use:</p>
<p>Using the NDK toolchain directly has a serious limitation:
You won't be able to use any C++ STL (either STLport or
the GNU libstdc++) with it. Also no exceptions and no RTTI.</p>
+<p>For clang, you need to add correct "-target" for given architecture, and add
+ "-gcc-toolchain" to path of GNU-based toolchain for "as" and "ld", eg.</p>
</blockquote>
+<ol>
+<li>Add "-target armv7-none-linux-androideabi" for armeabi-v7a, "-target armv5te-none-linux-androideabi"
+ for armeabi, "-target i686-none-linux-android" for x86, "-target mipsel-none-linux-android" for mips, and</li>
+<li>Add "-gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64"</li>
+</ol>
<h2>4/ Invoking the compiler (the easy way):</h2>
<p>The NDK allows you to create a "customized" toolchain installation to make
life easier. For example, consider the following command:</p>
@@ -60,7 +67,7 @@ copy of the android-5/arch-arm sysroot, and of the toolchain binaries.</p>
Use the '--arch=x86' option to specify the x86 GCC 4.6, or add '--arch=mips' option
to specify the MIPS GCC 4.6, or alternatively
'--toolchain=<name>'. For example:</p>
-<pre><code> --toolchain=x86-4.4.3 # select x86 GCC 4.4.3 compiler
+<pre><code> --toolchain=x86-4.8 # select x86 GCC 4.8 compiler
--toolchain=arm-linux-androideabi-4.7 # select ARM GCC 4.7 compiler
--toolchain=mipsel-linux-android-4.6 # select MIPS GCC 4.6 compiler, same as --arch=mips
</code></pre>
@@ -100,7 +107,7 @@ installation by using the --llvm-version=<version> option, where
<pre><code> build/tools/make-standalone-toolchain.sh \
--install-dir=/tmp/mydir \
--toolchain=arm-linux-androideabi-4.7 \
- --llvm-version=3.1
+ --llvm-version=3.3
</code></pre>
<p>Note that Clang binaries are copied in addition to the GCC ones, because
they rely on the same assembler, linker, headers, libraries and C++
@@ -113,7 +120,7 @@ environment variables to point to them.</p>
<p>The rest of this section gives more detail about how these work, in case
you encounter some unexpected problems.</p>
<p>For example, in an ARM standalone installation built with
-<code>--llvm-version=3.1</code>, <code>clang</code> is a one-liner that looks like this on Unix:</p>
+<code>--llvm-version=3.3</code>, <code>clang</code> is a one-liner that looks like this on Unix:</p>
<pre><code> `dirname $0`/clang31 -target armv5te-none-linux-androideabi "$@"
</code></pre>
<p>And <code>clang++</code> invokes <code>clang++31</code> in the same way.</p>
@@ -125,6 +132,8 @@ subsequent option "<code>-march=armv7-a</code>" and/or "<code>-mthumb</code>".
<li>With both, <code>-target</code> becomes <code>thumbv7-none-linux-androideabi</code>.</li>
</ol>
<p>You may override with your own <code>-target</code> if you wish.</p>
+<p>There is no need for "-gcc-toolchain" because clang locates "as" and "ld" in
+predefined relative location in standalone package.</p>
<p>Extra efforts have been made to make clang/clang++ easier drop-in
replacements for gcc/g++ in Makefile. When in doubt, use the following
common techniques to check:</p>
@@ -148,7 +157,8 @@ following flags are being used:</p>
<p>Note: The first flag enables Thumb-2 instructions, and the second one
enables H/W FPU instructions while ensuring that floating-point
parameters are passed in core registers, which is critical for
- ABI compatibility. Do <em>not</em> use these flags separately!</p>
+ ABI compatibility. Do <em>not</em> use these flags separately before
+ NDK r9b!</p>
<p>If you want to use Neon instructions, you will need to change the <code>-mfpu</code>
compiler flag:</p>
<pre><code> CFLAGS='-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
@@ -160,6 +170,11 @@ compiler flag:</p>
<p>Note: The first flag instructs linker to pick libgcc.a, libgcov.a and
crt<em>.o tailored for armv7-a. The 2nd flag is </em>required* to route
around a CPU bug in some Cortex-A8 implementations:</p>
+<p>Since NDK r9b, all Android native APIs taking or returning double/float
+has <strong>attribute</strong>((pcs("aapcs"))) for ARM. It's possible to compile
+user code in <code>-mhard-float</code> (which implies <code>-mfloat-abi=hard)</code> and still
+link with Android native APIs which follow softfp ABI. Please see
+tests/device/hard-float/jni/Android.mk for details.</p>
<p>If none of the above makes sense to you, it's probably better not to use
the standalone toolchain, and stick to the NDK build system instead, which
will handle all the details for you.</p>
diff --git a/android-ndk-r9/docs/sidenav.html b/android-ndk-r9b/docs/sidenav.html
index eb05e5e..6dce967 100644
--- a/android-ndk-r9/docs/sidenav.html
+++ b/android-ndk-r9b/docs/sidenav.html
@@ -36,6 +36,10 @@
</ul>
<ul>
+<li><a href="renderscript/index.html" target="content">RenderScript</a></li>
+</ul>
+
+<ul>
<li><a href="CHANGES.html" target="content">NDK Changes</a></li>
<li><a href="system/libc/CHANGES.html" target="content">Bionic Changes</a></li>
<li><a href="SYSTEM-ISSUES.html" target="content">System Issues</a></li>
diff --git a/android-ndk-r9/docs/text/APPLICATION-MK.text b/android-ndk-r9b/docs/text/APPLICATION-MK.text
index df86948..61c144f 100644
--- a/android-ndk-r9/docs/text/APPLICATION-MK.text
+++ b/android-ndk-r9b/docs/text/APPLICATION-MK.text
@@ -246,8 +246,8 @@ APP_SHORT_COMMANDS
- - - -
NDK_TOOLCHAIN_VERSION
-> Define this variable to either 4.4.3 or 4.6 to select version of GCC compiler.
-> 4.6 is the default
+> Define this variable to either 4.6, 4.7 or 4.8 to select version of
+> the GCC compiler. 4.6 is the default
- - - -
APP_PIE
diff --git a/android-ndk-r9/docs/text/CHANGES.text b/android-ndk-r9b/docs/text/CHANGES.text
index 74f72ea..6fe33bf 100644
--- a/android-ndk-r9/docs/text/CHANGES.text
+++ b/android-ndk-r9b/docs/text/CHANGES.text
@@ -1,4 +1,145 @@
-Android NDK ChangeLog:
+----------------------------------------------------------------------------
+android-ndk-r9b
+===
+
+IMPORTANT CHANGES:
+---
+
+- Updated include/android/*h and math.h for all API up to 18, add API level 13,
+ 15, 16 and 17 in the process.
+ See commit message in https://android-review.googlesource.com/#/c/68012
+ and https://android-review.googlesource.com/#/c/68014 for added APIs.
+ Issues http://b.android.com/47150, http://b.android.com/58528, and
+ http://b.android.com/38423
+
+- Added API19 for Renderscript binding support
+
+- Supported -mhard-float in the existing "armeabi-v7a" ABI. See
+ tests/device/hard-float/jni/Android.mk for details and current
+ restriction on Clang.
+
+- Rebased GCC 4.8 to 4.8.2, and add diagnostic color support. To enable
+ it, set -fdiagnostics-color=auto or -fdiagnostics-color=always, or
+ simply export GCC_COLORS, eg.
+> export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
+
+> See http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html
+
+- Added two new samples to demostrate OpenGL ES3 features: Teapot and MoreTeapots.
+ Run on devices with API>=16 (Don't run on emulator)
+
+- Both GCC 4.7 and Clang 3.2 are deprecated, and will be removed from the next release.
+
+
+IMPORTANT BUG FIXES:
+---
+
+- Fixed ARM GCC 4.6 thumb2 fails to generate 16bit relative jump table.
+ See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48328
+
+- Fixed GCC 4.8 ICE on g++.dg/cpp0x/lambda/lambda-defarg3.C
+ See https://android-review.googlesource.com/#/c/62770 and http://gcc.gnu.org/ml/gcc/2013-07/msg00424.html
+
+- Fixed Windows 32-bit *-gdb.exe fail to launch.
+ See http://b.android.com/58975
+
+- Fixed GCC 4.8 ICE when building bullet library with error message reads:
+> internal compiler error: verify_flow_info failed
+
+> See http://b.android.com/58916 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58165
+
+- Fixed GDB/ARM to skip ARM.exidx data for unwinding in prologue code.
+ Add a command "set arm exidx-unwinding" to control exidx-based stack
+ unwinding.
+ See http://b.android.com/55826
+
+- Fixed Clang 3.3 MIPS where HI and LO registers are incorrectly reused.
+
+- Fixed MIPS 4.7 ICE with erro reads:
+> external/icu4c/i18n/decimfmt.cpp:1322:1: internal compiler error: in dbx_reg_number, at dwarf2out.c:10185
+
+> See http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00830.html
+
+
+OTHER BUG FIXES:
+---
+
+- Fixed headers
+> 1. Fixed ARM's WCHAR_MIN / WCHAR_MAX to be unsigned according to spec. (X86/MIPS'
+ are signed). Define _WCHAR_IS_ALWAYS_SIGNED to restore old behavior.
+ See http://b.android.com/57749
+> 2. Fixed include/netinet/tcp.h to contain TCP_INFO state enum.
+ See http://b.android.com/38881
+> 3. Fixed cdefs_elh.h _C_LABEL_STRING macro generates warnings with gcc 4.8 toolchain in c++11 mode.
+ See http://b.android.com/58135, http://b.android.com/58652
+> 4. Removed non-existence functions imaxabs and imaxdiv from header inttypes.h
+> 5. Marked pthread_exit() as __noreturn, and pthread_self() as __pure2.
+ See http://b.android.com/60686
+> 6. Added missing mkdtemp() already exists in bionic in stdlib.h
+
+
+- Fixed samples/gles3jni build with Clang at android-11
+
+- Fixed mclinker to allow mulitple occurrences of the following options: -gc-sections and --eh-frame-hdr.
+
+- Fixed mclinker to accept --no-warn-mismatch
+
+- Fixed cpu-features not to assume all VFPv4 devices support IDIV.
+ Now it only adds IDIV to white-listed devices (Nexus 4 at this moment)
+ b.android.com/57637
+
+- Fixed android_native_app_glue.c to stop errors being logged erroneously on event predispatch
+
+- Fixed all operations on gabi++ terminate and unexpected_handler to be thread-safe
+
+- More fixes on Clang -integrated-as to pass tests ssax-instructions and fenv
+
+- Fixed GCC 4.6/4.7/4.8 to pass linker option --eh-frame-hdr even for
+ static executable. See http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00969.html.
+
+- Fixed extra apostrophe in docs/CPU-ARCH-ABIS.html
+ See docs/NDK-DEPENDS.html, http://b.android.com/60142
+
+- Fixed extra quotes in ndk-build output on Windows
+ See http://b.android.com/60649
+
+- Fixed Clang 3.3 to compile ARM atomic builtin __atomic_fetch_add/sub/or/...
+
+- Fixed Clang 3.3 ICE on customized vfprintf. See
+ http://llvm.org/bugs/show_bug.cgi?id=16344
+
+
+OTHER CHANGES:
+---
+
+- Enabled OpenMP for all GCC: Add the following flags: "LOCAL_CFLAGS += -fopenmp"
+ and "LOCAL_LDFLAGS += -fopenmp".
+ Please find examples in tests/device/test-openmp
+
+- Significantly reduced the size of ld.mcld (1.5MB vs. ld.bfd 3.5MB and ld.gold 7.5MB)
+ and result in ~20% speed up too.
+
+- Added LOCAL_CONLYFLAGS and APP_CONLYFLAGS to specify options applicable to C only
+ but not C++. The reason being that the existing LOCAL_CFLAGS and APP_CFLAGS are
+ also used for C++ compilation (to save trouble of specifying most options twice),
+ option like -std=gnu99 may fail g++ (warning) and clang++ (error).
+
+- Added gabi++ array helper functions
+
+- All libgcc.a in gcc are built with -funwind-tables to allow stack to unwind past __aeabi_idiv0
+ for example
+
+- Added Ingenic MXU support in MIPS GCC 4.6/4.7/4.8 with new option -mmxu
+
+- Extended MIPS GCC 4.6/4.7/4.8 -mldc1-sdc1 to control ldxc1/sdxc1 too
+
+- Added crazy linker. See sources/android/crazy_linker/README.TXT
+
+- Fixed bitmap-plasma to draw on full screen rather than 200x200
+
+- Reduced linux and darwin toolchain size by 25% (by symlink to
+ identical files)
+
----------------------------------------------------------------------------
android-ndk-r9
@@ -58,7 +199,7 @@ IMPORTANT BUG FIXES:
See http://b.android.com/56508
- Fixed GCC 4.6 ARM broken -Os on boost 1.52.0.
- See http://b.andriod.com/42891
+ See http://b.android.com/42891
- Fixed libc.so and libc.a to contain wait4 already exist in header.
See http://b.android.com/19854
@@ -67,6 +208,7 @@ IMPORTANT BUG FIXES:
- Fixed LOCAL_SHORT_COMMANDS bug where linker.list file is empty and not
used.
+ See http://b.android.com/57105
- Fixed GCC MIPS on darwin to use CFI directives. Without this,
"ld.mcld --eh-frame-hdr" fail very often.
@@ -110,7 +252,8 @@ OTHER BUG FIXES:
- Fixed ndk-build to ensure that built libraries actually are removed on
ndk-build clean, from projects that include prebuilt static libraries.
- See https://android-review.googlesource.com/#/c/54461/ and
+ See See http://b.android.com/53527,
+ https://android-review.googlesource.com/#/c/54461/ and
https://android-review.googlesource.com/#/c/54480
- Fixed NDK_ANALYZE=1 to be less verbose
@@ -146,10 +289,10 @@ OTHER BUG FIXES:
- Fixed ld.gold to enable "--sort-section=name" option
-- Fixed GCC4.4.3/4.6/4.7 to supress -export-dynamic for statically linked
+- Fixed GCC 4.4.3/4.6/4.7 to supress -export-dynamic for statically linked
programs. GCC no longer adds .interp section for statically linked programs.
-- Fixed GCC4.4.3 stlport compilation error about inconsistent typedef of
+- Fixed GCC 4.4.3 stlport compilation error about inconsistent typedef of
_Unwind_Control_Block.
See https://android-review.googlesource.com/#/c/54426
@@ -171,7 +314,7 @@ OTHER BUG FIXES:
- Fixed clang error with option "-mllvm -arm-enable-ehabi" which reads
-> clang: for the -arm-enable-ehabi option: may only occur zero or one times!
+> clang: for the -arm-enable-ehabi option: may only occur zero or one times!
- Fixed NDK fails to build if there's no uses-sdk element in AndroidManifest.xml.
See http://b.android.com/57015
@@ -209,7 +352,7 @@ OTHER CHANGES:
- Script make-standalone-toolchain.sh now supports stlport
in addition to gnustl, with --stl=stlport.
- See STANDALONE-TOOLCHAIN.html
+ See http://b.android.com/53472 and STANDALONE-TOOLCHAIN.html
- Script make-standalone-toolchain.sh --llvm-version= now also
creates scripts $TOOLCHAIN_PREFIX-clang and $TOOLCHAIN_PREFIX-clang++
@@ -486,6 +629,7 @@ OTHER BUG FIXES:
detect -cc1 and don't specify "-target" when found
- Fixed ndk-build to observe NDK_APP_OUT set in Application.mk
+ See http://b.android.com/42477
- Fixed X86 libc.so/lib.a missing sigsetjmp/siglongjmp already
declared in setjmp.h.
diff --git a/android-ndk-r9/docs/text/CPU-ARCH-ABIS.text b/android-ndk-r9b/docs/text/CPU-ARCH-ABIS.text
index c348d3d..2abb27e 100644
--- a/android-ndk-r9/docs/text/CPU-ARCH-ABIS.text
+++ b/android-ndk-r9b/docs/text/CPU-ARCH-ABIS.text
@@ -219,12 +219,12 @@ By default, the NDK will generate machine code for the 'armeabi' ABI.
You can however add the following line to your Application.mk to generate
ARMv7-a compatible machine code instead:
- APP_ABI := armeabi-v7a
+ APP_ABI := armeabi-v7a
It is also possible to build machine code for two or more distinct ABIs,
for example:
- APP_ABI := armeabi armeabi-v7a
+ APP_ABI := armeabi armeabi-v7a
This will instruct the NDK to build two versions of your machine code: one for
each ABI listed on this line. Both libraries will be copied to your application
@@ -237,7 +237,7 @@ target device. See below for details.
Also you can use:
- APP_ABI := all
+ APP_ABI := all
which will generate machine code for all supported ABIs with this NDK. Doing so
will ensure that your application package contains libraries for all target ABIs.
diff --git a/android-ndk-r9/docs/text/DEVELOPMENT.text b/android-ndk-r9b/docs/text/DEVELOPMENT.text
index 5773b3b..7e1fd4d 100644
--- a/android-ndk-r9/docs/text/DEVELOPMENT.text
+++ b/android-ndk-r9b/docs/text/DEVELOPMENT.text
@@ -174,7 +174,7 @@ and place them in a directory named:
These binary packages include the following:
- host-specific toolchain binaries. e.g.
- `arm-linux-androideabi-4.4.3-linux-x86.tar.bz2`.
+ `arm-linux-androideabi-4.6-linux-x86.tar.bz2`.
- toolchain specific device binaries, e.g.
`arm-gdbserver.tar.bz2`.
diff --git a/android-ndk-r9/docs/text/STANDALONE-TOOLCHAIN.text b/android-ndk-r9b/docs/text/STANDALONE-TOOLCHAIN.text
index c8e0e85..32b2099 100644
--- a/android-ndk-r9/docs/text/STANDALONE-TOOLCHAIN.text
+++ b/android-ndk-r9b/docs/text/STANDALONE-TOOLCHAIN.text
@@ -68,6 +68,13 @@ IMPORTANT NOTE:
You won't be able to use any C++ STL (either STLport or
the GNU libstdc++) with it. Also no exceptions and no RTTI.
+> For clang, you need to add correct "-target" for given architecture, and add
+ "-gcc-toolchain" to path of GNU-based toolchain for "as" and "ld", eg.
+
+ 1. Add "-target armv7-none-linux-androideabi" for armeabi-v7a, "-target armv5te-none-linux-androideabi"
+ for armeabi, "-target i686-none-linux-android" for x86, "-target mipsel-none-linux-android" for mips, and
+ 2. Add "-gcc-toolchain $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64"
+
4/ Invoking the compiler (the easy way):
----------------------------------------
@@ -85,7 +92,7 @@ Use the '--arch=x86' option to specify the x86 GCC 4.6, or add '--arch=mips' opt
to specify the MIPS GCC 4.6, or alternatively
'--toolchain=<name>'. For example:
- --toolchain=x86-4.4.3 # select x86 GCC 4.4.3 compiler
+ --toolchain=x86-4.8 # select x86 GCC 4.8 compiler
--toolchain=arm-linux-androideabi-4.7 # select ARM GCC 4.7 compiler
--toolchain=mipsel-linux-android-4.6 # select MIPS GCC 4.6 compiler, same as --arch=mips
@@ -136,7 +143,7 @@ installation by using the --llvm-version=<version> option, where
build/tools/make-standalone-toolchain.sh \
--install-dir=/tmp/mydir \
--toolchain=arm-linux-androideabi-4.7 \
- --llvm-version=3.1
+ --llvm-version=3.3
Note that Clang binaries are copied in addition to the GCC ones, because
they rely on the same assembler, linker, headers, libraries and C++
@@ -152,7 +159,7 @@ The rest of this section gives more detail about how these work, in case
you encounter some unexpected problems.
For example, in an ARM standalone installation built with
-`--llvm-version=3.1`, `clang` is a one-liner that looks like this on Unix:
+`--llvm-version=3.3`, `clang` is a one-liner that looks like this on Unix:
`dirname $0`/clang31 -target armv5te-none-linux-androideabi "$@"
@@ -167,6 +174,9 @@ subsequent option "`-march=armv7-a`" and/or "`-mthumb`". ie.
You may override with your own -target if you wish.
+There is no need for "-gcc-toolchain" because clang locates "as" and "ld" in
+predefined relative location in standalone package.
+
Extra efforts have been made to make clang/clang++ easier drop-in
replacements for gcc/g++ in Makefile. When in doubt, use the following
common techniques to check:
@@ -197,8 +207,9 @@ following flags are being used:
Note: The first flag enables Thumb-2 instructions, and the second one
enables H/W FPU instructions while ensuring that floating-point
parameters are passed in core registers, which is critical for
- ABI compatibility. Do *not* use these flags separately!
-
+ ABI compatibility. Do *not* use these flags separately before
+ NDK r9b!
+
If you want to use Neon instructions, you will need to change the -mfpu
compiler flag:
@@ -214,6 +225,12 @@ Note: The first flag instructs linker to pick libgcc.a, libgcov.a and
crt*.o tailored for armv7-a. The 2nd flag is *required* to route
around a CPU bug in some Cortex-A8 implementations:
+Since NDK r9b, all Android native APIs taking or returning double/float
+has __attribute__((pcs("aapcs"))) for ARM. It's possible to compile
+user code in -mhard-float (which implies -mfloat-abi=hard) and still
+link with Android native APIs which follow softfp ABI. Please see
+tests/device/hard-float/jni/Android.mk for details.
+
If none of the above makes sense to you, it's probably better not to use
the standalone toolchain, and stick to the NDK build system instead, which
will handle all the details for you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment