forked from jengelh/openldap2
simplified pie patch a bit
OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=56
This commit is contained in:
parent
f83edd3df7
commit
3ef3072610
@ -1,181 +1,120 @@
|
||||
From c73e8eb5d25f22ffb1203a38becbe88da4fc9116 Mon Sep 17 00:00:00 2001
|
||||
From 0067c67787f5ce93c90f60d51e01c769c918520c Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Haferkamp <rhafer@suse.de>
|
||||
Date: Wed, 16 Jun 2010 14:08:30 +0200
|
||||
Date: Fri, 12 Nov 2010 09:39:11 +0100
|
||||
Subject: pie compile
|
||||
|
||||
|
||||
12 files changed, 35 insertions(+), 2 deletions(-)
|
||||
7 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/build/top.mk b/build/top.mk
|
||||
index eb4c825..4cb3da8 100644
|
||||
index eb4c825..6339d63 100644
|
||||
--- a/build/top.mk
|
||||
+++ b/build/top.mk
|
||||
@@ -178,9 +178,9 @@ SLAPD_L = $(LDAP_LIBLUNICODE_A) $(LDAP_LIBREWRITE_A) \
|
||||
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@
|
||||
@@ -107,7 +107,7 @@ LINK_LIBS = $(MOD_LIBS) $(@PLAT@_LINK_LIBS)
|
||||
LTSTATIC = @LTSTATIC@
|
||||
|
||||
KRB4_LIBS = @KRB4_LIBS@
|
||||
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
|
||||
$(MAKE) ucgendat
|
||||
./ucgendat $(srcdir)/UnicodeData.txt -x $(srcdir)/CompositionExclusions.txt
|
||||
LTLINK = $(LIBTOOL) --mode=link \
|
||||
- $(CC) $(LTSTATIC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS)
|
||||
+ $(CC) -pie $(LTSTATIC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS)
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+PIE_LDFLAGS="-pie"
|
||||
+
|
||||
ucgendat: $(XLIBS) ucgendat.o
|
||||
$(LTLINK) -o $@ ucgendat.o $(LIBS)
|
||||
LTCOMPILE_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=compile \
|
||||
$(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(LIB_DEFS) -c
|
||||
@@ -116,7 +116,7 @@ LTLINK_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=link \
|
||||
$(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB)
|
||||
|
||||
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
|
||||
@@ -19,6 +19,9 @@ PROGRAM = testavl
|
||||
LDAP_INCDIR= ../../include
|
||||
LDAP_LIBDIR= ../../libraries
|
||||
LTCOMPILE_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=compile \
|
||||
- $(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c
|
||||
+ $(CC) $(LT_CFLAGS) $(PIE_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+PIE_LDFLAGS="-pie"
|
||||
+
|
||||
NT_SRCS = ntservice.c
|
||||
NT_OBJS = ntservice.o slapdmsg.res
|
||||
|
||||
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@
|
||||
|
||||
SLAPI_LIBS=@LIBSLAPI@ @SLAPI_LIBS@
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+PIE_LDFLAGS="-pie"
|
||||
+
|
||||
XDEFS = $(MODULES_CPPFLAGS)
|
||||
XLDFLAGS = $(MODULES_LDFLAGS)
|
||||
LTLINK_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=link \
|
||||
$(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_MOD)
|
||||
@@ -206,7 +206,7 @@ SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LI
|
||||
# Our Defaults
|
||||
CC = $(AC_CC)
|
||||
DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
|
||||
-CFLAGS = $(AC_CFLAGS) $(DEFS)
|
||||
+CFLAGS = -fPIE $(AC_CFLAGS) $(DEFS)
|
||||
LDFLAGS = $(LDAP_LIBPATH) $(AC_LDFLAGS) $(XLDFLAGS)
|
||||
LIBS = $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS)
|
||||
|
||||
diff --git a/servers/slapd/back-bdb/Makefile.in b/servers/slapd/back-bdb/Makefile.in
|
||||
index f44dab2..d919931 100644
|
||||
index f44dab2..8123c72 100644
|
||||
--- a/servers/slapd/back-bdb/Makefile.in
|
||||
+++ b/servers/slapd/back-bdb/Makefile.in
|
||||
@@ -37,6 +37,9 @@ mod_DEFS = -DSLAPD_IMPORT
|
||||
@@ -33,6 +33,8 @@ LDAP_LIBDIR= ../../../libraries
|
||||
BUILD_OPT = "--enable-bdb"
|
||||
BUILD_MOD = @BUILD_BDB@
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+
|
||||
mod_DEFS = -DSLAPD_IMPORT
|
||||
MOD_DEFS = $(@BUILD_BDB@_DEFS)
|
||||
MOD_LIBS = $(BDB_LIBS)
|
||||
|
||||
+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)
|
||||
diff --git a/servers/slapd/back-hdb/Makefile.in b/servers/slapd/back-hdb/Makefile.in
|
||||
index 5d8381c..a80d8c0 100644
|
||||
index 5d8381c..59bea01 100644
|
||||
--- a/servers/slapd/back-hdb/Makefile.in
|
||||
+++ b/servers/slapd/back-hdb/Makefile.in
|
||||
@@ -41,6 +41,9 @@ mod_DEFS = -DSLAPD_IMPORT
|
||||
MOD_DEFS = $(@BUILD_HDB@_DEFS)
|
||||
MOD_LIBS = $(BDB_LIBS)
|
||||
@@ -37,6 +37,8 @@ LDAP_LIBDIR= ../../../libraries
|
||||
BUILD_OPT = "--enable-hdb"
|
||||
BUILD_MOD = @BUILD_HDB@
|
||||
|
||||
+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)
|
||||
mod_DEFS = -DSLAPD_IMPORT
|
||||
MOD_DEFS = $(@BUILD_HDB@_DEFS)
|
||||
MOD_LIBS = $(BDB_LIBS)
|
||||
diff --git a/servers/slapd/back-ldap/Makefile.in b/servers/slapd/back-ldap/Makefile.in
|
||||
index 64a4af8..51495d5 100644
|
||||
index 64a4af8..6b093c3 100644
|
||||
--- a/servers/slapd/back-ldap/Makefile.in
|
||||
+++ b/servers/slapd/back-ldap/Makefile.in
|
||||
@@ -29,6 +29,9 @@ BUILD_MOD = @BUILD_LDAP@
|
||||
@@ -26,6 +26,8 @@ LDAP_LIBDIR= ../../../libraries
|
||||
BUILD_OPT = "--enable-ldap"
|
||||
BUILD_MOD = @BUILD_LDAP@
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+
|
||||
mod_DEFS = -DSLAPD_IMPORT
|
||||
MOD_DEFS = $(@BUILD_LDAP@_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)
|
||||
diff --git a/servers/slapd/back-ldif/Makefile.in b/servers/slapd/back-ldif/Makefile.in
|
||||
index 29450ae..c47641f 100644
|
||||
index 29450ae..450caf2 100644
|
||||
--- a/servers/slapd/back-ldif/Makefile.in
|
||||
+++ b/servers/slapd/back-ldif/Makefile.in
|
||||
@@ -25,6 +25,9 @@ BUILD_MOD = yes
|
||||
@@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries
|
||||
BUILD_OPT = "--enable-ldif"
|
||||
BUILD_MOD = yes
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+
|
||||
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)
|
||||
diff --git a/servers/slapd/back-monitor/Makefile.in b/servers/slapd/back-monitor/Makefile.in
|
||||
index 6005b2d..a8f45a7 100644
|
||||
index 6005b2d..f4fd287 100644
|
||||
--- a/servers/slapd/back-monitor/Makefile.in
|
||||
+++ b/servers/slapd/back-monitor/Makefile.in
|
||||
@@ -33,6 +33,9 @@ BUILD_MOD = @BUILD_MONITOR@
|
||||
@@ -30,6 +30,8 @@ LDAP_LIBDIR= ../../../libraries
|
||||
BUILD_OPT = "--enable-monitor"
|
||||
BUILD_MOD = @BUILD_MONITOR@
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+
|
||||
mod_DEFS = -DSLAPD_IMPORT
|
||||
MOD_DEFS = $(@BUILD_MONITOR@_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)
|
||||
diff --git a/servers/slapd/back-relay/Makefile.in b/servers/slapd/back-relay/Makefile.in
|
||||
index a408f34..518c7e5 100644
|
||||
index a408f34..012cd07 100644
|
||||
--- a/servers/slapd/back-relay/Makefile.in
|
||||
+++ b/servers/slapd/back-relay/Makefile.in
|
||||
@@ -25,6 +25,9 @@ BUILD_MOD = @BUILD_RELAY@
|
||||
@@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries
|
||||
BUILD_OPT = "--enable-relay"
|
||||
BUILD_MOD = @BUILD_RELAY@
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+
|
||||
mod_DEFS = -DSLAPD_IMPORT
|
||||
MOD_DEFS = $(@BUILD_RELAY@_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) $(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
|
||||
|
||||
+PIE_CFLAGS="-fPIE"
|
||||
+PIE_LDFLAGS="-pie"
|
||||
+
|
||||
MOD_DEFS = -DSLAPD_IMPORT
|
||||
|
||||
shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
|
||||
--
|
||||
1.7.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user