From e5a81e65d74382a1c8803e5c85ce7f0e25611a8c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 5 Dec 2021 00:39:14 +0200 Subject: [PATCH 1/3] build, refactor: Re-use `qt_lib_suffix` variable --- build-aux/m4/bitcoin_qt.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index fb14ff40ff3..874f9afa678 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -161,7 +161,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle]) AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa]) elif test "$TARGET_OS" = "android"; then - QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid_$ANDROID_ARCH -ljnigraphics -landroid -lqtfreetype_$ANDROID_ARCH $QT_LIBS" + QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid${qt_lib_suffix} -ljnigraphics -landroid -lqtfreetype${qt_lib_suffix} $QT_LIBS" AC_DEFINE([QT_QPA_PLATFORM_ANDROID], [1], [Define this symbol if the qt platform is android]) fi fi From 3b8f4e347b09594dcf88f4f2c0bb5afc1265ef51 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 5 Dec 2021 00:39:14 +0200 Subject: [PATCH 2/3] build, qt: Drop unused CROSS_COMPILE variable for Android builds Since Qt 5.14.0 the CROSS_COMPILE variable always being overridden by the Qt build system internally. See upstream commit: c28b881c98fadcd3415370fad2525b558f6b03e4 --- depends/packages/qt.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 9824b5bebd6..6b2d44dc641 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -167,7 +167,6 @@ $(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-dbus From ef81c51f62e03cb53e65f1ced6120d87f1827c40 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 5 Dec 2021 00:39:14 +0200 Subject: [PATCH 3/3] build: Use config_opts instead of passing a compiler flag directly This approach is safer as it allows the configure script to check the availability of a compiler flag. --- depends/packages/libxcb_util.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/libxcb_util.mk b/depends/packages/libxcb_util.mk index 2b65b585976..6f1b9cd7c65 100644 --- a/depends/packages/libxcb_util.mk +++ b/depends/packages/libxcb_util.mk @@ -8,7 +8,7 @@ $(package)_dependencies=libxcb define $(package)_set_vars $(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen $(package)_config_opts += --disable-dependency-tracking --enable-option-checking -$(package)_cflags += -fPIC +$(package)_config_opts += --with-pic endef define $(package)_preprocess_cmds