[ofa-general] ***SPAM*** [PATCH] opensm/*/Makefile.am: remove explicit -lpthread and -ldl flags from Makefile.am

Sasha Khapyorsky sashak at voltaire.com
Sun Jul 27 11:47:05 PDT 2008


-lpthread and -ldl are standard things and can be generated by
./configure into LIBS variable and we don't need to specify this
explicitly in Makefiles. If so remove already not used lopensm_LDFLAGS
and osmtest_LDFLAGS variables too.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/configure.in        |    2 ++
 opensm/opensm/Makefile.am  |    4 +---
 opensm/osmtest/Makefile.am |    1 -
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/opensm/configure.in b/opensm/configure.in
index 7d04c14..7da932b 100644
--- a/opensm/configure.in
+++ b/opensm/configure.in
@@ -38,6 +38,8 @@ fi
 dnl Checks for libraries
 AC_CHECK_LIB(pthread, pthread_mutex_init, [],
 	AC_MSG_ERROR([pthread_mutex_init() not found.  libosmcomp requires libpthread.]))
+AC_CHECK_LIB(dl, dlopen, [],
+	AC_MSG_ERROR([dlopen() not found. OpenSM requires libdl.]))
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
diff --git a/opensm/opensm/Makefile.am b/opensm/opensm/Makefile.am
index c8a9980..d938b27 100644
--- a/opensm/opensm/Makefile.am
+++ b/opensm/opensm/Makefile.am
@@ -82,15 +82,13 @@ libopensm.la: $(libopensm_la_OBJECTS) $(libopensm_la_DEPENDENCIES)
 	$(USEGPPLINK) $(libopensm_la_LDFLAGS) $(libopensm_la_OBJECTS) $(libopensm_la_LIBADD) $(LIBS)
 opensm$(EXEEXT): $(opensm_OBJECTS) $(opensm_DEPENDENCIES)
 	@rm -f opensm$(EXEEXT)
-	$(USEGPPLINK) $(opensm_LDFLAGS) $(opensm_OBJECTS) $(opensm_LDADD) $(LIBS)
+	$(USEGPPLINK) $(opensm_OBJECTS) $(opensm_LDADD) $(LIBS)
 endif
 
 # we need to be able to load libraries from local build subtree before make install
 # we always give precedence to local tree libs and then use the pre-installed ones.
 opensm_LDADD = -L../complib -losmcomp -L../libvendor -losmvendor -L. -lopensm $(OSMV_LDADD)
 
-opensm_LDFLAGS = -lpthread -ldl
-
 opensmincludedir = $(includedir)/infiniband/opensm
 
 opensminclude_HEADERS = $(srcdir)/../include/opensm/osm_base.h \
diff --git a/opensm/osmtest/Makefile.am b/opensm/osmtest/Makefile.am
index c9b6019..97326a5 100644
--- a/opensm/osmtest/Makefile.am
+++ b/opensm/osmtest/Makefile.am
@@ -20,7 +20,6 @@ osmtest_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT $(DBGFLAGS)
 endif
 osmtest_LDADD = -L../complib -losmcomp -L../libvendor -losmvendor -L../opensm -lopensm $(OSMV_LDADD)
 
-osmtest_LDFLAGS = -lpthread
 # for linking with the simulator client library we have to use g++:
 if OSMV_SIM
 USEGPPLINK = $(LIBTOOL) --mode=link g++ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-- 
1.5.5.1.178.g1f811




More information about the general mailing list