]> code.ossystems Code Review - openembedded-core.git/commit
libcap-ng: add pthread library if header is found
authorChristopher Larson <chris_larson@mentor.com>
Tue, 26 Nov 2019 18:08:29 +0000 (23:08 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Dec 2019 12:29:29 +0000 (12:29 +0000)
commit8d84fdea1c26ed5f8f8261c89070df44da3f1855
tree5ec6ddef1e1311529a9fed7911a0aa26c5b8b1d1
parentddd2c5624404848ee668dabec0f61599ab5003e4
libcap-ng: add pthread library if header is found

If the pthread.h header is found, make sure library containing
"pthread_atfork" is added to the list of libraries against which to
link. On some hosts (e.g. openSUSE 15.1) "-lpthread" needs to be
explicitly added in order for the code to compile correctly.

We already had a workaround for this for native builds, but using some
external toolchains, we can be bit by this for the target recipe as
well.

Most of this is courtesy Trevor Woerner <twoerner@gmail.com>, via his
patch at stevegrubb/libcap-ng#10, the last thanks to Khem Raj.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/libcap-ng/libcap-ng.inc
meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch [new file with mode: 0644]
meta/recipes-support/libcap-ng/libcap-ng/0002-Wrap-pthread_atfork-usage-in-HAVE_PTHREAD_H.patch [new file with mode: 0644]
meta/recipes-support/libcap-ng/libcap-ng_0.7.10.bb