File: set_hardening_flags.patch

package info (click to toggle)
rman 3.2-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,152 kB
  • sloc: ansic: 3,607; perl: 451; sh: 334; makefile: 77
file content (27 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (2)
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: set hardening flags.
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2013-05-08

Index: rman/Makefile
===================================================================
--- rman.orig/Makefile
+++ rman/Makefile
@@ -26,7 +26,8 @@ MANDIR = /usr/local/man/man1
 
 ### if you have GNU gcc, use these definitions
 CC = gcc
-CFLAGS = -O2 -finline-functions
+CFLAGS = -O2 -finline-functions $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
 
 ### if you just have a standard UNIX, use these instead of GNU.
 ### CC must be an ANSI C compiler
@@ -102,7 +103,7 @@ all:  rman
 
 # everyone but me zaps assertions with the -DNDEBUG flag
 rman: rman.c Makefile
-	$(CC) -DNDEBUG $(defs) -DPOLYGLOTMANVERSION=\"$(version)\" $(CFLAGS) -o rman rman.c
+	$(CC) -DNDEBUG $(defs) -DPOLYGLOTMANVERSION=\"$(version)\" $(CFLAGS) $(LDFLAGS) -o rman rman.c
 
 
 debug: