summaryrefslogtreecommitdiff
path: root/add-secure-compile-options-for-makedumpfile.patch
blob: 21ca0efcb2a248e86eb1bf0c5a91521aea50346c (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
28
29
30
31
32
From 776d8f6355fdf77ec63bae4be09b8f40d0c831ad Mon Sep 17 00:00:00 2001
From: pengyeqing <pengyeqing@huawei.com>
Date: Sun, 18 Aug 2019 23:59:23 +0000
Subject: [PATCH] kexec-tools: add secure compile options for makedumpfile

reason:add secure compile options for makedumpfile

Signed-off-by: pengyeqing <pengyeqing@huawei.com>
---
 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/makedumpfile-1.7.4/Makefile b/makedumpfile-1.7.4/Makefile
index 612b9d0..180a64f 100644
--- a/makedumpfile-1.7.4/Makefile
+++ b/makedumpfile-1.7.4/Makefile
@@ -10,9 +10,10 @@ endif
 
 CFLAGS_BASE := $(CFLAGS) -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
 		-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-CFLAGS      := $(CFLAGS_BASE) -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
-CFLAGS_ARCH := $(CFLAGS_BASE)
+CFLAGS      := $(CFLAGS_BASE) -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"' -fstack-protector-strong -Wl,-z,now -fPIE
+CFLAGS_ARCH := $(CFLAGS_BASE) -fPIE
 # LDFLAGS = -L/usr/local/lib -I/usr/local/include
+LDFLAGS += -pie
 
 HOST_ARCH := $(shell uname -m)
 # Use TARGET as the target architecture if specified.
-- 
1.8.3.1