Skip to contentSkip to conversation

package/kf5-modemmanager-qt: link with libatomic when needed

PATCH New Fabrice Fontaine 3 participants 3 messages Mar 17, 2019 – Mar 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/kf5-modemmanager-qt: link with libatomic when needed

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

---
 package/kf5/kf5-modemmanager-qt/kf5-modemmanager-qt.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/kf5/kf5-modemmanager-qt/kf5-modemmanager-qt.mk +5 -0
index 9bbeeaa760..20fbc102c6 100644
@@ -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))
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/kf5-modemmanager-qt: link with libatomic when needed

Quoted 8 lines · On Sun, 17 Mar 2019 22:10:16 +0100 Fabrice Fontaine…

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.

Quoted 7 lines

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

---
 package/kf5/kf5-modemmanager-qt/kf5-modemmanager-qt.mk | 5 +++++
 1 file changed, 5 insertions(+)

Applied to master, thanks. As usual, I would prefer an upstreamable fix, though.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/kf5-modemmanager-qt: link with libatomic when needed

In reply to Fabrice Fontaine
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:

Quoted 8 lines

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

Committed to 2018.11.x and 2019.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard