1 <html><body><pre>Android NDK ChangeLog: 2 3 ------------------------------------------------------------------------------- 4 android-ndk-r7 5 6 IMPORTANT CHANGES: 7 8 - New official NDK APIs for Android 4.0 (a.k.a. API level 14), 9 which adds the following native features to the platform: 10 11 - Native multimedia API based on the Khronos Group OpenMAX AL™ 12 1.0.1 Standard. New headers <OMXAL/OpenMAXAL.h> and 13 <OMXAL/OpenMAXAL_Android.h> are provided to allow 14 applications targeting this API level to perform multimedia output 15 directly from native code using a new Android-specific buffer 16 queue interface. For more details, see docs/openmaxal/index.html 17 and http://www.khronos.org/openmax/. 18 19 - Updated the native audio API based on the Khronos Group OpenSL ES 20 1.0.1™ Standard. API Level 14 can now decode compressed 21 audio (e.g. MP3, AAC, Vorbis) to PCM. For more details, see 22 docs/opensles/index.html and http://www.khronos.org/opensles/. 23 24 - CCache support. To speed up large rebuilds, simply define the NDK_CCACHE 25 environment variable to 'ccache' (or the path to your ccache binary), as in: 26 27 export NDK_CCACHE=ccache 28 29 The NDK build system will automatically use it when compiling any source 30 file. For more information about CCache, see http://ccache.samba.org 31 32 - You can now set your APP_ABI to 'all' to indicate that you want to build 33 your NDK modules for all the ABIs supported by your given NDK release. 34 35 This means that either one of these two lines in your Application.mk are 36 equivalent with this release: 37 38 APP_ABI := all 39 APP_ABI := armeabi armeabi-v7a x86 40 41 This also works if you define APP_ABI on the command-line, as in: 42 43 ndk-build APP_ABI=all 44 45 Which is a quick way to check that your project builds for all supported 46 ABIs without changing its Application.mk file. 47 48 - Shorter paths to source and object files used in build commands. 49 When invoking $NDK/ndk-build from your project path, the paths to the 50 source, object and binary files passed to the build commands will be 51 significantly shorter now because they are now passed relative to the 52 current directory. 53 54 This is useful when building projects with a lot of source files, to 55 avoid limits on the maximum command line length supported by your host 56 operating system. 57 58 The behaviour is unchanged if you invoked ndk-build from a sub-directory 59 of your project tree, or if you define NDK_PROJECT_PATH to point to a 60 specific directory. 61 62 - New LOCAL_CPP_FEATURES variable in Android.mk, used to declare which C++ 63 features (RTTI or Exceptions) your module uses. This is especially handy 64 if you have prebuilt modules that depend on them since this will ensure 65 the final link will work correctly. 66 67 See docs/ANDROID-MK.html and docs/CPLUSPLUS-SUPPORT.html for more details 68 69 - WARNING: VERY EXPERIMENTAL!! 70 71 You can now build your NDK sources on Windows *without* Cygwin. 72 Simply call the script 'ndk-build.cmd' from the Windows cmd.exe 73 command-line, when in your project path. 74 75 The script takes exactly the same arguments than the original 76 ndk-build one. 77 78 Note that the Windows NDK package comes with its own prebuilt 79 binaries for GNU Make, Awk and other tools required by the build, 80 i.e. you shouldn't need to install anything else to get a working 81 build system. 82 83 IMPORTANT: ndk-gdb doesn't work. You still need Cygwin to debug 84 at the moment! 85 86 This feature is still very experimental, but feel free to try it 87 and report issues on the public forum (android-ndk (a] googlegroups.com) 88 or the public bug databse (http://b.android.com). 89 90 Note that all samples and unit tests succesfully compile with it. 91 92 IMPORTANT BUG FIXES: 93 94 - Imported shared libraries are now installed by default to the target 95 installation location (i.e. libs/%lt;abi%gt;) if APP_MODULES is not 96 defined in your Application.mk. 97 98 This means that if a top-level module "foo" imports a module "bar", then 99 both libfoo.so and libbar.so will be copied to the install location. 100 101 Previously, only libfoo.so was, unless you listed 'bar' in your APP_MODULES 102 too. 103 104 If you define APP_MODULES explicitely, the behaviour is unchanged. 105 106 - Static library imports are now properly transitive. If top-level module 107 'foo' imports static library 'bar' which imports static library 'zoo', 108 the libfoo.so will now be linked against both libbar.a and libzoo.a. 109 110 - ndk-gdb now works correctly for activities with multiple categories 111 in their MAIN intent filters. 112 113 OTHER CHANGES: 114 115 - docs/STABLE-APIS.html: Added missing documentation listing EGL 116 as a supported stable API, starting from API level 9. 117 118 - Add a new C++ support runtime named "gabi++". More details about it 119 are available in the updated docs/CPLUSPLUS-SUPPORT.html. 120 121 - The STLport C++ runtimes now support RTTI (no exceptions yet though). 122 123 - Add a new C++ support runtime named "gnustl_shared" corresponding to the 124 shared library version of GNU libstdc++ v3 (GPLv3 license). See more 125 info at docs/CPLUSPLUS-SUPPORT.html 126 127 - You can now list several file extensions in LOCAL_CPP_EXTENSION. As in: 128 129 LOCAL_CPP_EXTENSION := .cpp .cxx 130 131 To compile both foo.cpp and bar.cxx as C++ sources. 132 133 - Refreshed the EGL and OpenGLES Khronos headers to support more extensions. 134 Note that this does *not* change the NDK ABIs for the corresponding 135 libraries, since each extension must be probed at runtime by the client 136 application. 137 138 Which extensions are available depends on your actual device (and GPU 139 drivers), not the version of the platform it provides. 140 141 The header changes simply add new constants and types to make it easier 142 to use the extensions why they have been probed with eglGetProcAddress() or 143 glGetProcAddress(). Here is the list of newly supported extensions: 144 145 GLES 1.x 146 -------- 147 GL_OES_vertex_array_object 148 GL_OES_EGL_image_external 149 GL_APPLE_texture_2D_limited_npot 150 GL_EXT_blend_minmax 151 GL_EXT_discard_framebuffer 152 GL_EXT_multi_draw_arrays 153 GL_EXT_read_format_bgra 154 GL_EXT_texture_filter_anisotropic 155 GL_EXT_texture_format_BGRA8888 156 GL_EXT_texture_lod_bias 157 GL_IMG_read_format 158 GL_IMG_texture_compression_pvrtc 159 GL_IMG_texture_env_enhanced_fixed_function 160 GL_IMG_user_clip_plane 161 GL_IMG_multisampled_render_to_texture 162 GL_NV_fence 163 GL_QCOM_driver_control 164 GL_QCOM_extended_get 165 GL_QCOM_extended_get2 166 GL_QCOM_perfmon_global_mode 167 GL_QCOM_writeonly_rendering 168 GL_QCOM_tiled_rendering 169 170 GLES 2.0 171 -------- 172 GL_OES_element_index_uint 173 GL_OES_get_program_binary 174 GL_OES_mapbuffer 175 GL_OES_packed_depth_stencil 176 GL_OES_texture_3D 177 GL_OES_texture_float 178 GL_OES_texture_float_linear 179 GL_OES_texture_half_float_linear 180 GL_OES_texture_npot 181 GL_OES_vertex_array_object 182 GL_OES_EGL_image_external 183 GL_AMD_program_binary_Z400 184 GL_EXT_blend_minmax 185 GL_EXT_discard_framebuffer 186 GL_EXT_multi_draw_arrays 187 GL_EXT_read_format_bgra 188 GL_EXT_texture_format_BGRA8888 189 GL_EXT_texture_compression_dxt1 190 GL_IMG_program_binary 191 GL_IMG_read_format 192 GL_IMG_shader_binary 193 GL_IMG_texture_compression_pvrtc 194 GL_IMG_multisampled_render_to_texture 195 GL_NV_coverage_sample 196 GL_NV_depth_nonlinear 197 GL_QCOM_extended_get 198 GL_QCOM_extended_get2 199 GL_QCOM_writeonly_rendering 200 GL_QCOM_tiled_rendering 201 202 EGL: 203 ---- 204 EGL_ANDROID_recordable 205 EGL_NV_system_time 206 207 - docs/NATIVE-ACTIVITY.HTML: Fixed typo, the minimum API level 208 should be 9, not 8 for native activities. 209 210 - removed many unwanted exported symbols from the link-time shared 211 system libraries provided by the NDK. This ensures that code generated 212 with the standalone toolchain doesn't risk to accidentally depend 213 on a non-stable ABI symbol (e.g. any libgcc.a symbol that changes 214 each time the toolchain used to build the platform is changed). 215 216 - download-toolchain-sources.sh: Script was updated to download the toolchain 217 sources from android.googlesource.com, the new location for AOSP servers. 218 219 ------------------------------------------------------------------------------- 220 android-ndk-r6b 221 222 This is a bug-fix release for NDK r6, no new features are provided. 223 224 IMPORTANT BUG FIXES: 225 226 - Fixed the multi-architecture build, i.e. when using APP_ABI="armeabi x86" 227 228 - Fixed location of prebuilt STLport binaries in the NDK release package. 229 (A bug in the packaging script placed them in the wrong location). 230 231 - Fixed atexit() usage in shared libraries with the x86 standalone toolchain. 232 233 - Fixed make-standalone-toolchain.sh --arch=x86 (it failed to copy the 234 proper GNU libstdc++ binaries to the right location). 235 236 - Fixed standalone toolchain linker warnings about missing definition and 237 size for '__dso_handle' symbol (arm only). 238 239 - Fixed the inclusion order of $(SYSROOT)/usr/include for x86 builds, 240 see http://code.google.com/p/android/issues/detail?id=18540 241 242 - Fixed the definitions of ptrdiff_t and size_t in x86-specific system 243 when used with the x86 standalone toolchain. 244 245 ------------------------------------------------------------------------------- 246 android-ndk-r6 247 248 IMPORTANT CHANGES: 249 250 - Official support for the x86 ABI. 251 252 This release of the Android NDK now provides support for the 'x86' ABI. 253 This allows you to generate machine code that runs on future x86-based 254 Android devices. 255 256 Note that by default, code is still generated for ARM-based devices. 257 You can however add 'x86' to your APP_PLATFORM definition in your 258 Application.mk. For example, the following line instructs ndk-build 259 to build your code for three distinct ABIs: 260 261 APP_ABI := armeabi armeabi-v7a x86 262 263 Unless you rely on ARM-based assembly sources, you shouldn't need to touch 264 your Android.mk files to build x86 machine code. 265 266 For all details regarding x86 support, please read the new documentation 267 file named docs/CPU-X86.html. 268 269 Don't hesitate to file NDK bugs related to x86 at http://b.android.com 270 271 - You can build a standalone x86 toolchain using the --toolchain=x86-4.4.3 272 option when calling make-standalone-toolchain.sh. See 273 docs/STANDALONE-TOOLCHAIN.html for more details. 274 275 - The new 'ndk-stack' tool can be used to translate stack traces 276 (as reported by adb logcat in case of crash in native code) into 277 something more readable, i.e. containing function / source file / 278 line number information corresponding to each stack frame. 279 280 For more information and usage example, see the new documentation 281 file docs/NDK-STACK.html 282 283 OTHER FIXES & CHANGES: 284 285 - The arm-eabi-4.4.0, which had been deprecated since NDK r5, has been 286 finally removed from the NDK distribution. 287 288 - Support a project.properties file in the application's directory 289 instead of default.properties. This is in preparation for future SDK Tools 290 changes. 291 292 ------------------------------------------------------------------------------- 293 android-ndk-r5c 294 295 This release fixes a few bugs in r5b. There are no new features. 296 297 IMPORTANT BUG FIXES: 298 299 - Fixed a typo that prevented LOCAL_WHOLE_STATIC_LIBRARIES to work correctly 300 with the new toolchain. Also properly document this variable in 301 docs/ANDROID-MK.html. 302 303 - Fixed a bug where code linked against gnustl_static would crash when run 304 on Android platform releases older than 2.2. 305 306 - <android/input.h>: Two functions in this header file, introduced 307 by API level 9 (a.k.a. 2.3) were incorrect and have been fixed. While 308 this breaks the source API, the binary interface to the system is 309 unchanged. 310 311 The functions missing a third 'history_index' parameter. They correct 312 definition is now: 313 314 float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, 315 size_t pointer_index, 316 size_t history_index); 317 318 float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, 319 size_t pointer_index, 320 size_t history_index); 321 322 - Updated the android-9 C library arm binary to correctly expose at link time 323 new functions that were added to it in Gingerbread (e.g. pthread_rwlock_init). 324 325 - Fixed a bug that made gdbserver crash on misc. Honeycomb devices (e.g. 326 the Motorola Xoom). 327 328 OTHER FIXES & CHANGES: 329 330 - Object files are now always linked in the order they appear in 331 LOCAL_SRC_FILES. This was not the case previously because the files 332 were grouped by source extensions instead. 333 334 - download-toolchain-sources.sh: Fixed a silly bug that prevented the 335 --git-date option to work properly when downloading the master branch. 336 337 - Fix an issue where a module could import itself, resulting in an infinite 338 loop in GNU Make. 339 340 - When import-module fails, it now prints the list of directories 341 that were searched. This is useful to check that the NDK_MODULE_PATH 342 definition used by the build system is correct. 343 344 - When import-module succeeds, it now prints the directory where the module 345 was found to the log (visible with NDK_LOG=1). 346 347 - <pthread.h>: Fixed the definition of PTHREAD_RWLOCK_INITIALIZER for 348 android-9 API level and higher. 349 350 - Fixed a bug where LOCAL_ARM_NEON was defined to true would make the build 351 fail (typo in build/core/build-binary.mk) 352 353 - Fixed a bug that prevented the compilation of .s assembly files 354 (.S files were ok). 355 356 - Speed-up the build of debuggable applications when there is a very 357 large number of include directories in a project. 358 359 - ndk-gdb: Better detection of 'adb shell' failures (improves error messages). 360 361 - ndk-build: Fix a rare bug that appeared when trying to perform parallel 362 builds of debuggable projects. 363 364 365 ------------------------------------------------------------------------------- 366 android-ndk-r5b 367 368 This release fixes a few bugs in r5. There are no new features. 369 370 IMPORTANT BUG FIXES: 371 372 - Fix a compiler bug in the arm-linux-androideabi-4.4.3 toolchain. 373 The previous binary generated invalid thumb instruction sequences when 374 dealing with signed chars. This problem was first reported on the 375 android-ndk forum and fixed by the following change in the toolchain 376 sources: 377 378 https://review.source.android.com/#change,19474 379 380 - docs/CPLUSPLUS-SUPPORT.html: Add missing documentation for the 381 "gnustl_static" value for APP_STL, that allows you to link against 382 a static library version of GNU libstdc++. 383 384 - ndk-build: Fix a bug that created inconsistent dependency files when a 385 compilation error occured on Windows, preventing building properly after 386 the error was fixed in the source code. 387 388 - ndk-build: Fix a Cygwin-specific bug where using very short paths for 389 the Android NDK installation or the project path could lead to the 390 generation of invalid dependency files, making incremental builds 391 impossible. 392 393 - Fix a typo that prevented the cpufeatures library to work correctly 394 with the new NDK toolchain. 395 396 - Linux toolchain binaries now run on Ubuntu 8.04 or higher. 397 More specifically, the r5 binaries did require GLibc 2.11 on the host 398 system, and refused to run with previous releases due to an ABI mismatch 399 in the GNU C Library. The r5b binaries are generated with a special 400 toolchain that instead targets GLibc 2.7 or higher. 401 402 - GNU libstdc++ will not crash anymore when printing floating-point values 403 through i/o streams. 404 405 OTHER FIXES & CHANGES: 406 407 - ndk-build: Speed-up the Cygwin build by avoiding calling "cygpath -m" 408 from GNU Make for each and every source or object file. This was a problem 409 for users with very large source trees. 410 411 In case this doesn't work properly, define NDK_USE_CYGPATH=1 in your 412 environment to use 'cygpath -m' as usual. 413 414 Also, if 'cygpath' is not in your path, completely ignore it 415 (seems to be enough to run the NDK under MSys). 416 417 - ndk-build: Handle installation paths containing spaces when checking 418 cygwin installation. Before that, the script complained that the user 419 was using an incorrect version of GNU Make (even if he had the right one). 420 421 - Fixed a typo that prevented several NDK_MODULE_PATH to work properly when 422 it contained multiple directories separated with ":" 423 424 - prebuilt-common.sh: Make the script check the compiler directly for 64-bit 425 generated machine code, instead of relying on the host tag. That should 426 allow the 32-bit toolchain to rebuild properly on Snow Leopard. 427 428 - prebuilt-common.sh: Fix the toolchain rebuild scripts to work when 429 using a 32-bit host toolchain. 430 431 - <netinet/in.h>: Add missing declaration for INET_ADDRSTRLEN 432 - <netinet/in6.h>: Add missing declaration for IN6_IS_ADDR_MC_NODELOCAL 433 and IN6_IS_ADDR_MC_GLOBAL. 434 435 - <asm/byteorder.>: Replaced 'asm' with '__asm__' to allow compilation 436 with -std=c99. See https://review.source.android.com/#change,20076 437 438 - standalone toolchain: The -fpic flag is now the default for the 439 arm-linux-androideabi toolchain, instead of -fPIC. This avoids a performance 440 degradation when compared to the old android-eabi configuration. 441 442 This only affects users of the standalone toolchain. The NDK build script 443 always enforced -fpic implicitely. 444 445 ------------------------------------------------------------------------------- 446 android-ndk-r5 447 448 IMPORTANT BUG FIXES: 449 450 - Allow dlclose() to properly call static C++ destructors when unloading 451 a shared library. This requires changes in both the C library and the 452 build system. IMPORTANT: This feature is only available for API level 9. 453 454 - Fix packaging error for system libraries of level 5 and 8. The libraries 455 bundled with the NDK and used at link time were not the correct version, 456 and this prevented linking against certain symbols appropriately. 457 458 - ndk-gdb: do not start activity unless --start or --launch is used. 459 (the documentation was correct, the implementation wrong) 460 461 - The system headers for all API levels have been cleaned up and will 462 not provide the declarations of functions that are not available in 463 the corresponding system libraries. 464 465 IMPORTANT CHANGES: 466 467 - Support for API level 9, (a.k.a. Android 2.3) which adds the following 468 native features to the platform: 469 470 - Native audio API based on the Khronos Group OpenSL ES™ 1.0.1 Standard. 471 New headers <SLES/OpenSLES.h> and <SLES/OpenSLES_Android.h> 472 are provided to allow applications targeting this API level to perform 473 audio input, output and processing directly from native code. 474 475 - Native activity support, i.e. the ability to build applications that 476 are coded entirely in C or C++. More precisely, such applications still 477 run inside a VM, and will have to access most of the platform's features 478 using JNI (i.e. native code calling VM methods). However, this also 479 comes with a series of headers and libraries to implement the following 480 directly from native code: 481 482 - activity lifecycle management. 483 - user input handling (touch, keyboard, trackball, ...). 484 - window management (including accessing the pixel buffer). 485 - sensor listeners (e.g. accelerometer, compass, ...). 486 - hardware configuration management. 487 - easily reading assets out of an APK from native code. 488 - access to the storage manager, a new feature of Android X.X 489 that allows one to provide Opaque Binary Objects containing 490 large amounts of data outside of the APK. 491 492 See the documentation in docs/STABLE-APIS.html for more details. 493 494 Note that most of these new features are targeted at game developers. 495 496 - Improved gdbserver binary to allow debugging _threaded_ programs properly 497 with ndk-gdb (the previous binary could only set breakpoints on the main 498 thread). 499 500 IMPORTANT: THIS ONLY WORKS IF YOU RUN ON ANDROID 2.3 OR HIGHER. 501 502 The root cause of the problem is a platform bug that was only fixed in 503 2.3. If you try to debug on a previous platform, the gdbserver binary 504 will only be able to set breakpoints on the main thread. 505 506 For more information, see the specific section in docs/NDK-GDB.html. 507 508 - Easier debuggable builds: just invoke ndk-build while defining the 509 NDK_DEBUG variable to 1, as in: 510 511 $NDK/ndk-build NDK_DEBUG=1 512 513 This will have the same result that setting the android:debuggable="true" 514 in the <application> element of your AndroidManifest.xml file. See the 515 file docs/NDK-BUILD.html for more details. 516 517 Note that you will need to use the SDKr8 build tools to use this feature 518 properly! 519 520 - Refresh of system C++ headers: 521 522 - Headers have been moved out of the platform directory hierarchy. 523 This is to prevent conflicts with other STLs like STLport or the 524 GNU libstdc++ which provide their own version of the headers, but 525 does not affect your builds. 526 527 - The list of headers has grown to include the following: 528 529 cassert, cctype, cerrno, cfloat, climits, cmath, 530 csetjmp, csignal, cstddef, cstdint, cstdio, cstdlib, 531 cstring, ctime, cwchar, new, typeinfo, utility 532 533 Note that they still correspond to our minimal C++ runtime, no new feature 534 was introduced here. 535 536 - Support for C++ exceptions and RTTI. See docs/CPLUSPLUS-SUPPORT.html for 537 all details (and limitations). 538 539 - STLport implementation: Add sources and prebuilt binaries for a port of 540 the STLport C++ Standard Library (www.stlport.org), and an easy way to use 541 it at build time by defining APP_STL in your Application.mk. See 542 docs/APPLICATION-MK.html and docs/CPLUSPLUS-SUPPORT.html for all details. 543 544 - GNU libstdc++ implementation: Available as a static library that you can 545 select for your application through APP_STL. See docs/CPLUSPLUS-SUPPORT.html 546 for all details. 547 548 - Add support for prebuilt libraries with the PREBUILT_SHARED_LIBRARY and 549 PREBUILT_STATIC_LIBRARIES build scripts. See the new documentation 550 file named docs/PREBUILTS.html for explanations and usage examples. 551 552 - Support for module exports: A module can now define a set of compiler or 553 linker flags that will be automatically 'imported' by any other module that 554 depends on it, through LOCAL_STATIC_LIBRARIES or LOCAL_SHARED_LIBRARIES. 555 556 This is achieved with the help of new Android.mk variables named 557 LOCAL_EXPORT_CFLAGS, LOCAL_EXPORT_CPPFLAGS, LOCAL_EXPORT_C_INCLUDES and 558 LOCAL_EXPORT_LDLIBS. See docs/ANDROID-MK.html for mode documentation, and 559 a 'samples/module-exports' for a sample project that uses this. 560 561 - Add support to specify a different file name for generated files, through 562 the new LOCAL_MODULE_FILENAME variable. See docs/ANDROID-MK.html for an 563 example. 564 565 - Add support for module imports, through the NDK_MODULE_PATH environment 566 variable and the new 'import-module' function. This allows you to avoid 567 hard-coding the path of third-party modules into your project files. 568 569 See docs/IMPORT-MODULE.html for details. 570 571 - Add the content of LOCAL_C_INCLUDES to gdb.setup to make native debugging 572 easier. Also fixes an issue that prevented clean parallel builds of 573 debuggable applications to work correctly. This fixes an error message that 574 said: 575 576 /bin/sh: <project>/libs/armeabi/gdb.setup: No such file or directory 577 578 When doing a "ndk-build -j<number>", with <number> bigger than 1. 579 580 - Add support for assembly-level source filtering. See the description of 581 LOCAL_FILTER_ASM in docs/ANDROID-MK.html for more details. This can be useful 582 for certain kinds of obfuscation tasks. 583 584 - This NDK comes with a new toolchain (named arm-linux-androideabi-4.4.3) 585 which provides many benefits, including: 586 587 - Better code generation than the previous one (gcc-4.4.0) 588 - On Windows, the binaries do not depend on Cygwin anymore. 589 - The ability to use it as a stand-alone cross-compiler 590 (see docs/STANDALONE-TOOLCHAIN.html for all details). 591 592 The binaries for gcc-4.4.0 are still provided for backwards compatibility. 593 Use NDK_TOOLCHAIN=arm-eabi-4.4.0 in your environment to force its usage. 594 Note that it is now deprecated and will be removed in a future NDK release. 595 596 IMPORTANT: The old toolchain doesn't properly support exceptions, RTTI, 597 STLport and GNU libstdc++. 598 599 The binaries for the already-deprecated gcc-4.2.1 have been removed. 600 601 - The 'cpufeatures' library has been updated to provide better architecture 602 and features detection (including a work-around for buggy ARMv6 kernels 603 which report an architecture version of 7). 604 605 The library is now also available as an import module, to simplify its 606 usage in your build scripts. See the updated docs/CPU-FEATURES.html file 607 for details. 608 609 NOTE: Please update your Android.mk to use module imports as soon as 610 possible. The location $NDK/source/cpufeatures/ is deprecated 611 and will be removed in a future NDK release. Avoid referencing 612 it directly in your build scritps! 613 614 OTHER FIXES AND CHANGES: 615 616 - Reduced the size of generated binaries by using --strip-unneeded 617 instead of --strip-debug. This gets rid of mor symbol table entries 618 in release shared libraries and executables, without impacting 619 runtime execution. 620 621 - Fix bad automatic dependency tracking when using multiple source 622 sub-directories. 623 624 - The path to system headers is now included last in the compilation command 625 line. This prevents conflicts with source code that define their own headers 626 with similar names (e.g. a custom "err.h" was ignored, because the system 627 <err.h> was used instead). 628 629 - Update documentation for 'my-dir' function to explain that, due to the 630 way GNU Make works, it really returns the path of the last included 631 Makefile (instead of the current one). Also provide examples on how 632 to deal with it. 633 634 - make-release.sh: Now has an --out-dir=<path> option to specify the 635 output directory where the packages are going to be copied. Also 636 ensure that generated packages have go+r permissions. 637 638 - ndk-build will now properly escape arguments. This means that something 639 like this: 640 641 ndk-build MY_CFLAGS="-DFOO -DBAR" 642 643 will now work correctly. 644 645 - Add --git-http option to download-toolchain-sources.sh and 646 rebuild-all-prebuilt.sh in order to download sources from 647 android.git.kernel.org through HTTP. 648 649 - ndk-gdb: properly launch activities for which name does not contain any dot. 650 651 - ndk-gdb: add --delay=<timeout> option to specify a delay in seconds 652 between activity launch and gdbserver attach. This is needed because certain 653 activities can take a long time to properly launch. The default delay is 654 also increased to 2 seconds (instead of 1). 655 656 - build/tools/build-gcc.sh: copy the sysroot to the build directory. This 657 avoids the generated toolchain binaries from hard-coding host build paths. 658 659 - Platform files are now under $NDK/platforms instead of $NDK/build/platforms 660 661 - Toolchain files are now under $NDK/toolchains instead of 662 $NDK/build/toolchains and $NDK/build/prebuilt. 663 664 - Release and debug objects are stored under two different directories now 665 (i.e. obj/local/<abi>/objs and obj/local/<abi>/objs-debug). This 666 prevents rebuilding *everything* when you switch between these two modes, 667 which can be a real time-saver for complex projects. 668 669 - Fixed a bug that duplicated the LOCAL_LDFLAGS in the final link command 670 when LOCAL_ALLOW_UNDEFINED_SYMBOLS was not set to 'true' 671 672 ------------------------------------------------------------------------------- 673 android-ndk-r4b 674 675 This release fixes a few bugs in r4 scripts. There are no new features. 676 677 OTHER FIXES & CHANGES: 678 679 - build/tools/rebuild-all-prebuilt.sh: mktemp expects 'XXXXXX' instead of 'XXX'. 680 Fix the script (and others in the same directory) to do that properly. 681 682 - ndk-gdb: check the target device's API level, and dump an error message if 683 it is not at least 8 (Android 2.2 a.k.a. Froyo). Fix script to properly 684 remove control characters like '\r' from adb shell's output. Also fix 685 script to work properly with OS X's BSD awk. 686 687 - ndk-build: Make AndroidManifest.xml optional. Now the build scripts will try 688 to look for jni/Android.mk if no manifest is found. If you don't use this, 689 you can also define NDK_PROJECT_PATH to point to your tree. 690 691 Also, on Windows, check that a Cygwin-compatible make executable is being 692 used, and dump a readable help message to solve the issue if this is not 693 the case. 694 695 - Place generated binaries under $PROJECT_PATH/obj/ instead of 696 $PROJECT_PATH/bin/ndk/. The 'bin' directory is sometimes cleaned 697 by the JDT, resulting in the inability to properly load symbol versions 698 of the shared libraries when running ndk-gdb. 699 700 - Warn when sources with unsupported extensions are used in LOCAL_SRC_FILES. 701 Previous behaviour was to silently ignore them. 702 703 - Set the optimization mode to 'debug' automatically if the manifest sets 704 android:debuggable to 'true'. You can override this by using 705 'APP_OPTIM := release' in your Application.mk, or by adding '-O2' to 706 your LOCAL_CFLAGS. 707 708 Note that even in release mode, the NDK build scripts will produce 709 binaries with symbols under obj/local/<abi>/ that will be used for 710 debugging with gdb. However, the debugger will have a harder time to 711 print proper local variable values that have been optimized out or 712 even set breakpoints properly. 713 714 ------------------------------------------------------------------------------- 715 android-ndk-r4 716 717 IMPORTANT BUG FIXES: 718 719 - The <fenv.h> header was not placed in the correct location and could not 720 be found by normal builds. 721 722 IMPORTANT CHANGES: 723 724 - On Windows, Cygwin 1.7 or higher is now required. The NDK will not 725 work properly with Cygwin 1.5 which is now officially obsolete 726 anyway. 727 728 - Simplified build system: You no longer need to run build/host-setup.sh 729 or modify anything under $NDK_ROOT/apps/. Instead, just invoke the 730 new 'ndk-build' script from your application's project directory, or 731 one of its sub-directories. 732 733 See docs/OVERVIEW.html and docs/NDK-BUILD.html for more details. 734 735 NOTE: For compatibility purpose, you can still define projects 736 through $NDK_ROOT/apps/<name> though. 737 738 However, not that sample applications have moved from 739 'apps/<name>/project' to 'samples/<name>' and now must 740 be built with 'ndk-build'. The source code of pre-existing 741 samples didn't change though. 742 743 - Easy native debugging support when running debuggable applications 744 on Android 2.2 or higher, through the new 'ndk-gdb' helper script. 745 See docs/NDK-GDB.html for details. 746 747 - Support for hardware FPU. This is through the new 'armeabi-v7a' ABI 748 corresponding to ARMv7-a class devices. 749 750 Note that by default, the NDK will still generate machine code for the old 751 'armeabi' ABI (ARMv5TE based) which is supported by all official Android 752 system images to date. 753 754 You will need to define APP_ABI in your Application.mk file to change this. 755 See docs/APPLICATION-MK.html 756 757 More details about ABIs is now available in docs/CPU-ARCH-ABIS.html 758 759 - A small static library named 'cpufeatures' is provided with source code 760 and can be used at runtime to determine the CPU features supported by the 761 target device. It should run on all Android platforms, starting from 1.5. 762 763 For more information, see docs/CPU-FEATURES.html 764 765 - Support for the optional ARM Advanced SIMD (a.k.a. NEON) instruction set 766 extension through the use the LOCAL_ARM_NEON variable in Android.mk, or 767 the '.neon' suffix when listing source files. 768 769 Neon is an *optional* instruction set extension, and not all Android ARMv7 770 devices will support it. You will need to use the 'cpufeatures' library to 771 determine if such code can be used at runtime, and provide alternate code 772 paths if this is not the case. This is similar to MMX/SSE/3DNow on x86 773 platforms. 774 775 For more information, see docs/CPU-ARM-NEON.html 776 777 - Added a new sample (hello-neon) to demonstrate usage of 'cpufeatures' 778 and NEON intrinsics and build support. 779 780 - Added <android/bitmap.h>, a new stable API available from android-8 781 (a.k.a. Android 2.2) to reliably access the pixel buffer of an 782 android.graphics.Bitmap object from native code. See docs/STABLE-API.html 783 and the new sample program under 'samples/bitmap-plasma' for details 784 and usage example. 785 786 - Support the NX (No Execute) security feature, where special sections 787 are added to the generated shared libraries to instruct the kernel 788 that code shall not be executed from the heap and stack by default. 789 790 See docs/ANDROID-MK.html to see how to disable this, plus reference 791 links for more information. 792 793 OTHER FIXES AND CHANGES: 794 795 - support the .s extension for raw assembly sources (.S is already supported 796 but the input files are parsed by the C-preprocessor before being sent to 797 the assembler). 798 799 - build/host-setup.sh has been removed. There is no need for a 'setup' step 800 when using the NDK for the first time. All host-specific autodetection and 801 basic tool sanity checking have been moved to the build scripts themselves. 802 803 - APP_MODULES in Application.mk is now optional. If not defined, the NDK 804 will simply build _all_ the modules that are declared from your Android.mk. 805 806 You can still use APP_MODULES to restrict the set of modules you want to 807 build. Note that the NDK now computes the transitive dependencies of these 808 modules for you now. See docs/APPLICATION-MK.html for details. 809 810 - docs/STABLE-APIS.html: Add missing section for Dynamic Linker Library 811 (libdl.so). It is actually supported by all API levels. 812 813 - build/tools/download-toolchain-sources.sh: Use 'master' branch by default 814 instead of the 'eclair' one. 815 816 - build-toolchain.sh: Allow ad-hoc patching of toolchain sources when rebuilding 817 them. This is primarily to ease development. All you need to do is put a patch 818 under build/tools/toolchain-patches/<foo>/<name>.patch, and it will be applied 819 with 'patch -p1' into the <foo> directory of the unpacked toolchain sources 820 before the configure step. 821 822 - docs/CPU-ARCH-ABIS.html: Mention the experimental 'x86' ABI. 823 824 - build/core/mkdeps.sh: Removed obsolete script. 825 826 - the NDK build script now only parses the Application.mk and Android.mk of 827 the applications listed by APP. The error messages when APP is empty or 828 malformed have also been improved. 829 830 - removed the annoying 'the mangling of 'va_list' has changed in GCC 4.4' 831 warning when building with GCC 4.4.0 for ARM. 832 833 - C Library header fixes: 834 835 For all platforms: 836 837 - <arpa/inet.h>: no longer includes <netinet/in6.h>. 838 - <ctype.h>: better inlining with -ansi option. 839 - <mntent.h>: add missing include for <stdio.h>. 840 - <netinet/in.h>: include <netinet/in6.h> and define in6addr_any + 841 in6addr_loopback. 842 - <netinet/in6.h>: add IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, 843 IN6ADDR_ANY_INIT, ipv6mr_interface. 844 - <sys/epoll.h>: add missing C++ inclusion guards. 845 - <sys/resource.h>: add missing rlim_t declaration. 846 - <sys/system_properties.h>: add missing C++ inclusion guards. 847 - <time64.h>: add missing C++ inclusion guards. 848 - <netdb.h>: move h_errno declaration inside C++ inclusion guards. 849 850 - C Library changes: 851 852 For android-8 (a.k.a. Android 2.2): 853 854 - <dlfcn.h>: add DL_info and dladdr(). 855 - <err.h>: add err(), warn() and other variants. 856 - <regex.h>, <fts.h>, <sys/queue.h>: added 857 - <pthread.h>: add pthread_condattr_t 858 - <sched.h>: added proper clone() declaration (and implementation). 859 - <signal.h>: added killpg(). 860 - <stdio.h>: add fdprintf() and vfdprintf(). 861 - <stdlib.h>: fix ptsname_r() signature in declaration. previous 862 implementation was broken anyway. 863 - <unistd.h>: add getusershell(), setusershell(), endusershell(), 864 ttyname(), ttyname_r(), TEMP_FAILURE_RETRY. Fix usleep() signature 865 (now returns int). 866 - <wchar.h>: add fake mbstowcs() and wcstombs(). 867 868 More details available under docs/system/libc/CHANGES.html 869 870 ------------------------------------------------------------------------------- 871 android-ndk-r3 872 873 IMPORTANT BUG FIXES: 874 875 - Fix build/host-setup.sh to execute as a Bourne shell script (again) 876 877 - Make target shared libraries portable to systems that don't use the exact 878 same toolchain. This is needed due to differences in libgcc.a implementations 879 between gcc 4.2.1 and 4.4.0. This change ensures that generated machine 880 code doesn't depend on helper functions provided by the Android platform 881 runtime. 882 883 884 IMPORTANT CHANGES: 885 886 - GCC 4.4.0 is now used by default by the NDK. It generates better code than 887 GCC 4.2.1, which was used in previous releases. However, the compiler's C++ 888 frontend is also a lot more pedantic regarding certain template constructs 889 and will even refuse to build some of them. 890 891 For this reason, the NDK also comes with GCC 4.2.1 prebuilt binaries, and 892 you can force its usage by defining NDK_TOOLCHAIN in your environment to 893 the value 'arm-eabi-4.2.1'. For example: 894 895 export NDK_TOOLCHAIN=arm-eabi-4.2.1 896 make APP=hello-jni 897 898 Note that only the 'armeabi' ABI is supported by the 4.2.1 toolchain. We 899 recommend switching to 4.2.1 *only* if you encounter compilation problems 900 with 4.4.0. 901 902 The 4.2.1 prebuilt binaries will probably be removed from a future release 903 of the Android NDK, we thus *strongly* invite you to fix your code if such 904 problems happen. 905 906 - Support for OpenGL ES 2.0. This is through the new 'android-5' platform to 907 reflect Android 2.0 (previously the Eclair branch). This is merely a copy 908 of android-4 that also includes headers and libraries for OpenGL ES 2.0. 909 910 See the sample named "hello-gl2" for a *very* basic demonstration. Note that 911 OpenGL ES 2.0 is currently *not* available from Java, and must be used 912 through native code exclusively. 913 914 IMPORTANT: OpenGL ES 2.0 is not supported in the Android emulator at this 915 time. Running/testing any native code that depends on it thus 916 requires a real device. 917 918 - The NDK build script will now remove installed binaries from the application 919 project's path before starting the build. This ensures that: 920 921 - if the build fails for some reason, a stale/obsolete file is not left in 922 your application project tree by mistake. 923 924 - if you change the target ABI, a stale/obsolete file is not left into the 925 folder corresponding to the old ABI. 926 927 928 - Updated the STABLE-APIS.html document to clarify the OpenGL ES 1.0/1.1/2.0 929 issues regarding specific devices (i.e. 1.0 supported everywhere, 1.1 and 930 2.0 on specific devices only, need for <uses-feature> tag in manifest). 931 932 933 OTHER FIXES AND CHANGES: 934 935 - Actually use the awk version detected by host-setup.sh during the build. 936 937 - Only allow undefined symbols when LOCAL_ALLOW_UNDEFINED_SYMBOLS is set 938 to 'true', just like the documentation says it works. Also fix a typo 939 in CLEAR_VARS that prevented this variable from being cleared properly. 940 941 - Simplified build/tools/make-release.sh, the --prebuilt-dir option is 942 gone, and --help will dump a clearer description of expected options 943 and input files. 944 945 - Added --prebuilt-ndk=FILE option to build/tools/make-release.sh script to 946 package a new experimental NDK package archive from the current source tree 947 plus the toolchain binaries of an existing NDK release package. E.g.: 948 949 build/tools/make-release.sh \ 950 --prebuilt-ndk=/path/to/android-ndk-1.6_r1-linux-x86.zip 951 952 will generate a new NDK package in /tmp/ndk-release that contains the most 953 up-to-date build scripts, plus the toolchain binaries from 1.6_r1 (which 954 are not in the git repository). 955 956 Also added the --no-git option to collect all sources from the current 957 NDK root directory, instead of the list given by 'git ls-files'. This can 958 be useful if you don't want to checkout the whole 'platform/development' 959 project from repo and still work on the NDK. 960 961 This change is to help people easily package experimental NDK releases to 962 test and distribute fixes and improvements. 963 964 - Remove bash-isms from build/tools/build-toolchain.sh. Now it's possible to 965 build it with the 'dash' shell on Debian-based systems (tested on Ubuntu 8.04) 966 967 - Remove bash-ism from build/tools/build-ndk-sysroot.sh 968 969 - Refresh C library headers for all platforms: 970 971 - make <endian.h> simply include <sys/endian.h> 972 - make <stdint.h> properly declare 64-bit integer types with a C99 compiler 973 - add missing <sys/types.h> to <strings.h> 974 - add GLibc-compatible macro aliases (st_atimensec, st_mtimensec and 975 st_ctimensec) to <stat.h> 976 - add missing declaration for tzset() in <time.h> 977 978 - Added build/tools/download-toolchain-sources.sh, a script that allows you 979 to download the toolchain sources from the official open-source repository 980 at android.git.kernel.org and nicely package them into a tarball that can 981 later be used by build/tools/build-toolchain.sh to rebuild the prebuilt 982 binaries for your system. 983 984 - Updated build/tools/build-toolchain.sh to support the tarballs generated 985 by download-toolchain-sources.sh with the --package=<file> option. This 986 also builds both gcc 4.2.1 and 4.4.0, adding support for armeabi-v7a to 987 gcc 4.4.0. 988 989 ------------------------------------------------------------------------------- 990 android-ndk-1.6_r1 991 992 IMPORTANT BUG FIXES: 993 994 - Fix build/host-setup.sh to: 995 * execute as a Bourne shell script 996 * remove unused host gcc dependency 997 * improve Windows host auto-detection 998 * add GNU Make version check 999 * add Nawk/Gawk check 1000 * ensure that the script is run from $NDKROOT as build/host-setup.sh 1001 * add --help, --verbose, --no-awk-check and --no-make-check options 1002 1003 - Properly add sysroot library search path at build time. This makes a line 1004 in Android.mk like: 1005 1006 LOCAL_LDLIBS := -lz 1007 1008 Actually work correctly, instead of having the linker complaining that it 1009 could not find the corresponding libz.so library. Also clear LOCAL_LDLIBS 1010 in $(CLEAR_VARS) script. 1011 1012 1013 IMPORTANT CHANGES: 1014 1015 - The 'sources' directory is gone. The NDK build system now looks for 1016 $(APP_PROJECT_PATH)/jni/Android.mk by default. You can override this with 1017 the new APP_BUILD_SCRIPT variable in Application.mk 1018 1019 For example, the 'hello-jni' sample uses the following files: 1020 1021 apps/hello-jni/project/jni/Android.mk 1022 apps/hello-jni/project/jni/hello-jni.c 1023 1024 The 'apps/<name>' directory is still needed in this release though. 1025 1026 - Change LOCAL_CFLAGS / LOCAL_CPPFLAGS to work as in the full Android build 1027 system. This means that: 1028 1029 - LOCAL_CFLAGS is now used for *both* C and C++ sources (was only for C) 1030 - LOCAL_CPPFLAGS is now used for C++ sources only (was for both C and C++) 1031 - LOCAL_CXXFLAGS is used like LOCAL_CPPFLAGS but is considered obsolete. 1032 (will disappear in next release) 1033 1034 Also fixed APP_CPPFLAGS / APP_CFLAGS / APP_CXXFLAGS correspondingly. 1035 1036 - Rename build/platforms/android-1.5 to build/platforms/android-3 to match 1037 the Android API level instead of the marketing speak. 1038 1039 Also add a new build/platforms/android-4, and make the build system select 1040 which platform to use based on the content of the project file named 1041 $(APP_PROJECT_PATH)/default.properties. 1042 1043 - Add OpenGL ES 1.x headers and libraries to the android-4 stable APIs. 1044 (NOTE: they are *not* available for android-3) 1045 1046 Also provide a small port of the "San Angeles Observation" demo to show 1047 how to make a simple Android application that uses them. 1048 1049 1050 OTHER FIXES AND CHANGES 1051 1052 - Ensure that the __ANDROID__ macro is always defined when building code 1053 with the NDK. Normally, the macro must be defined by the toolchain 1054 automatically to indicate that you're targeting the Android runtime. 1055 1056 This works for the new arm-linux-androideabi toolchain, but there is 1057 a bug in the way we built the arm-eabi one, so add the flag manually 1058 through the NDK build script for it. 1059 1060 Note that the ANDROID macro, is now deprecated. While it is still defined 1061 by the NDK, you should modify your code to test against __ANDROID__ instead! 1062 1063 - Generate thumb binaries by default. 1064 1065 - Add support for LOCAL_ARM_MODE in Android.mk. 1066 1067 - Add support for the '.arm' suffix in source file names to force the 1068 compilation of a single source in ARM (32-bit) mode. 1069 1070 - Generate proper unoptimized versions of binaries when APP_OPTIM := debug 1071 1072 - Add support for LOCAL_C_INCLUDES in Android.mk 1073 1074 - Fix compilation of assembler files (e.g. foo.S) 1075 1076 ------------------------------------------------------------------------------- 1077 android-ndk-1.5_r1 released. 1078 </pre></body></html> 1079