[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
 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_LIB([bcm_host], [vc_tv_unregister_callback_full], [
+        dnl we build for Raspberry which needs the latomic flag
+        VLC_ADD_LDFLAGS([libvlccore],[ -latomic ])
         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 ])

More information about the vlc-devel mailing list