Android NDK R 8&&コンパイルmipsなどcpuのso

3847 ワード

This release of the NDK includes support for MIPS ABI and a few additional fixes.
New features:
Added support for the MIPS ABI, which allows you to generate machine code that runs on compatible MIPS-based Android devices. Major features for MIPS include MIPS-specific toolchains, system headers, libraries and debugging support. For more details regarding MIPS support, see  docs/CPU-MIPS.html  in the NDK package. By default, code is generated for ARM-based devices. You can add  mips  to your  APP_ABI  definition in your  Application.mk  file to build for MIPS platforms. For example, the following line instructs  ndk-build  to build your code for three distinct ABIs:
APP_ABI := armeabi armeabi-v7a mips
Unless you rely on architecture-specific assembly sources, such as ARM assembly code, you should not need to touch your  Android.mk  files to build MIPS machine code.
You can build a standalone MIPS toolchain using the  --arch=mips  option when calling  make-standalone-toolchain.sh . See  docs/STANDALONE-TOOLCHAIN.html  for more details.
Note: To ensure that your applications are available to users only if their devices are capable of running them, Google Play filters applications based on the instruction set information included in your application — no action is needed on your part to enable the filtering. Additionally, the Android system itself also checks your application at install time and allows the installation to continue only if the application provides a library that is compiled for the device's CPU architecture.
Important bug fixes:
Fixed a typo in GAbi++ implementation where the result of  dynamic_cast<D>(b)  of base class object  b  to derived class  D  is incorrectly adjusted in the opposite direction from the base class. (Issue 28721)
Fixed an issue in which  make-standalone-toolchain.sh  fails to copy  libsupc++.* .
Other bug fixes:
Fixed  ndk-build.cmd  to ensure that  ndk-build.cmd  works correctly even if the user has redefined the  SHELL  environment variable, which may be changed when installing a variety of development tools in Windows environments
以上がAndroid NDK r 8公式release info.
このように,これまでNDKがサポートしてきたCPU命令セットおよびアーキテクチャプラットフォームはARM,x 86,MIPSである.
コンパイル方法:
jniディレクトリの下にあるApplicaton.mk(ない場合は新規作成が必要)は、次のコマンドを1行追加します.
APP_ABI := armeabi armeabi-v7a mips

mipsのコンパイラならlibs->mipsファイルに入れます
他は変えなくてもいいです.x 86プラットフォームのライブラリをコンパイルするには、パラメータ「x 86」を追加します.
APP_ABI := armeabi armeabi-v7a mips x86


ダウンロード先:
http://developer.android.com/tools/sdk/ndk/index.html#GetStarted