summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-01-22 13:33:25 -0600
committerDudemanguy <random342@airmail.cc>2023-01-23 03:48:28 +0000
commit3dc5f6bea7bc1efbe11ec4425560592a3dab751d (patch)
tree2a39e7437887bba9ef7369bb82e26ea4750b1a6d
parent3ec52b9c80bc900a5c2aa409aaa6cad515d5ea5f (diff)
downloadmpv-build-3dc5f6bea7bc1efbe11ec4425560592a3dab751d.tar.bz2
mpv-build-3dc5f6bea7bc1efbe11ec4425560592a3dab751d.tar.xz
scripts/mpv-config: pass -Wl,-Bsymbolic when building libmpv
According to ffmpeg's own documentation* we have to add these linker flags to libmpv when building it against the static library. waf doesn't need this for mysterious, unknown reasons (the linker flags there are a bit different) but passing this works fine on meson. Just add an extra check to the mpv-config script to enable this if needed. Fixes #208. *: https://ffmpeg.org/platform.html#Advanced-linking-configuration
-rwxr-xr-xscripts/mpv-config9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/mpv-config b/scripts/mpv-config
index fe9ce49..bd8a258 100755
--- a/scripts/mpv-config
+++ b/scripts/mpv-config
@@ -11,6 +11,11 @@ if test -f "$BUILD"/mpv_options ; then
unset -v IFS
fi
+OPTIONS=""
+if "$BUILD"/scripts/test-libmpv && [ "$BUILDSYSTEM" != "waf" ]; then
+ OPTIONS="$OPTIONS -Dc_link_args='-Wl,-Bsymbolic'"
+fi
+
case "$PKG_CONFIG_PATH" in
'')
export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig"
@@ -20,7 +25,7 @@ case "$PKG_CONFIG_PATH" in
;;
esac
-echo Using mpv options: "$@"
+echo Using mpv options: $OPTIONS "$@"
cd "$BUILD"/mpv
@@ -32,5 +37,5 @@ export LDFLAGS="$LDFLAGS $(pkg-config --libs fontconfig harfbuzz fribidi) -lstdc
if [ "$BUILDSYSTEM" = "waf" ]; then
python3 ./waf configure "$@"
else
- meson setup build -Dbuildtype=release "$@"
+ meson setup build -Dbuildtype=release $OPTIONS "$@"
fi