[vlc-devel] [PATCH] configure: link with the atomic library when compiling for Raspberry
Rémi Denis-Courmont
remi at remlab.net
Thu Jan 30 10:46:05 CET 2020
LIBATOMIC=-latomic is an artefact of GCC, not of rPI, and what function need it depend on the target CPU, not the rPI either.
Le 30 janvier 2020 10:07:02 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>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.
>---
> configure.ac | 4 ++++
> src/Makefile.am | 2 +-
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/configure.ac b/configure.ac
>index 69b09dfe3ac..45f95f64299 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -3655,6 +3655,7 @@ AM_CONDITIONAL([HAVE_KVA], [test "${have_kva}" =
>"yes"])
> dnl
> dnl MMAL plugin
> dnl
>+LIBATOMIC=""
> AC_ARG_ENABLE([mmal],
> AS_HELP_STRING([--enable-mmal],
>[Multi-Media Abstraction Layer (MMAL) hardware plugin (default
>enable)]))
>@@ -3665,6 +3666,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
>+ LIBATOMIC="-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 ])
>@@ -3680,6 +3683,7 @@ if test "${enable_mmal}" != "no"; then
> VLC_RESTORE_FLAGS
> fi
> AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
>+AC_SUBST([LIBATOMIC])
>
> dnl
> dnl Audio plugins
>diff --git a/src/Makefile.am b/src/Makefile.am
>index b6c59968370..4bf36cf3e85 100644
>--- a/src/Makefile.am
>+++ b/src/Makefile.am
>@@ -393,7 +393,7 @@ libvlccore_la_SOURCES = \
> libvlccore_la_LIBADD = $(LIBS_libvlccore) \
> ../compat/libcompat.la \
> $(LTLIBINTL) $(LTLIBICONV) \
>- $(IDN_LIBS) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
>+ $(IDN_LIBS) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM) $(LIBATOMIC)
>
> if HAVE_WIN32
> libvlccore_la_SOURCES += \
>--
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200130/e7338113/attachment.html>
More information about the vlc-devel
mailing list