aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/hardening
blob: c8d107edffdbf66015731e4db27f0f0009f36d5b (plain)
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
Description: Fix passing of hardening build flags in Makefile
Author: Axel Beckert <abe@debian.org>

Index: dhex-0.67/Makefile
===================================================================
--- dhex-0.67.orig/Makefile	2012-06-22 15:04:57.000000000 +0200
+++ dhex-0.67/Makefile	2012-06-22 15:05:09.000000000 +0200
@@ -1,7 +1,7 @@
 CC=		gcc
-LDFLAGS=	-L/usr/lib	-L/usr/local/lib  	-L/usr/lib/ncurses	-L/usr/local/lib/ncurses
-CPPFLAGS=	-I/usr/include	-I/usr/local/include	-I/usr/include/ncurses	-I/usr/local/include/ncurses
-CFLAGS=		-O3 -Wall -std=c99 
+LDFLAGS+=	-L/usr/lib	-L/usr/local/lib  	-L/usr/lib/ncurses	-L/usr/local/lib/ncurses
+CPPFLAGS+=	-I/usr/include	-I/usr/local/include	-I/usr/include/ncurses	-I/usr/local/include/ncurses
+CFLAGS+=	-Wall -std=c99 
 #CFLAGS+= -ffunction-sections -fdata-sections
 #LDFLAGS+= --gc-sections 
 LIBS=		-lncurses
@@ -24,7 +24,7 @@
 all:	dhex
 
 dhex:	$(OFILES)
-	$(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
 
 install:all
 	strip dhex