postfix/dynamic_maps_pie.patch

788 lines
24 KiB
Diff
Raw Normal View History

Index: makedefs
===================================================================
--- makedefs.orig 2007-03-24 14:30:18.000000000 +0100
+++ makedefs 2007-08-06 00:05:32.627270181 +0200
@@ -475,4 +475,5 @@ AWK = $AWK
STRCASE = $STRCASE
EXPORT = AUXLIBS='$AUXLIBS' CCARGS='$CCARGS' OPT='$OPT' DEBUG='$DEBUG'
WARN = $WARN
+PIE = $PIE
EOF
Index: src/anvil/Makefile.in
===================================================================
--- src/anvil/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/anvil/Makefile.in 2007-08-06 00:05:32.639270914 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = anvil
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/cleanup/Makefile.in
===================================================================
--- src/cleanup/Makefile.in.orig 2007-03-17 18:51:40.000000000 +0100
+++ src/cleanup/Makefile.in 2007-08-06 00:05:32.663272382 +0200
@@ -20,11 +20,14 @@ PROG = cleanup
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libmilter.a ../../lib/libglobal.a \
../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/discard/Makefile.in
===================================================================
--- src/discard/Makefile.in.orig 2007-03-17 18:51:47.000000000 +0100
+++ src/discard/Makefile.in 2007-08-06 00:05:32.767278742 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = discard
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/error/Makefile.in
===================================================================
--- src/error/Makefile.in.orig 2007-03-17 18:51:39.000000000 +0100
+++ src/error/Makefile.in 2007-08-06 00:05:32.791280210 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = error
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/flush/Makefile.in
===================================================================
--- src/flush/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/flush/Makefile.in 2007-08-06 00:05:32.815281678 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = flush
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/fsstone/Makefile.in
===================================================================
--- src/fsstone/Makefile.in.orig 2006-12-04 01:29:52.000000000 +0100
+++ src/fsstone/Makefile.in 2007-08-06 00:05:32.855284124 +0200
@@ -9,6 +9,9 @@ TESTPROG=
PROG = fsstone
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
@@ -20,7 +23,7 @@ Makefile: Makefile.in
cat ../../conf/makedefs.out $? >$@
fsstone: fsstone.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ fsstone.o $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ fsstone.o $(LIBS) $(SYSLIBS) $(PIE)
test: $(TESTPROG)
Index: src/local/Makefile.in
===================================================================
--- src/local/Makefile.in.orig 2007-03-17 18:51:42.000000000 +0100
+++ src/local/Makefile.in 2007-08-06 00:05:32.875285347 +0200
@@ -15,11 +15,14 @@ PROG = local
TESTPROG=
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/master/Makefile.in
===================================================================
--- src/master/Makefile.in.orig 2007-08-06 00:05:31.915226638 +0200
+++ src/master/Makefile.in 2007-08-06 00:05:32.899286815 +0200
@@ -20,7 +20,7 @@ LIB_DIR = ../../lib
INC_DIR = ../../include
BIN_DIR = ../../libexec
-.c.o:; $(CC) `for i in $(LIB_OBJ); do [ $$i = $@ ] && echo -fPIC; done` $(CFLAGS) -c $*.c
+.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
all: $(PROG) $(LIB)
@@ -30,7 +30,7 @@ Makefile: Makefile.in
cat ../../conf/makedefs.out $? >$@
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
test: $(TESTPROG)
Index: src/oqmgr/Makefile.in
===================================================================
--- src/oqmgr/Makefile.in.orig 2007-03-17 18:51:43.000000000 +0100
+++ src/oqmgr/Makefile.in 2007-08-06 00:05:32.923288283 +0200
@@ -13,11 +13,14 @@ TESTPROG=
PROG = qmgr
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/pickup/Makefile.in
===================================================================
--- src/pickup/Makefile.in.orig 2007-03-17 18:51:39.000000000 +0100
+++ src/pickup/Makefile.in 2007-08-06 00:05:32.959290484 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = pickup
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/pipe/Makefile.in
===================================================================
--- src/pipe/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/pipe/Makefile.in 2007-08-06 00:05:32.983291952 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = pipe
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postalias/Makefile.in
===================================================================
--- src/postalias/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/postalias/Makefile.in 2007-08-06 00:05:33.007293420 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postalias
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postcat/Makefile.in
===================================================================
--- src/postcat/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/postcat/Makefile.in 2007-08-06 00:05:33.043295621 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postcat
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postdrop/Makefile.in
===================================================================
--- src/postdrop/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/postdrop/Makefile.in 2007-08-06 00:05:33.147301981 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postdrop
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postfix/Makefile.in
===================================================================
--- src/postfix/Makefile.in.orig 2007-03-17 18:51:39.000000000 +0100
+++ src/postfix/Makefile.in 2007-08-06 00:05:33.175303694 +0200
@@ -10,11 +10,14 @@ INC_DIR = ../../include
TESTPROG=
PROG = postfix
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postkick/Makefile.in
===================================================================
--- src/postkick/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/postkick/Makefile.in 2007-08-06 00:05:33.203305406 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postkick
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postlock/Makefile.in
===================================================================
--- src/postlock/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/postlock/Makefile.in 2007-08-06 00:05:33.227306874 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postlock
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postlog/Makefile.in
===================================================================
--- src/postlog/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/postlog/Makefile.in 2007-08-06 00:05:33.251308342 +0200
@@ -10,11 +10,14 @@ INC_DIR = ../../include
TESTPROG=
PROG = postlog
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postmap/Makefile.in
===================================================================
--- src/postmap/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/postmap/Makefile.in 2007-08-06 00:05:33.287310543 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postmap
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postqueue/Makefile.in
===================================================================
--- src/postqueue/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/postqueue/Makefile.in 2007-08-06 00:05:33.311312011 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postqueue
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/postsuper/Makefile.in
===================================================================
--- src/postsuper/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/postsuper/Makefile.in 2007-08-06 00:05:33.335313479 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = postsuper
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/proxymap/Makefile.in
===================================================================
--- src/proxymap/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/proxymap/Makefile.in 2007-08-06 00:05:33.363315191 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = proxymap
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/qmgr/Makefile.in
===================================================================
--- src/qmgr/Makefile.in.orig 2007-03-17 18:51:43.000000000 +0100
+++ src/qmgr/Makefile.in 2007-08-06 00:05:33.467321551 +0200
@@ -15,11 +15,14 @@ TESTPROG=
PROG = qmgr
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/qmqpd/Makefile.in
===================================================================
--- src/qmqpd/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/qmqpd/Makefile.in 2007-08-06 00:05:33.491323019 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = qmqpd
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libdns.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/scache/Makefile.in
===================================================================
--- src/scache/Makefile.in.orig 2007-03-17 18:51:47.000000000 +0100
+++ src/scache/Makefile.in 2007-08-06 00:05:33.527325220 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = scache
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/sendmail/Makefile.in
===================================================================
--- src/sendmail/Makefile.in.orig 2007-03-17 18:51:39.000000000 +0100
+++ src/sendmail/Makefile.in 2007-08-06 00:05:33.559327177 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = sendmail
INC_DIR = ../../include
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/showq/Makefile.in
===================================================================
--- src/showq/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/showq/Makefile.in 2007-08-06 00:05:33.587328890 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = showq
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/smtpstone/Makefile.in
===================================================================
--- src/smtpstone/Makefile.in.orig 2007-03-17 18:51:39.000000000 +0100
+++ src/smtpstone/Makefile.in 2007-08-06 00:05:33.603329868 +0200
@@ -9,6 +9,9 @@ TESTPROG=
INC_DIR = ../../include
PROG = smtp-source smtp-sink qmqp-source qmqp-sink
LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
@@ -20,16 +23,16 @@ Makefile: Makefile.in
cat ../../conf/makedefs.out $? >$@
smtp-sink: smtp-sink.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ smtp-sink.o $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ smtp-sink.o $(LIBS) $(SYSLIBS) $(PIE)
smtp-source: smtp-source.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ smtp-source.o $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ smtp-source.o $(LIBS) $(SYSLIBS) $(PIE)
qmqp-sink: qmqp-sink.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ qmqp-sink.o $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ qmqp-sink.o $(LIBS) $(SYSLIBS) $(PIE)
qmqp-source: qmqp-source.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ qmqp-source.o $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ qmqp-source.o $(LIBS) $(SYSLIBS) $(PIE)
test: $(TESTPROG)
Index: src/spawn/Makefile.in
===================================================================
--- src/spawn/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/spawn/Makefile.in 2007-08-06 00:05:33.635331825 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = spawn
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/tlsmgr/Makefile.in
===================================================================
--- src/tlsmgr/Makefile.in.orig 2007-03-17 18:51:47.000000000 +0100
+++ src/tlsmgr/Makefile.in 2007-08-06 00:05:33.739338185 +0200
@@ -10,11 +10,14 @@ PROG = tlsmgr
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libglobal.a \
../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/trivial-rewrite/Makefile.in
===================================================================
--- src/trivial-rewrite/Makefile.in.orig 2007-03-17 18:51:42.000000000 +0100
+++ src/trivial-rewrite/Makefile.in 2007-08-06 00:05:33.787341121 +0200
@@ -12,13 +12,16 @@ LIBS = ../../lib/libmaster.a ../../lib/l
LIB_DIR = ../../lib
INC_DIR = ../../include
BIN_DIR = ../../libexec
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
all: $(PROG) $(LIB)
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/verify/Makefile.in
===================================================================
--- src/verify/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/verify/Makefile.in 2007-08-06 00:05:33.803342099 +0200
@@ -9,11 +9,14 @@ TESTPROG=
PROG = verify
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/virtual/Makefile.in
===================================================================
--- src/virtual/Makefile.in.orig 2007-03-17 18:51:46.000000000 +0100
+++ src/virtual/Makefile.in 2007-08-06 00:05:33.823343322 +0200
@@ -9,11 +9,14 @@ PROG = virtual
TESTPROG=
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/bounce/Makefile.in
===================================================================
--- src/bounce/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/bounce/Makefile.in 2007-08-06 00:05:33.839344301 +0200
@@ -16,13 +16,16 @@ PROG = bounce
SAMPLES = ../../conf/bounce.cf.default
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
all: $(PROG) ../../conf/bounce.cf.default
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
# Eliminate dependency on installed Postfix.
../../conf/bounce.cf.default: template_test.ref annotate.pl
Index: src/postconf/Makefile.in
===================================================================
--- src/postconf/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/postconf/Makefile.in 2007-08-06 00:05:33.903348215 +0200
@@ -12,11 +12,14 @@ PROG = postconf
SAMPLES = ../../conf/main.cf.default
INC_DIR = ../../include
LIBS = ../../lib/libxsasl.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
../../conf/main.cf.default: $(PROG) Makefile
rm -f $@
Index: src/smtp/Makefile.in
===================================================================
--- src/smtp/Makefile.in.orig 2007-03-17 18:51:45.000000000 +0100
+++ src/smtp/Makefile.in 2007-08-06 00:05:33.915348949 +0200
@@ -14,11 +14,14 @@ PROG = smtp
INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
../../lib/libxsasl.a ../../lib/libglobal.a ../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/smtpd/Makefile.in
===================================================================
--- src/smtpd/Makefile.in.orig 2007-03-17 18:51:41.000000000 +0100
+++ src/smtpd/Makefile.in 2007-08-06 00:05:33.931349927 +0200
@@ -16,11 +16,14 @@ INC_DIR = ../../include
LIBS = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
../../lib/libxsasl.a ../../lib/libmilter.a ../../lib/libglobal.a \
../../lib/libutil.a
+ifdef PIE
+CFLAGS += -fPIE
+endif
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) $(PIE)
$(OBJS): ../../conf/makedefs.out
Index: src/xsasl/Makefile.in
===================================================================
--- src/xsasl/Makefile.in.orig 2007-03-17 18:51:38.000000000 +0100
+++ src/xsasl/Makefile.in 2007-08-06 00:05:33.947350906 +0200
@@ -18,7 +18,7 @@ LIB_DIR = ../../lib
INC_DIR = ../../include
MAKES =
-.c.o:; $(CC) $(CFLAGS) -c $*.c
+.c.o:; $(CC) -fPIC $(CFLAGS) -c $*.c
all: $(LIB)