From 2e883ceace1583f73dce644200004d62ced40bbf Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Fri, 6 Aug 2021 16:38:39 +0200 Subject: [PATCH] package/qt5/qt5base: fix libatomic handling to not affect host builds qt5declarative builds qmltyperegistrar for the host as part of its build process. When building qt target packages (which is the case for qt5declarative), -spec devices/linux-buildroot-g++ is passed to qmake in QT5_QMAKE variable and this spec currently has -latomic in its LIBS. This -latomic makes it to the build of the host build of qmltyperegistrar which is not useful. This was discovered on Fedora 34 where libatomic is not pulled with gcc package, therefore was missing on the host machine. This makes sure that -latomic is not added for host build of qt packages. Fixes: 7d286be4f9 ("package/qt5base: link with -latomic when needed") Cc: Quentin Schulz Suggested-by: Arnout Vandecappelle Signed-off-by: Quentin Schulz Signed-off-by: Thomas Petazzoni (cherry picked from commit 2d991fd7b23f66e3a88c02177bf28d5587061ac8) Signed-off-by: Peter Korsgaard --- package/qt5/qt5base/qt5base.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 84e9fa4edb..7897e4294a 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -277,7 +277,7 @@ 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 - printf 'LIBS += -latomic\n' >$(QT5BASE_ARCH_CONFIG_FILE) + printf '!host_build { \n LIBS += -latomic\n }' >$(QT5BASE_ARCH_CONFIG_FILE) endef endif