Skip to contentSkip to conversation

package/libcpprestsdk: link with libatomic when needed

PATCH New Fabrice Fontaine 2 participants 2 messages Feb 15, 2019 – Feb 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libcpprestsdk: 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/983537ceb38add50ca0a2316f39a2964db1b83c5

---
 package/libcpprestsdk/libcpprestsdk.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/libcpprestsdk/libcpprestsdk.mk +4 -0
index be9ca292c5..9370c037e4 100644
@@ -12,4 +12,8 @@ LIBCPPRESTSDK_SUBDIR = Release
 LIBCPPRESTSDK_DEPENDENCIES += host-pkgconf boost openssl zlib
 LIBCPPRESTSDK_CONF_OPTS = -DWERROR=OFF -DCPPREST_EXCLUDE_WEBSOCKETS=ON
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+LIBCPPRESTSDK_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/libcpprestsdk: link with libatomic when needed

Quoted 8 lines · On Fri, 15 Feb 2019 22:33:15 +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/983537ceb38add50ca0a2316f39a2964db1b83c5

---
 package/libcpprestsdk/libcpprestsdk.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master, thanks.

Thomas

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