Skip to content

Commit ea95dee

Browse files
committed
CI: android:
- fix openssl error on armv7
1 parent 9cd11a7 commit ea95dee

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

platforms/build-android.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,39 @@ for INDEX in "${ARCH_KEYS_INDEX[@]}"; do
232232

233233
cd "$BUILD_DIR_OPENSSL"
234234

235+
if [ ! -e "openssl-3.3.0.tar.gz" ]; then
235236
wget -q "https://github.com/openssl/openssl/releases/download/openssl-3.3.0/openssl-3.3.0.tar.gz"
237+
fi
236238

239+
if [ ! -d "openssl-3.3.0" ]; then
237240
tar -xzf "openssl-3.3.0.tar.gz"
241+
fi
238242

239243
cd "openssl-3.3.0"
240244

241245
OPENSSL_TARGET_ARCH="android-$ARCH"
242246

243247
export ANDROID_NDK_ROOT="$ANDROID_NDK_HOME"
244248

249+
if [ "$ARCH_VERSION" = "armv7a" ]; then
250+
251+
./Configure --prefix="$SYS_ROOT/usr" no-asm no-tests no-shared "$OPENSSL_TARGET_ARCH" "-D__ANDROID_API__=$SDK_VERSION"
252+
else
245253
./Configure --prefix="$SYS_ROOT/usr" no-tests no-shared "$OPENSSL_TARGET_ARCH" "-D__ANDROID_API__=$SDK_VERSION"
254+
fi
255+
256+
make clean
257+
258+
if [ "$ARCH_VERSION" = "armv7-a" ]; then
259+
260+
# fix an compile time error since openssl 3.1.0 >
261+
# see https://github.com/android/ndk/issues/1992
262+
# Apply patch that fixes the armcap instruction
263+
264+
# sed -e '/[.]hidden.*OPENSSL_armcap_P/d; /[.]extern.*OPENSSL_armcap_P/ {p; s/extern/hidden/ }' -i -- crypto/*arm*pl crypto/*/asm/*arm*pl
265+
sed -E -i '' -e '/[.]hidden.*OPENSSL_armcap_P/d' -e '/[.]extern.*OPENSSL_armcap_P/ {p; s/extern/hidden/; }' crypto/*arm*pl crypto/*/asm/*arm*pl
266+
267+
fi
246268

247269
make -j build_sw
248270

0 commit comments

Comments
 (0)