From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> Apparently definitions are ordered in pkg-config, and the linker requires libraries to be sorted dependent-last. Otherwise static linking fails because pthread is before ibverbs in the linker line. Fixes: df5fe3c2fa9d ("Generate and install pkgconfig files for libs") Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- buildlib/template.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildlib/template.pc.in b/buildlib/template.pc.in index 99a798464abd03..618840c8cfd555 100644 --- a/buildlib/template.pc.in +++ b/buildlib/template.pc.in @@ -7,7 +7,7 @@ Name: lib@PC_LIB_NAME@ Description: RDMA Core Userspace Library URL: https://github.com/linux-rdma/rdma-core Version: @PC_VERSION@ -Libs.private: @PC_LIB_PRIVATE@ Libs: -L${libdir} -l@PC_LIB_NAME@ @PC_RPATH@ +Libs.private: @PC_LIB_PRIVATE@ Requires.private: @PC_REQUIRES_PRIVATE@ Cflags: -I${includedir} -- 2.19.0