Skip to content

Commit

Permalink
Merge pull request #3 from clarkok/master
Browse files Browse the repository at this point in the history
Add `-fPIC` flag to avoid linking error on Android
  • Loading branch information
217heidai authored Oct 15, 2024
2 parents 243ae81 + 64f7fc8 commit 1f847f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# OpenSSL for Android
Automatically compile static OpenSSL library for Android by Github Actions.

Added `-fPIC` to fix linking error.

## Android
`armeabi``mips``mips64` targets are no longer supported with NDK R17+.
* [ ] armeabi
Expand Down
2 changes: 2 additions & 0 deletions openssl_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ OPENSSL_SOURCES_PATH=${WORK_PATH}/openssl-3.3.2
ANDROID_TARGET_API=$1
ANDROID_TARGET_ABI=$2
OUTPUT_PATH=${WORK_PATH}/openssl_3.3.2_${ANDROID_TARGET_ABI}
export CXXFLAGS="-fPIC"
export CPPFLAGS="-DANDROID -fPIC"

OPENSSL_TMP_FOLDER=/tmp/openssl_${ANDROID_TARGET_ABI}
mkdir -p ${OPENSSL_TMP_FOLDER}
Expand Down

0 comments on commit 1f847f6

Please sign in to comment.