summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xConfigure1
-rw-r--r--TABLE33
-rwxr-xr-xconfig1
-rw-r--r--crypto/perlasm/x86asm.pl4
-rw-r--r--crypto/perlasm/x86gas.pl9
-rw-r--r--fips/fips_canister.c3
6 files changed, 48 insertions, 3 deletions
diff --git a/Configure b/Configure
index 76aedb68ec..ed8c4c0bda 100755
--- a/Configure
+++ b/Configure
@@ -400,6 +400,7 @@ my %table=(
# 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-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)",
#### *BSD [do see comment about ${BSDthreads} above!]
diff --git a/TABLE b/TABLE
index 4292c1092c..47b7af934b 100644
--- a/TABLE
+++ b/TABLE
@@ -1089,6 +1089,39 @@ $ranlib =
$arflags =
$multilib =
+*** android-x86
+$cc = gcc
+$cflags = -mandroid -I$(ANDROID_DEV)/include -B$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall
+$unistd =
+$thread_cflag = -D_REENTRANT
+$sys_id =
+$lflags = -ldl
+$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
+$cpuid_obj = x86cpuid.o
+$bn_obj = bn-586.o co-586.o x86-mont.o x86-gf2m.o
+$des_obj = des-586.o crypt586.o
+$aes_obj = aes-586.o vpaes-x86.o aesni-x86.o
+$bf_obj = bf-586.o
+$md5_obj = md5-586.o
+$sha1_obj = sha1-586.o sha256-586.o sha512-586.o
+$cast_obj = cast-586.o
+$rc4_obj = rc4-586.o
+$rmd160_obj = rmd-586.o
+$rc5_obj = rc5-586.o
+$wp_obj = wp_block.o wp-mmx.o
+$cmll_obj = cmll-x86.o
+$modes_obj = ghash-x86.o
+$engines_obj = e_padlock-x86.o
+$perlasm_scheme = android
+$dso_scheme = dlfcn
+$shared_target= linux-shared
+$shared_cflag = -fPIC
+$shared_ldflag =
+$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
+$ranlib =
+$arflags =
+$multilib =
+
*** aux3-gcc
$cc = gcc
$cflags = -O2 -DTERMIO
diff --git a/config b/config
index 7a40df5774..37f86b068a 100755
--- a/config
+++ b/config
@@ -830,6 +830,7 @@ case "$GUESSOS" in
beos-*) OUT="$GUESSOS" ;;
x86pc-*-qnx6) OUT="QNX6-i386" ;;
*-*-qnx6) OUT="QNX6" ;;
+ x86-*-android|i?86-*-android) OUT="android-x86" ;;
armv[7-9]*-*-android) OUT="android-armv7" ;;
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
esac
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl
index b7ddb8137f..eb543db2f6 100644
--- a/crypto/perlasm/x86asm.pl
+++ b/crypto/perlasm/x86asm.pl
@@ -218,7 +218,7 @@ sub ::asm_init
$filename=$fn;
$i386=$cpu;
- $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=0;
+ $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=$android=0;
if (($type eq "elf"))
{ $elf=1; require "x86gas.pl"; }
elsif (($type eq "a\.out"))
@@ -235,6 +235,8 @@ sub ::asm_init
{ $win32=1; require "x86masm.pl"; }
elsif (($type eq "macosx"))
{ $aout=1; $macosx=1; require "x86gas.pl"; }
+ elsif (($type eq "android"))
+ { $elf=1; $android=1; require "x86gas.pl"; }
else
{ print STDERR <<"EOF";
Pick one target type from
diff --git a/crypto/perlasm/x86gas.pl b/crypto/perlasm/x86gas.pl
index 3a79106298..f6b8cc9679 100644
--- a/crypto/perlasm/x86gas.pl
+++ b/crypto/perlasm/x86gas.pl
@@ -209,7 +209,14 @@ sub ::picmeup
sub ::initseg
{ my $f=$nmdecor.shift;
- if ($::elf)
+ if ($::android)
+ { $initseg.=<<___;
+.section .init_array
+.align 4
+.long $f
+___
+ }
+ elsif ($::elf)
{ $initseg.=<<___;
.section .init
call $f
diff --git a/fips/fips_canister.c b/fips/fips_canister.c
index a209172f43..f00fc7b365 100644
--- a/fips/fips_canister.c
+++ b/fips/fips_canister.c
@@ -28,7 +28,8 @@ const void *FIPS_text_end(void);
#endif
#if !defined(FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE)
-# if (defined(__ANDROID__) && (defined(__arm__) || defined(__arm))) || \
+# if (defined(__ANDROID__) && (defined(__arm__) || defined(__arm) || \
+ defined(__i386__)|| defined(__i386))) || \
(defined(__vxworks) && (defined(__ppc__) || defined(__ppc))) || \
(defined(__linux) && defined(__PPC__) && !defined(__PPC64__))
# define FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE