|
@@ -1,27 +1,7 @@
|
|
#### Android...
|
|
#### Android...
|
|
#
|
|
#
|
|
-# It takes *one* prior-set environment variable to make it work:
|
|
|
|
-#
|
|
|
|
-# ANDROID_NDK=/some/where/android-ndk-<ver>
|
|
|
|
-#
|
|
|
|
-# As well as PATH *adjusted* to cover ${CROSS_COMPILE}gcc and company.
|
|
|
|
-#
|
|
|
|
-# Note that it's different from original instructions that required to
|
|
|
|
-# set CROSS_SYSROOT [to $ANDROID_NDK/platforms/android-<api>/arch-<arch>]
|
|
|
|
-# and CROSS_COMPILE. CROSS_SYSROOT is still recognized [and even required
|
|
|
|
-# for some legacy targets], but if not set, it's detected and set to the
|
|
|
|
-# latest Android platform available with appointed NDK automatically. If
|
|
|
|
-# you need to target older platform, pass additional -D__ANDROID_API__=N
|
|
|
|
-# to Configure. For example, to compile for ICS on ARM with NDK 10d:
|
|
|
|
-#
|
|
|
|
-# ANDROID_NDK=/some/where/android-ndk-10d
|
|
|
|
-# PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuild/linux-x86_64/bin:$PATH
|
|
|
|
-# [..]./Configure android-arm -D__ANDROID_API__=14
|
|
|
|
-#
|
|
|
|
-# One can engage clang by passing CC=clang to Configure. In such case
|
|
|
|
-# PATH needs even more adjustments to cover NDK's clang itself, as well
|
|
|
|
-# as unprefixed, yet target-specific ar and ranlib [or not, if you use
|
|
|
|
-# binutils-multiarch].
|
|
|
|
|
|
+# See NOTES.ANDROID for details. But don't miss platform-specific
|
|
|
|
+# comments below...
|
|
|
|
|
|
{
|
|
{
|
|
my $android_ndk = {};
|
|
my $android_ndk = {};
|
|
@@ -53,7 +33,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- # list available platforms [numerically]
|
|
|
|
|
|
+ # list available platforms (numerically)
|
|
my @platforms = sort { $a =~ m/-([0-9]+)$/; my $aa = $1;
|
|
my @platforms = sort { $a =~ m/-([0-9]+)$/; my $aa = $1;
|
|
$b =~ m/-([0-9]+)$/; $aa <=> $1;
|
|
$b =~ m/-([0-9]+)$/; $aa <=> $1;
|
|
} glob("$ndk/platforms/android-$api");
|
|
} glob("$ndk/platforms/android-$api");
|
|
@@ -141,7 +121,7 @@ my %targets = (
|
|
# ability to engage NEON is not constrained by ABI choice, nor
|
|
# ability to engage NEON is not constrained by ABI choice, nor
|
|
# is your ability to call OpenSSL from your application code
|
|
# is your ability to call OpenSSL from your application code
|
|
# compiled with floating-point ABI other than default 'soft'.
|
|
# compiled with floating-point ABI other than default 'soft'.
|
|
- # [Latter thanks to __attribute__((pcs("aapcs"))) declaration.]
|
|
|
|
|
|
+ # (Latter thanks to __attribute__((pcs("aapcs"))) declaration.)
|
|
# This means that choice of ARM libraries you provide in .apk
|
|
# This means that choice of ARM libraries you provide in .apk
|
|
# is driven by application needs. For example if application
|
|
# is driven by application needs. For example if application
|
|
# itself benefits from NEON or is floating-point intensive, then
|
|
# itself benefits from NEON or is floating-point intensive, then
|
|
@@ -154,10 +134,11 @@ my %targets = (
|
|
# in order to build "universal" binary and allow OpenSSL take
|
|
# in order to build "universal" binary and allow OpenSSL take
|
|
# advantage of NEON when it's available.
|
|
# advantage of NEON when it's available.
|
|
#
|
|
#
|
|
- # Keep in mind that [just like with linux-armv4] we rely on
|
|
|
|
|
|
+ # Keep in mind that (just like with linux-armv4) we rely on
|
|
# compiler defaults, which is not necessarily what you had
|
|
# compiler defaults, which is not necessarily what you had
|
|
# in mind, in which case you would have to pass additional
|
|
# in mind, in which case you would have to pass additional
|
|
# -march and/or -mfloat-abi flags. NDK defaults to armv5te.
|
|
# -march and/or -mfloat-abi flags. NDK defaults to armv5te.
|
|
|
|
+ # Some NDK versions reportedly require additional -latomic.
|
|
#
|
|
#
|
|
inherit_from => [ "android", asm("armv4_asm") ],
|
|
inherit_from => [ "android", asm("armv4_asm") ],
|
|
bn_ops => add("RC4_CHAR"),
|
|
bn_ops => add("RC4_CHAR"),
|
|
@@ -201,7 +182,7 @@ my %targets = (
|
|
},
|
|
},
|
|
|
|
|
|
####################################################################
|
|
####################################################################
|
|
- # Backward compatible targets, [might] requre $CROSS_SYSROOT
|
|
|
|
|
|
+ # Backward compatible targets, (might) requre $CROSS_SYSROOT
|
|
#
|
|
#
|
|
"android-armeabi" => {
|
|
"android-armeabi" => {
|
|
inherit_from => [ "android-arm" ],
|
|
inherit_from => [ "android-arm" ],
|