summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm/unit.spec.in
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-02-14 17:21:37 +0300
committerAndrei Belov <defan@nginx.com>2019-02-14 17:21:37 +0300
commit1ba49d925031a74f1a6b6f31991562583f3271b5 (patch)
tree675d73ca3f8f35be3388babbe41311fa987fbb42 /pkg/rpm/unit.spec.in
parent43ad6be2f04d4212bd97ffc9d8a2fe833d8f218c (diff)
downloadunit-1ba49d925031a74f1a6b6f31991562583f3271b5.tar.gz
unit-1ba49d925031a74f1a6b6f31991562583f3271b5.tar.bz2
Packages: added "-fno-strict-aliasing" flag on CentOS 6 x86_64.
Closes #221 on GitHub.
Diffstat (limited to 'pkg/rpm/unit.spec.in')
-rw-r--r--pkg/rpm/unit.spec.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in
index 05ee79af..2d5c1bd1 100644
--- a/pkg/rpm/unit.spec.in
+++ b/pkg/rpm/unit.spec.in
@@ -29,7 +29,12 @@ BuildRequires: openssl-devel
BuildRequires: libopenssl-devel
%endif
+%if (0%{?rhel} == 6) && (%{_arch} == x86_64)
+%define CC_OPT %{optflags} -fno-strict-aliasing -fPIC
+%else
%define CC_OPT %{optflags} -fPIC
+%endif
+
%define LD_OPT -Wl,-z,relro -Wl,-z,now -pie
%define CONFIGURE_ARGS $(echo "%%CONFIGURE_ARGS%%")