[ofa-general] [PATCH] opensm: remove -rpath from LDFLAGS

Sasha Khapyorsky sashak at voltaire.com
Sun Jul 27 06:09:16 PDT 2008


From: Doug Ledford <dledford at redhat.com>

Fedora is very picky that things pass rpmlint before they are allowed
into the distribution.  They only allow things that rpmlint flags as an
error in the case of obvious necessity.  One of the things that came up
in the review process is that opensm still uses rpath settings in its
various Makefile.am files.  The use of rpath at all is considered to be
an error and is currently blocking things.  I went in to the Makefile.am
files and attempted to clean them up.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/config/osmvsel.m4   |    1 -
 opensm/opensm/Makefile.am  |    6 +++---
 opensm/osmtest/Makefile.am |    5 ++---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/opensm/config/osmvsel.m4 b/opensm/config/osmvsel.m4
index 2999881..7e68813 100644
--- a/opensm/config/osmvsel.m4
+++ b/opensm/config/osmvsel.m4
@@ -68,7 +68,6 @@ if test $with_osmv = "openib"; then
    OSMV_CFLAGS="-DOSM_VENDOR_INTF_OPENIB"
    OSMV_INCLUDES="-I\$(srcdir)/../include -I\$(srcdir)/../../libibcommon/include -I\$(srcdir)/../../libibumad/include -I\$(includedir)"
    OSMV_LDADD="-L\$(abs_srcdir)/../../libibumad/.libs -L\$(abs_srcdir)/../../libibcommon/.libs -L\$(libdir) -libumad -libcommon"
-   OSMV_LDADD="-Wl,--rpath -Wl,\$(abs_srcdir)/../../libibumad/.libs -Wl,--rpath -Wl,\$(abs_srcdir)/../../libibcommon/.libs -Wl,--rpath -Wl,\$(libdir) $OSMV_LDADD"
 
    if test "x$with_umad_libs" != "x"; then
      OSMV_LDADD="-L$with_umad_libs $OSMV_LDADD"
diff --git a/opensm/opensm/Makefile.am b/opensm/opensm/Makefile.am
index 80f5a01..c8a9980 100644
--- a/opensm/opensm/Makefile.am
+++ b/opensm/opensm/Makefile.am
@@ -79,7 +79,7 @@ endif
 if OSMV_SIM
 USEGPPLINK = $(LIBTOOL) --mode=link g++ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 libopensm.la: $(libopensm_la_OBJECTS) $(libopensm_la_DEPENDENCIES)
-	$(USEGPPLINK) -rpath $(libdir) $(libopensm_la_LDFLAGS) $(libopensm_la_OBJECTS) $(libopensm_la_LIBADD) $(LIBS)
+	$(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)
@@ -87,9 +87,9 @@ 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 -L../libvendor -L. $(OSMV_LDADD) -lopensm -losmcomp -losmvendor
+opensm_LDADD = -L../complib -losmcomp -L../libvendor -losmvendor -L. -lopensm $(OSMV_LDADD)
 
-opensm_LDFLAGS = -Wl,--rpath -Wl,$(libdir) -lpthread -ldl
+opensm_LDFLAGS = -lpthread -ldl
 
 opensmincludedir = $(includedir)/infiniband/opensm
 
diff --git a/opensm/osmtest/Makefile.am b/opensm/osmtest/Makefile.am
index cb1c755..c9b6019 100644
--- a/opensm/osmtest/Makefile.am
+++ b/opensm/osmtest/Makefile.am
@@ -18,10 +18,9 @@ osmtest_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP $(
 else
 osmtest_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT $(DBGFLAGS)
 endif
-osmtest_LDADD = -L../complib -L../libvendor -L../opensm -L$(libdir) -L. \
-	$(OSMV_LDADD) -lopensm -losmcomp -losmvendor
+osmtest_LDADD = -L../complib -losmcomp -L../libvendor -losmvendor -L../opensm -lopensm $(OSMV_LDADD)
 
-osmtest_LDFLAGS = -Wl,--rpath -Wl,$(libdir) -lpthread  -L../opensm
+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