OpenSSL 1.1.1b

This commit is contained in:
BogDan Vatra
2019-05-01 18:30:34 +03:00
parent edc0a6fb19
commit 3098342d03
12 changed files with 25 additions and 39 deletions
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+17 -37
View File
@@ -1,14 +1,14 @@
#!/bin/bash
VERSION=1.0.2r
export ANDROID_NDK_ROOT=~/android/android-ndk-r10e
export ANDROID_API=android-21
VERSION=1.1.1b
export ANDROID_NDK_HOME=~/android/ndk-bundle
ANDROID_API=21
if [ ! -f "openssl-$VERSION.tar.gz" ]; then
wget https://www.openssl.org/source/openssl-$VERSION.tar.gz
fi
for arch in "x86" "aarch64" "arm"
for arch in "x86_64" "x86" "arm64" "arm"
do
rm -fr $arch
mkdir $arch
@@ -18,54 +18,34 @@ do
case $arch in
arm)
export ANDROID_PLATFORM=arch-arm
export ANDROID_EABI="arm-linux-androideabi-4.9"
export CROSS_COMPILE="arm-linux-androideabi-"
CONF_PARAM=android
;;
aarch64)
export ANDROID_PLATFORM=arch-arm64
export ANDROID_EABI="aarch64-linux-android-4.9"
export CROSS_COMPILE="aarch64-linux-android-"
CONF_PARAM=android
ANDROID_API=16
;;
x86)
export ANDROID_PLATFORM=arch-x86
export ANDROID_EABI="x86-4.9"
export CROSS_COMPILE="i686-linux-android-"
CONF_PARAM=android-x86
ANDROID_API=16
;;
arm64)
ANDROID_API=21
;;
x86_64)
ANDROID_API=21
;;
# x86_64)
# export ANDROID_EABI="x86_64-4.9"
# export ANDROID_ARCH=arch-x86_64
# export ARCH=x86_64
# export CROSS_COMPILE=x86_64-linux-android-
# CONF_PARAM="linux-generic64 no-asm -m64 -no-ssl2 -no-ssl3 -no-comp -no-hw --cross-compile-prefix=$CROSS_COMPILE"
# ;;
esac
export SYSTEM=android
export ANDROID_SYSROOT=$ANDROID_NDK_ROOT/platforms/$ANDROID_API/$ANDROID_PLATFORM
export ANDROID_DEV=$ANDROID_SYSROOT/usr
export CFLAGS="--sysroot=$ANDROID_SYSROOT"
export CPPFLAGS="--sysroot=$ANDROID_SYSROOT"
export CXXFLAGS="--sysroot=$ANDROID_SYSROOT"
ANDROID_TOOLCHAIN=""
for host in "linux-x86_64" "linux-x86" "darwin-x86_64" "darwin-x86"
do
if [ -d "$ANDROID_NDK_ROOT/toolchains/$ANDROID_EABI/prebuilt/$host/bin" ]; then
ANDROID_TOOLCHAIN="$ANDROID_NDK_ROOT/toolchains/$ANDROID_EABI/prebuilt/$host/bin"
if [ -d "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$host/bin" ]; then
ANDROID_TOOLCHAIN="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$host/bin"
break
fi
done
export PATH="$ANDROID_TOOLCHAIN":"$PATH"
./Configure shared $CONF_PARAM || exit 1
./Configure shared android-${arch} -D__ANDROID_API__=${ANDROID_API} || exit 1
make depend
make -j$(nproc) CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs || exit 1
${CROSS_COMPILE}strip -s libcrypto.so
${CROSS_COMPILE}strip -s libssl.so
llvm-strip -strip-all libcrypto.so
llvm-strip -strip-all libssl.so
cp libcrypto.so ../$arch
cp libssl.so ../$arch
cd ..
+8 -2
View File
@@ -6,8 +6,8 @@ contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
contains(ANDROID_TARGET_ARCH,arm64-v8a) {
ANDROID_EXTRA_LIBS += \
$$PWD/aarch64/libcrypto.so \
$$PWD/aarch64/libssl.so
$$PWD/arm64/libcrypto.so \
$$PWD/arm64/libssl.so
}
contains(ANDROID_TARGET_ARCH,x86) {
@@ -15,3 +15,9 @@ contains(ANDROID_TARGET_ARCH,x86) {
$$PWD/x86/libcrypto.so \
$$PWD/x86/libssl.so
}
contains(ANDROID_TARGET_ARCH,x86_64) {
ANDROID_EXTRA_LIBS += \
$$PWD/x86_64/libcrypto.so \
$$PWD/x86_64/libssl.so
}
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.