File: 020_hardening-fix.patch

package info (click to toggle)
dhex 0.69-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 484 kB
  • sloc: ansic: 5,113; makefile: 71; sh: 46
file content (45 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
Description: fix Makefile to make possible hardening improves
Author: Fabio Augusto De Muzio Tobich <ftobich@gmail.com>
Forwarded: no
Last-Update: 2020-11-08

Index: dhex/Makefile
===================================================================
--- dhex.orig/Makefile
+++ dhex/Makefile
@@ -1,9 +1,9 @@
 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+=		-g -Wall
 #CFLAGS+= -ffunction-sections -fdata-sections
-#LDFLAGS+= --gc-sections 
+#LDFLAGS+= --gc-sections
 LIBS=		-lncurses
 DESTDIR=	/usr/local/
 
@@ -24,7 +24,7 @@ OFILES=buffers.o \
 all:	dhex
 
 dhex:	$(OFILES)
-	$(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
+	$(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ $(OFILES) $(LIBS)
 
 install:all
 	strip dhex
@@ -34,12 +34,9 @@ install:all
 	cp dhex_markers.5 $(DESTDIR)/man/man5
 	cp dhex_searchlog.5 $(DESTDIR)/man/man5
 
-	
-
 .c.o:
 	$(CC) $< -c -I. $(CPPFLAGS) $(CFLAGS) $(OPTIONS)
 
 clean:
 	rm -f dhex $(OFILES)
 
-