2004-09-09 12:50:43 +00:00
|
|
|
|
|
|
|
Build subversion executables as PIEs. Requires a slight jig to
|
|
|
|
ensure that executables in the test suite are *not* build using
|
|
|
|
-pie, since that doesn't work when main() is not itself an
|
|
|
|
object built with -pie.
|
|
|
|
|
2004-09-30 12:04:30 +00:00
|
|
|
--- subversion-1.1.0/build/generator/gen_base.py.pie
|
|
|
|
+++ subversion-1.1.0/build/generator/gen_base.py
|
|
|
|
@@ -386,6 +386,9 @@
|
2004-09-09 12:50:43 +00:00
|
|
|
self.manpages = options.get('manpages', '')
|
|
|
|
self.testing = options.get('testing')
|
|
|
|
|
|
|
|
+ if self.install == 'test' or self.install == 'fs-test':
|
|
|
|
+ self.link_cmd = '$(LINK_TEST)'
|
|
|
|
+
|
|
|
|
def add_dependencies(self, graph, cfg, extmap):
|
|
|
|
TargetLinked.add_dependencies(self, graph, cfg, extmap)
|
|
|
|
|
2004-09-30 12:04:30 +00:00
|
|
|
@@ -426,8 +429,11 @@
|
2004-09-09 12:50:43 +00:00
|
|
|
self.msvc_fake = options.get('msvc-fake') == 'yes' # has fake target
|
2004-09-30 12:04:30 +00:00
|
|
|
self.msvc_export = string.split(options.get('msvc-export', ''))
|
2004-09-09 12:50:43 +00:00
|
|
|
|
|
|
|
- ### hmm. this is Makefile-specific
|
|
|
|
- self.link_cmd = '$(LINK_LIB)'
|
|
|
|
+ ### more Makefile-specific stuff:
|
|
|
|
+ if self.install == 'test':
|
|
|
|
+ self.link_cmd = '$(LINK_TEST_LIB)'
|
|
|
|
+ else:
|
|
|
|
+ self.link_cmd = '$(LINK_LIB)'
|
|
|
|
|
|
|
|
class TargetApacheMod(TargetLib):
|
|
|
|
|
2004-09-30 12:04:30 +00:00
|
|
|
--- subversion-1.1.0/Makefile.in.pie
|
|
|
|
+++ subversion-1.1.0/Makefile.in
|
|
|
|
@@ -140,9 +140,10 @@
|
2004-09-09 12:50:43 +00:00
|
|
|
CPPFLAGS = @CPPFLAGS@ $(EXTRA_CPPFLAGS)
|
|
|
|
LDFLAGS = @LDFLAGS@ $(EXTRA_LDFLAGS)
|
|
|
|
|
|
|
|
-COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES)
|
|
|
|
+BASE_COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES)
|
2004-09-30 13:17:46 +00:00
|
|
|
+COMPILE = $(BASE_COMPILE) -fpie
|
2004-09-30 12:04:30 +00:00
|
|
|
COMPILE_CXX = $(CXX) $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) $(INCLUDES)
|
|
|
|
-LT_COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
|
2004-09-09 12:50:43 +00:00
|
|
|
+LT_COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(BASE_COMPILE)
|
|
|
|
|
|
|
|
# special compilation for files destined for mod_dav_svn
|
|
|
|
COMPILE_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) $(APACHE_INCLUDES) $(INCLUDES) -o $@ -c
|
2004-09-30 12:04:30 +00:00
|
|
|
@@ -160,8 +161,11 @@
|
|
|
|
# special compilation for files destined for SWIG/Java
|
|
|
|
COMPILE_SWIG_JAVA_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
|
2004-09-09 12:50:43 +00:00
|
|
|
|
|
|
|
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
|
2004-09-09 12:51:43 +00:00
|
|
|
-LINK_LIB = $(LINK) -rpath $(libdir)
|
2004-09-09 12:50:43 +00:00
|
|
|
+BASE_LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
|
|
|
|
+LINK = $(BASE_LINK) -pie
|
|
|
|
+LINK_TEST = $(BASE_LINK) -no-install
|
2004-09-09 12:51:43 +00:00
|
|
|
+LINK_LIB = $(BASE_LINK) -rpath $(libdir)
|
2004-09-09 12:50:43 +00:00
|
|
|
+LINK_TEST_LIB = $(BASE_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
|