!11 增加SP安全编译选项

From: @stevending1st
Reviewed-by: @overweight
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2021-07-31 01:48:04 +00:00 committed by Gitee
commit ef65fed2de
2 changed files with 16 additions and 2 deletions

View File

@ -2,7 +2,7 @@
Name: lmbench
Version: 3
Release: 2
Release: 3
Summary: Tools for Performance Analysis
License: GPLv2
URL: http://www.bitmover.com/lmbench/
@ -10,7 +10,8 @@ Source0: http://www.bitmover.com/lmbench/%{name}%{version}.tar.gz
Patch0: lmbench3-fix-llseek-and-remove-bk-in-Makefile.patch
Patch1: lmbench3-add-HOWTO-to-indicate-howto-use-this-package.patch
Patch2: Rpc-code-moved-from-glibc-to-libtirpc.patch
Patch2: Rpc-code-moved-from-glibc-to-libtirpc.patch
Patch3: lmbench3-add-sp-security-compiler-option.patch
BuildRequires: gcc libtirpc-devel
@ -22,6 +23,7 @@ A userspace utility for testing the memory subsystem for faults. It's portable a
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%make_build
@ -58,6 +60,9 @@ install -m 0644 results/Makefile %{buildroot}/opt/%{name}/results
/opt/%{name}/*
%changelog
* Mon Jul 12 2021 stevending1st <stevending1st@163.com> - 3-3
- Add SP security compiler option.
* Wed Jul 15 2020 wangyue <wangyue92@huawei.com> - 3-2
- Fix rpc.h error.Rpc code moved from glibc to libtirpc.

View File

@ -0,0 +1,9 @@
diff -Nur lmbench3/scripts/build lmbench3_new/scripts/build
--- lmbench3/scripts/build 2005-08-23 08:19:54.000000000 +0800
+++ lmbench3_new/scripts/build 2021-07-12 22:02:33.651649157 +0800
@@ -249,4 +249,4 @@
if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR}; fi
# now go ahead and build everything!
-${MAKE} OS="${OS}" CC="${CC}" CFLAGS="${CFLAGS}" LDLIBS="${LDLIBS}" O="${BINDIR}" $*
+${MAKE} OS="${OS}" CC="${CC}" CFLAGS="${CFLAGS} -fstack-protector-strong" LDLIBS="${LDLIBS}" O="${BINDIR}" $*