diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-05 14:03:41 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-11 16:32:25 +0200 |
commit | 12a73062d84fec27536b09fd275ea248d14b93e5 (patch) | |
tree | 3ace27a28ad7275790320058d25e13df000bf8c8 | |
parent | 504902d12a1ea1d3774bacd9a35efd9cecd5f9c2 (diff) | |
download | sssd-12a73062d84fec27536b09fd275ea248d14b93e5.tar.gz sssd-12a73062d84fec27536b09fd275ea248d14b93e5.tar.bz2 sssd-12a73062d84fec27536b09fd275ea248d14b93e5.zip |
rpm: Use hardened flags for RPM build
https://fedorahosted.org/sssd/ticket/1797
This patch adds the _hardened_build macro on platforms where it is
defined by the RPM. The macro amounts to compiling with cc
--spec=/usr/lib/rpm/redhat/redhat-hardened-cc1 and then linking with ld
--spec=/usr/lib/rpm/redhat/redhat-hardened-ld.
On Fedora 19, the gcc spec files contain -z now and fPIC or fPIE.
-rw-r--r-- | contrib/sssd.spec.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 65832166..c48a5de9 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -41,6 +41,10 @@ # Determine the location of the LDB modules directory %global ldb_modulesdir %(pkg-config --variable=modulesdir ldb) +%if (0%{?fedora} > 15 || 0%{?rhel} >= 7) +%define _hardened_build 1 +%endif + Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ Release: 0@PRERELEASE_VERSION@%{?dist} |