mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Android: add all arch support
Add support for armv7a, i686 and x86_64 archs to android.mk Add -fPIC to depends file as anddroid requires it see https://stackoverflow.com/questions/30498776/position-independent-executables-and-android
This commit is contained in:
parent
d419ca7e32
commit
f9af3ced1c
8 changed files with 40 additions and 15 deletions
|
@ -1,4 +1,11 @@
|
|||
ifeq ($(HOST),armv7a-linux-android)
|
||||
android_AR=$(ANDROID_TOOLCHAIN_BIN)/arm-linux-androideabi-ar
|
||||
android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)eabi$(ANDROID_API_LEVEL)-clang++
|
||||
android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)eabi$(ANDROID_API_LEVEL)-clang
|
||||
android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/arm-linux-androideabi-ranlib
|
||||
else
|
||||
android_AR=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)-ar
|
||||
android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++
|
||||
android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang
|
||||
android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)-ranlib
|
||||
endif
|
||||
|
|
|
@ -15,6 +15,10 @@ $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win3
|
|||
$(package)_config_opts_x86_64_mingw32=address-model=64
|
||||
$(package)_config_opts_i686_mingw32=address-model=32
|
||||
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
|
||||
$(package)_config_opts_i686_android=address-model=32
|
||||
$(package)_config_opts_aarch64_android=address-model=64
|
||||
$(package)_config_opts_x86_64_android=address-model=64
|
||||
$(package)_config_opts_armv7a_android=address-model=32
|
||||
$(package)_toolset_$(host_os)=gcc
|
||||
$(package)_archiver_$(host_os)=$($(package)_ar)
|
||||
$(package)_toolset_darwin=darwin
|
||||
|
@ -22,6 +26,7 @@ $(package)_archiver_darwin=$($(package)_libtool)
|
|||
$(package)_config_libraries=chrono,filesystem,system,thread,test
|
||||
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
|
||||
$(package)_cxxflags_linux=-fPIC
|
||||
$(package)_cxxflags_android=-fPIC
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
|
|
|
@ -19,6 +19,7 @@ define $(package)_set_vars
|
|||
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
|
||||
$(package)_config_opts_release=--disable-debug-mode
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
$(package)_config_opts_android=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
|
|
|
@ -57,7 +57,11 @@ $(package)_config_opts_riscv64_linux=linux-generic64
|
|||
$(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc
|
||||
$(package)_config_opts_x86_64_mingw32=mingw64
|
||||
$(package)_config_opts_i686_mingw32=mingw
|
||||
$(package)_config_opts_android=linux-generic64
|
||||
$(package)_config_opts_android=-fPIC
|
||||
$(package)_config_opts_aarch64_android=linux-generic64
|
||||
$(package)_config_opts_x86_64_android=linux-generic64
|
||||
$(package)_config_opts_armv7a_android=linux-generic32
|
||||
$(package)_config_opts_i686_android=linux-generic32
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
|
|
|
@ -8,6 +8,7 @@ define $(package)_set_vars
|
|||
$(package)_config_opts=--disable-shared --without-tools --without-tests --disable-sdltest
|
||||
$(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
$(package)_config_opts_android=--with-pic
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
|
|
|
@ -127,20 +127,26 @@ $(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
|
|||
$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
|
||||
$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
|
||||
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
|
||||
$(package)_config_opts_aarch64_android = -xplatform android-clang
|
||||
$(package)_config_opts_aarch64_android += -android-sdk $(ANDROID_SDK)
|
||||
$(package)_config_opts_aarch64_android += -android-ndk $(ANDROID_NDK)
|
||||
$(package)_config_opts_aarch64_android += -android-ndk-platform android-$(ANDROID_API_LEVEL)
|
||||
$(package)_config_opts_aarch64_android += -device-option CROSS_COMPILE="$(host)-"
|
||||
|
||||
$(package)_config_opts_android = -xplatform android-clang
|
||||
$(package)_config_opts_android += -android-sdk $(ANDROID_SDK)
|
||||
$(package)_config_opts_android += -android-ndk $(ANDROID_NDK)
|
||||
$(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL)
|
||||
$(package)_config_opts_android += -device-option CROSS_COMPILE="$(host)-"
|
||||
$(package)_config_opts_android += -egl
|
||||
$(package)_config_opts_android += -qpa xcb
|
||||
$(package)_config_opts_android += -no-eglfs
|
||||
$(package)_config_opts_android += -opengl es2
|
||||
$(package)_config_opts_android += -qt-freetype
|
||||
$(package)_config_opts_android += -no-fontconfig
|
||||
$(package)_config_opts_android += -L $(host_prefix)/lib
|
||||
$(package)_config_opts_android += -I $(host_prefix)/include
|
||||
|
||||
$(package)_config_opts_aarch64_android += -android-arch arm64-v8a
|
||||
$(package)_config_opts_aarch64_android += -egl
|
||||
$(package)_config_opts_aarch64_android += -qpa xcb
|
||||
$(package)_config_opts_aarch64_android += -no-eglfs
|
||||
$(package)_config_opts_aarch64_android += -opengl es2
|
||||
$(package)_config_opts_aarch64_android += -qt-freetype
|
||||
$(package)_config_opts_aarch64_android += -no-fontconfig
|
||||
$(package)_config_opts_aarch64_android += -L $(host_prefix)/lib
|
||||
$(package)_config_opts_aarch64_android += -I $(host_prefix)/include
|
||||
$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a
|
||||
$(package)_config_opts_x86_64_android += -android-arch x86_64
|
||||
$(package)_config_opts_i686_android += -android-arch i686
|
||||
|
||||
$(package)_build_env = QT_RCC_TEST=1
|
||||
$(package)_build_env += QT_RCC_SOURCE_DATE_OVERRIDE=1
|
||||
endef
|
||||
|
|
|
@ -10,6 +10,7 @@ define $(package)_set_vars
|
|||
$(package)_config_opts += --without-libsodium --without-libgssapi_krb5 --without-pgm --without-norm --without-vmci
|
||||
$(package)_config_opts += --disable-libunwind --disable-radix-tree --without-gcov
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
$(package)_config_opts_android=--with-pic
|
||||
$(package)_cxxflags=-std=c++11
|
||||
endef
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ $(package)_config_opts+=RANLIB="$($(package)_ranlib)"
|
|||
$(package)_config_opts+=AR="$($(package)_ar)"
|
||||
$(package)_config_opts_darwin+=AR="$($(package)_libtool)"
|
||||
$(package)_config_opts_darwin+=ARFLAGS="-o"
|
||||
$(package)_config_opts_aarch64_android+=CHOST=$(host)
|
||||
$(package)_config_opts_android+=CHOST=$(host)
|
||||
endef
|
||||
|
||||
# zlib has its own custom configure script that takes in options like CC,
|
||||
|
|
Loading…
Add table
Reference in a new issue