File at-3.1.13-pie.patch of Package at
Index: Makefile.in
===================================================================
--- Makefile.in.orig
+++ Makefile.in
@@ -65,17 +65,17 @@ LIST = Filelist Filelist.asc
.PHONY: all install clean dist distclean
all: at atd atrun
at: $(ATOBJECTS)
- $(CC) $(CFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB)
+ $(CC) $(CFLAGS) -o at -pie $(ATOBJECTS) $(LIBS) $(LEXLIB)
rm -f $(CLONES)
$(LN_S) -f at atq
$(LN_S) -f at atrm
atd: $(RUNOBJECTS)
- $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB)
+ $(CC) $(CFLAGS) -o atd -pie $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(SELINUXLIB)
y.tab.c y.tab.h: parsetime.y
$(YACC) -d parsetime.y
lex.yy.c: parsetime.l
@@ -83,11 +83,11 @@ lex.yy.c: parsetime.l
atrun: atrun.in
configure
.c.o:
- $(CC) -c $(CFLAGS) $(DEFS) $*.c
+ $(CC) -c $(CFLAGS) -fpie $(DEFS) $*.c
install: all
$(INSTALL) -m 755 -d $(IROOT)$(etcdir)
$(INSTALL) -m 755 -d $(IROOT)$(bindir)
$(INSTALL) -m 755 -d $(IROOT)$(sbindir)