From fc2f43e3da364429925008f71496521612554bca Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 2 Jun 2016 14:25:13 +0200 Subject: [PATCH] Added android64 support. --- scripts/0001-64bit-architecture-support.patch | 26 ++++++++++++++++++++++++++ scripts/android-build-openssl.sh | 7 +++---- scripts/android-build.conf | 6 +++--- 3 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 scripts/0001-64bit-architecture-support.patch diff --git a/scripts/0001-64bit-architecture-support.patch b/scripts/0001-64bit-architecture-support.patch new file mode 100644 index 0000000..255a796 --- /dev/null +++ b/scripts/0001-64bit-architecture-support.patch @@ -0,0 +1,26 @@ +From 6e9a00d9ac02c3b3adc0613798678eadb0c4dae5 Mon Sep 17 00:00:00 2001 +From: Armin Novak +Date: Thu, 2 Jun 2016 13:55:27 +0200 +Subject: [PATCH] 64bit architecture support. + +--- + Configure | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Configure b/Configure +index c98107a..fa20eca 100755 +--- a/Configure ++++ b/Configure +@@ -473,6 +473,9 @@ my %table=( + "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-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"android64", "gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib64 -m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:android:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", ++"android64-aarch64","gcc:-march=armv8-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"android64-mips64","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib64 -mabi=64 -O3 -Wall -DBN_DIV3W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC:-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", + + #### *BSD [do see comment about ${BSDthreads} above!] + "BSD-generic32","gcc:-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)", +-- +2.1.4 + diff --git a/scripts/android-build-openssl.sh b/scripts/android-build-openssl.sh index 3a36006..e94b4e5 100755 --- a/scripts/android-build-openssl.sh +++ b/scripts/android-build-openssl.sh @@ -45,6 +45,7 @@ function build { BASE=$(pwd) DST_DIR=$BUILD_DST/$DST_PREFIX common_run cd $BUILD_SRC + common_run git am $(dirname "${BASH_SOURCE[0]}")/0001-64bit-architecture-support.patch common_run git clean -xdf common_run ./Configure --openssldir=$DST_DIR $CONFIG shared common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" depend @@ -84,10 +85,8 @@ do $ARCH "mipsel-linux-android-" "arch-mips" ;; "mips64") - echo "[WARNING] Skipping unsupported architecture $ARCH" - continue - build "android-mips" "mipsel-linux-android-" \ - $ARCH "mipsel-linux-android-" "arch-mips" + build "android64-mips64" "mips64el-linux-android-" \ + $ARCH "mips64el-linux-android-" "arch-mips64" ;; "x86") build "android-x86" "i686-linux-android-" \ diff --git a/scripts/android-build.conf b/scripts/android-build.conf index b8c836e..f2331a8 100644 --- a/scripts/android-build.conf +++ b/scripts/android-build.conf @@ -8,11 +8,11 @@ WITH_JPEG=0 WITH_OPENH264=1 WITH_OPENSSL=1 BUILD_DEPS=1 -ANDROID_NATIVE_API_LEVEL=android-12 +ANDROID_NATIVE_API_LEVEL=android-21 JPEG_TAG=master OPENH264_TAG=v1.5.0 -OPENSSL_TAG=OpenSSL_1_0_2g +OPENSSL_TAG=OpenSSL_1_0_2h SRC_DIR=$SCRIPT_PATH/.. BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs @@ -20,4 +20,4 @@ BUILD_SRC=$SRC_DIR/build CMAKE_BUILD_TYPE=Debug -BUILD_ARCH="armeabi armeabi-v7a x86" +BUILD_ARCH="armeabi armeabi-v7a x86 arm64-v8a x86_64 mips64" -- 2.7.4