File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "free
37
37
# whether build fat library, use lipo -S create
38
38
cfg_build_fat_library =no
39
39
40
+ # whether use mthumb instruction or not
41
+ # format cfg_${libname}_${archname}_use_mthumb
42
+ cfg_curl_arm_use_mthumb =no
43
+
40
44
# debug and release mode flag
41
45
cfg_build_release_mode =" -O3 -DNDEBUG"
42
46
cfg_build_debug_mode =" -O0 -g -DDEBUG"
Original file line number Diff line number Diff line change 283
283
archive_name=$lib
284
284
fi
285
285
286
+
286
287
mkdir -p $cfg_platform_name /$archive_name /include/
287
288
288
289
for arch in " ${build_arches[@]} "
302
303
# set build mode flags -- debug or release
303
304
set_build_mode_cflags
304
305
306
+ # determine wether use mthumb or not
307
+ parse_use_mthumb=cfg_${lib} _${arch} _use_mthumb
308
+ use_mthumb=${! parse_use_mthumb}
309
+ echo $use_mthumb
310
+ if [ -z $use_mthumb ]; then
311
+ use_mthumb=yes
312
+ fi
313
+
314
+ export ANDROID_USE_MTHUMB=$use_mthumb
305
315
306
316
install_library_path=" install-${cfg_platform_name} "
307
317
build_library_path=$cfg_platform_name
331
341
if [ $cfg_platform_name = " android" ]; then
332
342
export ANDROID_GCC_VERSION=$build_gcc_version
333
343
export ANDROID_API=android-$build_api
334
-
335
344
fi
336
345
337
346
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ png_dependent_archive_list=z
28
28
freetype_dependent_archive_list =z
29
29
websockets_dependent_archive_list =z
30
30
curl_dependent_archive_list =z,ssl,crypto
31
+ openssl_dependent_archive_list =crypto
31
32
32
33
33
34
# #ignore arch list for specify libraries
Original file line number Diff line number Diff line change @@ -247,17 +247,23 @@ check_android_sdk()
247
247
exit 1
248
248
fi
249
249
250
+ THUMB_FLAG=" "
251
+ if [ $ANDROID_USE_MTHUMB = " yes" ]; then
252
+ THUMB_FLAG=" -mthumb"
253
+ echo " we are using mthumb for ${ANDROID_ABI} !!"
254
+ fi
255
+
250
256
251
257
if [ ${ANDROID_ABI} = " armeabi-v7a" ]; then
252
258
add_make_enabled " HAVE_NEON"
253
259
add_make_enabled " HAVE_ARMV7A"
254
- add_make " EXTRA_CFLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -fomit-frame-pointer -fno-strict-aliasing -DANDROID -Wa,--noexecstack -Wformat "
260
+ add_make " EXTRA_CFLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 ${THUMB_FLAG} -fomit-frame-pointer -fno-strict-aliasing -DANDROID -Wa,--noexecstack -Wformat "
255
261
add_make " EXTRA_LDFLAGS := -march=armv7-a -Wl,--fix-cortex-a8"
256
262
fi
257
263
258
264
if [ ${ANDROID_ABI} = " armeabi" -a -z " ${NO_ARMV6} " ]; then
259
265
add_make_enabled " HAVE_ARMV6"
260
- add_make " EXTRA_CFLAGS := -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -mthumb -fomit-frame-pointer -fno-strict-aliasing -DANDROID -Wa,--noexecstack -Wformat "
266
+ add_make " EXTRA_CFLAGS := -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float ${THUMB_FLAG} -fomit-frame-pointer -fno-strict-aliasing -DANDROID -Wa,--noexecstack -Wformat "
261
267
fi
262
268
263
269
if [ ${ANDROID_ABI} = " armeabi-v8a" ]; then
You can’t perform that action at this time.
0 commit comments