| From 72ef4c1c3c11fc05c057f2b40b87de92a573f2eb Mon Sep 17 00:00:00 2001 |
| From: Fabrice Fontaine <fontaine.fabrice@gmail.com> |
| Date: Mon, 11 Feb 2019 21:42:01 +0100 |
| Subject: [PATCH] meson.build: add atomic dependency for sparc |
| |
| Linking with libatomic is needed on sparc otherwise build fails on: |
| ncmpc@exe/src_Main.cxx.o: In function `std::__atomic_base<long>::operator++()': |
| /home/buildroot/autobuild/instance-1/output/host/opt/ext-toolchain/sparc-buildroot-linux-uclibc/include/c++/6.4.0/bits/atomic_base.h:296: undefined reference to `__atomic_fetch_add_4' |
| |
| Fixes: |
| - http://autobuild.buildroot.org/results/7ac1a07e4f72633d3ec92b79dc5d8c062490abdc |
| |
| Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> |
| Upstream: https://github.com/MusicPlayerDaemon/ncmpc/pull/45 |
| [Dario: make the patch to be applied with fuzz factor 0] |
| Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> |
| --- |
| meson.build | 4 ++++ |
| 1 file changed, 4 insertions(+) |
| |
| diff --git a/meson.build b/meson.build |
| index fa0eff9408b6..819674cbede4 100644 |
| --- a/meson.build |
| +++ b/meson.build |
| @@ -232,6 +232,9 @@ else |
| pcre_dep = declare_dependency() |
| endif |
| |
| +# Needed on sparc |
| +atomic_dep = cc.find_library('atomic', required: false) |
| + |
| inc = include_directories( |
| 'src', |
| |
| @@ -445,6 +448,7 @@ ncmpc = executable('ncmpc', |
| sources, |
| include_directories: inc, |
| dependencies: [ |
| + atomic_dep, |
| thread_dep, |
| event_dep, |
| pcre_dep, |
| -- |
| 2.43.0 |
| |