!32 Add BIND_NOW and PIE safe complie option

From: @starlet-dx 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
This commit is contained in:
openeuler-ci-bot 2023-11-08 00:55:19 +00:00 committed by Gitee
commit 97ca9f8501
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -13,7 +13,7 @@
Name: valgrind
Version: 3.13.0
Release: 29
Release: 30
Epoch: 1
Summary: An instrumentation framework for building dynamic analysis tools
License: GPLv2+
@ -78,7 +78,9 @@ CC="gcc -B `pwd`/shared/libgcc/"
%undefine _hardened_build
%undefine _strict_symbol_defs_build
OPTFLAGS="`echo " %{optflags} " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /g;s/ -fstack-protector\([-a-z]*\) / / g;s/ -Wp,-D_FORTIFY_SOURCE=2 / /g;s/ -O2 / /g;s/ -mcpu=\([a-z0-9]\+\) / /g;s/^ //;s/ $//'`"
optflags="`echo " %{optflags} -Wl,-z,now -fPIE -fPIC"`"
OPTFLAGS="`echo " $optflags " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /g;s/ -fstack-protector\([-a-z]*\) / / g;s/ -Wp,-D_FORTIFY_SOURCE=2 / /g;s/ -O2 / /g;s/ -mcpu=\([a-z0-9]\+\) / /g;s/^ //;s/ $//'`"
%configure CC="$CC" CFLAGS="$OPTFLAGS" CXXFLAGS="$OPTFLAGS" --with-mpicc=/bin/false GDB=%{_bindir}/gdb
%make_build
@ -121,5 +123,8 @@ popd
%{_mandir}/man1/*
%changelog
* Tue Nov 07 2023 yaoxin <yao_xin001@hoperun.com> - 1:3.13.0-30
- Add BIND_NOW and PIE safe complie option
* Sat Dec 7 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.13.0-29
- Package init