From 3691b150f12bfe6529150cb0409d91c95b57c1ac Mon Sep 17 00:00:00 2001 From: huang-xiaoquan Date: Thu, 9 Mar 2023 15:23:41 +0800 Subject: [PATCH] [RPM] Add pie and delete rpath in libgfortran (cherry picked from commit d1eef1aca9003ee64cd3d50b9bdc566a1e3486ac) --- gcc.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc.spec b/gcc.spec index d298353..87ac6fe 100644 --- a/gcc.spec +++ b/gcc.spec @@ -61,7 +61,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: 23 +Release: 24 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL: https://gcc.gnu.org @@ -798,7 +798,7 @@ enablelgo=,go enableld=,d %endif OPT_FLAGS="$OPT_FLAGS -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now" -OPT_LDFLAGS="$OPT_LDFLAGS -Wl,-z,relro,-z,now" +OPT_LDFLAGS="$OPT_LDFLAGS -pie -Wl,-z,relro,-z,now" export extra_ldflags_libobjc="-Wl,-z,relro,-z,now" export FCFLAGS="$OPT_FLAGS" CC="$CC" CFLAGS="$OPT_FLAGS" \ @@ -1568,6 +1568,7 @@ strip -g `find . \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \ -a -type f` popd chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgfortran.so.5.* +chrpath -d %{buildroot}%{_prefix}/%{_lib}/libgfortran.so.5.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.* chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.* %if %{build_libquadmath} @@ -2771,6 +2772,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Thu Mar 9 2023 huangxiaoquan - 10.3.1-24 +- Type:Fix +- ID:NA +- SUG:NA +- DESC:Add pie and delete rpath in libgfortran + * Sun Feb 26 2023 huitailang <804544223@qq.com> - 10.3.1-23 - Type:Sync - ID:NA -- Gitee