のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

ndk 64bit

Androidでの話です。
ARMの64ビット用にビルドする方法を調べました。

arm64-v8aをApplication.mkへ追加すればいいようです。


android-ndk-r10dのdocsのABI Management

file:///D:/android-ndk-r10d/docs/Programmers_Guide/html/md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html

Supported ABIs

Overview

Table 1 provides an at-a-glance overview of each ABI's supported instruction sets and capabilities.

Instruction Set(s) Notes
armeabi ARMV5TE and later
Thumb-1
No hard float.
armeabi-v7a armeabi
Thumb-2
VFPv3-D16
other optional
Hard float when specified as armeabi-v7a-hard.
Incompatible with ARMv5, v6 devices.
arm64-v8a AArch-64
x86 x86 (IA-32)
MMX
SSE/2/3
SSSE3
No support for MOVBE or SSE4.
x86-64 x86-64
MMX
SSE/2/3
SSSE3
SSE4.1, 4.2
POPCNT
mips MIPS32r1 and later Hard float.
mips64 MIPS64r6
arm64-v8a
This ABI is for ARMv8-based CPUs that support AArch64.

For more information, see the ARMv8 Technology Preview, and contact ARM for further details.
http://www.arm.com/files/downloads/ARMv8_Architecture.pdf

 APP_ABI := armeabi armeabi-v7a arm64-v8a
 lib/<abi>/lib<name>.so
    lib/armeabi/libfoo.so
    lib/armeabi-v7a/libfoo.so
    lib/arm64-v8a/libfoo.so
    lib/x86/libfoo.so
    lib/x86-64/libfoo.so
    lib/mips/libfoo.so
    lib/mips64/libfoo.so