[vlc-devel] [PATCH] configure: link with the atomic library when compiling for Raspberry

Steve Lhomme robux4 at ycbcr.xyz
Mon Jan 20 12:41:42 CET 2020


We don't have a way to detect the target is a Raspberry so we enable it manually.

Only the libvlccore seems to need it for proper linkings. Modules don't need it.

--
replaces the automatic compiler detection from
https://patches.videolan.org/patch/25978/
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index f69d7195537..1e8c205f320 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3664,6 +3664,8 @@ if test "${enable_mmal}" != "no"; then
   AC_CHECK_HEADERS([interface/mmal/mmal.h],
     [ AC_CHECK_LIB([bcm_host], [vc_tv_unregister_callback_full], [
         have_mmal="yes"
+        dnl we build for Raspberry which needs the latomic flag
+        VLC_ADD_LDFLAGS([libvlccore],[ -latomic ])
         VLC_ADD_PLUGIN([mmal])
         VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ])
         VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ])
-- 
2.17.1



More information about the vlc-devel mailing list