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

Add Pthreads (and possibly other) flags to the pkg-config file #332

Merged
merged 1 commit into from
Dec 13, 2018

Conversation

wferi
Copy link
Contributor

@wferi wferi commented Dec 9, 2018

No description provided.

@jnpkrn
Copy link
Contributor

jnpkrn commented Dec 11, 2018

Just gathering the context, is this to serve building libqb
(it's users?) statically or does just Libs.privates receive
a special treatment in Debian or something like that?

@wferi
Copy link
Contributor Author

wferi commented Dec 11, 2018

Libs.private enables linking libqb statically, yes. (Not that I know anybody doing that, that part is mostly for completeness.) Cflags, on the other hand, is emitted all the time and (under GCC) propagates the -pthread option to all users of libqb (even when compiling modules or linking everything dynamically).

@jnpkrn
Copy link
Contributor

jnpkrn commented Dec 12, 2018

Thanks, was just curious since I vaguely remember Libs.private
references seldom scattered in the Fedora devel ML and casting
some opinionated ideas about its proper treatment
+ there's at least a single crucial difference regarding libtool
already as discussed elsewhere under this project, for instance.

Can you add this "static compiling" + "completeness" justifications
to the commit message, please? There's some bad experience with
not entirely obvious changes that charge an extra time to understand
in retrospect if need be, so better to prevent that systemically

Also would mention that gethostbyname/libnsl and libglib counterparts
don't qualify since they are only used in the examples (if I'm not
missing anything), not in the library proper -- in case one would
wonder in the plain cross-check.

Thanks

Proper Libs.private enables linking applications statically against
libqb: static archives (.a) don't carry their own dependency
information, unlike shared libraries (.so).  Modern libc versions
include socket and RT functions, so socket_LIBS and rt_LIBS will be
empty there, but we include them for strict correctness on older
platforms; basically, we're matching libqb_la_LIBADD here.
Consequently, nsl_LIBS and GLIB_LIBS don't enter this field, since they
are only used in the examples and tests, not in the library proper.

Cflags, on the other hand, is emitted all the time and (under GCC)
propagates the -pthread option (which also affects the preprocessing
stage) to all users of libqb even when compiling modules or linking
everything dynamically.

Signed-off-by: Ferenc Wágner <[email protected]>
@wferi
Copy link
Contributor Author

wferi commented Dec 13, 2018

I rebased the commit keeping the content but with extended message.
If you want real visibility, wouldn't comments be more effective? Those can get stale, though...

@chrissie-c
Copy link
Contributor

I think the commit message is fine as documentation. As you say comments can get stale and it seems to be routine to check commit messages these days when checking when/why things happen.

Thanks Feri & Poki,

@chrissie-c chrissie-c merged commit f67b428 into ClusterLabs:master Dec 13, 2018
@wferi wferi deleted the pkg-config branch December 13, 2018 08:43
@wferi
Copy link
Contributor Author

wferi commented Dec 13, 2018

Thanks for the merge.
Why/how was my full name replaced in the commit? I don't mind, just curious...

@chrissie-c
Copy link
Contributor

I'm not sure. github being weird I suspect! I should maybe do manual commits if it's going to start happening regularly.

which removes half the reason for having GH features in the first place. sigh

Sorry

@jnpkrn
Copy link
Contributor

jnpkrn commented Dec 13, 2018

Happens easily when single-button-laziness prevails, and I've already
pointed this out in the past (over a year ago if not earlier):

#251 (comment)

So yes, please finally do retain a full control over the commits to hit
the tree, everything else carries these spoiling risks (and that GitHub
will continue to be the primary forge is far from being set in stone,
especially when none of us has a bit of a power over the hosting).

That would also avoid the silliness of undesired authorship handling:
44a9379

Hopefully that's enough of a justification.

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.

3 participants