0001-src-event-meson.build-add-atomic-dependency-for-spar.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From cb190801706da046823c74f89472af83ff947ce1 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 17 Aug 2019 22:25:06 +0200
  4. Subject: [PATCH] src/event/meson.build: add atomic dependency for sparc
  5. Linking with libatomic is needed on sparc otherwise build fails on:
  6. /usr/lfs/v0/rc-buildroot-test/scripts/instance-0/output/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: src/event/libevent.a(MaskMonitor.cxx.o): undefined reference to symbol '__atomic_fetch_or_4@@LIBATOMIC_1.0'
  7. Fixes:
  8. - http://autobuild.buildroot.org/results/7a9fdb7e323892fb6ed85a2441054303e889c089
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. [Upstream status: not sent (the same kind of patch for ncmpc was
  11. refused: https://github.com/MusicPlayerDaemon/ncmpc/pull/45)]
  12. ---
  13. src/event/meson.build | 4 ++++
  14. 1 file changed, 4 insertions(+)
  15. diff --git a/src/event/meson.build b/src/event/meson.build
  16. index bc13bbcd2..88370c03a 100644
  17. --- a/src/event/meson.build
  18. +++ b/src/event/meson.build
  19. @@ -21,9 +21,13 @@ event = static_library(
  20. ],
  21. )
  22. +# Needed on sparc
  23. +atomic_dep = c_compiler.find_library('atomic', required: false)
  24. +
  25. event_dep = declare_dependency(
  26. link_with: event,
  27. dependencies: [
  28. + atomic_dep,
  29. thread_dep,
  30. system_dep,
  31. boost_dep,
  32. --
  33. 2.20.1