Add BIND_NOW and PIE safe complie option

This commit is contained in:
starlet-dx 2023-11-07 16:46:45 +08:00
parent 730ebdabf1
commit a1e7847814

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