liblo: link with libatomic when available
authorAlex Baldwin <alexbaldwinmusic@gmail.com>
Sun, 25 Feb 2018 14:40:34 +0000 (15:40 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 25 Feb 2018 20:54:47 +0000 (21:54 +0100)
liblo uses atomic builtins that are only available inside libatomic on
some architectures, so link with it when available.

Fixes:

  http://autobuild.buildroot.net/results/c8bed3a3fa7d2b2258f573cbfcb01af07419e0bf/

Signed-off-by: Alex Baldwin <alexbaldwinmusic@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/liblo/liblo.mk

index c7d163dae230438227e1f16e76a2875f26825e65..7845c68ff26b9ab8e67bb7c649a0b1190ea6141f 100644 (file)
@@ -17,4 +17,10 @@ LIBLO_CONF_OPTS += \
        --disable-ipv6 \
        --disable-werror
 
+# Liblo uses atomic builtins, so we need to link with libatomic for
+# the architectures who explicitly need libatomic.
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+LIBLO_CONF_ENV += LIBS="-latomic"
+endif
+
 $(eval $(autotools-package))