Add support for Android 5, both 32- and 64-bit cases.
Special note about additional -pie flag in android-armv7. The initial reason for adding it is that Android 5 refuses to execute non-PIE binaries. But what about older systems and previously validated platforms? It should be noted that flag is not used when compiling object code, fipscanister.o in this context, only when linking applications, *supplementary* fips_algvs used during validation procedure. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
This commit is contained in:
parent
50e2a0ea46
commit
6db8e3bdc9
@ -405,7 +405,8 @@ my %table=(
|
|||||||
# Android: linux-* but without -DTERMIO and pointers to headers and libs.
|
# Android: linux-* but without -DTERMIO and pointers to headers and libs.
|
||||||
"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-pie%-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"android64-aarch64","gcc:-mandroid -fPIC -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-pie%-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
||||||
#### *BSD [do see comment about ${BSDthreads} above!]
|
#### *BSD [do see comment about ${BSDthreads} above!]
|
||||||
"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
1
config
1
config
@ -872,6 +872,7 @@ case "$GUESSOS" in
|
|||||||
*-*-qnx6) OUT="QNX6" ;;
|
*-*-qnx6) OUT="QNX6" ;;
|
||||||
x86-*-android|i?86-*-android) OUT="android-x86" ;;
|
x86-*-android|i?86-*-android) OUT="android-x86" ;;
|
||||||
armv[7-9]*-*-android) OUT="android-armv7" ;;
|
armv[7-9]*-*-android) OUT="android-armv7" ;;
|
||||||
|
aarch64-*-android) OUT="android64-aarch64" ;;
|
||||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ const void *FIPS_text_end(void);
|
|||||||
|
|
||||||
#if !defined(FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE)
|
#if !defined(FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE)
|
||||||
# if (defined(__ANDROID__) && (defined(__arm__) || defined(__arm) || \
|
# if (defined(__ANDROID__) && (defined(__arm__) || defined(__arm) || \
|
||||||
|
defined(__aarch64__) || \
|
||||||
defined(__i386__)|| defined(__i386))) || \
|
defined(__i386__)|| defined(__i386))) || \
|
||||||
(defined(__vxworks) && (defined(__ppc__) || defined(__ppc) || \
|
(defined(__vxworks) && (defined(__ppc__) || defined(__ppc) || \
|
||||||
defined(__mips__)|| defined(__mips))) || \
|
defined(__mips__)|| defined(__mips))) || \
|
||||||
|
@ -1325,7 +1325,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
FIPS_post_set_callback(post_cb);
|
FIPS_post_set_callback(post_cb);
|
||||||
|
|
||||||
#if defined(__APPLE__) && (defined(__arm__) || defined(__aarch64__))
|
#if (defined(__arm__) || defined(__aarch64__))
|
||||||
extern unsigned int OPENSSL_armcap_P;
|
extern unsigned int OPENSSL_armcap_P;
|
||||||
if (0 == OPENSSL_armcap_P)
|
if (0 == OPENSSL_armcap_P)
|
||||||
fprintf(stderr, "Optimizations disabled\n");
|
fprintf(stderr, "Optimizations disabled\n");
|
||||||
|
@ -326,7 +326,7 @@ int main(int argc, char **argv)
|
|||||||
SysInit();
|
SysInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__) && (defined(__arm__) || defined(__aarch64__))
|
#if (defined(__arm__) || defined(__aarch64__))
|
||||||
if (*args && !strcmp(*args, "-noaccel"))
|
if (*args && !strcmp(*args, "-noaccel"))
|
||||||
{
|
{
|
||||||
extern unsigned int OPENSSL_armcap_P;
|
extern unsigned int OPENSSL_armcap_P;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user