From 55817811168e90c4506050bb4996dc4d59060958 Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Thu, 14 Feb 2019 17:21:37 +0300 Subject: Packages: added "-fno-strict-aliasing" flag on CentOS 6 x86_64. Closes #221 on GitHub. --- pkg/rpm/unit.module.spec.in | 4 ++++ pkg/rpm/unit.spec.in | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'pkg/rpm') diff --git a/pkg/rpm/unit.module.spec.in b/pkg/rpm/unit.module.spec.in index 03d4addb..d86469f4 100644 --- a/pkg/rpm/unit.module.spec.in +++ b/pkg/rpm/unit.module.spec.in @@ -10,7 +10,11 @@ %define unit_version %%UNIT_VERSION%% %define unit_release %%UNIT_RELEASE%%%{?dist}.ngx +%if (0%{?rhel} == 6) && (%{_arch} == x86_64) +%define CC_OPT %{optflags} -fno-strict-aliasing +%else %define CC_OPT %{optflags} +%endif %define CONFIGURE_ARGS $(echo "%%CONFIGURE_ARGS%%") diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in index 1ef02881..31833f6b 100644 --- a/pkg/rpm/unit.spec.in +++ b/pkg/rpm/unit.spec.in @@ -23,7 +23,12 @@ Requires: systemd 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%%") -- cgit