kexec-tools/add-secure-compile-options-for-makedumpfile.patch
EulerOSWander a18d6e55fe update makedumpfile to makedumpfile-1.7.4
(cherry picked from commit 0b7f2dba217a63af9b20df2ca6d379dd62dc9b1b)
2024-07-31 16:53:53 +08:00

33 lines
1.1 KiB
Diff

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