With the change "[RFC] add prefer_static built-in option" (9603) from https://github.com/mesonbuild/meson Also: 6697 and 6629 It is now possible to have meson call pkg-config with the --static flag and bring in the Requires.private dependent libaries when linking. There is no further need to modify the .pc files (or the linker flags.) The use of the -Dprefer_static=true will cause the linker to prefer and use the static library if it is available, which might not be intended if the shared library is also available. This option will force the static linkage, whereas passing the libraries from pkg-config --static to ld would pick the shared libraries over the static libraries. With the linker options removing any unnecessary libraries: -Wl,--as-needed, -Wl,-dead_strip_dylibs The example below is how to force the linker to use the foo static library when a foo shared library is available. gcc main.o -Wl,-Bstatic -lfoo -Wl,-Bdynamic Which is what this meson option `prefer_static=true` will do for all static libaries that it finds (regardless of if shared libraries are available.) ref: https://stackoverflow.com/questions/71078862/prefer-static-libraries-but-fallback-to-shared-if-not-found
LibreELEC
LibreELEC is a 'Just enough OS' Linux distribution for the award-winning Kodi software on popular mediacentre hardware. Further information on the project can be found on the LibreELEC website.
Issues & Support
Please ask questions in the LibreELEC forum: Help & Support or ask a member of project staff in the #libreelec IRC channel on Libera.Chat. Please report bugs via GitHub Issues.
Donations
Contributions towards current project funding goals can be made via OpenCollective.
License
LibreELEC original code is released under GPLv2.
Copyright
As LibreELEC includes code from many upstream projects it has many copyright owners; notably OpenELEC which we forked from after disagreeing with project direction and management, and OpenBricks/GeeXboX the uncredited source of the original 2009 build system. LibreELEC makes no claim of copyright on any upstream code. However all original LibreELEC authored code is copyright LibreELEC.tv. Patches to upstream code have the same license as the upstream project unless specified otherwise. For a complete copyright list please checkout the source code to examine license headers. Unless expressly stated otherwise all code submitted to the LibreELEC project (in any form) is licensed under GPLv2 and copyright is donated to the project. This approach gives the project freedom to maintain the code without the overhead of preserving contact with every submitter, e.g. GPLv3. You are free to retain copyright by adding your copyright header to each submitted code page. If you submit code that is not your own work it is your responsibility to place a header stating the copyright.