b890c23
b890c23
Libraries should be linked with -rpath $libdir but programs should not.
b890c23
Doing so for the latter means that a redundant RPATH entry of $libdir
b890c23
will end up in the binaries.
b890c23
b890c23
The redundant RPATH can also cause obscure build failures by causing
b890c23
in-build binaries to pick up libraries from the system environment,
b890c23
which libtool will otherwise avoid.
b890c23
b890c23
--- subversion-1.6.1/build.conf.rpath
b890c23
+++ subversion-1.6.1/build.conf
b890c23
@@ -472,7 +472,7 @@ type = swig_lib
b890c23
 lang = python
b890c23
 path = subversion/bindings/swig/python/libsvn_swig_py
b890c23
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr
b890c23
-link-cmd = $(LINK) $(SWIG_PY_LIBS)
b890c23
+link-cmd = $(LINK_LIB) $(SWIG_PY_LIBS)
b890c23
 install = swig-py-lib
b890c23
 # need special build rule to include -DSWIGPYTHON
b890c23
 compile-cmd = $(COMPILE_SWIG_PY)
b890c23
@@ -495,7 +495,7 @@ type = swig_lib
b890c23
 lang = ruby
b890c23
 path = subversion/bindings/swig/ruby/libsvn_swig_ruby
b890c23
 libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr
b890c23
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
b890c23
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
b890c23
 install = swig-rb-lib
b890c23
 # need special build rule to include
b890c23
 compile-cmd = $(COMPILE_SWIG_RB)
b890c23
--- subversion-1.6.1/build/generator/gen_base.py.rpath
b890c23
+++ subversion-1.6.1/build/generator/gen_base.py
b890c23
@@ -455,6 +455,10 @@ class TargetLib(TargetLinked):
b890c23
     self.msvc_fake = options.get('msvc-fake') == 'yes' # has fake target
b890c23
     self.msvc_export = options.get('msvc-export', '').split()
b890c23
 
b890c23
+    ### hmm. this is Makefile-specific
b890c23
+    if self.link_cmd == '$(LINK)':
b890c23
+      self.link_cmd = '$(LINK_LIB)'
b890c23
+
b890c23
 class TargetApacheMod(TargetLib):
b890c23
 
b890c23
   def __init__(self, name, options, gen_obj):
b890c23
--- subversion-1.6.1/Makefile.in.rpath
b890c23
+++ subversion-1.6.1/Makefile.in
b890c23
@@ -184,7 +184,8 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
b890c23
 COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
b890c23
 COMPILE_JAVAHL_JAVAH = $(JAVAH)
b890c23
 
b890c23
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
b890c23
+LINK_LIB = $(LINK) -rpath $(libdir)
b890c23
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
b890c23
 LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
b890c23
 
b890c23
 # special link rule for mod_dav_svn