From 0cdefe09695651e4a56dd980219710af8e1039a3 Mon Sep 17 00:00:00 2001 From: David Friedman Date: Tue, 18 Feb 2014 22:08:05 -0800 Subject: [PATCH] NDK r9d: Incorporates all review comments, final file sizes. Staged at: http://boku.mtv:8195/tools/sdk/ndk/index.html Change-Id: Ie33eed770c029af8a20385b5bd6c05fdc9bea750 --- docs/html/tools/sdk/ndk/index.jd | 340 +++++++++++++++++++++++++++++++++------ 1 file changed, 288 insertions(+), 52 deletions(-) diff --git a/docs/html/tools/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd index 4e50d9833d3a..a22dc9039b2a 100644 --- a/docs/html/tools/sdk/ndk/index.jd +++ b/docs/html/tools/sdk/ndk/index.jd @@ -2,33 +2,33 @@ ndk=true page.template=sdk -ndk.mac64_download=android-ndk-r9c-darwin-x86_64.tar.bz2 -ndk.mac64_bytes=358350393 -ndk.mac64_checksum=154bc0248671b8609037218d3faa47f5 +ndk.mac64_download=android-ndk-r9d-darwin-x86_64.tar.bz2 +ndk.mac64_bytes=400339614 +ndk.mac64_checksum=c914164b1231c574dbe40debef7048be -ndk.mac32_download=android-ndk-r9c-darwin-x86.tar.bz2 -ndk.mac32_bytes=352900444 -ndk.mac32_checksum=0ba391eb12d4eed6bd7dbff5d8804e0f +ndk.mac32_download=android-ndk-r9d-darwin-x86.tar.bz2 +ndk.mac32_bytes=393866116 +ndk.mac32_checksum=ee6544bd8093c79ea08c2e3a6ffe3573 -ndk.linux64_download=android-ndk-r9c-linux-x86_64.tar.bz2 -ndk.linux64_bytes=371254928 -ndk.linux64_checksum=e9c3fd9881c811753bb57f701b3e05b1 +ndk.linux64_download=android-ndk-r9d-linux-x86_64.tar.bz2 +ndk.linux64_bytes=412879983 +ndk.linux64_checksum=c7c775ab3342965408d20fd18e71aa45 -ndk.linux32_download=android-ndk-r9c-linux-x86.tar.bz2 -ndk.linux32_bytes=365412557 -ndk.linux32_checksum=93d2aa9a40501b568037642cdb174643 +ndk.linux32_download=android-ndk-r9d-linux-x86.tar.bz2 +ndk.linux32_bytes=405218267 +ndk.linux32_checksum=6c1d7d99f55f0c17ecbcf81ba0eb201f -ndk.win64_download=android-ndk-r9c-windows-x86_64.zip -ndk.win64_bytes=483804820 -ndk.win64_checksum=9e84d0d59ce7d4a24370b619fb8799e4 +ndk.win64_download=android-ndk-r9d-windows-x86_64.zip +ndk.win64_bytes=520997454 +ndk.win64_checksum=8cd244fc799d0e6e59d65a59a8692588 -ndk.win32_download=android-ndk-r9c-windows-x86.zip -ndk.win32_bytes=460676475 -ndk.win32_checksum=863b5ab371b63c3e9bf0d39e47903763 +ndk.win32_download=android-ndk-r9d-windows-x86.zip +ndk.win32_bytes=491440074 +ndk.win32_checksum=b16516b611841a075685a10c59d6d7a2 -ndk.debug_info_download=android-ndk-r9c-cxx-stl-libs-with-debugging-info.zip -ndk.debug_info_bytes=100364569 -ndk.debug_info_checksum=37911716e1fd2fe3abb8a410750d73e6 +ndk.debug_info_download=android-ndk-r9d-cxx-stl-libs-with-debug-info.zip +ndk.debug_info_bytes=104947363 +ndk.debug_info_checksum=906c8d88e0f02295c3bfe6b8e98a1a35 page.title=Android NDK @@ -272,6 +272,192 @@ $('#Downloads').after($('#download-table'));

Android NDK, Revision 9d (March 2014) +

