Ensure that in static builds, we only include the common sm object
files once. Turns out that linkers *aren't* smart enough to just "figure it out" and ensure that we only get one copy (or perhaps it's libtool who's trying to be too smart...?). This commit was SVN r4371.
Этот коммит содержится в:
родитель
d9060730fb
Коммит
3532271877
@ -43,18 +43,23 @@ sources = \
|
|||||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||||
# (for static builds).
|
# (for static builds).
|
||||||
|
|
||||||
if OMPI_BUILD_coll_sm_DSO
|
|
||||||
component_noinst =
|
component_noinst =
|
||||||
component_install = mca_coll_sm.la
|
|
||||||
else
|
|
||||||
component_noinst = libmca_coll_sm.la
|
|
||||||
component_install =
|
component_install =
|
||||||
|
if OMPI_BUILD_coll_sm_DSO
|
||||||
|
component_install += mca_coll_sm.la
|
||||||
|
else
|
||||||
|
component_noinst += libmca_coll_sm.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# See src/mca/ptl/sm/Makefile.am for an explanation of
|
||||||
|
# libmca_common_sm.la.
|
||||||
|
|
||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_coll_sm_la_SOURCES = $(sources)
|
mca_coll_sm_la_SOURCES = $(sources)
|
||||||
mca_coll_sm_la_LDFLAGS = -module -avoid-version
|
mca_coll_sm_la_LDFLAGS = -module -avoid-version
|
||||||
|
mca_coll_sm_la_LIBADD = \
|
||||||
|
$(top_ompi_builddir)/src/mca/common/sm/libmca_common_sm.la
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
libmca_coll_sm_la_SOURCES =$(sources)
|
libmca_coll_sm_la_SOURCES =$(sources)
|
||||||
|
@ -12,25 +12,6 @@
|
|||||||
# $HEADER$
|
# $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
|
# Use the top-level Makefile.options
|
||||||
|
|
||||||
include $(top_ompi_srcdir)/config/Makefile.options
|
include $(top_ompi_srcdir)/config/Makefile.options
|
||||||
@ -52,15 +33,16 @@ component_noinst = libmca_mpool_sm.la
|
|||||||
component_install =
|
component_install =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
common = $(top_ompi_builddir)/src/mca/common/sm/libmca_common_sm.la
|
# See src/mca/ptl/sm/Makefile.am for an explanation of
|
||||||
|
# libmca_common_sm.la.
|
||||||
|
|
||||||
mcacomponentdir = $(libdir)/openmpi
|
mcacomponentdir = $(libdir)/openmpi
|
||||||
mcacomponent_LTLIBRARIES = $(component_install)
|
mcacomponent_LTLIBRARIES = $(component_install)
|
||||||
mca_mpool_sm_la_SOURCES = $(sources)
|
mca_mpool_sm_la_SOURCES = $(sources)
|
||||||
mca_mpool_sm_la_LDFLAGS = -module -avoid-version
|
mca_mpool_sm_la_LDFLAGS = -module -avoid-version
|
||||||
mca_mpool_sm_la_LIBADD = $(common)
|
mca_mpool_sm_la_LIBADD = \
|
||||||
|
$(top_ompi_builddir)/src/mca/common/sm/libmca_common_sm.la
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(component_noinst)
|
noinst_LTLIBRARIES = $(component_noinst)
|
||||||
libmca_mpool_sm_la_SOURCES = $(sources)
|
libmca_mpool_sm_la_SOURCES = $(sources)
|
||||||
libmca_mpool_sm_la_LDFLAGS = -module -avoid-version
|
libmca_mpool_sm_la_LDFLAGS = -module -avoid-version
|
||||||
libmca_mpool_sm_la_LIBADD = $(common)
|
|
||||||
|
@ -12,31 +12,10 @@
|
|||||||
# $HEADER$
|
# $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
|
include $(top_ompi_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libmca_ptl_sm.la librecompile.la
|
noinst_LTLIBRARIES = libmca_ptl_sm.la librecompile.la
|
||||||
libmca_ptl_sm_la_LIBADD = \
|
libmca_ptl_sm_la_LIBADD = librecompile.la
|
||||||
librecompile.la \
|
|
||||||
$(top_ompi_builddir)/src/mca/common/sm/libmca_common_sm.la
|
|
||||||
libmca_ptl_sm_la_SOURCES = \
|
libmca_ptl_sm_la_SOURCES = \
|
||||||
ptl_sm.c \
|
ptl_sm.c \
|
||||||
ptl_sm.h \
|
ptl_sm.h \
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user