Skip to content
Snippets Groups Projects
Commit b9026d79 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Hugo Beauzée-Luyssen
Browse files

contrib: medialibrary: link with -latomic

medialibrary uses atomics which may require libatomic depending on the
ABI. This is currently the case on Linux RISC-V. In principles, it
should be pulled as needed by `-pthread` which should be in LDFLAGS.
However:
1) The VLC build system passes `-pthread` in LIBADD instead of LDFLAGS.
2) GNU/libtool discards `-pthread` for CXX-tagged binaries.

This is essentially the same problem as with libupnp lacking
`-lpthread`. In this particular case, medialibrary.pc forces `-lpthread`
explicitly but lacks `-latomic`.

Fixes #26521.
parent a86a62c9
No related branches found
No related tags found
1 merge request!1269RISC-V RV64GC GNU/Linux support
......@@ -22,6 +22,13 @@ medialibrary: medialibrary-$(MEDIALIBRARY_VERSION).tar.xz .sum-medialibrary
.medialibrary: medialibrary
cd $< && $(HOSTVARS_MESON) $(MESON) -Dlibvlc=disabled build
ninja -C $</build
ifdef HAVE_LINUX
ifndef HAVE_ANDROID
sed -e 's,^Libs\(.*\)-pthread,Libs\1-pthread -latomic,' \
-i $</build/meson-private/medialibrary.pc
endif
endif
cd $< && cd build && ninja install
touch $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment