aboutsummaryrefslogtreecommitdiffstats
path: root/main/subversion/subversion-1.12.0-linking.patch
blob: f3dcacc41912123426fad8c3f82a98cd80443a34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Fix the way libtool is used to match standard practice:

a) link ONLY libraries using -rpath $(libdir), not executables
   .. this avoids adding an RPATH for $libdir to executables
b) link non-installable test binaries using -no-install
   .. only for convenience but should speed up builds slightly(?)

--- subversion-1.12.0/build.conf.linking
+++ subversion-1.12.0/build.conf
@@ -572,7 +572,7 @@
 path = subversion/bindings/swig/python/libsvn_swig_py
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
        apriconv apr python swig
-link-cmd = $(LINK)
+link-cmd = $(LINK_LIB)
 install = swig-py-lib
 # need special build rule to include -DSWIGPYTHON
 compile-cmd = $(COMPILE_SWIG_PY)
@@ -598,7 +598,7 @@
 lang = ruby
 path = subversion/bindings/swig/ruby/libsvn_swig_ruby
 libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
 install = swig-rb-lib
 # need special build rule to include
 compile-cmd = $(COMPILE_SWIG_RB)
@@ -769,6 +769,7 @@
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr aprutil apriconv apr
 msvc-static = yes
 undefined-lib-symbols = yes
+link-cmd = $(LINK_TEST_LIB)
 
 # ----------------------------------------------------------------------------
 # Tests for libsvn_fs_base
--- subversion-1.12.0/build/generator/gen_base.py.linking
+++ subversion-1.12.0/build/generator/gen_base.py
@@ -599,7 +599,7 @@
     self.install = options.get('install')
     self.compile_cmd = options.get('compile-cmd')
     self.sources = options.get('sources', '*.c *.cpp')
-    self.link_cmd = options.get('link-cmd', '$(LINK)')
+    self.link_cmd = options.get('link-cmd', '$(LINK_LIB)')
 
     self.external_lib = options.get('external-lib')
     self.external_project = options.get('external-project')
@@ -659,6 +659,14 @@
 
     self.msvc_force_static = options.get('msvc-force-static') == 'yes'
 
+    if self.install in ['test', 'bdb-test', 'sub-test', ]:
+      self.link_cmd = '$(LINK_TEST)'
+    elif self.install in ['bin', 'tools']:
+      self.link_cmd = '$(LINK_EXE)'
+    elif self.link_cmd == '$(LINK_LIB)':
+      raise GenError('ERROR: Unknown executable link type for ' + self.name + \
+                     ': ' + self.link_cmd + ' (' + self.install + ')')
+    
   def add_dependencies(self):
     TargetLinked.add_dependencies(self)
 
--- subversion-1.12.0/Makefile.in.linking
+++ subversion-1.12.0/Makefile.in
@@ -268,11 +268,14 @@
 COMPILE_SVNXX = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) -o $@ -c
 COMPILE_SVNXX_TEST = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) $(BOOST_TEST_CPPFLAGS) -o $@ -c
 
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
-LINK_LIB = $(LINK) $(LT_SO_VERSION)
-LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
-LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
-LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS)
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
+LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
+LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS)
+LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION) -rpath $(libdir)
+LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS) -no-install
+LINK_TEST = $(LINK) -no-install
+LINK_TEST_LIB = $(LINK_TEST) -avoid-version
+LINK_EXE = $(LINK)
 
 # special link rule for mod_dav_svn
 LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module $(APACHE_LDFLAGS) -shared