package/kf5-modemmanager-qt: link with libatomic when needed
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 17 Mar 2019 21:10:16 +0000 (22:10 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 18 Mar 2019 21:08:03 +0000 (22:08 +0100)
On some architectures, atomic binutils are provided by the libatomic
library from gcc. Linking with libatomic is therefore necessary,
otherwise the build fails with:

sparc-buildroot-linux-uclibc/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line

This is often for example the case on sparcv8 32 bit.

Fixes:
 - http://autobuild.buildroot.org/results/b941a3deaa57cac79f1686d47ca6ababf2f0d5e4

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/kf5/kf5-modemmanager-qt/kf5-modemmanager-qt.mk

index 9bbeeaa76024bd83bdfdc6c5da73395b8eed5c8c..20fbc102c6cd4f5df5f1ffa0cb076121f6afebd5 100644 (file)
@@ -13,4 +13,9 @@ KF5_MODEMMANAGER_QT_LICENSE_FILE = COPYING.LIB
 KF5_MODEMMANAGER_QT_DEPENDENCIES = kf5-extra-cmake-modules modem-manager qt5base
 KF5_MODEMMANAGER_QT_INSTALL_STAGING = YES
 
+# Uses __atomic_fetch_add_4
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+KF5_MODEMMANAGER_QT_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
+endif
+
 $(eval $(cmake-package))