Skip to content

Commit a4d5626

Browse files
committed
add correct compile flags to openssl android
1 parent 2526cd3 commit a4d5626

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

build/android/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,13 @@ info "Building static libraries"
132132
spushd "${cocos_root}/contrib"
133133
mkdir -p "Android-${ANDROID_ABI}" && cd "Android-${ANDROID_ABI}"
134134

135+
135136
../bootstrap ${OPTIONS} \
136137
--host=${TARGET} \
137138
--prefix=${cocos_root}/contrib/${TARGET}-${ANDROID_ABI}> $out
139+
140+
echo "ANDROID_ARCH := ${CFLAGS}" >> config.mak
141+
138142
#
139143
# make
140144
#

contrib/src/openssl/rules.mak

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ ifdef HAVE_IOS
5252
# cd $< && perl -i -pe 's|static volatile sig_atomic_t intr_signal|static volatile int intr_signal|' crypto/ui/ui_openssl.c
5353
cd $< && perl -i -pe "s|^CC= xcrun clang|CC= xcrun cc -arch ${IOS_ARCH} -miphoneos-version-min=6.0 |g" Makefile
5454
cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= -isysroot ${IOS_SDK} |g" Makefile
55+
endif
56+
ifdef HAVE_ANDROID
57+
cd $< && perl -i -pe "s|^CFLAG= (.*)|CFLAG= ${ANDROID_ARCH} |g" Makefile
5558
endif
5659
cd $< && $(MAKE) install
5760
touch $@

0 commit comments

Comments
 (0)