From af0ea7d0372445fb315e739190fd98ecaf37c607 Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Mon, 31 Jan 2022 23:30:24 +0100 Subject: [PATCH] package/qt5base: fix uclibc/musl compile with libexecinfo enabled - depend and link against libexecinfo if enabled to fix linking failure in case execinfo.h is detected for qlogging: qt5base-5.15.2/src/corelib/global/qlogging.cpp:110 - __has_include() - libexecinfo already depends on !BR2_TOOLCHAIN_USES_GLIBC - rename plain QT5BASE_CONFIGURE_ARCH_CONFIG to QT5BASE_CONFIGURE_ARCH_CONFIG_LIBATOMIC Fixes: - http://autobuild.buildroot.net/results/e7c685744b1f1bebb7fec9835bda534a72b7b7c2 .../riscv64-buildroot-linux-musl/bin/ld: .../build/qt5base-5.15.2/src/corelib/global/qlogging.cpp:1398: undefined reference to `backtrace_symbols' Signed-off-by: Peter Seiderer Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/qt5/qt5base/qt5base.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index d8a0bf1d16..ef38d03253 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -235,6 +235,14 @@ QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu) QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_EXAMPLES),-make,-nomake) examples +# see qt5base-5.15.2/src/corelib/global/qlogging.cpp:110 - __has_include() +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +QT5BASE_DEPENDENCIES += libexecinfo +define QT5BASE_CONFIGURE_ARCH_CONFIG_LIBEXECINFO + printf '!host_build { \n LIBS += -lexecinfo\n }' >$(QT5BASE_ARCH_CONFIG_FILE) +endef +endif + ifeq ($(BR2_PACKAGE_LIBINPUT),y) QT5BASE_CONFIGURE_OPTS += -libinput QT5BASE_DEPENDENCIES += libinput @@ -283,7 +291,7 @@ endif QT5BASE_ARCH_CONFIG_FILE = $(@D)/mkspecs/devices/linux-buildroot-g++/arch.conf ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) # Qt 5.8 needs atomics, which on various architectures are in -latomic -define QT5BASE_CONFIGURE_ARCH_CONFIG +define QT5BASE_CONFIGURE_ARCH_CONFIG_LIBATOMIC printf '!host_build { \n LIBS += -latomic\n }' >$(QT5BASE_ARCH_CONFIG_FILE) endef endif @@ -306,7 +314,8 @@ define QT5BASE_CONFIGURE_CMDS $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h $(QT5BASE_CONFIGURE_CONFIG_FILE) touch $(QT5BASE_ARCH_CONFIG_FILE) - $(QT5BASE_CONFIGURE_ARCH_CONFIG) + $(QT5BASE_CONFIGURE_ARCH_CONFIG_LIBATOMIC) + $(QT5BASE_CONFIGURE_ARCH_CONFIG_LIBEXECINFO) $(QT5BASE_CONFIGURE_HOSTCC) (cd $(@D); \ $(TARGET_MAKE_ENV) \