Skip to content

Commit c072519

Browse files
committed
Enable crosscompiled android arm7 version of openvpn
1 parent 6d04e71 commit c072519

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed
Binary file not shown.

openvpn3/session.go

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ package openvpn3
3131
#cgo android,arm64 LDFLAGS: -lopenvpn3_android_arm64
3232
#cgo android,amd64 LDFLAGS: -lopenvpn3_android_amd64
3333
#cgo android,386 LDFLAGS: -lopenvpn3_android_x86
34+
#cgo android,arm LDFLAGS: -lopenvpn3_android_armeabi-v7a
3435
//TODO copied from openvpnv3 lib build tool - do we really need all of this?
3536
#cgo darwin,amd64 LDFLAGS: -framework Security -framework CoreFoundation -framework SystemConfiguration -framework IOKit -framework ApplicationServices -mmacosx-version-min=10.8 -stdlib=libc++
3637
//iOS frameworks

scripts/build-bridge.sh

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ echo "O3 is: $O3"
2424
/go-src-root/scripts/x-compile-windows.sh
2525
/go-src-root/scripts/x-compile-ios.sh
2626
/go-src-root/scripts/x-compile-android-arm64.sh
27+
/go-src-root/scripts/x-compile-android-armeabi-v7a.sh
2728
/go-src-root/scripts/x-compile-android-x86.sh
2829
/go-src-root/scripts/x-compile-android-amd64.sh
2930

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
PLATFORM=android
5+
SCRIPTS=android
6+
LIBSUFFIX=android_armeabi-v7a
7+
8+
echo "Building for: $PLATFORM"
9+
10+
echo "Bootstrapping Android NDK"
11+
12+
$ANDROID_NDK_ROOT/build/tools/make_standalone_toolchain.py --install-dir=/usr/$ANDROID_CHAIN_ARM --api=16 --arch=arm
13+
14+
15+
echo BUILD DEPS
16+
pushd $DEP_DIR
17+
rm -rf asio* lz4* mbedtls* #lzo* boost* minicrypto openssl* polarssl* snappy*
18+
echo "******* ASIO"
19+
$O3/core/deps/asio/build-asio
20+
echo "******* MBEDTLS"
21+
TARGETS=android-a7a $O3/core/scripts/android/build-mbedtls
22+
echo "******* LZ4"
23+
TARGETS=android-a7a $O3/core/scripts/android/build-lz4
24+
popd
25+
26+
. core/vars/setpath
27+
. core/vars/vars-android-a7a
28+
29+
cd core/adapter
30+
PROF=$PLATFORM MTLS=1 NOSSL=1 LZ4=1 ASIO=1 ECHO=1 CO=1 build library
31+
32+
LIB_OUT="/go-src-root/openvpn3/bridge/libopenvpn3_${LIBSUFFIX}.a"
33+
rm -rf $LIB_OUT
34+
35+
libs=("$DEP_DIR/mbedtls/mbedtls-$PLATFORM/library/libmbedtls.a" \
36+
"$DEP_DIR/lz4/lz4-$PLATFORM/lib/liblz4.a" )
37+
38+
MORE_LIBS=${libs[@]} /go-src-root/scripts/concat-libs.sh $LIB_OUT library.o
39+
40+
$RANLIB_CMD $LIB_OUT | grep -v "has no symbols" || true

0 commit comments

Comments
 (0)