Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove -lgcc_s from the list of library dependencies in .pc file #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marecki315
Copy link

When -lgcc_s is in the list of required libraries in .pc, it's impossible to avoid dependency to dynamic libgcc_s.so when linking gcc statically inside target binary using -static-libgcc option.

When `-lgcc_s` is in the list of required libraries in .pc, it's
impossible to avoid dependency to dynamic `libgcc_s.so` when linking
gcc statically inside target binary using `-static-libgcc` option.
@K-os
Copy link
Collaborator

K-os commented Nov 27, 2024

What happens when you build libvvdec with -static-libgcc ? On my machine that does not add -lgcc_s as a dependency.

@marecki315
Copy link
Author

marecki315 commented Nov 27, 2024

The issue doesn't appear when building libvvdec, but when building a project (application or library) that uses libvvdec and pkgconfig to find the dependency.
If you try to build a binary and link libvvdec statically, these dependencies specified in .pc file will be added:

Libs.private: -lstdc++ -lm -lgcc -lgcc -lgcc_s

When using -static-libgcc, the -lgcc dependency won't appear in target app/lib, but -lgcc_s will still be there.

It is enough to have only -lgcc in Libs.private. -lgcc_s is unnecessary because either libgcc.a or libgcc_s.so needs to be linked.

https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants