2010-08-27 21:45:34 +02:00
|
|
|
From c73e8eb5d25f22ffb1203a38becbe88da4fc9116 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ralf Haferkamp <rhafer@suse.de>
|
|
|
|
Date: Wed, 16 Jun 2010 14:08:30 +0200
|
|
|
|
Subject: pie compile
|
|
|
|
|
|
|
|
|
|
|
|
12 files changed, 35 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/build/top.mk b/build/top.mk
|
|
|
|
index eb4c825..4cb3da8 100644
|
|
|
|
--- a/build/top.mk
|
|
|
|
+++ b/build/top.mk
|
|
|
|
@@ -178,9 +178,9 @@ SLAPD_L = $(LDAP_LIBLUNICODE_A) $(LDAP_LIBREWRITE_A) \
|
2006-12-19 00:17:14 +01:00
|
|
|
WRAP_LIBS = @WRAP_LIBS@
|
|
|
|
# AutoConfig generated
|
|
|
|
AC_CC = @CC@
|
|
|
|
-AC_CFLAGS = @CFLAGS@
|
|
|
|
+AC_CFLAGS = @CFLAGS@ $(PIE_CFLAGS)
|
|
|
|
AC_DEFS = @CPPFLAGS@ # @DEFS@
|
|
|
|
-AC_LDFLAGS = @LDFLAGS@
|
|
|
|
+AC_LDFLAGS = @LDFLAGS@ $(PIE_LDFLAGS)
|
|
|
|
AC_LIBS = @LIBS@
|
|
|
|
|
|
|
|
KRB4_LIBS = @KRB4_LIBS@
|
2010-08-27 21:45:34 +02:00
|
|
|
diff --git a/libraries/liblunicode/Makefile.in b/libraries/liblunicode/Makefile.in
|
|
|
|
index 5348baa..7332d4e 100644
|
|
|
|
--- a/libraries/liblunicode/Makefile.in
|
|
|
|
+++ b/libraries/liblunicode/Makefile.in
|
|
|
|
@@ -35,6 +35,9 @@ $(XXDIR)/uctable.h: $(XXDIR)/ucgendat.c $(srcdir)/UnicodeData.txt $(srcdir)/Comp
|
2009-12-10 16:36:32 +01:00
|
|
|
$(MAKE) ucgendat
|
|
|
|
./ucgendat $(srcdir)/UnicodeData.txt -x $(srcdir)/CompositionExclusions.txt
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
ucgendat: $(XLIBS) ucgendat.o
|
|
|
|
$(LTLINK) -o $@ ucgendat.o $(LIBS)
|
2009-12-10 16:36:32 +01:00
|
|
|
|
2010-08-27 21:45:34 +02:00
|
|
|
diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in
|
|
|
|
index b527966..a04e18e 100644
|
|
|
|
--- a/libraries/liblutil/Makefile.in
|
|
|
|
+++ b/libraries/liblutil/Makefile.in
|
2009-12-10 16:36:32 +01:00
|
|
|
@@ -19,6 +19,9 @@ PROGRAM = testavl
|
2006-12-19 00:17:14 +01:00
|
|
|
LDAP_INCDIR= ../../include
|
|
|
|
LDAP_LIBDIR= ../../libraries
|
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
NT_SRCS = ntservice.c
|
|
|
|
NT_OBJS = ntservice.o slapdmsg.res
|
|
|
|
|
2010-08-27 21:45:34 +02:00
|
|
|
diff --git a/libraries/librewrite/Makefile.in b/libraries/librewrite/Makefile.in
|
|
|
|
index 72678c1..a4e0bcc 100644
|
|
|
|
--- a/libraries/librewrite/Makefile.in
|
|
|
|
+++ b/libraries/librewrite/Makefile.in
|
|
|
|
@@ -26,6 +26,9 @@ OBJS = config.o context.o info.o ldapmap.o map.o params.o rule.o \
|
|
|
|
LDAP_INCDIR= ../../include
|
|
|
|
LDAP_LIBDIR= ../../libraries
|
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
LIBRARY = librewrite.a
|
|
|
|
PROGRAMS = rewrite
|
|
|
|
XLIBS = $(LIBRARY) $(LDAP_LIBLUTIL_A) \
|
|
|
|
diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in
|
|
|
|
index c170d79..23a18eb 100644
|
|
|
|
--- a/servers/slapd/Makefile.in
|
|
|
|
+++ b/servers/slapd/Makefile.in
|
|
|
|
@@ -69,6 +69,9 @@ SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
SLAPI_LIBS=@LIBSLAPI@ @SLAPI_LIBS@
|
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
XDEFS = $(MODULES_CPPFLAGS)
|
|
|
|
XLDFLAGS = $(MODULES_LDFLAGS)
|
|
|
|
|
2010-08-27 21:45:34 +02:00
|
|
|
diff --git a/servers/slapd/back-bdb/Makefile.in b/servers/slapd/back-bdb/Makefile.in
|
|
|
|
index f44dab2..d919931 100644
|
|
|
|
--- a/servers/slapd/back-bdb/Makefile.in
|
|
|
|
+++ b/servers/slapd/back-bdb/Makefile.in
|
2009-12-10 16:36:32 +01:00
|
|
|
@@ -37,6 +37,9 @@ mod_DEFS = -DSLAPD_IMPORT
|
2006-12-19 00:17:14 +01:00
|
|
|
MOD_DEFS = $(@BUILD_BDB@_DEFS)
|
2009-12-10 16:36:32 +01:00
|
|
|
MOD_LIBS = $(BDB_LIBS)
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
|
|
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
|
|
|
UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
2010-08-27 21:45:34 +02:00
|
|
|
diff --git a/servers/slapd/back-hdb/Makefile.in b/servers/slapd/back-hdb/Makefile.in
|
|
|
|
index 5d8381c..a80d8c0 100644
|
|
|
|
--- a/servers/slapd/back-hdb/Makefile.in
|
|
|
|
+++ b/servers/slapd/back-hdb/Makefile.in
|
2009-12-10 16:36:32 +01:00
|
|
|
@@ -41,6 +41,9 @@ mod_DEFS = -DSLAPD_IMPORT
|
2006-12-19 00:17:14 +01:00
|
|
|
MOD_DEFS = $(@BUILD_HDB@_DEFS)
|
2009-12-10 16:36:32 +01:00
|
|
|
MOD_LIBS = $(BDB_LIBS)
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
|
|
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
|
|
|
UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
2010-08-27 21:45:34 +02:00
|
|
|
diff --git a/servers/slapd/back-ldap/Makefile.in b/servers/slapd/back-ldap/Makefile.in
|
|
|
|
index 64a4af8..51495d5 100644
|
|
|
|
--- a/servers/slapd/back-ldap/Makefile.in
|
|
|
|
+++ b/servers/slapd/back-ldap/Makefile.in
|
|
|
|
@@ -29,6 +29,9 @@ BUILD_MOD = @BUILD_LDAP@
|
2006-12-19 00:17:14 +01:00
|
|
|
mod_DEFS = -DSLAPD_IMPORT
|
2010-08-27 21:45:34 +02:00
|
|
|
MOD_DEFS = $(@BUILD_LDAP@_DEFS)
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
2010-08-27 21:45:34 +02:00
|
|
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
|
|
|
UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
|
|
|
diff --git a/servers/slapd/back-ldif/Makefile.in b/servers/slapd/back-ldif/Makefile.in
|
|
|
|
index 29450ae..c47641f 100644
|
|
|
|
--- a/servers/slapd/back-ldif/Makefile.in
|
|
|
|
+++ b/servers/slapd/back-ldif/Makefile.in
|
2009-12-10 16:36:32 +01:00
|
|
|
@@ -25,6 +25,9 @@ BUILD_MOD = yes
|
2006-12-19 00:17:14 +01:00
|
|
|
mod_DEFS = -DSLAPD_IMPORT
|
|
|
|
MOD_DEFS = $(yes_DEFS)
|
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
|
|
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
|
|
|
UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
2010-08-27 21:45:34 +02:00
|
|
|
diff --git a/servers/slapd/back-monitor/Makefile.in b/servers/slapd/back-monitor/Makefile.in
|
|
|
|
index 6005b2d..a8f45a7 100644
|
|
|
|
--- a/servers/slapd/back-monitor/Makefile.in
|
|
|
|
+++ b/servers/slapd/back-monitor/Makefile.in
|
|
|
|
@@ -33,6 +33,9 @@ BUILD_MOD = @BUILD_MONITOR@
|
|
|
|
mod_DEFS = -DSLAPD_IMPORT
|
|
|
|
MOD_DEFS = $(@BUILD_MONITOR@_DEFS)
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
2010-08-27 21:45:34 +02:00
|
|
|
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
|
|
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
|
|
|
UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
|
|
|
diff --git a/servers/slapd/back-relay/Makefile.in b/servers/slapd/back-relay/Makefile.in
|
|
|
|
index a408f34..518c7e5 100644
|
|
|
|
--- a/servers/slapd/back-relay/Makefile.in
|
|
|
|
+++ b/servers/slapd/back-relay/Makefile.in
|
|
|
|
@@ -25,6 +25,9 @@ BUILD_MOD = @BUILD_RELAY@
|
2006-12-19 00:17:14 +01:00
|
|
|
mod_DEFS = -DSLAPD_IMPORT
|
2010-08-27 21:45:34 +02:00
|
|
|
MOD_DEFS = $(@BUILD_RELAY@_DEFS)
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
|
|
|
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
2010-08-27 21:45:34 +02:00
|
|
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS) $(REWRITE)
|
|
|
|
UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS) $(REWRITE)
|
|
|
|
diff --git a/servers/slapd/overlays/Makefile.in b/servers/slapd/overlays/Makefile.in
|
|
|
|
index 0b7ce5c..7a48574 100644
|
|
|
|
--- a/servers/slapd/overlays/Makefile.in
|
|
|
|
+++ b/servers/slapd/overlays/Makefile.in
|
|
|
|
@@ -46,6 +46,9 @@ LTONLY_MOD = $(LTONLY_mod)
|
|
|
|
LDAP_INCDIR= ../../../include
|
|
|
|
LDAP_LIBDIR= ../../../libraries
|
2006-12-19 00:17:14 +01:00
|
|
|
|
|
|
|
+PIE_CFLAGS="-fPIE"
|
|
|
|
+PIE_LDFLAGS="-pie"
|
|
|
|
+
|
2010-08-27 21:45:34 +02:00
|
|
|
MOD_DEFS = -DSLAPD_IMPORT
|
|
|
|
|
2006-12-19 00:17:14 +01:00
|
|
|
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
2010-08-27 21:45:34 +02:00
|
|
|
--
|
|
|
|
1.7.1
|
|
|
|
|