subversion/subversion-1.8.0-pie.patch

57 lines
2.0 KiB
Diff
Raw Normal View History

diff -uap subversion-1.7.0/build/generator/gen_base.py.pie subversion-1.7.0/build/generator/gen_base.py
2013-06-18 15:48:20 +00:00
--- subversion-1.8.0/build/generator/gen_base.py.pie
+++ subversion-1.8.0/build/generator/gen_base.py
@@ -409,7 +409,7 @@ class TargetLinked(Target):
2010-09-03 14:47:21 +00:00
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')
2013-06-18 15:48:20 +00:00
@@ -465,6 +465,11 @@ class TargetExe(TargetLinked):
2010-09-03 14:47:21 +00:00
self.manpages = options.get('manpages', '')
self.testing = options.get('testing')
+ if self.install == 'test' or self.install == 'bdb-test':
+ self.link_cmd = '$(LINK_TEST)'
+ else:
+ self.link_cmd = '$(LINK_EXE)'
+
def add_dependencies(self):
TargetLinked.add_dependencies(self)
2013-06-18 15:48:20 +00:00
@@ -515,8 +520,8 @@ class TargetLib(TargetLinked):
2010-09-03 14:47:21 +00:00
self.msvc_export = options.get('msvc-export', '').split()
### hmm. this is Makefile-specific
- if self.link_cmd == '$(LINK)':
- self.link_cmd = '$(LINK_LIB)'
+ if self.install == 'test':
+ self.link_cmd = '$(LINK_TEST_LIB)'
class TargetApacheMod(TargetLib):
2013-06-18 15:48:20 +00:00
--- subversion-1.8.0/Makefile.in.pie
+++ subversion-1.8.0/Makefile.in
@@ -203,6 +203,9 @@ COMPILE_CXXHL_CXX = $(LIBTOOL) $(LTCXXFL
2010-09-03 14:47:21 +00:00
LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
2010-09-03 14:47:21 +00:00
+LINK_TEST = $(LINK) -no-install
+LINK_TEST_LIB = $(LINK) -avoid-version
+LINK_EXE = $(LINK) -pie
LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
2010-09-03 14:47:21 +00:00
2013-06-18 15:48:20 +00:00
@@ -676,7 +679,7 @@ schema-clean:
$(PYTHON) $(top_srcdir)/build/transform_sql.py $< $(top_srcdir)/$@
.c.o:
- $(COMPILE) -o $@ -c $<
+ $(COMPILE) -fpie -o $@ -c $<
.cpp.o:
$(COMPILE_CXX) -o $@ -c $<