[RPM] Add pie and delete rpath in libgfortran
(cherry picked from commit d1eef1aca9003ee64cd3d50b9bdc566a1e3486ac)
This commit is contained in:
parent
0f3c849db8
commit
3691b150f1
11
gcc.spec
11
gcc.spec
@ -61,7 +61,7 @@
|
|||||||
Summary: Various compilers (C, C++, Objective-C, ...)
|
Summary: Various compilers (C, C++, Objective-C, ...)
|
||||||
Name: gcc
|
Name: gcc
|
||||||
Version: %{gcc_version}
|
Version: %{gcc_version}
|
||||||
Release: 23
|
Release: 24
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
||||||
URL: https://gcc.gnu.org
|
URL: https://gcc.gnu.org
|
||||||
|
|
||||||
@ -798,7 +798,7 @@ enablelgo=,go
|
|||||||
enableld=,d
|
enableld=,d
|
||||||
%endif
|
%endif
|
||||||
OPT_FLAGS="$OPT_FLAGS -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -Wl,-z,relro,-z,now"
|
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 extra_ldflags_libobjc="-Wl,-z,relro,-z,now"
|
||||||
export FCFLAGS="$OPT_FLAGS"
|
export FCFLAGS="$OPT_FLAGS"
|
||||||
CC="$CC" CFLAGS="$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`
|
-a -type f`
|
||||||
popd
|
popd
|
||||||
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgfortran.so.5.*
|
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}/libgomp.so.1.*
|
||||||
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.*
|
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.*
|
||||||
%if %{build_libquadmath}
|
%if %{build_libquadmath}
|
||||||
@ -2771,6 +2772,12 @@ end
|
|||||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 9 2023 huangxiaoquan <huangxiaoquan1@huawei.com> - 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
|
* Sun Feb 26 2023 huitailang <804544223@qq.com> - 10.3.1-23
|
||||||
- Type:Sync
|
- Type:Sync
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user