From fb894e6e3e839d0322043fc25c217b7cf2aa7e62 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 17 Aug 2016 20:37:51 -0500 Subject: [PATCH] pkg-config: fix static linking We need to list all major project libraries in the private libraries line to enable static linking to work properly. Signed-off-by: Jeff Squyres --- ompi/tools/wrappers/ompi-c.pc.in | 2 +- ompi/tools/wrappers/ompi-cxx.pc.in | 2 +- ompi/tools/wrappers/ompi-fort.pc.in | 2 +- orte/tools/wrappers/orte.pc.in | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ompi/tools/wrappers/ompi-c.pc.in b/ompi/tools/wrappers/ompi-c.pc.in index 083fbd3c0f2..7c658e950c5 100644 --- a/ompi/tools/wrappers/ompi-c.pc.in +++ b/ompi/tools/wrappers/ompi-c.pc.in @@ -15,6 +15,6 @@ libdir=@libdir@ # dependencies), so only list these in Libs.private. # Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ -lmpi -Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@ +Libs.private: -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ # Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CFLAGS@ diff --git a/ompi/tools/wrappers/ompi-cxx.pc.in b/ompi/tools/wrappers/ompi-cxx.pc.in index db2176ba5b6..b277c796224 100644 --- a/ompi/tools/wrappers/ompi-cxx.pc.in +++ b/ompi/tools/wrappers/ompi-cxx.pc.in @@ -15,6 +15,6 @@ libdir=@libdir@ # dependencies), so only list these in Libs.private. # Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_WRAPPER_CXX_LIB@ -lmpi -Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@ +Libs.private: -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ # Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_CXXFLAGS@ diff --git a/ompi/tools/wrappers/ompi-fort.pc.in b/ompi/tools/wrappers/ompi-fort.pc.in index 66641153250..e4f533b99ba 100644 --- a/ompi/tools/wrappers/ompi-fort.pc.in +++ b/ompi/tools/wrappers/ompi-fort.pc.in @@ -15,5 +15,5 @@ libdir=@libdir@ # dependencies), so only list these in Libs.private. # Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -lmpi -Libs.private: @OMPI_WRAPPER_EXTRA_LIBS@ +Libs.private: -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FCFLAGS@ diff --git a/orte/tools/wrappers/orte.pc.in b/orte/tools/wrappers/orte.pc.in index 1cc433ed544..f1d90ecf66a 100644 --- a/orte/tools/wrappers/orte.pc.in +++ b/orte/tools/wrappers/orte.pc.in @@ -15,7 +15,7 @@ libdir=@libdir@ # dependencies), so only list these in Libs.private. # Libs: -L${libdir} @ORTE_PKG_CONFIG_LDFLAGS@ -lopen-rte -Libs.private: @ORTE_WRAPPER_EXTRA_LIBS@ +Libs.private: -lopen-pal @ORTE_WRAPPER_EXTRA_LIBS@ # # It is safe to hard-wire the -I before the EXTRA_INCLUDES because we # will not be installing this .pc file unless --enable-devel-headers is