File: hardening

package info (click to toggle)
uronode 2.15-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,152 kB
  • sloc: ansic: 6,354; sh: 289; makefile: 102
file content (33 lines) | stat: -rw-r--r-- 982 bytes parent folder | download | duplicates (4)
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
Description: Fix Lintian hardening errors caused by flags not being passed to compiler,
use debhelper compiler flags
Author: Dave Hibberd <d@vehibberd.com>
Last-Update: 2017-08-22

--- a/Makefile.in
+++ b/Makefile.in
@@ -1,10 +1,13 @@
 all: nodeusers uronode axdigi calibrate @FLEXNET@
 
 CC = gcc
-LD = gcc
+LD = $(CC)
 # CFLAGS = -O2 -g -s -Wno-unused-result -Wstrict-prototypes
-CFLAGS = -DUNIX -g3 -DDEBUG
-LDFLAGS =
+# CFLAGS = -DUNIX -g3 -DDEBUG
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 LIBS = -lax25 -lax25io
 
 include Makefile.include
@@ -24,7 +27,7 @@
 DIGI_OBJS =		$(DIGI_SRC:.c=.o)
 CALIBRATE_OBJS =	$(CALIBRATE_SRC:.c=.o)
 .c.o:
-	$(CC) $(CFLAGS) -c $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS)  -c $<
 
 install: installbin installman installhelp installconf
 	install -b -m 755    -D -d	$(VAR_DIR)