[FFmpeg-devel] [PATCH] build: Allow libffmpeg to be built for Chromium-based browsers

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jul 29 12:20:05 EEST 2017



On 28.07.2017, at 12:07, James Le Cuirot <chewi at gentoo.org> wrote:
> diff --git a/ffbuild/libffmpeg.mak b/ffbuild/libffmpeg.mak
> new file mode 100644
> index 0000000..992cf3c
> --- /dev/null
> +++ b/ffbuild/libffmpeg.mak
> @@ -0,0 +1,21 @@
> +LIBFFMPEG = $(SLIBPREF)ffmpeg$(SLIBSUF)
> +LIBFFMPEG_LINK = $(LD) -shared -Wl,-soname,$(LIBFFMPEG) -Wl,-Bsymbolic -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--gc-sections $(LDFLAGS) $(LDLIBFLAGS) -o $(LIBFFMPEG)
> +
> +libffmpeg-: libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) libavutil/$(LIBPREF)avutil$(LIBSUF) libswresample/$(LIBPREF)swresample$(LIBSUF)
> +    $(LIBFFMPEG_LINK) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(FFEXTRALIBS)
> +
> +libffmpeg-yes: libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) libavutil/$(SLIBPREF)avutil$(SLIBSUF)
> +    $(LIBFFMPEG_LINK) -Wl,--no-as-needed -lavcodec -lavformat -lavutil

I don't see you using a version file to filter out the private symbols?
That is a VERY dangerous thing to forget.
Also I don't like that it doesn't reuse the standard linking options used for the main libraries.


More information about the ffmpeg-devel mailing list