From b1a45b244ea644b78b0f626643758a05c0f049b5 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 8 Nov 2016 15:16:37 +0200 Subject: [PATCH] -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 d9235d2d90873ff6207cb26d331e979ae9d651fd. Adjust the -ld spec file to avoid -pie when static linkage is used, as suggested by Florian Weimer. --- redhat-hardened-ld | 2 +- redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/redhat-hardened-ld b/redhat-hardened-ld index 5825256..ca378a9 100644 --- a/redhat-hardened-ld +++ b/redhat-hardened-ld @@ -1,5 +1,5 @@ *self_spec: -+ %{!shared:%{!r:-pie}} ++ %{!static:%{!shared:%{!r:-pie}}} *link: + -z now diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index b9f76a0..b8128be 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -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 - 54-1 +- -pie is incompatible with static linkage (#1343892, #1287743) + * Mon Nov 07 2016 Panu Matilainen - 53-1 - Drop brp-java-repack-jars by request (#1235770) - Drop brp-implant-ident-static, unused for 13 years and counting