diff --git a/memtester-add-fstack-protector.patch b/memtester-add-fstack-protector.patch new file mode 100644 index 0000000000000000000000000000000000000000..68071d8116a36028a5a0ed0fa3fe59b8e9713505 --- /dev/null +++ b/memtester-add-fstack-protector.patch @@ -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 + diff --git a/memtester.spec b/memtester.spec index 0812133593c088692ee273866412a92de504b3b7..2cea5e6af148fdf489b3c1ffdd558ee1bbbfee64 100644 --- a/memtester.spec +++ b/memtester.spec @@ -2,14 +2,14 @@ Name: memtester Version: 4.3.0 -Release: 1 +Release: 2 Summary: A userspace utility for testing the memory subsystem for faults License: GPLv2 URL: http://pyropus.ca/software/memtester/ Source0: http://pyropus.ca/software/memtester/old-versions/%{name}-%{version}.tar.gz Patch0: memtester-fix-make-install-path.patch - +Patch1: memtester-add-fstack-protector.patch BuildRequires: gcc %description @@ -18,6 +18,7 @@ A userspace utility for testing the memory subsystem for faults. It's portable a %prep %setup -q -n %{name}-%{version}/ %patch0 -p1 +%patch1 -p1 %build %make_build @@ -39,6 +40,9 @@ make install DESTDIR="%{buildroot}" %{_mandir}/* %changelog +* Sun Mar 29 2020 caodongxia +- Add -fstack-protector-strong + * Sun Mar 29 2020 Wei Xiong - Package init