Add android-x86.

This commit is contained in:
Andy Polyakov 2011-10-15 08:32:16 +00:00
parent e1db7c4e7a
commit 8fcdb1e60f
6 changed files with 48 additions and 3 deletions

View File

@ -400,6 +400,7 @@ 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-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::-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!] #### *BSD [do see comment about ${BSDthreads} above!]

33
TABLE
View File

@ -1089,6 +1089,39 @@ $ranlib =
$arflags = $arflags =
$multilib = $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 *** aux3-gcc
$cc = gcc $cc = gcc
$cflags = -O2 -DTERMIO $cflags = -O2 -DTERMIO

1
config
View File

@ -830,6 +830,7 @@ case "$GUESSOS" in
beos-*) OUT="$GUESSOS" ;; beos-*) OUT="$GUESSOS" ;;
x86pc-*-qnx6) OUT="QNX6-i386" ;; x86pc-*-qnx6) OUT="QNX6-i386" ;;
*-*-qnx6) OUT="QNX6" ;; *-*-qnx6) OUT="QNX6" ;;
x86-*-android|i?86-*-android) OUT="android-x86" ;;
armv[7-9]*-*-android) OUT="android-armv7" ;; armv[7-9]*-*-android) OUT="android-armv7" ;;
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;; *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
esac esac

View File

@ -218,7 +218,7 @@ sub ::asm_init
$filename=$fn; $filename=$fn;
$i386=$cpu; $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")) if (($type eq "elf"))
{ $elf=1; require "x86gas.pl"; } { $elf=1; require "x86gas.pl"; }
elsif (($type eq "a\.out")) elsif (($type eq "a\.out"))
@ -235,6 +235,8 @@ sub ::asm_init
{ $win32=1; require "x86masm.pl"; } { $win32=1; require "x86masm.pl"; }
elsif (($type eq "macosx")) elsif (($type eq "macosx"))
{ $aout=1; $macosx=1; require "x86gas.pl"; } { $aout=1; $macosx=1; require "x86gas.pl"; }
elsif (($type eq "android"))
{ $elf=1; $android=1; require "x86gas.pl"; }
else else
{ print STDERR <<"EOF"; { print STDERR <<"EOF";
Pick one target type from Pick one target type from

View File

@ -209,7 +209,14 @@ sub ::picmeup
sub ::initseg sub ::initseg
{ my $f=$nmdecor.shift; { my $f=$nmdecor.shift;
if ($::elf) if ($::android)
{ $initseg.=<<___;
.section .init_array
.align 4
.long $f
___
}
elsif ($::elf)
{ $initseg.=<<___; { $initseg.=<<___;
.section .init .section .init
call $f call $f

View File

@ -28,7 +28,8 @@ const void *FIPS_text_end(void);
#endif #endif
#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(__i386__)|| defined(__i386))) || \
(defined(__vxworks) && (defined(__ppc__) || defined(__ppc))) || \ (defined(__vxworks) && (defined(__ppc__) || defined(__ppc))) || \
(defined(__linux) && defined(__PPC__) && !defined(__PPC64__)) (defined(__linux) && defined(__PPC__) && !defined(__PPC64__))
# define FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE # define FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE