From a1e784781454bd8b40a7d9886390aa15cd219c89 Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Tue, 7 Nov 2023 16:46:45 +0800 Subject: [PATCH] Add BIND_NOW and PIE safe complie option --- valgrind.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/valgrind.spec b/valgrind.spec index 808904c..8f8377c 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -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 - 1:3.13.0-30 +- Add BIND_NOW and PIE safe complie option + * Sat Dec 7 2019 openEuler Buildteam - 3.13.0-29 - Package init -- Gitee