Package: xchain / 1.0.1-9

0001-Makefile-fixed-typo-of-the-target-name.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: Fixed typo of the target name and improved GCC hardening.
Author: Oohara Yuuma <oohara@debian.org>
Reviewed-by: Giovani Agusuto Ferreira <giovani@debian.org>
Last Update: 2017-01-15
Index: xchain-1.0.1/Makefile
===================================================================
--- xchain-1.0.1.orig/Makefile
+++ xchain-1.0.1/Makefile
@@ -2,17 +2,19 @@ DESTDIR = /
 # This is so dpkg-buildpackage can build in the correct dir
 
 CC=gcc
-CFLAGS=-O2 -Wall
+CFLAGS += -O2 -Wall -fPIE
 
 OBJS=		xchain.o
 
 .c.o:
-		$(CC) -c $(CFLAGS) $<
+		$(CC) -c $(CFLAGS) $(CPPFLAGS) $<
 
 all:		xchain
 
-chain:	$(OBJS)
-		$(CC) -o xchain $(CFLAGS) $(OBJS)
+LDFLAGS += -pie
+
+xchain:	$(OBJS)
+		$(CC) -o xchain $(CFLAGS) $(LDFLAGS) $(OBJS)
 		chmod 0755 xchain
 
 install:	xchain