Skip to content

Commit bbfc1d4

Browse files
committed
Added patch for openssl build.
1 parent 235c30c commit bbfc1d4

File tree

4 files changed

+36
-7
lines changed

4 files changed

+36
-7
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ RUN echo "************ Installing C++ Support ************" \
5555
&& sdkmanager 'cmake;3.6.4111459'
5656

5757
# NDK
58-
RUN echo "************ Installing Android NDK 17c ************" \
58+
RUN echo "************ Installing Android NDK 18b ************" \
5959
&& wget --output-document=$HOME/ndk.zip -q \
60-
"https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip" \
60+
"https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip" \
6161
&& mkdir -p $ANDROID_NDK_HOME \
6262
&& unzip -q $HOME/ndk.zip -d $ANDROID_NDK_HOME \
63-
&& mv $ANDROID_NDK_HOME/android-ndk-r17c/* $ANDROID_NDK_HOME \
64-
&& rm -f $HOME/ndk.zip && rm -d $ANDROID_NDK_HOME/android-ndk-r17c
63+
&& mv $ANDROID_NDK_HOME/android-ndk-r18b/* $ANDROID_NDK_HOME \
64+
&& rm -f $HOME/ndk.zip && rm -d $ANDROID_NDK_HOME/android-ndk-r18b
6565

6666
RUN useradd build -m -u 112
6767
USER build

build-android.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ function build_android_arch {
9393
fi
9494

9595
export SYSROOT=$TOOLCHAIN_ROOT_PATH/sysroot
96-
export CC="$NDK_TOOLCHAIN_BASENAME-gcc --sysroot=${SYSROOT}"
97-
export CXX=$NDK_TOOLCHAIN_BASENAME-gcc++
96+
export CC="$NDK_TOOLCHAIN_BASENAME-clang --sysroot=${SYSROOT}"
97+
export CXX=$NDK_TOOLCHAIN_BASENAME-clang++
9898
export LINK=${CXX}
9999
export LD=$NDK_TOOLCHAIN_BASENAME-ld
100100
export AR=$NDK_TOOLCHAIN_BASENAME-ar

common.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@ function unarchive() {
5555
ZIP_PATH=$2
5656
TARGET=$3
5757
TARGET_DIR=$4
58-
58+
5959
if [ -d $TARGET_DIR ]; then
6060
echo "Remove unarchive target dir for $TARGET"
6161
rm -dr $TARGET_DIR
6262
fi
6363

6464
echo "Unarchive sources for $TARGET..."
6565
(cd $BUILD_DIR; tar -zxf $ZIP_PATH; mv $EXTRACTED_NAME $TARGET_DIR;) || exit 29
66+
67+
echo "Applying Patch for cmake build."
68+
patch $TARGET_DIR/Configure configure.patch
6669
}

configure.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--- Configure 2018-11-20 14:44:48.000000000 +0100
2+
+++ Configure_fix 2018-12-20 13:09:17.000000000 +0100
3+
@@ -471,10 +471,10 @@
4+
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
5+
6+
# Android: linux-* but without pointers to headers and libs.
7+
-"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)",
8+
-"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)",
9+
-"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)",
10+
-"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)",
11+
+"android","gcc:-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)",
12+
+"android-x86","gcc:-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)",
13+
+"android-armv7","gcc:-march=armv7-a -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)",
14+
+"android-mips","gcc:-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)",
15+
16+
#### *BSD [do see comment about ${BSDthreads} above!]
17+
"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)",
18+
@@ -2122,7 +2122,7 @@
19+
VALUE "ProductVersion", "$version\\0"
20+
// Optional:
21+
//VALUE "Comments", "\\0"
22+
- VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0"
23+
+ VALUE "LegalCopyright", "Copyright � 1998-2005 The OpenSSL Project. Copyright � 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0"
24+
//VALUE "LegalTrademarks", "\\0"
25+
//VALUE "PrivateBuild", "\\0"
26+
//VALUE "SpecialBuild", "\\0"

0 commit comments

Comments
 (0)