summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm/unit.module.spec.in
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2017-12-28 20:38:36 +0300
committerAndrei Belov <defan@nginx.com>2017-12-28 20:38:36 +0300
commitcb3c7dd40c614b99bb430a35399b3b2085a314ed (patch)
tree58febf64bd97ce1f0f13c1176fa4c13e50d149eb /pkg/rpm/unit.module.spec.in
parentd22aa884058c46fde2d03f3cc717807fddadba4d (diff)
downloadunit-cb3c7dd40c614b99bb430a35399b3b2085a314ed.tar.gz
unit-cb3c7dd40c614b99bb430a35399b3b2085a314ed.tar.bz2
Packages: hardening flags for rpm.
Diffstat (limited to '')
-rw-r--r--pkg/rpm/unit.module.spec.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/rpm/unit.module.spec.in b/pkg/rpm/unit.module.spec.in
index cb4e2e6c..d49d079f 100644
--- a/pkg/rpm/unit.module.spec.in
+++ b/pkg/rpm/unit.module.spec.in
@@ -10,6 +10,8 @@
%define unit_version %%UNIT_VERSION%%
%define unit_release %%UNIT_RELEASE%%%{?dist}.ngx
+%define CC_OPT %{optflags}
+
%define CONFIGURE_ARGS $(echo "%%CONFIGURE_ARGS%%")
Name: %%NAME%%
@@ -50,13 +52,15 @@ tar --strip-components=1 -zxf %{SOURCE0}
./configure \
%{CONFIGURE_ARGS} \
--modules=%{_libdir}/unit/debug-modules \
+ --cc-opt="%{CC_OPT}" \
--debug
./configure %%MODULE_CONFARGS%%
make %%MODULE_MAKEARGS%%
%{__mv} build build-debug
./configure \
%{CONFIGURE_ARGS} \
- --modules=%{_libdir}/unit/modules
+ --modules=%{_libdir}/unit/modules \
+ --cc-opt="%{CC_OPT}"
./configure %%MODULE_CONFARGS%%
make %%MODULE_MAKEARGS%%