Skip to content
Snippets Groups Projects
  1. May 11, 2024
  2. Apr 24, 2024
  3. Feb 21, 2024
  4. Dec 21, 2023
  5. Dec 08, 2023
  6. Oct 02, 2023
    • Martin Storsjö's avatar
      tools: Don't include the direct library names when linking · 2b9c6c70
      Martin Storsjö authored
      
      When linking the main tools, the object files to link are set up
      via the variable OBJS-<name>, but for the tools, we've only
      used the target's list of dependencies.
      
      In most cases, this has been fine, but it has caused specifying
      the libraries to link in a duplicate fashion; the linking command
      has looked like this:
      
          $CC -Llibavutil ... tools/tool.o libavutil/libavutil.a -lavutil
      
      Normally, the libraries to link are handled with "-Llibavutil -lavutil";
      when linking the main fftools, this is how they are linked.
      
      In the case of the binaries under the "tools" directory (within the
      make variable TOOLS), we've passed the full set of dependencies
      to the linker, via $^, which does contain the names of the
      dependency libraries as well.
      
      When libraries are built as regular static libraries, or shared
      unix libraries, this has all worked fine. When libraries are
      built as DLLs for Windows, though, the norm is not to pass the
      actual DLL to the linker, but an import library.
      
      Mingw tools generally can handle linking directly against a DLL
      as well, but MSVC tools don't support that, and error out with
      a very cryptic error message:
      
          libavdevice\avdevice.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2D8
      
      By omitting these parts of the dependencies, linking of these tool
      executables succeed in MSVC builds with shared libraries enabled.
      
      Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
      2b9c6c70
  7. Mar 28, 2023
  8. Sep 27, 2022
  9. Jun 30, 2022
  10. Jun 02, 2022
  11. May 10, 2022
  12. Mar 17, 2022
  13. Feb 25, 2022
  14. Jan 04, 2022
    • Andreas Rheinhardt's avatar
      Makefile: Redo duplicating object files in shared builds · 20b0d24c
      Andreas Rheinhardt authored
      
      In case of shared builds, some object files containing tables
      are currently duplicated into other libraries: log2_tab.c,
      golomb.c, reverse.c. The check for whether this is duplicated
      is simply whether CONFIG_SHARED is true. Yet this is crude:
      E.g. libavdevice includes reverse.c for shared builds, but only
      needs it for the decklink input device, which given that decklink
      is not enabled by default will be unused in most libavdevice.so.
      
      This commit changes this by making it more explicit about what
      to duplicate from other libraries. To do this, two new Makefile
      variables were added: SHLIBOBJS and STLIBOBJS. SHLIBOBJS contains
      the objects that are duplicated from other libraries in case of
      shared builds; STLIBOBJS contains stuff that a library has to
      provide for other libraries in case of static builds. These new
      variables provide a way to enable/disable with a finer granularity
      than just whether shared builds are enabled or not. E.g. lavd's
      Makefile now contains: SHLIBOBJS-$(CONFIG_DECKLINK_INDEV) += reverse.o
      
      Another example is provided by the golomb tables. These are provided
      by lavc for static builds, even if one uses a build configuration
      that makes only lavf use them. Therefore lavc's Makefile contains
      STLIBOBJS-$(CONFIG_MXF_MUXER) += golomb.o, whereas lavf's Makefile
      has a corresponding SHLIBOBJS-$(CONFIG_MXF_MUXER) += golomb_tab.o.
      E.g. in case the MXF muxer is the only component needing these tables
      only libavformat.so will contain them for shared builds; currently
      libavcodec.so does so, too.
      (There is currently a CONFIG_EXTRA group for golomb. But actually
      one would need two groups (golomb_avcodec and golomb_avformat) in
      order to know when and where to include these tables. Therefore
      this commit uses a Makefile-based approach for this and stops
      using these groups for the users in libavformat.)
      
      Signed-off-by: default avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
      20b0d24c
  15. Dec 20, 2021
  16. Dec 15, 2021
  17. Aug 08, 2021
  18. Apr 27, 2021
  19. Mar 19, 2021
  20. Nov 20, 2020
  21. Oct 12, 2020
  22. Sep 13, 2020
  23. Mar 11, 2020
  24. Dec 05, 2019
  25. May 31, 2019
  26. Feb 16, 2019
  27. Dec 28, 2018
  28. Jul 21, 2018
  29. Mar 31, 2018
  30. Feb 06, 2018
  31. Nov 14, 2017
  32. Nov 13, 2017
  33. Nov 09, 2017
  34. Oct 19, 2017
  35. Oct 10, 2017
  36. Oct 05, 2017
Loading