History

ffbuild: read library linker objects from a file

The linker command can exceed the maximum argument limit on MinGW, especially for libavcodec. The objects list is now stored in a file and passed to the linker.

Gyan Doshi committed 1 year ago

Commit 9e857e11 parent 6bad55e3 files · +8 −3Browse files

Unified · Split

3 files
  1. .gitignore +1 −0
  2. ffbuild/common.mak +1 −1
  3. ffbuild/library.mak +6 −2
.gitignore+1−0
@@ -1,5 +1,6 @@
1*.a1*.a
2*.o2*.o
3*.objs
3*.o.*4*.o.*
4*.d5*.d
5*.def6*.def
ffbuild/common.mak+1−1
@@ -214,7 +214,7 @@ $(TOOLOBJS): | tools · 213 unmodified lines
214 214
215OUTDIRS := $(OUTDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(SLIBOBJS) $(SHLIBOBJS) $(STLIBOBJS) $(TESTOBJS))215OUTDIRS := $(OUTDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(SLIBOBJS) $(SHLIBOBJS) $(STLIBOBJS) $(TESTOBJS))
216 216
217CLEANSUFFIXES = *.d *.gcda *.gcno *.h.c *.ho *.map *.o *.pc *.ptx *.ptx.gz *.ptx.c *.ver *.version *$(DEFAULT_X86ASMD).asm *~ *.ilk *.pdb217CLEANSUFFIXES = *.d *.gcda *.gcno *.h.c *.ho *.map *.o *.objs *.pc *.ptx *.ptx.gz *.ptx.c *.ver *.version *$(DEFAULT_X86ASMD).asm *~ *.ilk *.pdb
218LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a218LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
219 219
220define RULES220define RULES
ffbuild/library.mak+6−2
@@ -35,8 +35,10 @@ OBJS += $(SHLIBOBJS) · 34 unmodified lines
35endif35endif
36$(SUBDIR)$(LIBNAME): $(OBJS) $(STLIBOBJS)36$(SUBDIR)$(LIBNAME): $(OBJS) $(STLIBOBJS)
37 $(RM) $@37 $(RM) $@
38 $(AR) $(ARFLAGS) $(AR_O) $^38 $(Q)echo $^ > $@.objs
39 $(AR) $(ARFLAGS) $(AR_O) @$@.objs
39 $(RANLIB) $@40 $(RANLIB) $@
41 -$(RM) $@.objs
40 42
41install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig43install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
42 44
@@ -66,8 +68,10 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) · 23 unmodified lines
66 68
67$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SHLIBOBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver69$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SHLIBOBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver
68 $(SLIB_CREATE_DEF_CMD)70 $(SLIB_CREATE_DEF_CMD)
69 $$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)71 $(Q)echo $$(filter %.o,$$^) > $$@.objs
72 $$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) @$$@.objs $(FFEXTRALIBS)
70 $(SLIB_EXTRA_CMD)73 $(SLIB_EXTRA_CMD)
74 -$(RM) $$@.objs
71 75
72ifdef SUBDIR76ifdef SUBDIR
73$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)77$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t