diff options
author | Diego Biurrun <diego@biurrun.de> | 2017-01-22 16:42:36 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-03-01 09:00:40 +0100 |
commit | 7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63 (patch) | |
tree | b20e60da36d23393800e832069148484ee245a86 /avbuild | |
parent | d154bdd3d053128c908a994bb26e14bbc17f0e53 (diff) | |
download | ffmpeg-7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63.tar.gz |
build: Fine-grained link-time dependency settings
Previously, all link-time dependencies were added for all libraries,
resulting in bogus link-time dependencies since not all dependencies
are shared across libraries. Also, in some cases like libavutil, not
all dependencies were taken into account, resulting in some cases of
underlinking.
To address all this mess a machinery is added for tracking which
dependency belongs to which library component and then leveraged
to determine correct dependencies for all individual libraries.
Diffstat (limited to 'avbuild')
-rw-r--r-- | avbuild/common.mak | 2 | ||||
-rw-r--r-- | avbuild/library.mak | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/avbuild/common.mak b/avbuild/common.mak index 236380effc..a627dc0ccf 100644 --- a/avbuild/common.mak +++ b/avbuild/common.mak @@ -8,7 +8,7 @@ OBJS += $(OBJS-yes) FFLIBS := $($(NAME)_FFLIBS) $(FFLIBS-yes) $(FFLIBS) TESTPROGS += $(TESTPROGS-yes) -FFEXTRALIBS := $(FFLIBS:%=$(LD_LIB)) $(EXTRALIBS) +FFEXTRALIBS := $(FFLIBS:%=$(LD_LIB)) $(foreach lib,EXTRALIBS-$(NAME) $(FFLIBS:%=EXTRALIBS-%),$($(lib))) $(EXTRALIBS) OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) TESTOBJS := $(TESTOBJS:%=$(SUBDIR)tests/%) $(TESTPROGS:%=$(SUBDIR)tests/%.o) diff --git a/avbuild/library.mak b/avbuild/library.mak index e5f6d7d288..be6098c9ff 100644 --- a/avbuild/library.mak +++ b/avbuild/library.mak @@ -30,7 +30,7 @@ $(TOOLS): THISLIB = $(NAME:%=$(LD_LIB)) $(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o - $$(LD) $(LDFLAGS) $(LDEXEFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(ELIBS) + $$(LD) $(LDFLAGS) $(LDEXEFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(EXTRALIBS-$$(*F)) $$(ELIBS) $(SUBDIR)lib$(NAME).version: $(SUBDIR)version.h | $(SUBDIR) $$(M) $$(SRC_PATH)/avbuild/libversion.sh $(NAME) $$< > $$@ |