diff --git a/src/mca/common/sm/Makefile.am b/src/mca/common/sm/Makefile.am index 44eb720ca9..a9ebb2a42e 100644 --- a/src/mca/common/sm/Makefile.am +++ b/src/mca/common/sm/Makefile.am @@ -2,6 +2,25 @@ # $HEADER$ # +# A word of explanation... +# +# This library is linked against various MCA components because all +# shared-memory based components (e.g., mpool, ptl, etc.) need to +# share some common code and data. There's two cases: +# +# 1. libmca_common_sm.la is a shared library. By linking that shared +# library to all components that need it, the OS linker will +# automatically load it into the process as necessary, and there will +# only be one copy (i.e., all the components will share *one* copy of +# the code and data). +# +# 2. libmca_common_sm.la is a static library. In this case, it will +# be rolled up into the top-level libmpi.la. It will also be rolled +# into each component, but then the component will also be rolled up +# into the upper-level libmpi.la. Linkers universally know how to +# "figure this out" so that we end up with only one copy of the code +# and data. + # Use the top-level Makefile.options include $(top_ompi_srcdir)/config/Makefile.options diff --git a/src/mca/mpool/sm/Makefile.am b/src/mca/mpool/sm/Makefile.am index 5b2bebc4ac..32d17f4e5b 100644 --- a/src/mca/mpool/sm/Makefile.am +++ b/src/mca/mpool/sm/Makefile.am @@ -2,6 +2,25 @@ # $HEADER$ # +# A word of explanation... +# +# We link this component to common/sm/libmca_common_sm.la. This is +# because all shared-memory based components (e.g., mpool, ptl, etc.) +# need to share some common code and data. There's two cases: +# +# 1. libmca_common_sm.la is a shared library. By linking that shared +# library to all components that need it, the OS linker will +# automatically load it into the process as necessary, and there will +# only be one copy (i.e., all the components will share *one* copy of +# the code and data). +# +# 2. libmca_common_sm.la is a static library. In this case, it will +# be rolled up into the top-level libmpi.la. It will also be rolled +# into each component, but then the component will also be rolled up +# into the upper-level libmpi.la. Linkers universally know how to +# "figure this out" so that we end up with only one copy of the code +# and data. + # Use the top-level Makefile.options include $(top_ompi_srcdir)/config/Makefile.options diff --git a/src/mca/ptl/sm/src/Makefile.am b/src/mca/ptl/sm/src/Makefile.am index 6f5d2c23ae..ef3289334f 100644 --- a/src/mca/ptl/sm/src/Makefile.am +++ b/src/mca/ptl/sm/src/Makefile.am @@ -2,6 +2,25 @@ # $HEADER$ # +# A word of explanation... +# +# We link this component to common/sm/libmca_common_sm.la. This is +# because all shared-memory based components (e.g., mpool, ptl, etc.) +# need to share some common code and data. There's two cases: +# +# 1. libmca_common_sm.la is a shared library. By linking that shared +# library to all components that need it, the OS linker will +# automatically load it into the process as necessary, and there will +# only be one copy (i.e., all the components will share *one* copy of +# the code and data). +# +# 2. libmca_common_sm.la is a static library. In this case, it will +# be rolled up into the top-level libmpi.la. It will also be rolled +# into each component, but then the component will also be rolled up +# into the upper-level libmpi.la. Linkers universally know how to +# "figure this out" so that we end up with only one copy of the code +# and data. + include $(top_ompi_srcdir)/config/Makefile.options noinst_LTLIBRARIES = libmca_ptl_sm.la