| <p>Android NDK ChangeLog:</p> |
| <hr /> |
| <h1>android-ndk-r9d</h1> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Added Clang 3.4; <code>NDK_TOOLCHAIN_VERSION=clang</code> now picks Clang 3.4. |
| GCC 4.6 remains the default.</p> |
| </li> |
| <li> |
| <p>For ARM: Added <code>APP_ABI=armeabi-v7a-hard.</code> All ARM toolchain are rebuilt with |
| additional multilib option <code>-mfloat-abi=hard.</code> With "APP_ABI=armeabi-v7a-hard",</p> |
| <blockquote> |
| <ol> |
| <li>ndk-build add "TARGET_CFLAGS += <code>-mhard-float</code> <code>-D_NDK_MATH_NO_SOFTFP=1"</code> and |
| "TARGET_LDFLAGS += <code>-Wl,--no-warn-mismatch</code> <code>-lm_hard"</code> on top of the existing |
| flags for armeabi-v7a. The final library is installed at libs/armeabi-v7a, |
| (ie. can't coexist with armeabi-v7a in the same <code>APP_ABI</code>). Also note that <code>APP_ABI=all</code> |
| expands to "armeabi armeabi-v7a x86 mips" as before.</li> |
| <li><code>make-standalone-toolchain.sh</code> copies additional libaries under /hard directories. |
| Add the above CFLAGS and LFLAGS in your makefile for GCC/clang to link with |
| libraries in /hard</li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>For X86: Added yasm and <code>LOCAL_ASMFLAGS</code>/EXPORT_ASMFLAGS. |
| ndk-build use prebuilts/<em>/bin/yasm</em> to compile source specified in <code>LOCAL_SRC_FILES</code> |
| with .asm extension </p> |
| </li> |
| <li> |
| <p>Updated mclinker to 2.6.0 with <code>-gc-sections</code> support</p> |
| </li> |
| <li> |
| <p>Added experimental libc++ support (upstream r201101). To use it:</p> |
| <blockquote> |
| <ol> |
| <li>Add "APP_STL := c++_static" or "APP_STL := c++_shared" in Application.mk. |
| You may rebuild from source via "LIBCXX_FORCE_REBUILD := true"</li> |
| <li><code>"make-standalone-toolchain.sh</code> --stl=libc++" to create standalone |
| toolchain with libc++ headers/lib |
| See b.android.com/36496 and <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a></li> |
| </ol> |
| </blockquote> |
| </li> |
| </ul> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed GCC 4.6/4.8 ARM EABI uncaught throw from unexpected exception |
| handler. |
| See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59392">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59392</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.8 not correctly resolve partial specialization of template with |
| dependent non-type template argument. |
| See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59052">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59052</a></p> |
| </li> |
| <li> |
| <p>Added more modules to prebuilt python</p> |
| <blockquote> |
| <ol> |
| <li>linux: zlib, nis, crypt, _curses and _curses_panel</li> |
| <li>darwin: zlib, bz2, _curses, _curses_panel, _hashlib, _ssl |
| See b.android.com/59902</li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>Fixed X86/MIPS' gdbserver event_getmsg_helper</p> |
| </li> |
| <li> |
| <p>Fixed numerous issues in the RenderScript NDK toolchain, including issues with |
| compatibility across older devices and C++ reflection.</p> |
| </li> |
| </ul> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed headers</p> |
| <blockquote> |
| <ol> |
| <li>Fixed typo in sources/android/support/include/iconv.h.<br /> |
| See <a href="http://b.android.com/63806">b/63806</a></li> |
| <li>Fixed missing #include <sys/types.h> in android/asset_manager.h for API >= 13 |
| See <a href="http://b.android.com/64988">b/64988</a></li> |
| <li>Fixed missing #include <stdint.h> in android/rect_manager.h for API >= 14</li> |
| <li>Added JNICALL to JNI_OnLoad and JNI_OnUnload in jni.h. Note that JNICALL |
| is defined to <code>__NDK_FPABI__</code> (see sys/cdefs.h)</li> |
| <li>Fixed the following headers to be inclued alone: android/tts.h, EGL/eglext.h, |
| fts.h GLES/glext.h, GLES2/gl2ext.h, OMXAL/OpenMAXSL_Android.h, SLES/OpenSLES_Android.h, |
| sys/prctl.h, sys/utime.h. See <a href="http://b.android.com/64679">b/64679</a></li> |
| <li>Added sys/cachectl.h for all archs. Only has effect to mips, but |
| developers no longer need to put #ifdef <strong>mips</strong> around it</li> |
| <li>Fixed platforms/android-18/include/android/input.h by adding |
| <code>__NDK_FPABI__</code> to functions taking/returning float/double.</li> |
| <li>Fixed MIPS' "struct stat" which was incorrectly set to its 64-bit |
| counterpart for API>=12 (regression in the last r9c release)</li> |
| <li>Define <code>__PTHREAD_MUTEX_INIT_VALUE,</code> <code>__PTHREAD_RECURSIVE_MUTEX_INIT_VALUE,</code> |
| and <code>__PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE</code> for API < 9</li> |
| <li>Added scalbln, scalblnf, and scalblnl to x86's libm.so for API >= 18</li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>Fixed gabi++ std::unexpected() to call std::terminate() so that |
| user-defined std::terminate() handler have chance to run</p> |
| </li> |
| <li> |
| <p>Fixed gabi++ to catch std::nullptr</p> |
| </li> |
| <li> |
| <p>Fixed samples Teapot and MoreTeapots to</p> |
| <blockquote> |
| <ol> |
| <li>Rendering issue in Tegra2/3. Now having medium precision for specular |
| variable, so that specular power can be <1.0</li> |
| <li>Workaround an issue where SYSTEM_UI_FLAG_IMMERSIVE_STICKY is invalidated |
| when a volume button is pressed. Issue remains: Immersive mode still does |
| not recover when the screen has been rotated, due to onSystemUiVisibilityChange |
| is not triggered when screen is rotated.</li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>Fixed ndk-build to add <code>-rpath-link=$SYSROOT/usr/lib</code> and <code>-rpath-link=$TARGET_OUT</code> |
| for linking executable with ld.bfd. See b.android.com/64266</p> |
| </li> |
| <li> |
| <p>Removed <code>-Bsymbolic</code> from all STL build</p> |
| </li> |
| <li> |
| <p>Fixed ndk-gdb-py.cmd by setting SHELL as env. var. instead of passing it to |
| python.exe which can't understand it. |
| See b.android.com/63054</p> |
| </li> |
| <li> |
| <p>Fixed <code>"make-standalone-toolchain.sh</code> --stl=stlport" to copy instead of symlink |
| gabi++ headers, otherwise the one created in cygwin wont' be understood by |
| cmd.exe and MinGW shell</p> |
| </li> |
| </ul> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p>"chmod a+x" all *cmd scripts previously intended for use in CMD.exe only, |
| in case developers prefer to use ndk-build.cmd in cygwin instead of the |
| recommended ndk-build</p> |
| </li> |
| <li> |
| <p>Speed up <code>make-standalone-toolchain.sh</code> by moving instead of copying if |
| destination directory (eg. --install-dir=<dir>) doesn't exist.</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r9c</h1> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>This is a bug-fix-only release.</li> |
| </ul> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed GCC 4.8 ARM where stack pointer is restored too early than access |
| to varaible in stack frame via frame pointer. |
| See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.8 libstdc++ where the generated code random segfault on std::nth_element |
| See <a href="http://b.android.com/62910">b/62910</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.8 ICE in cc1/cc1plus with <code>-fuse-ld=mcld.</code> Message reads:</p> |
| <blockquote> |
| <p>cc1: internal compiler error: in common_handle_option, at opts.c:1774</p> |
| </blockquote> |
| </li> |
| <li> |
| <p>Fixed <code>-mhard-float</code> support for __builtin math functions. |
| See <a href="http://b.android.com/62496">b/62496</a>. Please track comment of <a href="http://b.android.com/61784">b/61784</a> |
| for on-going fixes for <code>-mhard-float</code> with STL</p> |
| </li> |
| </ul> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed headers</p> |
| <blockquote> |
| <ol> |
| <li>Fixed prototype of poll to poll(struct pollfd *, nfds_t, int); in poll.h</li> |
| <li>Added utimensat and futimens to libc.so to API level >=12 and >=19, respectively.</li> |
| <li>Added missing clock_settime() and clock_nanosleep() in time.h for API>=8.</li> |
| <li>Added CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, |
| CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM, and CLOCK_BOOTTIME_ALARM in time.h. |
| Removed obsolete CLOCK_REALTIME_HR and CLOCK_MONOTONIC_HR.</li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>Refactored samples Teapot, MoreTeapots and source/android/ndk_helper. |
| Use hard float-abi for armeabi-v7a, added immersive mode in android-19, etc. |
| Also fix crash on X86 device in /system/lib/libdvm.so Check_ReleaseStringUTFChars</p> |
| </li> |
| <li> |
| <p>Fixed ndk-build fails in cygwin if NDK package is referenced via symlink</p> |
| </li> |
| <li> |
| <p>Fixed ndk-build.cmd fails in windows cmd.exe if <code>LOCAL_SRC_FILES</code> |
| contain absolute path. |
| See <a href="https://android-review.googlesource.com/#/c/69992">r/69992</a></p> |
| </li> |
| <li> |
| <p>Fixed ndk-stack to proceed even when it can't parse a frame due to |
| unable to locate routine, filename, or line number, in which case "??" |
| is printed.</p> |
| </li> |
| <li> |
| <p>Fixed ndk-stack windows-x64_64 erroneously matches frame line with in "stack:" |
| section even when the line has no word "pc", "eip", or "ip" in it, eg.</p> |
| <blockquote> |
| <pre><code>I/DEBUG ( 1151): #00 5f09db68 401f01c4 /system/lib/libc.so |
| </code></pre> |
| </blockquote> |
| </li> |
| <li> |
| <p>Fixed gabi++ to not use malloc() to allocate C++ thread-local |
| objects, and avoid dead-lock in gabi++ when libc.debug.malloc is non-zero in |
| userdebug/eng Android platform builds</p> |
| </li> |
| </ul> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Added <code>LOCAL_EXPORT_LDFLAGS</code></p> |
| </li> |
| <li> |
| <p>Introducing <code>NDK_PROJECT_PATH=null</code> for use in an integrated build system |
| where options are explicitly passed to ndk-build. With it ndk-build |
| make no attempt to look for <code>NDK_PROJECT_PATH</code>, and as a result the following |
| variables depending on <code>NDK_PROJECT_PATH</code> to be explicitly specified |
| (since they can on longer derive default value from <code>NDK_PROJECT_PATH</code> when it's null): |
| <code>NDK_OUT</code>, <code>NDK_LIBS_OUT</code>, <code>APP_BUILD_SCRIPT</code>, <code>NDK_DEBUG</code> (optional, default to 0), |
| and other <code>APP_</code>* used to be in Application.mk</p> |
| </li> |
| <li> |
| <p>Allow <code>APP_ABI</code> to be comma-delimited list, eg. <code>APP_ABI</code> := "armeabi,armeabi-v7a"</p> |
| </li> |
| <li> |
| <p>Rebuild all STL with debugging info (ie. "-g") in separate optional package |
| android-ndk-r9c-cxx-stl-libs-with-debugging-info.zip. |
| This helps ndk-stack to provide better stack dump across STL. |
| The code/size of the final stripped shouldn't be affected.</p> |
| </li> |
| <li> |
| <p>Enhanced hello-jni samples to report <code>APP_ABI</code> at compilation</p> |
| </li> |
| <li> |
| <p>Static libraries are built with Deterministic (option D) mode of ar |
| tool. See <a href="http://b.android.com/60705">b/60705</a></p> |
| </li> |
| </ul> |
| <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>=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 which causes 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) |
| <a href="http://b.android.com/57637">b/57637</a></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> |
| <ul> |
| <li> |
| <p>Added GLES3 headers/libraries and new API level 18. |
| See <a href="STABLE-APIS.html">STABLE-APIS</a> and the new samples/gles3jni/README</p> |
| </li> |
| <li> |
| <p>Added GCC 4.8 compiler. Since GCC 4.6 is still the default, |
| you need to explicitly enable it:</p> |
| <blockquote> |
| <ol> |
| <li>For ndk-build: Either export <code>NDK_TOOLCHAIN_VERSION=4.8</code> or add it |
| in Application.mk.</li> |
| <li>For standalone: Use "--toolchain=" option in <code>make-standalone-toolchain.sh</code>. |
| eg. "--toolchain=arm-linux-androideabi-4.8"</li> |
| </ol> |
| </blockquote> |
| </li> |
| </ul> |
| <blockquote> |
| <p>Note that:</p> |
| <ol> |
| <li><code>-Wunused-local-typedefs</code> is enabled by <code>-Wall.</code> Be sure to add "__attribute__((unused))" |
| if you use compile-time assert like sources/cxx-stl/stlport/stlport/stl/config/features.h |
| line #311. |
| See <a href="https://android-review.googlesource.com/#/c/55460">r/55460</a></li> |
| <li>Since 4.7 <code>-munaligned-access</code> is default for ARMv6+. You may |
| compile with <code>-mno-unaligned-access</code> for kernel not supporting it.</li> |
| </ol> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Added Clang 3.3; <code>NDK_TOOLCHAIN_VERSION=clang</code> now picks Clang 3.3.</p> |
| </li> |
| <li> |
| <p>Both GCC 4.4.3 and Clang 3.1 are deprecated, and will be removed |
| from the next release.</p> |
| </li> |
| <li> |
| <p>Gdb is now built with python 2.7.5 support.</p> |
| </li> |
| <li> |
| <p>Added mclinker for Windows host. Since ld.gold is the default |
| where available, you need to add <code>-fuse-ld=mcld</code> in <code>LOCAL_LDFLAGS</code> or |
| <code>APP_LDFLAGS</code> to explicitly enable it.</p> |
| </li> |
| <li> |
| <p>New tool ndk-depends to print ELF library dependencies. |
| See <a href="NDK-DEPENDS.html">NDK-DEPENDS</a>, <a href="http://b.android.com/53486">b/53486</a></p> |
| </li> |
| </ul> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed potential event handling issue in android_native_app_glue. |
| See <a href="http://b.android.com/41755">b/41755</a></p> |
| </li> |
| <li> |
| <p>Fixed ARM/GCC-4.7 to generates sufficient alignment for NEON |
| instruction vst/vld. |
| See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.4.3/4.6/4.7 ICE at const negative index to string literal |
| See <a href="http://b.android.com/54623">b/54623</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.7 segfault on const init to object address. |
| See <a href="http://b.android.com/56508">b/56508</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.6 ARM broken <code>-Os</code> on boost 1.52.0. |
| 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. |
| See <a href="http://b.android.com/19854">b/19854</a></p> |
| </li> |
| <li> |
| <p>Fixed x86's libc.so and libc.a to contain clone()</p> |
| </li> |
| <li> |
| <p>Fixed <code>LOCAL_SHORT_COMMANDS</code> bug where linker.list file is empty and not |
| 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, |
| "ld.mcld --eh-frame-hdr" fail very often.</p> |
| </li> |
| <li> |
| <p>Fixed Clang 3.2 X86/MIPS ICE in llvm/lib/VMCore/Value.cpp. |
| See <a href="https://android-review.googlesource.com/#/c/59021">r/59021</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.7 64-bit Windows assembler crash with error message reads: |
| "out of memory allocating 4294967280 bytes"</p> |
| </li> |
| <li> |
| <p>ndk-gdb "--start" or "--launch" now has application waits for gdbserver to |
| attach, which allows breakpoints set in early execution path (eg. JNI) to |
| be hit more reliably. It does needs jdb and produces warning about pending |
| breakpoints. You may specify "--nowait" to restore previous behavior. |
| See <a href="http://b.android.com/41278">b/41278</a></p> |
| </li> |
| <li> |
| <p>Fixed GDB crashes when library list is empty</p> |
| </li> |
| <li> |
| <p>Fixed GDB crashes when "stepi" past a "bx pc" or "blx pc" Thumb instruction |
| See <a href="http://b.android.com/56962">b/56962</a> and <a href="http://b.android.com/36149">b/36149</a></p> |
| </li> |
| <li> |
| <p>Fixed MIPS gdbserver to look for DT_MIPS_RLD_MAP instead of DT_DEBUG. |
| See <a href="http://b.android.com/56586">b/56586</a></p> |
| </li> |
| <li> |
| <p>Fixed ndk-build circular dependency, eg. A->B, B->B, then B was dropped from build. |
| See <a href="http://b.android.com/56690">b/56690</a></p> |
| </li> |
| </ul> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed ndk-build to be able to replace <code>NDK_TOOLCHAIN_VERSION=clang</code> specified at |
| commandline to clang3.2. (Fine if it's specified in environment variable). |
| Error message reads</p> |
| <p>... ndk/toolchains/arm-linux-androideabi-clang/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc |
| Command not found</p> |
| </li> |
| <li> |
| <p>Fixed gabi++ sizeof(_Unwind_Exception) to be 24 for MIPS in Clang. |
| See <a href="https://android-review.googlesource.com/#/c/54141">r/54141</a></p> |
| </li> |
| <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 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> |
| <p>Fixed <code>NDK_ANALYZE=1</code> to be less verbose</p> |
| </li> |
| <li> |
| <p>Fixed gnu-libstdc++/Android.mk to include /backward path. |
| Error message reads:</p> |
| <p>sources/cxx-stl/gnu-libstdc++/4.6/include/ext/hash_map:61:30: fatal |
| error: backward_warning.h: No such file or directory</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/53404">b/53404</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed stlport new somtimes return randon values</p> |
| </li> |
| <li> |
| <p>Fixed ndk-gdb to match in the order of CPU_ABIS, not <code>APP_ABIS</code>. |
| See <a href="http://b.android.com/54033">b/54033</a></p> |
| </li> |
| <li> |
| <p>Fixed NDK 64-bit on MacOSX choses wrong path for compiler. |
| See <a href="http://b.android.com/53769">b/53769</a></p> |
| </li> |
| <li> |
| <p>Fixed to detect 64-bit Windows Vista. |
| See <a href="http://b.android.com/54485">b/54485</a></p> |
| </li> |
| <li> |
| <p>Fixed X86 ntonl/swap32. Error message reads: |
| error: invalid 'asm': operand number out of range"</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/54465">b/54465</a> and |
| <a href="https://android-review.googlesource.com/#/c/57242">r/57242</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed ld.gold to merge string literals</p> |
| </li> |
| <li> |
| <p>Fixed ld.gold to handle large symbol alignemnt</p> |
| </li> |
| <li> |
| <p>Fixed ld.gold to enable "--sort-section=name" option</p> |
| </li> |
| <li> |
| <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 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> |
| <li> |
| <p>Fixed awk scripts to handle AndroidManifest.xml created on Windows |
| which may contain trailing \r, and cause error message reads. |
| See <a href="http://b.android.com/42548">b/42548</a></p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>__gmsl:512: *** non-numeric second argument to wordlist' function: ''. Stop.</p> |
| <p>Invalid attribute name: |
| package</p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed <code>make-standalone-toolchain.sh</code> to probe the prebuilts/ dir to detect the |
| appropriate default host bitness.</p> |
| </li> |
| <li> |
| <p>Fixed clang3.2 <code>-integrated-as</code></p> |
| </li> |
| <li> |
| <p>Fixed clang3.2 ARM EHABI compact model pr1/pr2 handlerdata</p> |
| </li> |
| <li> |
| <p>Fixed clang error with option "-mllvm <code>-arm-enable-ehabi"</code> which reads</p> |
| </li> |
| </ul> |
| <blockquote> |
| <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. |
| See <a href="http://b.android.com/57015">b/57015</a></li> |
| </ul> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Fixed headers</p> |
| <blockquote> |
| <ol> |
| <li>__set_errno in errno.h is deprecated, and libc.so no longer exports it. |
| To be compatible in the meantime, __set_errno becomes an inlined function in header</li> |
| <li>#include "stdint.h" in elf.h. |
| See <a href="http://b.android.com/55443">b/55443</a></li> |
| <li>Fixed sys/un.h to be included on its own. |
| See <a href="http://b.android.com/53646">b/53646</a></li> |
| <li>Fixed MotionEvent_getHistorical family of APIs in usr/include/android/input.h to |
| all take const AInputEvent* motion_event. |
| See <a href="http://b.android.com/55873">b/55873</a></li> |
| <li>Fixed malloc_usable_size to take "const void*". |
| See <a href="http://b.android.com/55725">b/55725</a></li> |
| <li>Fixed stdint.h to be more compatible with C99. |
| See <a href="https://android-review.googlesource.com/#/c/46821">r/46821</a></li> |
| <li>Fixed wchar.h not to redefine WCHAR_MAX/WCHAR_MIN</li> |
| <li>Fixed <inttypes.h> declaration for pointer-related PRI/SCN macros. |
| See <a href="http://b.android.com/57218">b/57218</a></li> |
| <li>Changed sys/cdefs.h so <code>__WCHAR_TYPE__</code> is 32-bit even for API < 9, |
| ie. wchat_t is 32-bit for all API level. |
| Define _WCHAR_IS_8BIT to restore old behavior. |
| See <a href="http://b.android.com/57267">b/57267</a></li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>Added more fomatting in NDK docs/, and misc docs/ fixes including callbacks/threads and others.</p> |
| </li> |
| <li> |
| <p>Support "thin-archive" for building static libraries. |
| See <a href="http://b.android.com/40303">b/40303</a> and <a href="ANDROID-MK.html">ANDROID-MK</a></p> |
| </li> |
| <li> |
| <p>Script <code>make-standalone-toolchain.sh</code> now supports stlport |
| in addition to gnustl, with --stl=stlport. |
| 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 |
| creates scripts $TOOLCHAIN_PREFIX-clang and $TOOLCHAIN_PREFIX-clang++ |
| in addition to clang and clang++, to avoid using host's clang/clang++ |
| by accident.</p> |
| </li> |
| <li> |
| <p>Added two flags to re-enable two optimizations in upstream Clang |
| but disabled in NDK for better compatibility with code used to be |
| compiled by GCC:</p> |
| <blockquote> |
| <ol> |
| <li>Added a flags <code>-fcxx-missing-return-semantics</code> to re-enable "missing |
| return semantics" in clang 3.2+. Normally for a value-returning |
| function all paths should terminate with a return statment. If not, |
| clang inserts undefined instruction (or trap in debug mode) at path |
| w/o return statement. If you are sure your code is correct, use |
| this flag for optimizer to take advantage of the undefined behavior. |
| If you are not sure, don't use this flag. The caller may still receiver |
| random incorrect value, but optimizer won't exploit it and make thing |
| even worse to debug.</li> |
| <li>Added a flag <code>-fglobal-ctor-const-promotion</code> to re-enable promoting |
| global variables with static constructor to constant. With this |
| flag, the global variable optimization pass of LLVM will try to |
| evalutate the global variables with static constructors, and promote |
| the global constants. Although this optimization is correct, it may |
| cause some incompatability with code compiled by gcc. For example, |
| code may do const_cast to cast the constant to mutable and modify it. |
| In GCC the variable is in read-write and the code run by accident. But |
| in Clang the const variable will be in read-only memory and crash</li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>Added <code>-mldc1-sdc1</code> to MIPS GCC and Clang compilers. By default |
| compilers align 8-byte objects properly and emit instructions |
| ldc1/sdc1 to move them around. If your app use custom allocator |
| which doesn't always align new object 8-byte boundary like the default |
| one does, your app may crashes due to ldc1/sdc1 on unaligned memory. |
| In this case you may use <code>-mno-ldc1-sdc1</code> to workaround.</p> |
| </li> |
| <li> |
| <p>Downgrade warning to "info" if <code>APP_PLATFORM_LEVEL</code> is larger than <code>APP_MIN_PLATFORM_LEVEL</code>. |
| <code>APP_PLATFORM_LEVEL</code> may be lower than <code>APP_PLATFORM</code> in jni/Application.mk |
| because NDK doesn't have headers for all level, and the actual level is |
| shifted downward. <code>APP_MIN_PLATFORM_LEVEL</code> is retrieved from android:minSdkVersion |
| in AndroidManifest.xml. |
| See <a href="http://b.android.com/39752">b/39752</a></p> |
| </li> |
| <li> |
| <p>cpu-features.c: add android_getCpuIdArm() and android_setCpuArm() |
| This allows retrieving the ARM CPUID information easily. |
| See <a href="http://b.android.com/53689">b/53689</a></p> |
| </li> |
| <li> |
| <p>Clang now compiles with GCC 4.8's as/ld in ndk-build. |
| Note that from GCC 4.7, "monotonic_clock" and "is_monotonic" are |
| renamed to "steady_clock" and "is_steady", respectively</p> |
| </li> |
| <li> |
| <p>Added new warnings in ndk-build:</p> |
| <blockquote> |
| <ol> |
| <li>if <code>LOCAL_LDLIBS</code>/LDFLAGS are used in static library modules</li> |
| <li>if there is no module to build</li> |
| <li>non-system libraries used in <code>LOCAL_LDLIBS</code>/LDFLAGS of shared library |
| or executable modules</li> |
| </ol> |
| </blockquote> |
| </li> |
| <li> |
| <p>Updated ndk-build so that if <code>APP_MODULES</code> is not defined and only static libraries |
| are listed in Android.mk, force-build all of them. |
| See <a href="http://b.android.com/53502">b/53502</a></p> |
| </li> |
| <li> |
| <p>ndk-build now supports absolute paths in <code>LOCAL_SRC_FILES</code></p> |
| </li> |
| <li> |
| <p>Executable "<code>*-gdbtui", which is equivalent to "</code>*-gdb <code>-tui",</code> is removed for the sake of space.</p> |
| </li> |
| <li> |
| <p>Issue warning when EDG front-end turns _STLP_HAS_INCLUDE_NEXT |
| back on. |
| See <a href="http://b.android.com/53646">b/53646</a></p> |
| </li> |
| <li> |
| <p>Added <code>NDK_LIBS_OUT</code> to override path for libraries/gdbserver from the default |
| $PROJECT/libs. See <a href="OVERVIEW.html">OVERVIEW</a></p> |
| </li> |
| <li> |
| <p>Changed ndk-build defaults to compile code with format string protection |
| "-Wformat <code>-Werror=format-security".</code> You may set |
| <code>LOCAL_DISABLE_FORMAT_STRING_CHECKS=true</code> to disable it. |
| See <a href="ANDROID-MK.html">ANDROID-MK</a></p> |
| </li> |
| <li> |
| <p>Added STL pretty-print support in ndk-gdb-py. |
| See <a href="NDK-GDB.html">NDK-GDB</a></p> |
| </li> |
| <li> |
| <p>Misc build/test</p> |
| <blockquote> |
| <ul> |
| <li>Added tests based on googletest frameworks</li> |
| <li>toolchain build script warns if shell isn't bash</li> |
| </ul> |
| </blockquote> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r8e</h1> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>NDK now delivers additional 64-bit host toolchain set (package name suffix |
| <code>*-x86_64.*</code>)</li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li> |
| <p>The ndk-build script uses 64-bit toolchain if it's present and your OS |
| supports it. If you install both 32-bit and 64-bit toolchain on 64-bit |
| OS, you may export <code>NDK_HOST_32BIT=1</code> or add it to the command-line to |
| always use the 32-bit host toolchain.</p> |
| </li> |
| <li> |
| <p>For standalone: add to <code>make-standalone-toolchain.sh</code> "--system=linux-x86_64" |
| on Linux or "--system=darwin-x86_64" on MacOSX to generate 64-bit host |
| toolchain instead of the default 32-bit</p> |
| </li> |
| </ol> |
| <p>See <a href="NDK-BUILD.html">NDK-BUILD</a></p> |
| </blockquote> |
| <ul> |
| <li>Added Clang 3.2 compiler. Since GCC 4.6 is still the default, you need to |
| explicitly enable it:</li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li> |
| <p>For ndk-build: Either export <code>NDK_TOOLCHAIN_VERSION=clang3.2</code> (or |
| <code>NDK_TOOLCHAIN_VERSION=clang</code> which picks the most recent among the |
| clang compilers in the package) or add it in Application.mk.</p> |
| </li> |
| <li> |
| <p>For standalone: Add "--llvm-version=3.2" to <code>make-standalone-toolchain.sh</code> |
| and replace CC and CXX in your makefile with <tool-path>/bin/clang |
| and <tool-path>/bin/clang++.</p> |
| </li> |
| </ol> |
| </blockquote> |
| <ul> |
| <li>Added static code analyzer for Linux/MacOSX hosts</li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li> |
| <p>For ndk-build, either export <code>NDK_ANALYZE=1</code> or add it to the command-line.</p> |
| </li> |
| <li> |
| <p>For standalone, please refer to ndk-build for example to run scan-build |
| using /path/to/standalone/bin/<arch>/analyzer.</p> |
| </li> |
| </ol> |
| <p>This feature is experimental now but welcome to try and report issues.</p> |
| </blockquote> |
| <ul> |
| <li>Added MCLinker for Linux/MacOSX hosts. Since ld.gold is the default |
| where available, you need to add <code>-fuse-ld=mcld</code> in <code>LOCAL_LDFLAGS</code> or |
| <code>APP_LDFLAGS</code> to explicitly enable it.</li> |
| </ul> |
| <blockquote> |
| <p>This feature is experimental now but welcome to try and report issues. |
| Please find project page: <a href="https://code.google.com/p/mclinker/">https://code.google.com/p/mclinker/</a></p> |
| </blockquote> |
| <ul> |
| <li>ndk-build now uses topological sort for module dependencies, ie. |
| it automatically sorts out the order of libraries specified in |
| <code>LOCAL_STATIC_LIBRARIES</code>, <code>LOCAL_WHOLE_STATIC_LIBRARIES</code> and |
| <code>LOCAL_SHARED_LIBRARIES</code>.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/39378">b/39378</a> and an example in tests/build/topological-sort.</p> |
| </blockquote> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed build script to build all toolchains in <code>-O2.</code> Toolchains |
| in previous releases were incorrectly built without optimization.</p> |
| </li> |
| <li> |
| <p>Fixed build script which unconditionally builds Clang/llvm for MacOSX |
| in 64-bit</p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.6/4.7 ICE gen_thumb_movhi_clobber at config/arm/arm.md:5832. |
| See <a href="http://b.android.com/52732">b/52732</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC/ARM 4.6/4.7 fails to link code using 64-bit atomic built-in |
| functions. |
| See <a href="http://b.android.com/41297">b/41297</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.7 linker error reads like |
| .../arm-linux-androideabi/bin/ld: error: DIV usage mismatch between |
| out/target/product/generic/obj/STATIC_LIBRARIES/ds_intermediates/ds.a(ak.o) |
| and output.</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://sourceware.org/ml/binutils/2012-12/msg00202.html">http://sourceware.org/ml/binutils/2012-12/msg00202.html</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed GCC 4.7 ICE in build_data_member_initialization, at |
| cp/semantics.c:5790</p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.7 ICE in redirect_eh_edge_1, at tree-eh.c:2214. |
| See <a href="http://b.android.com/52909">b/52909</a></p> |
| </li> |
| <li> |
| <p>Fixed a GCC 4.7 segfault. |
| See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245</a></p> |
| </li> |
| <li> |
| <p>Fixed to <chrono> clock resolution and enable steady_clock. |
| See <a href="http://b.android.com/39680">b/39680</a></p> |
| </li> |
| <li> |
| <p>Fixed to enable _GLIBCXX_HAS_GTHREADS for GCC 4.7 libstdc++. |
| See <a href="http://b.android.com/41770">b/41770</a> and <a href="http://b.android.com/41859">b/41859</a></p> |
| </li> |
| <li> |
| <p>Fixed X86 MXX/SSE code fails to link due to missing posix_memalign. |
| See <a href="https://android-review.googlesource.com/#/c/51872">r/51872</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC4.7/X86 segfault in i386.c distance_non_agu_define_in_bb(). |
| See <a href="https://android-review.googlesource.com/#/c/50383">r/50383</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC4.7/X86 to resotre earlier cmov behavior. |
| See <a href="http://gcc.gnu.org/viewcvs?view=revision&revision=193554">http://gcc.gnu.org/viewcvs?view=revision&revision=193554</a></p> |
| </li> |
| <li> |
| <p>More fixes to handle NULL return value of setlocale() in |
| libstdc++/GCC4.7. |
| See <a href="http://b.android.com/46718">b/46718</a></p> |
| </li> |
| <li> |
| <p>Fixed ld.gold runtime undefined reference to __exidx_start/_end. |
| See <a href="https://android-review.googlesource.com/#/c/52134">r/52134</a></p> |
| </li> |
| <li> |
| <p>Fixed Clang3.1 ICE using Eigen library. |
| See <a href="http://b.android.com/41246">b/41246</a></p> |
| </li> |
| <li> |
| <p>Fixed Clang3.1 ICE including <chrono> in C++11 mode. |
| See <a href="http://b.android.com/39600">b/39600</a></p> |
| </li> |
| <li> |
| <p>Fixed Clang3.1 ICE when generating object code for a method |
| call to a uniform initialized rvalue. |
| See <a href="http://b.android.com/41387">b/41387</a></p> |
| </li> |
| <li> |
| <p>Fixed Clang3.1/X86 stack realignment. |
| See <a href="https://android-review.googlesource.com/#/c/52154">r/52154</a></p> |
| </li> |
| <li> |
| <p>Fixed GDB SIGILL when debugging on platform 4.1.2. |
| See <a href="http://b.android.com/40941">b/40941</a></p> |
| </li> |
| <li> |
| <p>Fixed GDB cannot set "source:line" breakpoints when symbols contain |
| frankenpaths. |
| See <a href="http://b.android.com/42448">b/42448</a></p> |
| </li> |
| <li> |
| <p>Fixed GDB read_program_header for MIPS PIE executables. |
| See <a href="https://android-review.googlesource.com/#/c/49592">r/49592</a></p> |
| </li> |
| <li> |
| <p>Fixed STLport segfault in uncaught_exception(). |
| See <a href="https://android-review.googlesource.com/#/c/50236">r/50236</a></p> |
| </li> |
| <li> |
| <p>Fixed STLport Bus error in exception handling due |
| to unaligned access of DW_EH_PE_udata2, 4 and 8.</p> |
| </li> |
| <li> |
| <p>Fixed Gabi++ nothrow new[] infinite recursion. |
| See <a href="http://b.android.com/52833">b/52833</a></p> |
| </li> |
| <li> |
| <p>Fixed Gabi++ wrong offset to EH pointer. |
| See <a href="https://android-review.googlesource.com/#/c/53446">r/53446</a></p> |
| </li> |
| <li> |
| <p>Removed Gabi++ redundant free on exception object. |
| See <a href="https://android-review.googlesource.com/#/c/53447">r/53447</a></p> |
| </li> |
| </ul> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li>Fix NDK headers</li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li>Remove redundant definitions of size_t, ssize_t, and ptrdiff_t</li> |
| <li>Fixed MIPS and ARM fenv.h</li> |
| <li>Fixed stddef.h to not re-define offsetof already exists |
| in toolchain</li> |
| <li>Fixed elf.h to contain Elf32_auxv_t and Elf64_auxv_t. |
| See <a href="http://b.android.com/38441">b/38441</a></li> |
| <li>Fixed the #ifdef C++ in OpenSLES_AndroidConfiguration.h. |
| See <a href="http://b.android.com/53163">b/53163</a></li> |
| </ol> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed STLport to abort after OOM instead of (silent) exit</p> |
| </li> |
| <li> |
| <p>Fixed 'system' and 'Gabi++' headers to be able to compile |
| with API level < 9</p> |
| </li> |
| <li> |
| <p>Fixed cpufeatures to not parse /proc/self/auxv. |
| See <a href="http://b.android.com/43055">b/43055</a></p> |
| </li> |
| <li> |
| <p>Fixed ld.gold to not depending on host libstdc++, and in case |
| of windows, library libgcc_sjlj_1.dll</p> |
| </li> |
| <li> |
| <p>Fixed Clang3.1 which emits inconsistent register list in .vsave |
| and fails assembler. eg. |
| .vsave {d8, d9, d10, d11, d12, d13, d14, s20, s21, s22} |
| See <a href="https://android-review.googlesource.com/#/c/49930">r/49930</a></p> |
| </li> |
| <li> |
| <p>Fixed Clang3.1 to be able to compile libgabi++ and pass test-stlport |
| on MIPS. |
| See <a href="https://android-review.googlesource.com/#/c/51961">r/51961</a></p> |
| </li> |
| <li> |
| <p>Fixed Clang3.1 to only enable exception by default for C++, |
| not for C</p> |
| </li> |
| <li> |
| <p>Misc fixes in Clang3.1 to pass most GNU exception tests</p> |
| </li> |
| <li> |
| <p>Fixed script clang/clang++ in standalone NDK compiler to |
| 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 |
| 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 |
| declared in setjmp.h. |
| See <a href="http://b.android.com/19851">b/19851</a></p> |
| </li> |
| <li> |
| <p>Patched GCC 4.4.3/4.6/4.7 libstdc++ to work with Clang in C++11. |
| See <a href="http://clang.llvm.org/cxx_status.html">http://clang.llvm.org/cxx_status.html</a></p> |
| </li> |
| <li> |
| <p>Fixed cygwin path in argument passed to HOST_AWK</p> |
| </li> |
| <li> |
| <p>Fixed ndk-build warning in windows when running from project's jni/ |
| directory. |
| See <a href="http://b.android.com/40192">b/40192</a></p> |
| </li> |
| <li> |
| <p>Fixed ndk-build won't build if makefile has tailing whitespace in |
| <code>LOCAL_PATH</code> definition. |
| See <a href="http://b.android.com/42841">b/42841</a></p> |
| </li> |
| </ul> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Enabled threading support in GCC/MIPS toolchain</p> |
| </li> |
| <li> |
| <p>Unhided GCC EH helpers <code>__cxa_begin_cleanup</code> and <code>__cxa_type_match</code> |
| in GNU libstdc++.</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See tests/build/b8247455-hidden-cxa/jni/Android.mk</p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Gabi++ and STLport static libraries are now built with hidden |
| visibility except for EH helpers</p> |
| </li> |
| <li> |
| <p>STLport in ARM is now built in thumb mode</p> |
| </li> |
| <li> |
| <p>Added support for std::set_new_handler in Gabi++. |
| See <a href="http://b.android.com/52805">b/52805</a></p> |
| </li> |
| <li> |
| <p>Enabled FUTEX in GNU libstdc++</p> |
| </li> |
| <li> |
| <p>ndk-build no longer copies prebuilt static library to project's |
| obj/local/<abi>/directory. |
| See <a href="http://b.android.com/40302">b/40302</a></p> |
| </li> |
| <li> |
| <p>Removed <code>__ARM_ARCH_5*__</code> from ARM toolchains/*/setup.mk. |
| See <a href="http://b.android.com/21132">b/21132</a></p> |
| </li> |
| <li> |
| <p>Built additional GNU libstdc++ libaries in thumb mode for ARM</p> |
| </li> |
| <li> |
| <p>Enabled MIPS floating-point madd/msub/nmadd/nmsub/recip/rsqrt |
| instructions with 32-bit FPU</p> |
| </li> |
| <li> |
| <p>Enabled graphite in GCC 4.6 and 4.7. Allow more loop optimizations: |
| <code>-fgraphite,</code> <code>-fgraphite-identity,</code> <code>-floop-block,</code> <code>-floop-flatten,</code> |
| <code>-floop-interchange,</code> <code>-floop-strip-mine,</code> <code>-floop-parallelize-all,</code> |
| and <code>-ftree-loop-linear.</code></p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html">http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html</a></p> |
| </blockquote> |
| <ul> |
| <li>Enabled polly for clang3.1/3.2 on Linux/MacOSX 32-bit hosts which analyzes |
| and optimizes memory access pattern.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://polly.llvm.org">http://polly.llvm.org</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Enabled <code>-flto</code> in GCC 4.7, 4.6, clang3.2 and Clang3.1 on linux (Clang LTO |
| via LLVMgold.so, ie. no MIPS because it doesn't have ld.gold)</p> |
| </li> |
| <li> |
| <p>Enabled --plugin and --plugin-opt for ld.gold in GCC 4.6/4.7</p> |
| </li> |
| <li> |
| <p>Enabled --text-reorder for ld.gold in GCC 4.7</p> |
| </li> |
| <li> |
| <p>GNU libstdc++ is now configured with _GLIBCXX_USE_C99_MATH which will undef |
| isinf, etc (*1), in bionic header. If you have code which does the following</p> |
| <pre><code>#include <math.h> |
| ... use isinf |
| #include <cmath> |
| #include <math.h> |
| ... use isinf // fails |
| </code></pre> |
| </li> |
| </ul> |
| <blockquote> |
| <p>The 2nd use of isinf may fail because cmath undefined isinf</p> |
| </blockquote> |
| <p>(*1) Math macro in bionic undefined by cmath: fpclassify, isfinite, isinf, |
| isnan, isnormal, isgreater, isgreaterequal, isless, islessequal, |
| islessgreater, isunordered, signbit</p> |
| <ul> |
| <li> |
| <p>Added <code>APP_LDFLAGS</code>. See <a href="ANDROID-MK.html">ANDROID-MK</a>.</p> |
| </li> |
| <li> |
| <p>Allow <code>NDK_LOG=0,</code> <code>NDK_HOST_32BIT=0</code> to disable <code>NDK_LOG</code> and host 32-bit toolchain, |
| respectively.</p> |
| </li> |
| <li> |
| <p>Changed the default GCC/X86 <code>-march=/-mtune=</code> from pentiumpro/generic to i686/atom</p> |
| </li> |
| <li> |
| <p>Misc toolchain build script enhancements:</p> |
| </li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li>Fixed a race condition in <code>build-gcc.sh</code> mingw build which used to prevent |
| high degree of parallel build</li> |
| <li><code>build-gabi++.sh</code> and <code>build-stlport.sh</code> can now run from NDK package. |
| See <a href="http://b.android.com/52835">b/52835</a></li> |
| <li>Fixed <code>run-tests.sh</code> in MSys</li> |
| <li>Better 64-bit host toolchain and canadian build supports</li> |
| <li>Updated <code>build-mingw64-toolchain.sh</code> for modern versions</li> |
| <li>Option to build libgnustl_static.a and stlport_static.a without hidden |
| visibility</li> |
| </ol> |
| </blockquote> |
| <hr /> |
| <h1>android-ndk-r8d</h1> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>Added GCC 4.7 compiler. Since GCC 4.6 is still the default, |
| you need to explicitly enable it:</li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li>For ndk-build: Either export <code>NDK_TOOLCHAIN_VERSION=4.7</code> or add it |
| in Application.mk.</li> |
| <li>For standalone: Use "--toolchain=" option in <code>make-standalone-toolchain.sh</code>. |
| eg. "--toolchain=arm-linux-androideabi-4.7"</li> |
| </ol> |
| <p>This feature is experimental now but welcome to try and report issues.</p> |
| </blockquote> |
| <ul> |
| <li>Added stlport exception support via gabi++. Note that the new gabi++ |
| depends on dlopen, etc, meaning that:</li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li>libstlport_static.a can no longer be used in "static" executable (-static, |
| only possible with standalone toolchain). "dynamic" executable (eg. |
| include $(BUILD_EXECUTABLE)) can link fine because compiler impliciently adds <code>-ldl</code></li> |
| <li>If your project links with "-nostdlib <code>-Wl,--no-undefined",</code> you need to provide |
| your own <code>-ldl</code></li> |
| </ol> |
| <p>See <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a>.</p> |
| <p>This feature is experimental now and works better with GCC 4.6/4.7 |
| than with GCC 4.4.3 and clang3.1. Welcome to try and report issues.</p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Add <code>-mstack-protector-guard=</code> option for x86 to choose between "global" |
| (default, compatible with older bionic) and "tls" (new %gs:20) for |
| <code>-fstack-protector,</code> <code>-fstack-protector-all,</code> and <code>-fstack-protector-strong</code> |
| (GCC 4.6+). Note that this alone doesn't enable any <code>-fstack-protector*</code></p> |
| </li> |
| <li> |
| <p>Add android_setCpu() to sources/android/cpufeatures/cpu-features.c |
| when auto-detection via /proc isn't possible in and after JB. |
| See <a href="http://code.google.com/p/chromium/issues/detail?id=164154">http://code.google.com/p/chromium/issues/detail?id=164154</a></p> |
| </li> |
| </ul> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed un-needed rebuild of object files via ndk-build. |
| See <a href="http://b.android.com/39810">b/39810</a></p> |
| </li> |
| <li> |
| <p>Fixed r8c linker fail in MacOSX 10.6.x with error reads:</p> |
| <pre><code>dyld: lazy symbol binding failed: Symbol not found: _memmem |
| Referenced from: ...../arm-linux-androideabi/bin/ld |
| Expected in: /usr/lib/libSystem.B.dylib |
| </code></pre> |
| </li> |
| </ul> |
| <blockquote> |
| <p>r8c was packaged on 10.7 machine which produced binaries not |
| compatible with 10.6 SDK/NDK still supports. Will build it |
| on 10.6 from now on.</p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Removed '-x c++' from clang++ in standalone. |
| See <a href="http://b.android.com/39089">b/39089</a></p> |
| </li> |
| <li> |
| <p>Fixed issues using <code>NDK_TOOLCHAIN_VERSION=clang3.1</code> in cygwin. |
| See <a href="http://b.android.com/39585">b/39585</a></p> |
| </li> |
| <li> |
| <p>Fixed <code>make-standalone-toolchain.sh</code> to create standalone toolchain |
| on cygwin and MinGW, which works for all cygwin, MingGW, and CMD.exe. |
| See <a href="http://b.android.com/39915">b/39915</a> and |
| <a href="http://b.android.com/39585">b/39585</a> (again)</p> |
| </li> |
| <li> |
| <p>Added missing SL_IID_ANDROIDBUFFERQUEUESOURCE in android-14 for |
| ARM/X86. |
| See <a href="http://b.android.com/40625">b/40625</a></p> |
| </li> |
| <li> |
| <p>Fixed x86 cpu detection for MOVBE. |
| See <a href="http://b.android.com/39317">b/39317</a></p> |
| </li> |
| <li> |
| <p>Fixed an issue preventing STL dependencies to C++ sources not |
| in .cpp extension.</p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.6 ARM ICE at reload1.c:1061. |
| See <a href="http://b.android.com/20862">b/20862</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.4.3 ARM ICE at emit-rtl.c:1954. |
| See <a href="http://b.android.com/22336">b/22336</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.4.3 ARM ICE at postreload.c:396. |
| See <a href="http://b.android.com/22345">b/22345</a></p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.6/4.7 elides lambdas. |
| See <a href="http://b.android.com/35933">b/35933</a></p> |
| </li> |
| </ul> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li>Fixed NDK headers</li> |
| </ul> |
| <blockquote> |
| <ol> |
| <li>Fixed <code>__WINT_TYPE__</code> and wint_t to be the same type</li> |
| <li>Corrected typo in <android/bitmap.h>. |
| See <a href="http://b.android.com/15134">b/15134</a></li> |
| <li>Corrected typo in <errno.h>. |
| See <a href="http://b.android.com/15134">b/15134</a></li> |
| <li>Check the presence of <code>__STDC_VERSION__</code> in <sys/cdefs.h>. |
| See <a href="http://b.android.com/14627">b/14627</a></li> |
| <li>Re-org headers byteswap.h and dirent.h</li> |
| <li>Fixed limits.h to include page.h which provides PAGE_SIZE. |
| See <a href="http://b.android.com/39983">b/39983</a></li> |
| <li>Fixed return type of glGetAttribLocation and glGetUniformLocation |
| from int to GLint.</li> |
| <li>Fixed <code>__BYTE_ORDER</code> for x86. |
| See <a href="http://b.android.com/39824">b/39824</a></li> |
| </ol> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed ndk-build to not overwrite <code>-Os</code> with <code>-O2</code> in ARM</p> |
| </li> |
| <li> |
| <p>Fixed to allow overwriting HOST_AWK, HOST_SED, and HOST_MAKE.</p> |
| </li> |
| <li> |
| <p>Fixed ld.gold issue on fsck_msdos build linking objects built by ICC</p> |
| </li> |
| <li> |
| <p>Fixed ARM EHABI support in clang conforming to spec.</p> |
| </li> |
| <li> |
| <p>Fixed GDB to shorten the time spending on walking target's link map upon |
| solib events. |
| See <a href="http://b.android.com/38402">b/38402</a></p> |
| </li> |
| <li> |
| <p>Fixed missing libgcc.a when linking shared libraries</p> |
| </li> |
| </ul> |
| <p>OTHER CHANGES:</p> |
| <ul> |
| <li> |
| <p>Backported 64-bit built-in atomic functions for ARM to GCC 4.6</p> |
| </li> |
| <li> |
| <p>Documentation for audio output latency, other misc docs/ fixes</p> |
| </li> |
| <li> |
| <p>Non-void functions in debug build by Clang now raise SIGILL on path w/o |
| return statement</p> |
| </li> |
| <li> |
| <p><code>make-standalone-toolchain.sh</code> now accepts surffix "-clang3.1" which is |
| equivalent to adding "--llvm-version=3.1" on GCC 4.6 toolchain.</p> |
| </li> |
| <li> |
| <p>Changed GCC and Clang bug report URL to <a href="http://source.android.com/source/report-bugs.html">http://source.android.com/source/report-bugs.html</a></p> |
| </li> |
| <li> |
| <p>Added ARM ELF support to llvm-objdump.</p> |
| </li> |
| <li> |
| <p>Suppressed warning "treating c input as c++" in clang.</p> |
| </li> |
| <li> |
| <p>Only 32-bit of libiberty.a is built (placed at lib32/)</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r8c</h1> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>Added Clang 3.1 compiler. Since GCC 4.6 is still the default, |
| you need to explicitly enable it:</li> |
| <li>For ndk-build: Either export <code>NDK_TOOLCHAIN_VERSION=clang3.1</code> or add it |
| in Application.mk.</li> |
| <li>For standalone: Add "--llvm-version=3.1" to <code>make-standalone-toolchain.sh</code> |
| and replace CC and CXX in your makefile with <tool-path>/bin/clang |
| and <tool-path>/bin/clang++.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="STANDALONE-TOOLCHAIN.html">STANDALONE-TOOLCHAIN</a> for details. |
| This feature is experimental now but welcome to try and report issues.</p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Gold linker ld.gold is now available in Windows toolchain. Gold is also the |
| default linker for ARM/X86 on all hosts. You may override it to use ld.bfd |
| linker by adding <code>LOCAL_LDFLAGS</code> += <code>-fuse-ld=bfd</code> in Android.mk, or pass |
| <code>-fuse-ld=bfd</code> to g++/clang++ commandline which does the linking.</p> |
| </li> |
| <li> |
| <p>ndk-build[.cmd] and ndk-gdb now check and bail out if NDK path contains space.</p> |
| </li> |
| <li> |
| <p>Changes in API level</p> |
| </li> |
| <li>Projects with android-10 .. 13 specified in <code>APP_PLATFORM</code>, project.properties or |
| default.properties will link against android-9 instead of android-14.</li> |
| <li>Executable in project with android-16 (Jelly Bean) or higher is compiled |
| with <code>-fPIE</code> (position-independent executables). A new <code>APP_PIE</code> allow manual control |
| of this behavior. See <a href="APPLICATION-MK.html">APPLICATION-MK</a> for details. Note that all API level |
| above 14 still link against platforms/android-14. ie. no new platforms/android-N |
| is added.</li> |
| <li> |
| <p>ndk-build now warns about the adjusted API level is larger than android:minSdkVersion |
| in project's AndroidManifest.xml.</p> |
| </li> |
| <li> |
| <p>ARM: Updated 'cpu-features' helper library to include 9 more ARM-specific features.</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See sources/android/cpufeatures/cpu-features.h for details.</p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>X86: long double is still a distinct type but it's 8-byte in size now (same as double)</p> |
| </li> |
| <li> |
| <p><code>APP_ABI=armeabi-v7a:</code> </p> |
| </li> |
| <li><code>-march=armv7-a</code> is also passed to linker to link v7-specific libraries and crt*.o</li> |
| <li><code>-mfpu=vfpv3-d16</code> is added by ndk-build instead of <code>-mfpu=vfp</code> in the previous releases.</li> |
| </ul> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li>Fixed an issue when <code>make-standalone-toolchain.sh</code> is run under root privilege resulting |
| in standalone toolchain inaccessible to some.</li> |
| <li>All files/executables attributes in NDK release package are set to readable/executable to all</li> |
| <li>The ownership/group of file libstdc++.a is now preserved when copied</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/35279">b/35279</a></p> |
| </blockquote> |
| <ul> |
| <li>Removed redundant \r from Windows prebuilt echo.exe. The redundant \r in gdb.setup fails |
| GDB because it incorrectly becomes part of the path.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/36054">b/36054</a></p> |
| </blockquote> |
| <ul> |
| <li>Fixed windows parallel builds that sometimes failed due to timing issues in the host-mkdir |
| implementation.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/25875">b/25875</a></p> |
| </blockquote> |
| <ul> |
| <li>Fixed GCC 4.4.3 GNU libstdc++ to NOT merge typeinfo names by default.</li> |
| </ul> |
| <blockquote> |
| <p>See toolchain repo gcc/gcc-4.4.3/libstdc++-v3/libsupc++/typeinfo, |
| <a href="http://b.android.com/22165">b/22165</a>, and |
| <a href="https://groups.google.com/forum/#!msg/android-ndk/FlnuAOIKHOo/kLEwaBso7KYJ%5B1-25%5D">https://groups.google.com/forum/#!msg/android-ndk/FlnuAOIKHOo/kLEwaBso7KYJ%5B1-25%5D</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed crash on null context in GCC 4.6 cp/mangle.c::write_unscoped_name, where gcc |
| may crash when context == NULL and dereferenced in TREE_CODE</p> |
| </li> |
| <li> |
| <p>Fixed GCC 4.4.3 crashes on NEON specific typedef for float</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/34613">b/34613</a></p> |
| </blockquote> |
| <ul> |
| <li>Fixed the STLport internal _IteWrapper::operator*() implementation where stale |
| stack location holding the dereferenced value is returned and leads to runtime crashes</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/38630">b/38630</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>ARM: Fixed ARM GCC 4.4.3/4.6 g++ to not warn about "the mangling of <va_list> has |
| changed in GCC 4.4". Switch <code>-Wno-psabi</code> is no longer needed to workaround.</p> |
| </li> |
| <li> |
| <p>ARM: Fix an issue when project with .arm/.neon suffixes in <code>LOCAL_SRC_FILES</code> also |
| uses <code>APP_STL</code>. With <code>APP_STL</code>, ndk-build searches for C++ file in <code>LOCAL_SRC_FILES</code> before |
| adding STL header/lib paths to compilation. Fix ndk-build to filter out .arm and .neon |
| suffixes before the search, otherwise item in <code>LOCAL_SRC_FILES</code>file like myfile.cpp.arm.neon |
| won't be considered C++.</p> |
| </li> |
| <li> |
| <p>ARM: Fixed binutils-2.21/ld.bfd to be capable of linking object from older binutils w/o |
| tag_FP_arch, which used to produce error message reads</p> |
| <p>BFD (GNU Binutils) 2.21 assertion fail |
| ...../binutils/binutils-2.21/bfd/elf32-arm.c:10190</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>The root cause is that ARM's binutils-2.21/ld.bfd performs sanity check and asserts |
| when "tag_FP_arch==0 && tag_ABI_HardFP_use !=0". This can happen in object using FP |
| linked by older binutils when tag_FP_arch isn't produced at all (thus gets the default |
| "zero" in new linker).</p> |
| <p>See <a href="http://b.android.com/35209">b/35209</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>ARM: Removed warning when binutils-2.19/ld links prebuilt object by newer binutils-2.21 |
| which reads</p> |
| <p>Unknown EABI object attribute 44</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>The reason is that all prebuilt crt*.o and C++ STL are built with later GCC 4.6/binutils-2.21 |
| and contain new tag "DIV_use" with value set to "Not allowed". This tag can be safely ignored |
| by the original GCC4.4.3/binutils-2.19 toolchain since it is only for sanity check.</p> |
| </blockquote> |
| <ul> |
| <li>ARM: Fixed an issue in GNU stdc++ compilation with both <code>-mthumb</code> and <code>-march=armv7-a,</code> by |
| making <code>make-standalone-toolchain.sh</code> to also populate headers/libs in sub-directory |
| "armv7-a/thumb".</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/35616">b/35616</a></p> |
| </blockquote> |
| <ul> |
| <li>ARM: Fix error: unresolvable R_ARM_THM_CALL relocation</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/35342">b/35342</a> and |
| <a href="https://groups.google.com/forum/?fromgroups#!topic/android-ndk/HaLycHImqL8">https://groups.google.com/forum/?fromgroups#!topic/android-ndk/HaLycHImqL8</a></p> |
| </blockquote> |
| <ul> |
| <li>ARM: Fixed internal compiler error at "reload1.c:3633". The reason is that ARM back-end |
| expects wrong operand type when sign-extend from char.</li> |
| </ul> |
| <blockquote> |
| <p>Back port fix from <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50099">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50099</a></p> |
| </blockquote> |
| <ul> |
| <li>ARM: Fixed internal compiler error with negative shift amount. |
| int foo(int a, int b) |
| { |
| return a | (b << -3); |
| }</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00594.html">http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00594.html</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>X86: Fixed <code>-fstack-protector,</code> which is also the default for ndk-build x86 ABI</p> |
| </li> |
| <li> |
| <p>MIPS: Fixed stlport endianess by setting <em>STLP_LITTLE_ENDIAN to 1 when compiling |
| MIPS' libstlport</em>*</p> |
| </li> |
| <li> |
| <p>MIPS: Fixed GCC __builtin_unreachable issue compiling LLVM</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See Bug 54369: <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54369</a></p> |
| </blockquote> |
| <ul> |
| <li>MIPS: Backport fix to bug 50380: cc1 hangs eating 100% CPU</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380</a> and |
| <a href="http://gcc.gnu.org/viewcvs/trunk/gcc/cse.c?r1=177852&r2=182498&pathrev=182498">http://gcc.gnu.org/viewcvs/trunk/gcc/cse.c?r1=177852&r2=182498&pathrev=182498</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Disable python support in gdb-7.x at build, otherwise gdb-7.x/configure may |
| pick up whatever python in host and build gdb with hard-wired dependency to specific |
| version of python.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/36120">b/36120</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Fixed ndk-gdb when <code>APP_ABI</code> contains "all" and matches none of known architecture</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/35392">b/35392</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Fixed Windows pathname support. Keep ':' if it looks like it could be part of |
| a Windows path starting with a drive letter.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://sourceware.org/ml/gdb/2011-06/msg00030.html">http://sourceware.org/ml/gdb/2011-06/msg00030.html</a> and |
| <a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12843">http://sourceware.org/bugzilla/show_bug.cgi?id=12843</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Fixed add HW breakpoint support for ARM in gdbserver</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://sourceware.org/ml/gdb-patches/2011-09/msg00200.html">http://sourceware.org/ml/gdb-patches/2011-09/msg00200.html</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Fixed to only read current solibs when linker is consistent. Speeds up solib |
| event handling.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/37677">b/37677</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Fixed to make repeated attempts to find solib breakpoint. GDB will retry enable_break() |
| during every call to svr4_current_sos() until it succeeds.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="https://android-review.googlesource.com/#/c/43563">r/43563</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Fixed an issue where gdb cannot stop on breakpoints placed on dlopen-ed |
| libraries.</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/34856">b/34856</a></p> |
| </blockquote> |
| <ul> |
| <li>GDB: Fixed SIGILL in dynamic linker when calling dlopen(), on system |
| where /system/bin/linker is stripped of symbols and rtld_db_dlactivity() |
| is implemented as Thumb, due to not preserving LSB of sym_addr</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/37147">b/37147</a></p> |
| </blockquote> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li>Fixed NDK headers</li> |
| <li>Fixed arch-mips/include/asm/* previously incorrectly cleaned from original kernel |
| See <a href="https://android-review.googlesource.com/#/c/43335">r/43335</a></li> |
| <li>Replace struct member data "<code>__unused</code>" with "<code>__linux_unused</code>" in linux/sysctl.h |
| and linux/icmp.h to avoid conflict with "#define __unused" in sys/cdefs.h</li> |
| <li>Fixed fenv.h to enclosed C functions with <code>__BEGIN_DECLS/__END_DECLS</code></li> |
| <li>Removed unimplemented functions in malloc.h</li> |
| <li>Fixed stdint.h. See <a href="http://b.android.com/1952">b/1952</a></li> |
| <li>Fixed preprocessor macros in <arch>/include/machine/*</li> |
| <li>Replaced link.h for mips with new version for all platforms</li> |
| <li>Remove linux-unistd.h</li> |
| <li> |
| <p>Move GLibc-specific macros LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX from |
| <pthread.h> to <limits.h>.</p> |
| </li> |
| <li> |
| <p>Fixed a buffer overflow in ndk-stack-parser.</p> |
| </li> |
| <li> |
| <p>Fixed _STLP_USE_EXCEPTIONS, when not defined, to omit all declarations |
| and uses of <code>__Named_exception.</code> Compile and use <code>__Named_exception</code> only |
| when STLport is being allowed to use exceptions.</p> |
| </li> |
| <li> |
| <p>Fixed to build Linux-only NDK packages (invoked as follow) w/o also building windows</p> |
| <p><code>./build/tools/make-release.sh</code> --force --systems=linux-x86</p> |
| </li> |
| <li> |
| <p>Fixed libc.so to not export atexit() and __do_handler. These symbols are exported |
| on ARM by the system version of the C library to support legacy native libraries. |
| NDK-generated should never reference them directly. Instead, each shared library or |
| executable should embed its own version of these symbols, provided by crtbegin_*.o</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>If your project is linked with "-nostdlib <code>-Wl,--no-undefined",</code> you need to provide |
| your own <code>__dso_handle</code> because crtbegin_so.o isn't linked. The content of <code>__dso_handle</code> |
| doesn't matter. eg.</p> |
| </blockquote> |
| <pre><code>extern "C" { |
| extern void *__dso_handle __attribute__((__visibility__ ("hidden"))); |
| void *__dso_handle; |
| } |
| </code></pre> |
| <ul> |
| <li> |
| <p>ARM: Fixed symbol decoder (used in objdump) for plt entries to generate more |
| readable form function@plt</p> |
| </li> |
| <li> |
| <p>X86: Removed the following symbols introduced in GCC 4.6/libgcc.a from X86's libc.so: |
| <code>__aeabi_idiv0</code>, <code>__aeabi_ldiv0</code>, <code>__aeabi_unwind_cpp_pr1</code>, and <code>__aeabi_unwind_cpp_pr2</code></p> |
| </li> |
| <li> |
| <p>MIPS: Removed unused .ctors, .dtors, and .eh_frame in MIPS crt*_so.S.</p> |
| </li> |
| <li> |
| <p>GDB: ndk-gdb now only takes the last line of output for ndk-build DUMP_XXXX. This |
| ensures that if Application.mk or Android.mk do print something with $(info ...), |
| it doesn't get injected into the result of DUMP_XXX.</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See <a href="https://groups.google.com/d/msg/android-ndk/-/ew0lTWGr1UEJ">https://groups.google.com/d/msg/android-ndk/-/ew0lTWGr1UEJ</a></p> |
| </blockquote> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Removed arch-x86 and arch-mips headers from platforms/android-{3,4,5,8}. |
| Those headers are incomplete to begin with, since both X86 and MIPS ABIs are only |
| supported at API ≥ 9</p> |
| </li> |
| <li> |
| <p>Simplified c++ include path in standalone package, eg. change</p> |
| <p><path>/arm-linux-androideabi/include/c++/4.6.x-google |
| to |
| <path>/include/c++/4.6/</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/35279">b/35279</a></p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Enhanced ndk-build to recognize more C++ file extensions by default:</p> |
| <p>.cc .cp .cxx .cpp .CPP .c++ .C</p> |
| </li> |
| </ul> |
| <blockquote> |
| <p>You may still use <code>LOCAL_CPP_EXTENSION</code> to override it</p> |
| </blockquote> |
| <ul> |
| <li> |
| <p>Fixed an issue in samples/san-angeles about black/freeze frame |
| at re-launch.</p> |
| </li> |
| <li> |
| <p>Replaced deprecated APIs in NDK samples</p> |
| </li> |
| <li>hello-gl2 from android-5 to android-7</li> |
| <li>native-activity from android-9 to android-10</li> |
| <li>native-audio from android-9 to android-10</li> |
| <li>native-plasma from android-9 to android-10</li> |
| </ul> |
| <blockquote> |
| <p>See <a href="http://b.android.com/20017">b/20017</a></p> |
| </blockquote> |
| <ul> |
| <li>Added new branding for Android executables with a simpler scheme in section |
| .note.android.ident (defined in crtbegin_static/dynamic.o) so that debugging |
| tools can act accordingly.</li> |
| </ul> |
| <blockquote> |
| <p>The structure member and values are defined as follows:</p> |
| </blockquote> |
| <pre><code>static const struct { |
| int32_t namesz; /* = 8, sizeof ("Android") */ |
| int32_t descsz; /* = 1 * sizeof(int32_t) */ |
| int32_t type; /* = 1, ABI_NOTETYPE */ |
| char name[sizeof "Android"]; /* = "Android" */ |
| int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */ |
| } |
| </code></pre> |
| <blockquote> |
| <p>Previous branding in section .note.ABI-tag is deprecated.</p> |
| </blockquote> |
| <ul> |
| <li>Added a new script <code>run-tests-all.sh</code> which calls <code>run-tests.sh</code> and <code>standalone/run.sh</code> |
| with various conditions. Script <code>run-tests.sh</code> w/o --abi is also enhanced to compile |
| most of tests for all supported ABI and run on all attached devices</li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r8b</h1> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed <code>LOCAL_SHORT_COMMANDS</code> issues on darwin-x86 and windows cygwin environment |
| and for static libraries. List file generation is sped up, and it is no longer |
| regenerated and causes whole project to be rebuilt every time.</p> |
| </li> |
| <li> |
| <p>Fixed several issues in ndk-gdb</p> |
| <ul> |
| <li> |
| <p>to pass flags "-e", "-d", "-s" to adb more consistently</p> |
| </li> |
| <li> |
| <p>to accept device serial name containing space</p> |
| </li> |
| <li> |
| <p>to also pull /system/bin/link, so gdb on host can set a breakpoint in |
| __dl_rtld_db_dlactivity and be aware of linker activity (eg. rescan solib symbols |
| when dlopen() is called)</p> |
| </li> |
| </ul> |
| </li> |
| <li> |
| <p>Fixed "ndk-build clean" in windows which failed to remove ./libs/*/lib*.so</p> |
| </li> |
| <li> |
| <p>Fixed ndk-build.cmd to return non-zero ERRORLEVEL when make fails</p> |
| </li> |
| <li> |
| <p>Fixed libc.so to no longer incorrectly export <strong>exidx_start and </strong>exidx_end symbols</p> |
| </li> |
| <li> |
| <p>Fixed SEGV when unwinding stack pasts __libc_init for ARM and MIPS.</p> |
| </li> |
| <li> |
| <p>Fixed __start (in crtbegin_dynamic/static.o) to "call <strong>libc_init" instead of |
| "jump </strong>libc_init", otherwise stack unwinding past <strong>libc_init may get wrong return |
| address and crash the program or do wield things. With "call", return address is pushed |
| on stack and unwinding stops correctly at _start. Note that </strong>libc_init never returns, so |
| this fix wonʼt affect normal program execution. But just in case it "does" return, |
| jump to address 0 and halt.</p> |
| </li> |
| </ul> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>GCC 4.6 toolchain</li> |
| </ul> |
| <p>Add GCC 4.6 toolchain (binutils 2.21 with gold + GDB 7.3.x) to co-exists with |
| the original GCC 4.4.3 toolchain (binutils 2.19 + GDB 6.6). Note:</p> |
| <ul> |
| <li> |
| <p>GCC 4.6 is the default. You may set <code>NDK_TOOLCHAIN_VERSION=4.4.3</code> in Application.mk |
| to select the original one.</p> |
| </li> |
| <li> |
| <p>Gold linker support is only available for ARM and x86 architectures on linux-86 |
| and darwin-x86 hosts. It's not turned on by default. Add |
| "LOCAL_LDFLAGS += <code>-fuse-ld=gold"</code> in Android.mk to enable it.</p> |
| </li> |
| <li> |
| <p>You will need the new GDB to debug program compiled with <code>-fPIE</code> (including |
| binaries in Jelly Bean image)</p> |
| </li> |
| <li> |
| <p>The binutils 2.21 ld also contain back-port of fixes from 2.22</p> |
| </li> |
| <li> |
| <p>Fixed "ld --gc-sections" which incorrectly retain zombie references to external |
| libraries. See <a href="http://sourceware.org/bugzilla/show_bug.cgi?id=13177">http://sourceware.org/bugzilla/show_bug.cgi?id=13177</a> for detail.</p> |
| </li> |
| <li> |
| <p>Fixed ARM "strip" to preserve the original p_align and p_flags in GNU_RELRO section |
| if they are valid. Otherwise program built with <code>-fPIE</code> can't be debugged. |
| <a href="http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.552&r2=1.553">http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.552&r2=1.553</a></p> |
| </li> |
| <li> |
| <p>Sincos optimization is not enabled for compatibility with old platforms which don't have |
| it.</p> |
| </li> |
| <li> |
| <p>NX and relro/bind_now protections are enabled by default</p> |
| </li> |
| </ul> |
| <p>Add "--noexecstack" for assembler and "-z noexecstack" for linker to enable NX |
| protection against buffer overflow attacks by enabling NX bit on stack and heap.</p> |
| <p>Add "-z relro -z now" for linker to harden internal data sections after linking |
| against security vulnerabilities due to memory corruption. See</p> |
| <p><a href="http://www.akkadia.org/drepper/nonselsec.pdf">http://www.akkadia.org/drepper/nonselsec.pdf</a> (section 6) |
| <a href="http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html">http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html</a></p> |
| <p>For those who really needs it, these features can be disabled by |
| 1. Passing "--execstack" to assembler and "-z execstack" to linker to |
| disable NX protection. |
| Passing "-z norelro -z lazy" to linker to disable second protection. |
| 2. In NDK jni/Android.mk, set the following |
| <code>LOCAL_DISABLE_NO_EXECUTE=true:</code> to disable "--noexecstack" and "-z noexecstack" |
| <code>LOCAL_DISABLE_RELRO=true:</code> to disable "-z relro -z now" |
| see <a href="ANDROID-MK.html">ANDROID-MK</a> for details</p> |
| <ul> |
| <li>Brand executables with .note.ABI-tag section</li> |
| </ul> |
| <p>Brand Android executable with .note.ABI-tag (in crtbegin_static/dynamic.o) for debugging |
| tools to act accordingly. The structure member and values are defined as follow.</p> |
| <pre><code>static const struct { |
| int32_t namesz; /* = 4, sizeof ("GNU") */ |
| int32_t descsz; /* = 6 * sizeof(int32_t) */ |
| int32_t type; /* = 1 */ |
| char name[sizeof "GNU"]; /* = "GNU" */ |
| int32_t os; /* = 0 */ |
| int32_t major; /* = 2 */ |
| int32_t minor; /* = 6 */ |
| int32_t teeny; /* = 15 */ |
| int32_t os_variant; /* = 1 */ |
| int32_t android_api; /* = 3, 4, 5, 8, 9, 14 */ |
| } |
| </code></pre> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Backport several patches to fix MIPS issues.</p> |
| </li> |
| <li> |
| <p><a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12637">http://sourceware.org/bugzilla/show_bug.cgi?id=12637</a> |
| mips-linux-gnu: relocation truncated to fit: R_MIPS_TLS_LDM</p> |
| </li> |
| <li> |
| <p><a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12845">http://sourceware.org/bugzilla/show_bug.cgi?id=12845</a> |
| ld segfaults when using --gc-sections</p> |
| </li> |
| <li> |
| <p><a href="http://sourceware.org/ml/binutils/2011-05/msg00198.html">http://sourceware.org/ml/binutils/2011-05/msg00198.html</a> |
| Refix MIPS GOT_PAGE counting</p> |
| </li> |
| <li> |
| <p>Follow warning symbol link in mips_elf_count_got_symbols.</p> |
| </li> |
| <li> |
| <p>Follow warning symbol link in mips_elf_allocate_lazy_stub.</p> |
| </li> |
| <li> |
| <p>Move MIPS .dynamic to the data segment, so that it is writable. |
| Replace hard-coded 4096 with symbols for correct segment sizes for MIPS.</p> |
| </li> |
| <li> |
| <p>Remove <code>-mno-shared</code> as default in MIPS toolchain. <code>-fPIC</code> (or <code>-fpic</code> if supported) |
| is default for Android toolchain. Without explicitly specifying one of |
| <code>-mshared,</code> <code>-fpic,</code> <code>-fPIC,</code> <code>-fpie,</code> or <code>-fPIE,</code> MIPS compiler adds <code>-mno-shared</code> |
| which turns off PIC. Fixed it not to add <code>-mno-shared</code> as default.</p> |
| </li> |
| <li> |
| <p>Fixed wrong package names in samples hello-jni and two-libs so tests project |
| underneath can compile</p> |
| </li> |
| </ul> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p>New binaries locations</p> |
| </li> |
| <li> |
| <p>gdbserver is moved from toolchain/<arch-os-ver>/prebuilt/gdbserver to |
| prebuilt/android-<arch>/gdbserver/gdbserver</p> |
| </li> |
| <li> |
| <p>x86 toolchain prefix is renamed from i686-android-linux- to i686-linux-android-</p> |
| </li> |
| <li> |
| <p>sources/cxx-stl/gnu-libstdc++/include and lib are moved to |
| sources/cxx-stl/gnu-libstdc++/4.4.3 when compiled with 4.4.3 GCC, or |
| sources/cxx-stl/gnu-libstdc++/4.6 when compiled with 4.6 GCC</p> |
| </li> |
| <li> |
| <p>libbfd.a and libintl.a are moved from lib/ to lib32/</p> |
| </li> |
| <li> |
| <p>Header if_dl.h is removed from all platforms and architectures. AF_LINK and sockaddr_dl |
| it describes are specpfic to BSD (ie. don't exist in Linux)</p> |
| </li> |
| <li> |
| <p>Various scripts to rebuild/test NDK toolchain</p> |
| </li> |
| <li> |
| <p>Add <code>build-mingw64-toolchain.sh</code> to generate a new Linux-hosted toolchain that generates |
| Win32 and Win64 executables.</p> |
| </li> |
| <li> |
| <p>Speed up <code>download-toolchain-sources.sh</code> by "clone" but only "checkout" the directories |
| that we need to build the NDK toolchain binaries.</p> |
| </li> |
| <li> |
| <p>New <code>build-host-gcc.sh</code> and <code>build-host-gdb.sh</code></p> |
| </li> |
| <li> |
| <p>Add <code>tests/check-release.sh</code> to check the content of a given NDK installation directory, |
| or an existing NDK package.</p> |
| </li> |
| <li> |
| <p>Rewrite standalone tests: <code>tests/standalone/run.sh</code></p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r8</h1> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed a typo in GAbi++ implementation where result of dynamic_cast<D>(b) |
| of base class object 'b' to derived class D is adjusted wrong |
| (in the opposite direction from base class). See |
| <a href="http://b.android.com/28721">b/28721</a></p> |
| </li> |
| <li> |
| <p>Fixed an issue in <code>make-standalone-toolchain.sh</code> which fails to copy |
| libsupc++.*.</p> |
| </li> |
| </ul> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>Added support for the mips ABI.</li> |
| </ul> |
| <blockquote> |
| <p>This release of the Android NDK contains support for 'mips' ABI. |
| To generate machine runs on MIPS-based Android devices, please add 'mips' to |
| <code>APP_ABI</code> definition in your Application.mk, or 'all' to generate binaries for |
| all currently supported ABI. See <a href="CPU-MIPS.html">CPU-MIPS</a> for details.</p> |
| </blockquote> |
| <ul> |
| <li>You can build a standalone mips toolchain using the |
| --toolchain=mipsel-linux-android-4.4.3 option when calling |
| <code>make-standalone-toolchain.sh</code>. See <a href="STANDALONE-TOOLCHAIN.html">STANDALONE-TOOLCHAIN</a> for more details.</li> |
| </ul> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li>Fixed ndk-build.cmd to ensure that ndk-build.cmd works correctly even if |
| the user has redefined the SHELL environment variable (which can happen under |
| the hood when installing a variety of development tools on Windows)</li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r7c</h1> |
| <p>This release of the NDK includes an important fix for Tegra2-based devices, |
| and a few additional fixes and improvements:</p> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li>Fixed GNU STL armeabi-v7a binaries to not crash on non-NEON devices. |
| The files provided with NDK r7b where not configured properly, resulting |
| in crashes on Tegra2-based devices and others when trying to use certain |
| floating-point functions (e.g., cosf, sinf, expf).</li> |
| </ul> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>Added support for custom output directories through the <code>NDK_OUT</code> |
| environment variable. When defined, this variable is used to store all |
| intermediate generated files, instead of $PROJECT_PATH/obj.</li> |
| </ul> |
| <p>The variable is also recognized by ndk-gdb.</p> |
| <ul> |
| <li>Added support for building modules with hundreds or even thousand of source |
| files by defining <code>LOCAL_SHORT_COMMANDS</code> to true in your Android.mk.</li> |
| </ul> |
| <p>This change forces the NDK build system to put most linker or archiver |
| options into list files, to work-around command-line length limitations |
| (particularly on Windows). See <a href="ANDROID-MK.html">ANDROID-MK</a> for details.</p> |
| <h2>OTHER BUG FIXES:</h2> |
| <ul> |
| <li>Fixed android_getCpuCount() implementation in the cpufeatures helper |
| library. The previous implementation only listed the cores that were |
| active the first time the function was called. This behavior could |
| provide results that were too low on devices that disable and enable |
| cores dynamically.</li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r7b</h1> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Updated <sys/atomics.h> to avoid correctness issues on some multi-core |
| ARM-based devices. Rebuild your unmodified sources with this version of the |
| NDK and this problem should completely be eliminated. For more details, read |
| <a href="ANDROID-ATOMICS.html">ANDROID-ATOMICS</a>.</p> |
| </li> |
| <li> |
| <p>Reverted to binutils 2.19 to try to fix debugging issues that |
| appeared in NDK r7 (which switched to binutils 2.20.1).</p> |
| </li> |
| <li> |
| <p>Fixed ndk-build on 32-bit Linux. A packaging error put a 64-bit version |
| of the 'awk' executable under prebuilt/linux-x86/bin in NDK r7.</p> |
| </li> |
| <li> |
| <p>Fixed native Windows build (ndk-build.cmd). Other build modes were not |
| affected. The fixes include:</p> |
| <ul> |
| <li> |
| <p>Removed an infinite loop / stack overflow bug that happened when trying |
| to call ndk-build.cmd from a directory that was <em>not</em> the top of your |
| project path (e.g. any sub-directory of it).</p> |
| </li> |
| <li> |
| <p>Fixed a problem where the auto-generated dependency files were ignored. |
| This meant that updating a header didn't trigger recompilation of sources |
| that included it.</p> |
| </li> |
| <li> |
| <p>Fixed a problem where special characters in files or paths, other than |
| spaces and quotes, were not correctly handled.</p> |
| </li> |
| </ul> |
| </li> |
| <li> |
| <p>Fixed the standalone toolchain to generate proper binaries when using |
| <code>-lstdc++</code> (i.e. linking against the GNU libstdc++ C++ runtime). You should |
| use <code>-lgnustl_shared</code> if you want to link against the shared library |
| version or <code>-lstdc++</code> for the static version.</p> |
| </li> |
| </ul> |
| <p>See <a href="STANDALONE-TOOLCHAIN.html">STANDALONE-TOOLCHAIN</a> for more details about this fix.</p> |
| <ul> |
| <li> |
| <p>Fixed gnustl_shared on Cygwin. The linker complained that it couldn't find |
| libsupc++.a while the file was at the right location.</p> |
| </li> |
| <li> |
| <p>Fixed cygwin C++ link when not using any specific C++ runtime through |
| <code>APP_STL</code>.</p> |
| </li> |
| </ul> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p>When your application uses the GNU libstdc++ runtime, the compiler will |
| no longer forcibly enable exceptions and RTTI. This change results in smaller |
| code. If you need these features, you need to do either one of these:</p> |
| <p>1/ Enable exceptions and/or RTTI explicitly in your modules or |
| Application.mk. (recommended)</p> |
| <p>2/ Define <code>APP_GNUSTL_FORCE_CPP_FEATURES</code> to 'exceptions', 'rtti' or both |
| in your Application.mk. See docs/APPLICATION-MK.html for more details.</p> |
| </li> |
| <li> |
| <p>ndk-gdb now works properly when your application has private services |
| running in independent processes. It debugs the main application process, |
| instead of the first process listed by 'ps', which is usually a service |
| process.</p> |
| </li> |
| <li> |
| <p>Fixed a rare bug where NDK r7 would fail to honor the <code>LOCAL_ARM_MODE</code> value |
| and always compile certain source files (but not all) to 32-bit instructions.</p> |
| </li> |
| <li> |
| <p>stlport: Refresh the sources to match the Android platform version. This |
| update fixes a few minor bugs:</p> |
| </li> |
| <li> |
| <p>Fixed instantiation of an incomplete type.</p> |
| </li> |
| <li>Fixed minor == versus = typo</li> |
| <li>Use memmove instead of memcpy in string::assign</li> |
| <li>Added better handling of IsNANorINF, IsINF, IsNegNAN, etc..</li> |
| </ul> |
| <p>For complete details, see the commit log.</p> |
| <ul> |
| <li> |
| <p>stlport: Removed 5 un-necessary static initializers from the library.</p> |
| </li> |
| <li> |
| <p>The GNU libstdc++ libraries for armeabi-v7a were mistakenly compiled for |
| armeabi instead. This had no impact on correctness, but using the right |
| ABI should provide for slightly better performance.</p> |
| </li> |
| <li> |
| <p>the 'cpu-features' helper library was updated to report three optional |
| x86 CPU features (SSSE3, MOVBE and POPCNT). See <a href="CPU-FEATURES.html">CPU-FEATURES</a> |
| for more details.</p> |
| </li> |
| <li> |
| <p><a href="NDK-BUILD.html">NDK-BUILD</a> was updated to mention <code>NDK_APPLICATION_MK</code> instead |
| of <code>NDK_APP_APPLICATION_MK</code> to select a custom Application.mk file.</p> |
| </li> |
| <li> |
| <p>cygwin: ndk-build no longer creates an empty "NUL" file in the current |
| directory when invoked.</p> |
| </li> |
| <li> |
| <p>cygwin: better automatic dependency detection. It previously didn't work |
| properly in the following case:</p> |
| <ul> |
| <li>When the cygwin drive prefix was not /cygdrive</li> |
| <li>When using drive-less mounts, e.g. when Cygwin would translate /home |
| to \server\subdir instead of C:\Some\Dir.</li> |
| </ul> |
| </li> |
| <li> |
| <p>cygwin: ndk-build does not try to use the native Windows tools under |
| $NDK/prebuilt/windows/bin with certain versions of Cygwin and/or |
| GNU Make.</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r7</h1> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li> |
| <p>New official NDK APIs for Android 4.0 (a.k.a. API level 14), |
| which adds the following native features to the platform:</p> |
| <ul> |
| <li> |
| <p>Native multimedia API based on the Khronos Group OpenMAX AL™ |
| 1.0.1 Standard. New headers <OMXAL/OpenMAXAL.h> and |
| <OMXAL/OpenMAXAL_Android.h> are provided to allow |
| applications targeting this API level to perform multimedia output |
| directly from native code using a new Android-specific buffer |
| queue interface. For more details, see docs/openmaxal/index.html |
| and <a href="http://www.khronos.org/openmax/.">http://www.khronos.org/openmax/.</a></p> |
| </li> |
| <li> |
| <p>Updated the native audio API based on the Khronos Group OpenSL ES |
| 1.0.1™ Standard. API Level 14 can now decode compressed |
| audio (e.g. MP3, AAC, Vorbis) to PCM. For more details, see |
| docs/opensles/index.html and <a href="http://www.khronos.org/opensles/.">http://www.khronos.org/opensles/.</a></p> |
| </li> |
| </ul> |
| </li> |
| <li> |
| <p>CCache support. To speed up large rebuilds, simply define the <code>NDK_CCACHE</code> |
| environment variable to 'ccache' (or the path to your ccache binary), as in:</p> |
| <pre><code>export NDK_CCACHE=ccache |
| </code></pre> |
| </li> |
| </ul> |
| <p>The NDK build system will automatically use it when compiling any source |
| file. For more information about CCache, see <a href="http://ccache.samba.org">http://ccache.samba.org</a><br /> |
| </p> |
| <ul> |
| <li>You can now set your <code>APP_ABI</code> to 'all' to indicate that you want to build |
| your NDK modules for all the ABIs supported by your given NDK release.</li> |
| </ul> |
| <p>This means that either one of these two lines in your Application.mk are |
| equivalent with this release:</p> |
| <pre><code> APP_ABI := all |
| APP_ABI := armeabi armeabi-v7a x86 |
| </code></pre> |
| <p>This also works if you define <code>APP_ABI</code> on the command-line, as in:</p> |
| <pre><code> ndk-build APP_ABI=all |
| </code></pre> |
| <p>Which is a quick way to check that your project builds for all supported |
| ABIs without changing its Application.mk file.</p> |
| <ul> |
| <li>Shorter paths to source and object files used in build commands. |
| When invoking $NDK/ndk-build from your project path, the paths to the |
| source, object and binary files passed to the build commands will be |
| significantly shorter now because they are now passed relative to the |
| current directory.</li> |
| </ul> |
| <p>This is useful when building projects with a lot of source files, to |
| avoid limits on the maximum command line length supported by your host |
| operating system.</p> |
| <p>The behaviour is unchanged if you invoked ndk-build from a sub-directory |
| of your project tree, or if you define <code>NDK_PROJECT_PATH</code> to point to a |
| specific directory.</p> |
| <ul> |
| <li>New <code>LOCAL_CPP_FEATURES</code> variable in Android.mk, used to declare which C++ |
| features (RTTI or Exceptions) your module uses. This is especially handy |
| if you have prebuilt modules that depend on them since this will ensure |
| the final link will work correctly.</li> |
| </ul> |
| <p>See <a href="ANDROID-MK.html">ANDROID-MK</a> and <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a> for more details</p> |
| <ul> |
| <li> |
| <p>WARNING: VERY EXPERIMENTAL!!</p> |
| <p>You can now build your NDK sources on Windows <em>without</em> Cygwin. |
| Simply call the script 'ndk-build.cmd' from the Windows cmd.exe |
| command-line, when in your project path.</p> |
| <p>The script takes exactly the same arguments than the original |
| ndk-build one.</p> |
| <p>Note that the Windows NDK package comes with its own prebuilt |
| binaries for GNU Make, Awk and other tools required by the build, |
| i.e. you shouldn't need to install anything else to get a working |
| build system.</p> |
| <p>IMPORTANT: ndk-gdb doesn't work. You still need Cygwin to debug |
| at the moment!</p> |
| <p>This feature is still very experimental, but feel free to try it |
| and report issues on the public forum (android-ndk@googlegroups.com) |
| or the public bug database (http://b.android.com).</p> |
| <p>Note that all samples and unit tests successfully compile with it.</p> |
| </li> |
| </ul> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li>Imported shared libraries are now installed by default to the target |
| installation location (i.e. libs/%lt;abi%gt;) if <code>APP_MODULES</code> is not |
| defined in your Application.mk.</li> |
| </ul> |
| <p>This means that if a top-level module "foo" imports a module "bar", then |
| both libfoo.so and libbar.so will be copied to the install location.</p> |
| <p>Previously, only libfoo.so was, unless you listed 'bar' in your <code>APP_MODULES</code> |
| too.</p> |
| <p>If you define <code>APP_MODULES</code> explicitly, the behaviour is unchanged.</p> |
| <ul> |
| <li> |
| <p>Static library imports are now properly transitive. If top-level module |
| 'foo' imports static library 'bar' which imports static library 'zoo', |
| the libfoo.so will now be linked against both libbar.a and libzoo.a.</p> |
| </li> |
| <li> |
| <p>ndk-gdb now works correctly for activities with multiple categories |
| in their MAIN intent filters.</p> |
| </li> |
| </ul> |
| <h2>OTHER CHANGES:</h2> |
| <ul> |
| <li> |
| <p><a href="STABLE-APIS.html">STABLE-APIS</a>: Added missing documentation listing EGL |
| as a supported stable API, starting from API level 9.</p> |
| </li> |
| <li> |
| <p>Add a new C++ support runtime named "gabi++". More details about it |
| are available in the updated <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a>.</p> |
| </li> |
| <li> |
| <p>The STLport C++ runtimes now support RTTI (no exceptions yet though).</p> |
| </li> |
| <li> |
| <p>Add a new C++ support runtime named "gnustl_shared" corresponding to the |
| shared library version of GNU libstdc++ v3 (GPLv3 license). See more |
| info at <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a></p> |
| </li> |
| <li> |
| <p>You can now list several file extensions in <code>LOCAL_CPP_EXTENSION</code>. As in:</p> |
| <pre><code>LOCAL_CPP_EXTENSION := .cpp .cxx |
| </code></pre> |
| </li> |
| </ul> |
| <p>To compile both foo.cpp and bar.cxx as C++ sources.</p> |
| <ul> |
| <li>Refreshed the EGL and OpenGLES Khronos headers to support more extensions. |
| Note that this does <em>not</em> change the NDK ABIs for the corresponding |
| libraries, since each extension must be probed at runtime by the client |
| application.</li> |
| </ul> |
| <p>Which extensions are available depends on your actual device (and GPU |
| drivers), not the version of the platform it provides.</p> |
| <p>The header changes simply add new constants and types to make it easier |
| to use the extensions why they have been probed with eglGetProcAddress() or |
| glGetProcAddress(). Here is the list of newly supported extensions:</p> |
| <pre><code>GLES 1.x |
| -------- |
| GL_OES_vertex_array_object |
| GL_OES_EGL_image_external |
| GL_APPLE_texture_2D_limited_npot |
| GL_EXT_blend_minmax |
| GL_EXT_discard_framebuffer |
| GL_EXT_multi_draw_arrays |
| GL_EXT_read_format_bgra |
| GL_EXT_texture_filter_anisotropic |
| GL_EXT_texture_format_BGRA8888 |
| GL_EXT_texture_lod_bias |
| GL_IMG_read_format |
| GL_IMG_texture_compression_pvrtc |
| GL_IMG_texture_env_enhanced_fixed_function |
| GL_IMG_user_clip_plane |
| GL_IMG_multisampled_render_to_texture |
| GL_NV_fence |
| GL_QCOM_driver_control |
| GL_QCOM_extended_get |
| GL_QCOM_extended_get2 |
| GL_QCOM_perfmon_global_mode |
| GL_QCOM_writeonly_rendering |
| GL_QCOM_tiled_rendering |
| |
| GLES 2.0 |
| -------- |
| GL_OES_element_index_uint |
| GL_OES_get_program_binary |
| GL_OES_mapbuffer |
| GL_OES_packed_depth_stencil |
| GL_OES_texture_3D |
| GL_OES_texture_float |
| GL_OES_texture_float_linear |
| GL_OES_texture_half_float_linear |
| GL_OES_texture_npot |
| GL_OES_vertex_array_object |
| GL_OES_EGL_image_external |
| GL_AMD_program_binary_Z400 |
| GL_EXT_blend_minmax |
| GL_EXT_discard_framebuffer |
| GL_EXT_multi_draw_arrays |
| GL_EXT_read_format_bgra |
| GL_EXT_texture_format_BGRA8888 |
| GL_EXT_texture_compression_dxt1 |
| GL_IMG_program_binary |
| GL_IMG_read_format |
| GL_IMG_shader_binary |
| GL_IMG_texture_compression_pvrtc |
| GL_IMG_multisampled_render_to_texture |
| GL_NV_coverage_sample |
| GL_NV_depth_nonlinear |
| GL_QCOM_extended_get |
| GL_QCOM_extended_get2 |
| GL_QCOM_writeonly_rendering |
| GL_QCOM_tiled_rendering |
| |
| EGL: |
| ---- |
| EGL_ANDROID_recordable |
| EGL_NV_system_time |
| </code></pre> |
| <ul> |
| <li> |
| <p>docs/NATIVE-ACTIVITY.HTML: Fixed typo, the minimum API level |
| should be 9, not 8 for native activities.</p> |
| </li> |
| <li> |
| <p>removed many unwanted exported symbols from the link-time shared |
| system libraries provided by the NDK. This ensures that code generated |
| with the standalone toolchain doesn't risk to accidentally depend |
| on a non-stable ABI symbol (e.g. any libgcc.a symbol that changes |
| each time the toolchain used to build the platform is changed).</p> |
| </li> |
| <li> |
| <p><code>download-toolchain-sources.sh</code>: Script was updated to download the toolchain |
| sources from android.googlesource.com, the new location for AOSP servers.</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r6b</h1> |
| <p>This is a bug-fix release for NDK r6, no new features are provided.</p> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed the multi-architecture build, i.e. when using <code>APP_ABI="armeabi</code> x86"</p> |
| </li> |
| <li> |
| <p>Fixed location of prebuilt STLport binaries in the NDK release package. |
| (A bug in the packaging script placed them in the wrong location).</p> |
| </li> |
| <li> |
| <p>Fixed atexit() usage in shared libraries with the x86 standalone toolchain.</p> |
| </li> |
| <li> |
| <p>Fixed <code>make-standalone-toolchain.sh</code> --arch=x86 (it failed to copy the |
| proper GNU libstdc++ binaries to the right location).</p> |
| </li> |
| <li> |
| <p>Fixed standalone toolchain linker warnings about missing definition and |
| size for '__dso_handle' symbol (arm only).</p> |
| </li> |
| <li> |
| <p>Fixed the inclusion order of $(SYSROOT)/usr/include for x86 builds, |
| see <a href="http://b.android.com/18540">b/18540</a></p> |
| </li> |
| <li> |
| <p>Fixed the definitions of ptrdiff_t and size_t in x86-specific system |
| when used with the x86 standalone toolchain.</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r6</h1> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>Official support for the x86 ABI.</li> |
| </ul> |
| <p>This release of the Android NDK now provides support for the 'x86' ABI. |
| This allows you to generate machine code that runs on future x86-based |
| Android devices.</p> |
| <p>Note that by default, code is still generated for ARM-based devices. |
| You can however add 'x86' to your <code>APP_PLATFORM</code> definition in your |
| Application.mk. For example, the following line instructs ndk-build |
| to build your code for three distinct ABIs:</p> |
| <pre><code>`APP_ABI` := armeabi armeabi-v7a x86 |
| </code></pre> |
| <p>Unless you rely on ARM-based assembly sources, you shouldn't need to touch |
| your Android.mk files to build x86 machine code.</p> |
| <p>For all details regarding x86 support, please read the new documentation |
| file named <a href="CPU-X86.html">CPU-X86</a>.</p> |
| <p>Don't hesitate to file NDK bugs related to x86 at <a href="http://b.android.com">http://b.android.com</a></p> |
| <ul> |
| <li> |
| <p>You can build a standalone x86 toolchain using the --toolchain=x86-4.4.3 |
| option when calling <code>make-standalone-toolchain.sh</code>. See |
| <a href="STANDALONE-TOOLCHAIN.html">STANDALONE-TOOLCHAIN</a> for more details.</p> |
| </li> |
| <li> |
| <p>The new 'ndk-stack' tool can be used to translate stack traces |
| (as reported by adb logcat in case of crash in native code) into |
| something more readable, i.e. containing function / source file / |
| line number information corresponding to each stack frame.</p> |
| </li> |
| </ul> |
| <p>For more information and usage example, see the new documentation |
| file <a href="NDK-STACK.html">NDK-STACK</a></p> |
| <h2>OTHER FIXES & CHANGES:</h2> |
| <ul> |
| <li> |
| <p>The arm-eabi-4.4.0, which had been deprecated since NDK r5, has been |
| finally removed from the NDK distribution.</p> |
| </li> |
| <li> |
| <p>Support a project.properties file in the application's directory |
| instead of default.properties. This is in preparation for future SDK Tools |
| changes.</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r5c</h1> |
| <p>This release fixes a few bugs in r5b. There are no new features.</p> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fixed a typo that prevented <code>LOCAL_WHOLE_STATIC_LIBRARIES</code> to work correctly |
| with the new toolchain. Also properly document this variable in |
| <a href="ANDROID-MK.html">ANDROID-MK</a>.</p> |
| </li> |
| <li> |
| <p>Fixed a bug where code linked against gnustl_static would crash when run |
| on Android platform releases older than 2.2.</p> |
| </li> |
| <li> |
| <p><android/input.h>: Two functions in this header file, introduced |
| by API level 9 (a.k.a. 2.3) were incorrect and have been fixed. While |
| this breaks the source API, the binary interface to the system is |
| unchanged.</p> |
| </li> |
| </ul> |
| <p>The functions missing a third 'history_index' parameter. They correct |
| definition is now:</p> |
| <pre><code> float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, |
| size_t pointer_index, |
| size_t history_index); |
| |
| float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, |
| size_t pointer_index, |
| size_t history_index); |
| </code></pre> |
| <ul> |
| <li> |
| <p>Updated the android-9 C library arm binary to correctly expose at link time |
| new functions that were added to it in Gingerbread (e.g. pthread_rwlock_init).</p> |
| </li> |
| <li> |
| <p>Fixed a bug that made gdbserver crash on misc. Honeycomb devices (e.g. |
| the Motorola Xoom).</p> |
| </li> |
| </ul> |
| <h2>OTHER FIXES & CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Object files are now always linked in the order they appear in |
| <code>LOCAL_SRC_FILES</code>. This was not the case previously because the files |
| were grouped by source extensions instead.</p> |
| </li> |
| <li> |
| <p><code>download-toolchain-sources.sh</code>: Fixed a silly bug that prevented the |
| --git-date option to work properly when downloading the master branch.</p> |
| </li> |
| <li> |
| <p>Fix an issue where a module could import itself, resulting in an infinite |
| loop in GNU Make.</p> |
| </li> |
| <li> |
| <p>When import-module fails, it now prints the list of directories |
| that were searched. This is useful to check that the <code>NDK_MODULE_PATH</code> |
| definition used by the build system is correct.</p> |
| </li> |
| <li> |
| <p>When import-module succeeds, it now prints the directory where the module |
| was found to the log (visible with <code>NDK_LOG=1).</code></p> |
| </li> |
| <li> |
| <p><pthread.h>: Fixed the definition of PTHREAD_RWLOCK_INITIALIZER for |
| android-9 API level and higher.</p> |
| </li> |
| <li> |
| <p>Fixed a bug where <code>LOCAL_ARM_NEON</code> was defined to true would make the build |
| fail (typo in build/core/build-binary.mk)</p> |
| </li> |
| <li> |
| <p>Fixed a bug that prevented the compilation of .s assembly files |
| (.S files were ok).</p> |
| </li> |
| <li> |
| <p>Speed-up the build of debuggable applications when there is a very |
| large number of include directories in a project.</p> |
| </li> |
| <li> |
| <p>ndk-gdb: Better detection of 'adb shell' failures (improves error messages).</p> |
| </li> |
| <li> |
| <p>ndk-build: Fix a rare bug that appeared when trying to perform parallel |
| builds of debuggable projects.</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r5b</h1> |
| <p>This release fixes a few bugs in r5. There are no new features.</p> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fix a compiler bug in the arm-linux-androideabi-4.4.3 toolchain. |
| The previous binary generated invalid thumb instruction sequences when |
| dealing with signed chars. This problem was first reported on the |
| android-ndk forum and fixed by the following change in the toolchain |
| sources:</p> |
| <pre><code>https://review.source.android.com/#change,19474 |
| </code></pre> |
| </li> |
| <li> |
| <p><a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a>: Add missing documentation for the |
| "gnustl_static" value for <code>APP_STL</code>, that allows you to link against |
| a static library version of GNU libstdc++.</p> |
| </li> |
| <li> |
| <p>ndk-build: Fix a bug that created inconsistent dependency files when a |
| compilation error occurred on Windows, preventing building properly after |
| the error was fixed in the source code.</p> |
| </li> |
| <li> |
| <p>ndk-build: Fix a Cygwin-specific bug where using very short paths for |
| the Android NDK installation or the project path could lead to the |
| generation of invalid dependency files, making incremental builds |
| impossible.</p> |
| </li> |
| <li> |
| <p>Fix a typo that prevented the cpufeatures library to work correctly |
| with the new NDK toolchain.</p> |
| </li> |
| <li> |
| <p>Linux toolchain binaries now run on Ubuntu 8.04 or higher. |
| More specifically, the r5 binaries did require GLibc 2.11 on the host |
| system, and refused to run with previous releases due to an ABI mismatch |
| in the GNU C Library. The r5b binaries are generated with a special |
| toolchain that instead targets GLibc 2.7 or higher.</p> |
| </li> |
| <li> |
| <p>GNU libstdc++ will not crash anymore when printing floating-point values |
| through i/o streams.</p> |
| </li> |
| </ul> |
| <p>OTHER FIXES & CHANGES:</p> |
| <ul> |
| <li>ndk-build: Speed-up the Cygwin build by avoiding calling "cygpath <code>-m"</code> |
| from GNU Make for each and every source or object file. This was a problem |
| for users with very large source trees.</li> |
| </ul> |
| <p>In case this doesn't work properly, define <code>NDK_USE_CYGPATH=1</code> in your |
| environment to use 'cygpath <code>-m'</code> as usual.</p> |
| <p>Also, if 'cygpath' is not in your path, completely ignore it |
| (seems to be enough to run the NDK under MSys).</p> |
| <ul> |
| <li> |
| <p>ndk-build: Handle installation paths containing spaces when checking |
| cygwin installation. Before that, the script complained that the user |
| was using an incorrect version of GNU Make (even if he had the right one).</p> |
| </li> |
| <li> |
| <p>Fixed a typo that prevented several <code>NDK_MODULE_PATH</code> to work properly when |
| it contained multiple directories separated with ":"</p> |
| </li> |
| <li> |
| <p><code>prebuilt-common.sh</code>: Make the script check the compiler directly for 64-bit |
| generated machine code, instead of relying on the host tag. That should |
| allow the 32-bit toolchain to rebuild properly on Snow Leopard.</p> |
| </li> |
| <li> |
| <p><code>prebuilt-common.sh</code>: Fix the toolchain rebuild scripts to work when |
| using a 32-bit host toolchain.</p> |
| </li> |
| <li> |
| <p><netinet/in.h>: Add missing declaration for INET_ADDRSTRLEN</p> |
| </li> |
| <li> |
| <p><netinet/in6.h>: Add missing declaration for IN6_IS_ADDR_MC_NODELOCAL |
| and IN6_IS_ADDR_MC_GLOBAL.</p> |
| </li> |
| <li> |
| <p><asm/byteorder.>: Replaced 'asm' with '<strong>asm</strong>' to allow compilation |
| with <code>-std=c99.</code> See <a href="https://review.source.android.com/#change,20076">https://review.source.android.com/#change,20076</a></p> |
| </li> |
| <li> |
| <p>standalone toolchain: The <code>-fpic</code> flag is now the default for the |
| arm-linux-androideabi toolchain, instead of <code>-fPIC.</code> This avoids a performance |
| degradation when compared to the old android-eabi configuration.</p> |
| </li> |
| </ul> |
| <p>This only affects users of the standalone toolchain. The NDK build script |
| always enforced <code>-fpic</code> implicitly.</p> |
| <hr /> |
| <h1>android-ndk-r5</h1> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Allow dlclose() to properly call static C++ destructors when unloading |
| a shared library. This requires changes in both the C library and the |
| build system. IMPORTANT: This feature is only available for API level 9.</p> |
| </li> |
| <li> |
| <p>Fix packaging error for system libraries of level 5 and 8. The libraries |
| bundled with the NDK and used at link time were not the correct version, |
| and this prevented linking against certain symbols appropriately.</p> |
| </li> |
| <li> |
| <p>ndk-gdb: do not start activity unless --start or --launch is used. |
| (the documentation was correct, the implementation wrong)</p> |
| </li> |
| <li> |
| <p>The system headers for all API levels have been cleaned up and will |
| not provide the declarations of functions that are not available in |
| the corresponding system libraries.</p> |
| </li> |
| </ul> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Support for API level 9, (a.k.a. Android 2.3) which adds the following |
| native features to the platform:</p> |
| <ul> |
| <li> |
| <p>Native audio API based on the Khronos Group OpenSL ES™ 1.0.1 Standard. |
| New headers <SLES/OpenSLES.h> and <SLES/OpenSLES_Android.h> |
| are provided to allow applications targeting this API level to perform |
| audio input, output and processing directly from native code.</p> |
| </li> |
| <li> |
| <p>Native activity support, i.e. the ability to build applications that |
| are coded entirely in C or C++. More precisely, such applications still |
| run inside a VM, and will have to access most of the platform's features |
| using JNI (i.e. native code calling VM methods). However, this also |
| comes with a series of headers and libraries to implement the following |
| directly from native code:</p> |
| <ul> |
| <li>activity lifecycle management.</li> |
| <li>user input handling (touch, keyboard, trackball, ...).</li> |
| <li>window management (including accessing the pixel buffer).</li> |
| <li>sensor listeners (e.g. accelerometer, compass, ...).</li> |
| <li>hardware configuration management.</li> |
| <li>easily reading assets out of an APK from native code.</li> |
| <li>access to the storage manager, a new feature of Android X.X |
| that allows one to provide Opaque Binary Objects containing |
| large amounts of data outside of the APK.</li> |
| </ul> |
| </li> |
| </ul> |
| <p>See the documentation in <a href="STABLE-APIS.html">STABLE-APIS</a> for more details.</p> |
| <p>Note that most of these new features are targeted at game developers.</p> |
| </li> |
| <li> |
| <p>Improved gdbserver binary to allow debugging <em>threaded</em> programs properly |
| with ndk-gdb (the previous binary could only set breakpoints on the main |
| thread).</p> |
| </li> |
| </ul> |
| <p>IMPORTANT: THIS ONLY WORKS IF YOU RUN ON ANDROID 2.3 OR HIGHER.</p> |
| <p>The root cause of the problem is a platform bug that was only fixed in |
| 2.3. If you try to debug on a previous platform, the gdbserver binary |
| will only be able to set breakpoints on the main thread.</p> |
| <p>For more information, see the specific section in <a href="NDK-GDB.html">NDK-GDB</a>.</p> |
| <ul> |
| <li> |
| <p>Easier debuggable builds: just invoke ndk-build while defining the |
| <code>NDK_DEBUG</code> variable to 1, as in:</p> |
| <p>$NDK/ndk-build <code>NDK_DEBUG=1</code></p> |
| </li> |
| </ul> |
| <p>This will have the same result that setting the android:debuggable="true" |
| in the <application> element of your AndroidManifest.xml file. See the |
| file <a href="NDK-BUILD.html">NDK-BUILD</a> for more details.</p> |
| <p>Note that you will need to use the SDKr8 build tools to use this feature |
| properly!</p> |
| <ul> |
| <li> |
| <p>Refresh of system C++ headers:</p> |
| <ul> |
| <li> |
| <p>Headers have been moved out of the platform directory hierarchy. |
| This is to prevent conflicts with other STLs like STLport or the |
| GNU libstdc++ which provide their own version of the headers, but |
| does not affect your builds.</p> |
| </li> |
| <li> |
| <p>The list of headers has grown to include the following:</p> |
| <pre><code>cassert, cctype, cerrno, cfloat, climits, cmath, |
| csetjmp, csignal, cstddef, cstdint, cstdio, cstdlib, |
| cstring, ctime, cwchar, new, typeinfo, utility |
| </code></pre> |
| </li> |
| </ul> |
| <p>Note that they still correspond to our minimal C++ runtime, no new feature |
| was introduced here.</p> |
| </li> |
| <li> |
| <p>Support for C++ exceptions and RTTI. See <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a> for |
| all details (and limitations).</p> |
| </li> |
| <li> |
| <p>STLport implementation: Add sources and prebuilt binaries for a port of |
| the STLport C++ Standard Library (www.stlport.org), and an easy way to use |
| it at build time by defining <code>APP_STL</code> in your Application.mk. See |
| <a href="APPLICATION-MK.html">APPLICATION-MK</a> and <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a> for all details.</p> |
| </li> |
| <li> |
| <p>GNU libstdc++ implementation: Available as a static library that you can |
| select for your application through <code>APP_STL</code>. See <a href="CPLUSPLUS-SUPPORT.html">CPLUSPLUS-SUPPORT</a> |
| for all details.</p> |
| </li> |
| <li> |
| <p>Add support for prebuilt libraries with the PREBUILT_SHARED_LIBRARY and |
| PREBUILT_STATIC_LIBRARIES build scripts. See the new documentation |
| file named <a href="PREBUILTS.html">PREBUILTS</a> for explanations and usage examples.</p> |
| </li> |
| <li> |
| <p>Support for module exports: A module can now define a set of compiler or |
| linker flags that will be automatically 'imported' by any other module that |
| depends on it, through <code>LOCAL_STATIC_LIBRARIES</code> or <code>LOCAL_SHARED_LIBRARIES</code>.</p> |
| </li> |
| </ul> |
| <p>This is achieved with the help of new Android.mk variables named |
| <code>LOCAL_EXPORT_CFLAGS</code>, <code>LOCAL_EXPORT_CPPFLAGS</code>, <code>LOCAL_EXPORT_C_INCLUDES</code> and |
| <code>LOCAL_EXPORT_LDLIBS</code>. See <a href="ANDROID-MK.html">ANDROID-MK</a> for mode documentation, and |
| a 'samples/module-exports' for a sample project that uses this.</p> |
| <ul> |
| <li> |
| <p>Add support to specify a different file name for generated files, through |
| the new <code>LOCAL_MODULE_FILENAME</code> variable. See <a href="ANDROID-MK.html">ANDROID-MK</a> for an |
| example.</p> |
| </li> |
| <li> |
| <p>Add support for module imports, through the <code>NDK_MODULE_PATH</code> environment |
| variable and the new 'import-module' function. This allows you to avoid |
| hard-coding the path of third-party modules into your project files.</p> |
| </li> |
| </ul> |
| <p>See <a href="IMPORT-MODULE.html">IMPORT-MODULE</a> for details.</p> |
| <ul> |
| <li> |
| <p>Add the content of <code>LOCAL_C_INCLUDES</code> to gdb.setup to make native debugging |
| easier. Also fixes an issue that prevented clean parallel builds of |
| debuggable applications to work correctly. This fixes an error message that |
| said:</p> |
| <p>/bin/sh: <project>/libs/armeabi/gdb.setup: No such file or directory</p> |
| </li> |
| </ul> |
| <p>When doing a "ndk-build <code>-j<number>",</code> with <number> bigger than 1.</p> |
| <ul> |
| <li> |
| <p>Add support for assembly-level source filtering. See the description of |
| <code>LOCAL_FILTER_ASM</code> in <a href="ANDROID-MK.html">ANDROID-MK</a> for more details. This can be useful |
| for certain kinds of obfuscation tasks.</p> |
| </li> |
| <li> |
| <p>This NDK comes with a new toolchain (named arm-linux-androideabi-4.4.3) |
| which provides many benefits, including:</p> |
| <ul> |
| <li>Better code generation than the previous one (gcc-4.4.0)</li> |
| <li>On Windows, the binaries do not depend on Cygwin anymore.</li> |
| <li>The ability to use it as a stand-alone cross-compiler |
| (see <a href="STANDALONE-TOOLCHAIN.html">STANDALONE-TOOLCHAIN</a> for all details).</li> |
| </ul> |
| </li> |
| </ul> |
| <p>The binaries for gcc-4.4.0 are still provided for backwards compatibility. |
| Use <code>NDK_TOOLCHAIN=arm-eabi-4.4.0</code> in your environment to force its usage. |
| Note that it is now deprecated and will be removed in a future NDK release.</p> |
| <p>IMPORTANT: The old toolchain doesn't properly support exceptions, RTTI, |
| STLport and GNU libstdc++.</p> |
| <p>The binaries for the already-deprecated gcc-4.2.1 have been removed.</p> |
| <ul> |
| <li>The 'cpufeatures' library has been updated to provide better architecture |
| and features detection (including a work-around for buggy ARMv6 kernels |
| which report an architecture version of 7).</li> |
| </ul> |
| <p>The library is now also available as an import module, to simplify its |
| usage in your build scripts. See the updated <a href="CPU-FEATURES.html">CPU-FEATURES</a> file |
| for details.</p> |
| <p>NOTE: Please update your Android.mk to use module imports as soon as |
| possible. The location $NDK/source/cpufeatures/ is deprecated |
| and will be removed in a future NDK release. Avoid referencing |
| it directly in your build scripts!</p> |
| <h2>OTHER FIXES AND CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Reduced the size of generated binaries by using --strip-unneeded |
| instead of --strip-debug. This gets rid of mor symbol table entries |
| in release shared libraries and executables, without impacting |
| runtime execution.</p> |
| </li> |
| <li> |
| <p>Fix bad automatic dependency tracking when using multiple source |
| sub-directories.</p> |
| </li> |
| <li> |
| <p>The path to system headers is now included last in the compilation command |
| line. This prevents conflicts with source code that define their own headers |
| with similar names (e.g. a custom "err.h" was ignored, because the system |
| <err.h> was used instead).</p> |
| </li> |
| <li> |
| <p>Update documentation for 'my-dir' function to explain that, due to the |
| way GNU Make works, it really returns the path of the last included |
| Makefile (instead of the current one). Also provide examples on how |
| to deal with it.</p> |
| </li> |
| <li> |
| <p><code>make-release.sh</code>: Now has an --out-dir=<path> option to specify the |
| output directory where the packages are going to be copied. Also |
| ensure that generated packages have go+r permissions.</p> |
| </li> |
| <li> |
| <p>ndk-build will now properly escape arguments. This means that something |
| like this:</p> |
| <p>ndk-build <code>MY_CFLAGS="-DFOO</code> <code>-DBAR"</code></p> |
| </li> |
| </ul> |
| <p>will now work correctly.</p> |
| <ul> |
| <li> |
| <p>Add --git-http option to <code>download-toolchain-sources.sh</code> and |
| <code>rebuild-all-prebuilt.sh</code> in order to download sources from |
| android.git.kernel.org through HTTP.</p> |
| </li> |
| <li> |
| <p>ndk-gdb: properly launch activities for which name does not contain any dot.</p> |
| </li> |
| <li> |
| <p>ndk-gdb: add --delay=<timeout> option to specify a delay in seconds |
| between activity launch and gdbserver attach. This is needed because certain |
| activities can take a long time to properly launch. The default delay is |
| also increased to 2 seconds (instead of 1).</p> |
| </li> |
| <li> |
| <p><code>build/tools/build-gcc.sh</code>: copy the sysroot to the build directory. This |
| avoids the generated toolchain binaries from hard-coding host build paths.</p> |
| </li> |
| <li> |
| <p>Platform files are now under $NDK/platforms instead of $NDK/build/platforms</p> |
| </li> |
| <li> |
| <p>Toolchain files are now under $NDK/toolchains instead of |
| $NDK/build/toolchains and $NDK/build/prebuilt.</p> |
| </li> |
| <li> |
| <p>Release and debug objects are stored under two different directories now |
| (i.e. obj/local/<abi>/objs and obj/local/<abi>/objs-debug). This |
| prevents rebuilding <em>everything</em> when you switch between these two modes, |
| which can be a real time-saver for complex projects.</p> |
| </li> |
| <li> |
| <p>Fixed a bug that duplicated the <code>LOCAL_LDFLAGS</code> in the final link command |
| when <code>LOCAL_ALLOW_UNDEFINED_SYMBOLS</code> was not set to 'true'</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-r4b</h1> |
| <p>This release fixes a few bugs in r4 scripts. There are no new features.</p> |
| <h2>OTHER FIXES & CHANGES:</h2> |
| <ul> |
| <li> |
| <p><code>build/tools/rebuild-all-prebuilt.sh</code>: mktemp expects 'XXXXXX' instead of 'XXX'. |
| Fix the script (and others in the same directory) to do that properly.</p> |
| </li> |
| <li> |
| <p>ndk-gdb: check the target device's API level, and dump an error message if |
| it is not at least 8 (Android 2.2 a.k.a. Froyo). Fix script to properly |
| remove control characters like '\r' from adb shell's output. Also fix |
| script to work properly with OS X's BSD awk.</p> |
| </li> |
| <li> |
| <p>ndk-build: Make AndroidManifest.xml optional. Now the build scripts will try |
| to look for jni/Android.mk if no manifest is found. If you don't use this, |
| you can also define <code>NDK_PROJECT_PATH</code> to point to your tree.</p> |
| </li> |
| </ul> |
| <p>Also, on Windows, check that a Cygwin-compatible make executable is being |
| used, and dump a readable help message to solve the issue if this is not |
| the case.</p> |
| <ul> |
| <li> |
| <p>Place generated binaries under $PROJECT_PATH/obj/ instead of |
| $PROJECT_PATH/bin/ndk/. The 'bin' directory is sometimes cleaned |
| by the JDT, resulting in the inability to properly load symbol versions |
| of the shared libraries when running ndk-gdb.</p> |
| </li> |
| <li> |
| <p>Warn when sources with unsupported extensions are used in <code>LOCAL_SRC_FILES</code>. |
| Previous behaviour was to silently ignore them.</p> |
| </li> |
| <li> |
| <p>Set the optimization mode to 'debug' automatically if the manifest sets |
| android:debuggable to 'true'. You can override this by using |
| 'APP_OPTIM := release' in your Application.mk, or by adding '-O2' to |
| your <code>LOCAL_CFLAGS</code>.</p> |
| </li> |
| </ul> |
| <p>Note that even in release mode, the NDK build scripts will produce |
| binaries with symbols under obj/local/<abi>/ that will be used for |
| debugging with gdb. However, the debugger will have a harder time to |
| print proper local variable values that have been optimized out or |
| even set breakpoints properly.</p> |
| <hr /> |
| <h1>android-ndk-r4</h1> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li>The <fenv.h> header was not placed in the correct location and could not |
| be found by normal builds.</li> |
| </ul> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li> |
| <p>On Windows, Cygwin 1.7 or higher is now required. The NDK will not |
| work properly with Cygwin 1.5 which is now officially obsolete |
| anyway.</p> |
| </li> |
| <li> |
| <p>Simplified build system: You no longer need to run <code>build/host-setup.sh</code> |
| or modify anything under $NDK_ROOT/apps/. Instead, just invoke the |
| new 'ndk-build' script from your application's project directory, or |
| one of its sub-directories.</p> |
| </li> |
| </ul> |
| <p>See <a href="OVERVIEW.html">OVERVIEW</a> and <a href="NDK-BUILD.html">NDK-BUILD</a> for more details.</p> |
| <p>NOTE: For compatibility purpose, you can still define projects |
| through $NDK_ROOT/apps/<name> though.</p> |
| <pre><code> However, not that sample applications have moved from |
| 'apps/<name>/project' to 'samples/<name>' and now must |
| be built with 'ndk-build'. The source code of pre-existing |
| samples didn't change though. |
| </code></pre> |
| <ul> |
| <li> |
| <p>Easy native debugging support when running debuggable applications |
| on Android 2.2 or higher, through the new 'ndk-gdb' helper script. |
| See <a href="NDK-GDB.html">NDK-GDB</a> for details.</p> |
| </li> |
| <li> |
| <p>Support for hardware FPU. This is through the new 'armeabi-v7a' ABI |
| corresponding to ARMv7-a class devices.</p> |
| </li> |
| </ul> |
| <p>Note that by default, the NDK will still generate machine code for the old |
| 'armeabi' ABI (ARMv5TE based) which is supported by all official Android |
| system images to date.</p> |
| <p>You will need to define <code>APP_ABI</code> in your Application.mk file to change this. |
| See <a href="APPLICATION-MK.html">APPLICATION-MK</a></p> |
| <p>More details about ABIs is now available in <a href="CPU-ARCH-ABIS.html">CPU-ARCH-ABIS</a></p> |
| <ul> |
| <li>A small static library named 'cpufeatures' is provided with source code |
| and can be used at runtime to determine the CPU features supported by the |
| target device. It should run on all Android platforms, starting from 1.5.</li> |
| </ul> |
| <p>For more information, see <a href="CPU-FEATURES.html">CPU-FEATURES</a></p> |
| <ul> |
| <li>Support for the optional ARM Advanced SIMD (a.k.a. NEON) instruction set |
| extension through the use the <code>LOCAL_ARM_NEON</code> variable in Android.mk, or |
| the '.neon' suffix when listing source files.</li> |
| </ul> |
| <p>Neon is an <em>optional</em> instruction set extension, and not all Android ARMv7 |
| devices will support it. You will need to use the 'cpufeatures' library to |
| determine if such code can be used at runtime, and provide alternate code |
| paths if this is not the case. This is similar to MMX/SSE/3DNow on x86 |
| platforms.</p> |
| <p>For more information, see <a href="CPU-ARM-NEON.html">CPU-ARM-NEON</a></p> |
| <ul> |
| <li> |
| <p>Added a new sample (hello-neon) to demonstrate usage of 'cpufeatures' |
| and NEON intrinsics and build support.</p> |
| </li> |
| <li> |
| <p>Added <android/bitmap.h>, a new stable API available from android-8 |
| (a.k.a. Android 2.2) to reliably access the pixel buffer of an |
| android.graphics.Bitmap object from native code. See <a href="STABLE-API.html">STABLE-API</a> |
| and the new sample program under 'samples/bitmap-plasma' for details |
| and usage example.</p> |
| </li> |
| <li> |
| <p>Support the NX (No Execute) security feature, where special sections |
| are added to the generated shared libraries to instruct the kernel |
| that code shall not be executed from the heap and stack by default.</p> |
| </li> |
| </ul> |
| <p>See <a href="ANDROID-MK.html">ANDROID-MK</a> to see how to disable this, plus reference |
| links for more information.</p> |
| <h2>OTHER FIXES AND CHANGES:</h2> |
| <ul> |
| <li> |
| <p>support the .s extension for raw assembly sources (.S is already supported |
| but the input files are parsed by the C-preprocessor before being sent to |
| the assembler).</p> |
| </li> |
| <li> |
| <p><code>build/host-setup.sh</code> has been removed. There is no need for a 'setup' step |
| when using the NDK for the first time. All host-specific autodetection and |
| basic tool sanity checking have been moved to the build scripts themselves.</p> |
| </li> |
| <li> |
| <p><code>APP_MODULES</code> in Application.mk is now optional. If not defined, the NDK |
| will simply build <em>all</em> the modules that are declared from your Android.mk.</p> |
| </li> |
| </ul> |
| <p>You can still use <code>APP_MODULES</code> to restrict the set of modules you want to |
| build. Note that the NDK now computes the transitive dependencies of these |
| modules for you now. See <a href="APPLICATION-MK.html">APPLICATION-MK</a> for details.</p> |
| <ul> |
| <li> |
| <p><a href="STABLE-APIS.html">STABLE-APIS</a>: Add missing section for Dynamic Linker Library |
| (libdl.so). It is actually supported by all API levels.</p> |
| </li> |
| <li> |
| <p><code>build/tools/download-toolchain-sources.sh</code>: Use 'master' branch by default |
| instead of the 'eclair' one.</p> |
| </li> |
| <li> |
| <p><code>build-toolchain.sh</code>: Allow ad-hoc patching of toolchain sources when rebuilding |
| them. This is primarily to ease development. All you need to do is put a patch |
| under build/tools/toolchain-patches/<foo>/<name>.patch, and it will be applied |
| with 'patch <code>-p1'</code> into the <foo> directory of the unpacked toolchain sources |
| before the configure step.</p> |
| </li> |
| <li> |
| <p><a href="CPU-ARCH-ABIS.html">CPU-ARCH-ABIS</a>: Mention the experimental 'x86' ABI.</p> |
| </li> |
| <li> |
| <p><code>build/core/mkdeps.sh</code>: Removed obsolete script.</p> |
| </li> |
| <li> |
| <p>the NDK build script now only parses the Application.mk and Android.mk of |
| the applications listed by APP. The error messages when APP is empty or |
| malformed have also been improved.</p> |
| </li> |
| <li> |
| <p>removed the annoying 'the mangling of 'va_list' has changed in GCC 4.4' |
| warning when building with GCC 4.4.0 for ARM.</p> |
| </li> |
| <li> |
| <p>C Library header fixes:</p> |
| <p>For all platforms:</p> |
| <pre><code>- <arpa/inet.h>: no longer includes <netinet/in6.h>. |
| - <ctype.h>: better inlining with -ansi option. |
| - <mntent.h>: add missing include for <stdio.h>. |
| - <netinet/in.h>: include <netinet/in6.h> and define in6addr_any + |
| in6addr_loopback. |
| - <netinet/in6.h>: add IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, |
| IN6ADDR_ANY_INIT, ipv6mr_interface. |
| - <sys/epoll.h>: add missing C++ inclusion guards. |
| - <sys/resource.h>: add missing rlim_t declaration. |
| - <sys/system_properties.h>: add missing C++ inclusion guards. |
| - <time64.h>: add missing C++ inclusion guards. |
| - <netdb.h>: move h_errno declaration inside C++ inclusion guards. |
| </code></pre> |
| </li> |
| <li> |
| <p>C Library changes:</p> |
| <p>For android-8 (a.k.a. Android 2.2):</p> |
| <pre><code>- <dlfcn.h>: add DL_info and dladdr(). |
| - <err.h>: add err(), warn() and other variants. |
| - <regex.h>, <fts.h>, <sys/queue.h>: added |
| - <pthread.h>: add pthread_condattr_t |
| - <sched.h>: added proper clone() declaration (and implementation). |
| - <signal.h>: added killpg(). |
| - <stdio.h>: add fdprintf() and vfdprintf(). |
| - <stdlib.h>: fix ptsname_r() signature in declaration. previous |
| implementation was broken anyway. |
| - <unistd.h>: add getusershell(), setusershell(), endusershell(), |
| ttyname(), ttyname_r(), TEMP_FAILURE_RETRY. Fix usleep() signature |
| (now returns int). |
| - <wchar.h>: add fake mbstowcs() and wcstombs(). |
| </code></pre> |
| </li> |
| </ul> |
| <p>More details available under docs/system/libc/CHANGES.html</p> |
| <hr /> |
| <h1>android-ndk-r3</h1> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li> |
| <p>Fix <code>build/host-setup.sh</code> to execute as a Bourne shell script (again)</p> |
| </li> |
| <li> |
| <p>Make target shared libraries portable to systems that don't use the exact |
| same toolchain. This is needed due to differences in libgcc.a implementations |
| between gcc 4.2.1 and 4.4.0. This change ensures that generated machine |
| code doesn't depend on helper functions provided by the Android platform |
| runtime.</p> |
| </li> |
| </ul> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>GCC 4.4.0 is now used by default by the NDK. It generates better code than |
| GCC 4.2.1, which was used in previous releases. However, the compiler's C++ |
| frontend is also a lot more pedantic regarding certain template constructs |
| and will even refuse to build some of them.</li> |
| </ul> |
| <p>For this reason, the NDK also comes with GCC 4.2.1 prebuilt binaries, and |
| you can force its usage by defining <code>NDK_TOOLCHAIN</code> in your environment to |
| the value 'arm-eabi-4.2.1'. For example:</p> |
| <pre><code> export NDK_TOOLCHAIN=arm-eabi-4.2.1 |
| make APP=hello-jni |
| </code></pre> |
| <p>Note that only the 'armeabi' ABI is supported by the 4.2.1 toolchain. We |
| recommend switching to 4.2.1 <em>only</em> if you encounter compilation problems |
| with 4.4.0.</p> |
| <p>The 4.2.1 prebuilt binaries will probably be removed from a future release |
| of the Android NDK, we thus <em>strongly</em> invite you to fix your code if such |
| problems happen.</p> |
| <ul> |
| <li>Support for OpenGL ES 2.0. This is through the new 'android-5' platform to |
| reflect Android 2.0 (previously the Eclair branch). This is merely a copy |
| of android-4 that also includes headers and libraries for OpenGL ES 2.0.</li> |
| </ul> |
| <p>See the sample named "hello-gl2" for a <em>very</em> basic demonstration. Note that |
| OpenGL ES 2.0 is currently <em>not</em> available from Java, and must be used |
| through native code exclusively.</p> |
| <p>IMPORTANT: OpenGL ES 2.0 is not supported in the Android emulator at this |
| time. Running/testing any native code that depends on it thus |
| requires a real device.</p> |
| <ul> |
| <li> |
| <p>The NDK build script will now remove installed binaries from the application |
| project's path before starting the build. This ensures that:</p> |
| </li> |
| <li> |
| <p>if the build fails for some reason, a stale/obsolete file is not left in |
| your application project tree by mistake.</p> |
| </li> |
| <li> |
| <p>if you change the target ABI, a stale/obsolete file is not left into the |
| folder corresponding to the old ABI.</p> |
| </li> |
| <li> |
| <p>Updated the <a href="STABLE-APIS.html">STABLE-APIS</a> document to clarify the OpenGL ES 1.0/1.1/2.0 |
| issues regarding specific devices (i.e. 1.0 supported everywhere, 1.1 and |
| 2.0 on specific devices only, need for <uses-feature> tag in manifest).</p> |
| </li> |
| </ul> |
| <h2>OTHER FIXES AND CHANGES:</h2> |
| <ul> |
| <li> |
| <p>Actually use the awk version detected by <code>host-setup.sh</code> during the build.</p> |
| </li> |
| <li> |
| <p>Only allow undefined symbols when <code>LOCAL_ALLOW_UNDEFINED_SYMBOLS</code> is set |
| to 'true', just like the documentation says it works. Also fix a typo |
| in CLEAR_VARS that prevented this variable from being cleared properly.</p> |
| </li> |
| <li> |
| <p>Simplified <code>build/tools/make-release.sh</code>, the --prebuilt-dir option is |
| gone, and --help will dump a clearer description of expected options |
| and input files.</p> |
| </li> |
| <li> |
| <p>Added --prebuilt-ndk=FILE option to <code>build/tools/make-release.sh</code> script to |
| package a new experimental NDK package archive from the current source tree |
| plus the toolchain binaries of an existing NDK release package. E.g.:</p> |
| <p><code>build/tools/make-release.sh</code> \ |
| --prebuilt-ndk=/path/to/android-ndk-1.6_r1-linux-x86.zip</p> |
| </li> |
| </ul> |
| <p>will generate a new NDK package in /tmp/ndk-release that contains the most |
| up-to-date build scripts, plus the toolchain binaries from 1.6_r1 (which |
| are not in the git repository).</p> |
| <p>Also added the --no-git option to collect all sources from the current |
| NDK root directory, instead of the list given by 'git ls-files'. This can |
| be useful if you don't want to checkout the whole 'platform/development' |
| project from repo and still work on the NDK.</p> |
| <p>This change is to help people easily package experimental NDK releases to |
| test and distribute fixes and improvements.</p> |
| <ul> |
| <li> |
| <p>Remove bash-isms from <code>build/tools/build-toolchain.sh</code>. Now it's possible to |
| build it with the 'dash' shell on Debian-based systems (tested on Ubuntu 8.04)</p> |
| </li> |
| <li> |
| <p>Remove bash-ism from <code>build/tools/build-ndk-sysroot.sh</code></p> |
| </li> |
| <li> |
| <p>Refresh C library headers for all platforms:</p> |
| <ul> |
| <li>make <endian.h> simply include <sys/endian.h></li> |
| <li>make <stdint.h> properly declare 64-bit integer types with a C99 compiler</li> |
| <li>add missing <sys/types.h> to <strings.h></li> |
| <li>add GLibc-compatible macro aliases (st_atimensec, st_mtimensec and |
| st_ctimensec) to <stat.h></li> |
| <li>add missing declaration for tzset() in <time.h></li> |
| </ul> |
| </li> |
| <li> |
| <p>Added <code>build/tools/download-toolchain-sources.sh</code>, a script that allows you |
| to download the toolchain sources from the official open-source repository |
| at android.git.kernel.org and nicely package them into a tarball that can |
| later be used by <code>build/tools/build-toolchain.sh</code> to rebuild the prebuilt |
| binaries for your system.</p> |
| </li> |
| <li> |
| <p>Updated <code>build/tools/build-toolchain.sh</code> to support the tarballs generated |
| by <code>download-toolchain-sources.sh</code> with the --package=<file> option. This |
| also builds both gcc 4.2.1 and 4.4.0, adding support for armeabi-v7a to |
| gcc 4.4.0.</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-1.6_r1</h1> |
| <h2>IMPORTANT BUG FIXES:</h2> |
| <ul> |
| <li>Fix <code>build/host-setup.sh</code> to:</li> |
| <li>execute as a Bourne shell script</li> |
| <li>remove unused host gcc dependency</li> |
| <li>improve Windows host auto-detection</li> |
| <li>add GNU Make version check</li> |
| <li>add Nawk/Gawk check</li> |
| <li>ensure that the script is run from $NDKROOT as <code>build/host-setup.sh</code></li> |
| <li> |
| <p>add --help, --verbose, --no-awk-check and --no-make-check options</p> |
| </li> |
| <li> |
| <p>Properly add sysroot library search path at build time. This makes a line |
| in Android.mk like:</p> |
| <p><code>LOCAL_LDLIBS</code> := <code>-lz</code></p> |
| </li> |
| </ul> |
| <p>Actually work correctly, instead of having the linker complaining that it |
| could not find the corresponding libz.so library. Also clear <code>LOCAL_LDLIBS</code> |
| in $(CLEAR_VARS) script.</p> |
| <h2>IMPORTANT CHANGES:</h2> |
| <ul> |
| <li>The 'sources' directory is gone. The NDK build system now looks for |
| $(APP_PROJECT_PATH)/jni/Android.mk by default. You can override this with |
| the new <code>APP_BUILD_SCRIPT</code> variable in Application.mk</li> |
| </ul> |
| <p>For example, the 'hello-jni' sample uses the following files:</p> |
| <pre><code>apps/hello-jni/project/jni/Android.mk |
| apps/hello-jni/project/jni/hello-jni.c |
| </code></pre> |
| <p>The 'apps/<name>' directory is still needed in this release though.</p> |
| <ul> |
| <li> |
| <p>Change <code>LOCAL_CFLAGS</code> / <code>LOCAL_CPPFLAGS</code> to work as in the full Android build |
| system. This means that:</p> |
| <ul> |
| <li><code>LOCAL_CFLAGS</code> is now used for <em>both</em> C and C++ sources (was only for C)</li> |
| <li><code>LOCAL_CPPFLAGS</code> is now used for C++ sources only (was for both C and C++)</li> |
| <li><code>LOCAL_CXXFLAGS</code> is used like <code>LOCAL_CPPFLAGS</code> but is considered obsolete. |
| (will disappear in next release)</li> |
| </ul> |
| </li> |
| </ul> |
| <p>Also fixed <code>APP_CPPFLAGS</code> / <code>APP_CFLAGS</code> / <code>APP_CXXFLAGS</code> correspondingly.</p> |
| <ul> |
| <li>Rename build/platforms/android-1.5 to build/platforms/android-3 to match |
| the Android API level instead of the marketing speak.</li> |
| </ul> |
| <p>Also add a new build/platforms/android-4, and make the build system select |
| which platform to use based on the content of the project file named |
| $(APP_PROJECT_PATH)/default.properties.</p> |
| <ul> |
| <li>Add OpenGL ES 1.x headers and libraries to the android-4 stable APIs. |
| (NOTE: they are <em>not</em> available for android-3)</li> |
| </ul> |
| <p>Also provide a small port of the "San Angeles Observation" demo to show |
| how to make a simple Android application that uses them.</p> |
| <h2>OTHER FIXES AND CHANGES</h2> |
| <ul> |
| <li>Ensure that the <code>__ANDROID__</code> macro is always defined when building code |
| with the NDK. Normally, the macro must be defined by the toolchain |
| automatically to indicate that you're targeting the Android runtime.</li> |
| </ul> |
| <p>This works for the new arm-linux-androideabi toolchain, but there is |
| a bug in the way we built the arm-eabi one, so add the flag manually |
| through the NDK build script for it.</p> |
| <p>Note that the ANDROID macro, is now deprecated. While it is still defined |
| by the NDK, you should modify your code to test against <code>__ANDROID__</code> instead!</p> |
| <ul> |
| <li> |
| <p>Generate thumb binaries by default.</p> |
| </li> |
| <li> |
| <p>Add support for <code>LOCAL_ARM_MODE</code> in Android.mk.</p> |
| </li> |
| <li> |
| <p>Add support for the '.arm' suffix in source file names to force the |
| compilation of a single source in ARM (32-bit) mode.</p> |
| </li> |
| <li> |
| <p>Generate proper unoptimized versions of binaries when <code>APP_OPTIM</code> := debug</p> |
| </li> |
| <li> |
| <p>Add support for <code>LOCAL_C_INCLUDES</code> in Android.mk</p> |
| </li> |
| <li> |
| <p>Fix compilation of assembler files (e.g. foo.S)</p> |
| </li> |
| </ul> |
| <hr /> |
| <h1>android-ndk-1.5_r1 released.</h1> |