-pie is incompatible with static linkage (#1343892, #1287743)

The hardened gcc specs do not handle static linkage, so building
with -static has been broken since commit
d9235d2d90. Adjust the -ld spec
file to avoid -pie when static linkage is used, as suggested
by Florian Weimer.
This commit is contained in:
Panu Matilainen 2016-11-08 15:16:37 +02:00
parent 3234495f75
commit b1a45b244e
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
*self_spec:
+ %{!shared:%{!r:-pie}}
+ %{!static:%{!shared:%{!r:-pie}}}
*link:
+ -z now

View File

@ -6,7 +6,7 @@
Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config
Version: 53
Version: 54
Release: 1%{?dist}
# No version specified.
License: GPL+
@ -140,6 +140,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov
%{_rpmconfigdir}/macros.d/macros.kmp
%changelog
* Tue Nov 08 2016 Panu Matilainen <pmatilai@redhat.com> - 54-1
- -pie is incompatible with static linkage (#1343892, #1287743)
* Mon Nov 07 2016 Panu Matilainen <pmatilai@redhat.com> - 53-1
- Drop brp-java-repack-jars by request (#1235770)
- Drop brp-implant-ident-static, unused for 13 years and counting