!6 add fstack-protector-strong
From: @MementoMoriCheng Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
d635b5bfd6
35
memtester-add-fstack-protector.patch
Normal file
35
memtester-add-fstack-protector.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 9acc16f71329bd61198de45d2edb8992652a8d18 Mon Sep 17 00:00:00 2001
|
||||
From: caodongxia <315816521@qq.com>
|
||||
Date: Fri, 19 Mar 2021 12:46:40 +0800
|
||||
Subject: [PATCH] create
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
conf-cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index e9ae52c..3b1a0a6 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,7 +12,7 @@
|
||||
# more information.
|
||||
CC = $(shell head -n 1 conf-cc)
|
||||
LD = $(shell head -n 1 conf-ld)
|
||||
-
|
||||
+$(info CFLAGS=$(CC))
|
||||
SOURCES = memtester.c tests.c
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
HEADERS = memtester.h
|
||||
diff --git a/conf-cc b/conf-cc
|
||||
index b99d03d..c3ad6bb 100644
|
||||
--- a/conf-cc
|
||||
+++ b/conf-cc
|
||||
@@ -1,3 +1,3 @@
|
||||
-cc -O2 -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c
|
||||
+cc -O2 -fstack-protector-strong -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c
|
||||
|
||||
This will be used to compile .c files.
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: memtester
|
||||
Version: 4.3.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: A userspace utility for testing the memory subsystem for faults
|
||||
License: GPLv2
|
||||
URL: http://pyropus.ca/software/memtester/
|
||||
@ -10,7 +10,7 @@ Source0: http://pyropus.ca/software/memtester/old-versions/%{name}-%{version}.ta
|
||||
|
||||
Patch0: memtester-fix-make-install-path.patch
|
||||
Patch1: fix-multi-difine.patch
|
||||
|
||||
Patch2: memtester-add-fstack-protector.patch
|
||||
BuildRequires: gcc
|
||||
|
||||
%description
|
||||
@ -20,6 +20,7 @@ A userspace utility for testing the memory subsystem for faults. It's portable a
|
||||
%setup -q -n %{name}-%{version}/
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%make_build
|
||||
@ -41,6 +42,9 @@ make install DESTDIR="%{buildroot}"
|
||||
%{_mandir}/*
|
||||
|
||||
%changelog
|
||||
* Tue Sep 7 2021 Shaowei Cheng <chenshaowei3@huawei.com>
|
||||
- Add -fstack-protector-strong
|
||||
|
||||
* Wed Aug 4 2021 Lu Weitao <luweitao2@huawei.com>
|
||||
- fix compile failure by upgrade to GCC-10
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user