+
+
+
Important changes:
+
+
    +
  • Added support for the Clang 3.4 compiler. The +NDK_TOOLCHAIN_VERSION=clang option now picks Clang 3.4. GCC 4.6 is +still the default compiler.
  • +
  • Added APP_ABI=armeabi-v7a-hard, with +additional multilib option -mfloat-abi=hard. These options are for +use with ARM GCC 4.6/4.8 and clang 3.3/3.4 (which use 4.8's assembler, linker, +and libs). When using these options, note the following changes:
  • +
      +
    • When executing the ndk-build script, add the +following options for armeabi-v7a target: +
      TARGET_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
      +TARGET_LDFLAGS += -Wl,--no-warn-mismatch -lm_hard
      +The built library is copied to libs/armeabi-v7a. For make to +behave as expected, you cannot specify both armeabi-v7a and +armeabi-v7a-hard as make targets (i.e., on the APP_ABI= line). +Doing so causes one of them to be ignored. Note that APP_ABI=all +is still equivalent to +armeabi armeabi-v7a x86 mips.
    • +
    • The make-standalone-toolchain.sh script copies +additional libaries under /hard directories. + Add the above CFLAGS and LFLAGS to your +makefile to enable GCC or Clang to link with + libraries in /hard.
    • +
    +
  • Added the yasm assembler, as well as LOCAL_ASMFLAGS +and EXPORT_ASMFLAGS flags for x86 +targets. The ndk-build script uses +prebuilts/*/bin/yasm* to build LOCAL_SRC_FILES that +have the .asm extension.
  • +
  • Updated MClinker to 2.6.0, which adds -gc-sections +support.
  • +
  • Added experimental libc++ support (upstream r201101). Use this new +feature by following these steps: +
      +
    • Add APP_STL := c++_static or APP_STL := +c++_shared in Application.mk. + You may rebuild from source via LIBCXX_FORCE_REBUILD := +true
    • +
    • Execute make-standalone-toolchain.sh --stl=libc++ +to create a standalone toolchain with libc++ headers/lib.
    • +
    + For more information, see +CPLUSPLUS-SUPPORT.html. +(Issue 36496)
  • +
+
+
+
Important bug fixes:
+
+
    +
  • Fixed an uncaught throw from an unexpected +exception handler for GCC 4.6/4.8 ARM EABI. (GCC Issue 59392)
  • +
  • Fixed GCC 4.8 so that it now correctly resolves partial +specialization of a template with + a dependent, non-type template argument. (GCC Issue 59052)
  • +
  • Added more modules to prebuilt python (Issue 59902): +
      +
    • Mac OS X: zlib, bz2, +_curses, _curses_panel, _hashlib, +_ssl
    • +
    • Linux: zlib, nis, +crypt, _curses, and _curses_panel
    • +
    +
  • Fixed the x86 and MIPS gdbserver +event_getmsg_helper.
  • +
  • Fixed numerous issues in the RenderScript NDK toolchain, including +issues with compatibility across older devices and C++ reflection.
  • +
    +
+
+ +
Other bug fixes:
+
+
    +
  • Header fixes: +
      +
    • Fixed a missing #include <sys/types.h> in +android/asset_manager.h for Android API level 13 and higher. + (Issue 64988)
    • +
    • Fixed a missing #include in +android/rect_manager.h for Android API level 14 and higher.
    • +
    • Added JNICALL to JNI_OnLoad and +JNI_OnUnload in jni.h. Note that JNICALL + is defined as __NDK_FPABI__ For more information, see +sys/cdefs.h.
    • +
    • Updated the following headers so that they can be included +without the need to +manually include their dependencies (Issue 64679):
    • +
      +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
      +
      +
    • Added sys/cachectl.h for all architectures. MIPS +developers can now include this header instead of writing #ifdef +__mips__.
    • +
    • Fixed platforms/android-18/include/android/input.h + by adding __NDK_FPABI__ to functions taking or returning +float or double values.
    • +
    • Fixed MIPS struct stat, which was incorrectly set +to its 64-bit counterpart for Android API level 12 and later. This wrong +setting was a +regression introduced in release r9c.
    • +
    • Defined __PTHREAD_MUTEX_INIT_VALUE, +__PTHREAD_RECURSIVE_MUTEX_INIT_VALUE, + and __PTHREAD_ERRORCHECK_MUTEX_INIT_VALUE for Android API +level 9 and lower.
    • +
    • Added scalbln, scalblnf, and +scalblnl to x86 libm.so for APIs 18 and later.
    • +
    • Fixed a typo in +sources/android/support/include/iconv.h. + (Issue 63806)
    • + +
    +
  • +
  • Fixed gabi++ std::unexpected() to call +std::terminate() so that + a user-defined std::terminate() handler has a chance to run. +
  • +
  • Fixed gabi++ to catch std::nullptr.
  • +
  • Fixed samples Teapot and MoreTeapots: +
      +
    • Solved a problem with Tegra 2 and 3 chips by changing specular +variables to use medium precision. Values for specular power can now be less +than 1.0.
    • +
    • Changed the samples so that pressing the volume button restores +immersive mode and invalidates +SYSTEM_UI_FLAG_IMMERSIVE_STICKY. Screen rotation does not +trigger onSystemUiVisibilityChange, and so does not restore +immersive mode.
    • +
    +
  • +
  • Fixed the ndk-build script to add +-rpath-link=$SYSROOT/usr/lib and +-rpath-link=$TARGET_OUT in order to use ld.bfd to +link executables. (Issue 64266)
  • +
  • Removed -Bsymbolic from all STL builds.
  • +
  • Fixed ndk-gdb-py.cmd by setting SHELL as +an environment variable +instead of passing it to + python.exe, which ignores the setting. + (Issue 63054)
  • +
  • Fixed the make-standalone-toolchain.sh script so that +the --stl=stlport option copies the gabi++ headers instead of +symlinking them; the cmd.exe and MinGW shells do not understand +symlinks created by cygwin.
  • +
+
+ +
Other changes:
+
+
    +
  • Applied execution permissions to all *cmd scripts +previously intended for use only in the cmd.exe shell, in case +developers prefer to use ndk-build.cmd in cygwin instead of the +recommended ndk-build script.
  • +
  • Improved the speed of the make-standalone-toolchain.sh +script by moving instead of copying if the specified destination directory does +not exist.
  • +
+ +
+
+ + +
+

+ Android NDK, Revision 9c (December 2013)

@@ -280,11 +466,22 @@ $('#Downloads').after($('#download-table'));
Important bug fixes:
    -
  • Fixed a problem with GCC 4.8 ARM, in which the stack pointer is restored too early. This problem prevented the frame pointer from reliably accessing a variable in the stack frame. For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854.
  • -
  • - Fixed a problem with GCC 4.8 libstdc++, in which a bug in std::nth_element was causing generation of code that produced a random segfault. For more information, see https://code.google.com/p/android/issues/detail?id=62910.
  • -
  • Fixed GCC 4.8 ICE in cc1/cc1plus with -fuse-ld=mcld, so that the following error no longer occurs: -
    cc1: internal compiler error: in common_handle_option, at opts.c:1774
  • -
  • Fixed -mhard-float support for __builtin math functions. For ongoing information on fixes for -mhard-float with STL, please follow http://b.android.com/61784.
  • +
  • Fixed a problem with GCC 4.8 ARM, in which the stack pointer is +restored too early. This problem prevented the frame pointer from reliably +accessing a variable in the stack frame. (GCC Issue 58854)
  • +
  • Fixed a problem with GCC 4.8 libstdc++, in which a bug in +std::nth_element was causing generation of code that produced a random +segfault. (Issue 62910)
  • +
  • Fixed GCC 4.8 ICE in cc1/cc1plus with +-fuse-ld=mcld, so that the following error no longer occurs: +
    cc1: internal compiler error: in common_handle_option, at
    +opts.c:1774
  • +
  • Fixed -mhard-float support for +__builtin math functions. For ongoing information on fixes for +-mhard-float with STL, please follow Issue 61784.
@@ -293,33 +490,55 @@ $('#Downloads').after($('#download-table'));
  • Header fixes:
      -
    • Changed prototype of poll to poll(struct pollfd *, nfds_t, int); in poll.h.
    • -
    • Added utimensat to libc.so in API levels 12 and 19. It is now present in levels 12-19.
    • -
    • Introduced futimens into libc.so, as of API level 19.
    • -
    • Added missing clock_settime() and clock_nanosleep() to time.h for API 8 and higher.
    • -
    • 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.
    • +
    • Changed prototype of poll to poll(struct +pollfd *, nfds_t, int); in poll.h.
    • +
    • Added utimensat to libc.so for Android +API levels 12 and 19. These libraries are now included for all Android API +levels 12 through 19.
    • +
    • Introduced futimens into libc.so, for Android API +level 19.
    • +
    • Added missing clock_settime() and +clock_nanosleep() to time.h for Android API level 8 +and higher.
    • +
    • 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.
  • -
  • Refactored samples Teapot, MoreTeapots, and source/android/ndk_helper as follows: +
  • In samples Teapot, MoreTeapots, and +source/android/ndk_helper:
      -
    • They now use a hard-float abi for armeabi-v7a.
    • -
    • Android-19 now has immersive mode.
    • -
    • Fixed a problem with Check_ReleaseStringUTFChars in /system/lib/libdvm.so that was causing crashes on x86 devices.
    • +
    • Changed them so that they now use a hard-float abi for armeabi-v7a.
    • +
    • Updated them to use immersive mode on Android API level 19 and +higher.
    • +
    • Fixed a problem with Check_ReleaseStringUTFChars in +/system/lib/libdvm.so that was causing crashes on x86 devices.
  • -
  • Fixed ndk-build fails that happen in cygwin when the NDK package is referenced via symlink.
  • -
  • Fixed ndk-build.cmd fails that happen in windows cmd.exe when LOCAL_SRC_FILES contains absolute paths. See https://android-review.googlesource.com/#/c/69992.
  • -
  • Fixed ndk-stack to proceed even when it can't parse a frame due to inability to find a routine, filename, or line number. In any of those cases, it prints "??".
  • -
  • Fixed ndk-stack windows-x64_64 so that it no longer erroneously matches a frame line with a line in the stack: - section that doesn't contain pc, eip, or ip. For example: -
    I/DEBUG   ( 1151):     #00  5f09db68  401f01c4  /system/lib/libc.so
  • +
  • Fixed ndk-build fails that happen in cygwin when the NDK +package is +referenced via symlink.
  • +
  • Fixed ndk-build.cmd fails that happen in windows +cmd.exe when +LOCAL_SRC_FILES contains absolute paths. (Issue 69992)
  • +
  • Fixed the ndk-stack script to proceed even when it can't parse +a frame due to inability to find a routine, filename, or line number. In any of +these cases, it prints ??.
  • +
  • Fixed the ndk-stack stack for windows-x64_64 targets so that +it no longer erroneously matches a frame line with a line in the +stack: section that doesn't contain pc, +eip, or ip. For example: +
    I/DEBUG   ( 1151):     #00  5f09db68  401f01c4
    +/system/lib/libc.so
  • Fixed gabi++ so that it:
    • Does not use malloc() to allocate C++ thread-local objects.
    • -
    • Avoids deadlocks in gabi++ in cases where libc.debug.malloc is non-zero in - userdebug/eng Android platform builds.
    • +
    • Avoids deadlocks in gabi++ in cases where libc.debug.malloc is +non-zero in userdebug/eng Android platform builds.
@@ -328,12 +547,29 @@ $('#Downloads').after($('#download-table'));
  • Added LOCAL_EXPORT_LDFLAGS.
  • -
  • Introduced the NDK_PROJECT_PATH=null setting for use in an integrated build system where options are explicitly passed to ndk-build. With this setting, ndk-build makes no attempt to look for NDK_PROJECT_PATH. This setting also prevents variables from deriving default settings from NDK_PROJECT_PATH. As a result, the following variables must now be explicitly specified (with their default values if such exist): NDK_OUT, NDK_LIBS_OUT, APP_BUILD_SCRIPT, NDK_DEBUG (optional, default to 0), and other APP_*'s contained in Application.mk.
  • -
  • APP_ABI can now be enumerated in a comma-delimited list. For example: +
  • Introduced the NDK_PROJECT_PATH=null setting for use in an +integrated build system where options are explicitly passed to +ndk-build. With this setting, ndk-build makes no +attempt to look for NDK_PROJECT_PATH. This setting also prevents +variables from deriving default settings from NDK_PROJECT_PATH. As a result, +the following variables must now be explicitly specified (with their default +values if such exist): NDK_OUT, NDK_LIBS_OUT, APP_BUILD_SCRIPT, +NDK_DEBUG (optional, default to 0), and other APP_*'s +contained in Application.mk.
  • +
  • APP_ABI can now be enumerated in a comma-delimited list. For +example:
    APP_ABI := "armeabi,armeabi-v7a"
  • -
  • Provided the ability (option -g) to rebuild all of STL with debugging info in an optional, separate package called android-ndk-r9c-cxx-stl-libs-with-debugging-info.zip. This option helps ndk-stack to provide better a stack dump across STL. This change should not affect the code/size of the final, stripped file.
  • -
  • Enhanced hello-jni samples to report APP_ABI at compilation.
  • -
  • Used the ar tool in Deterministic mode (option -D) to build static libraries. For more information, see http://b.android.com/60705.
  • +
  • Provided the ability to rebuild all of STL with debugging info in an +optional, separate package called +android-ndk-r9c-cxx-stl-libs-with-debugging-info.zip, using the +-g option. This option +helps the ndk-stack script provide better a stack dump across STL. +This change should not affect the code/size of the final, stripped file.
  • +
  • Enhanced hello-jni samples to report APP_ABI at +compilation.
  • +
  • Used the ar tool in Deterministic mode (option +-D) to build static libraries. (Issue 60705)
@@ -360,7 +596,7 @@ $('#Downloads').after($('#download-table')); (Issues 47150, 58528, and 38423) -
  • Added support for API level 19, including Renderscript binding.
  • +
  • Added support for Android API level 19, including Renderscript binding.
  • Added support for -mhard-float in the existing armeabi-v7a ABI. For more information and current restrictions on Clang, see {@code tests/device/hard-float/jni/Android.mk}.
  • @@ -2392,8 +2628,8 @@ float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, dealing with signed chars.
  • Adds missing documentation for the "gnustl_static" value for APP_STL, that allows you to link against - a static library version of GNU libstdc++.
  • -
  • The following ndk-build issues are fixed: + a static library version of GNU libstdc++.
  • the +
  • Fixed the following ndk-build issues:
    • A bug that created inconsistent dependency files when a compilation error occured on Windows. This prevented a proper build after -- 2.11.0