[bzr] Conditionally add -fno-strict-aliasing to CFLAGS
Ondrej Oprala
ooprala at fedoraproject.org
Tue May 28 12:29:05 UTC 2013
commit 8421668a390b11c3a0dff6841f6f90bf22a1505f
Author: Ondrej Oprala <ooprala at redhat.com>
Date: Tue May 28 14:22:11 2013 +0200
Conditionally add -fno-strict-aliasing to CFLAGS
bzr.spec | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/bzr.spec b/bzr.spec
index be8fba0..0738148 100644
--- a/bzr.spec
+++ b/bzr.spec
@@ -13,7 +13,7 @@
%global bzrmajor 2.5
%global bzrminor .1
#global bzrrc b6
-%global release 9
+%global release 10
Name: bzr
Version: %{bzrmajor}%{?bzrminor}
@@ -73,8 +73,11 @@ sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' bzrlib/_patiencediff_py
sed -i '1{/#![[:space:]]*\/usr\/bin\/\(python\|env\)/d}' bzrlib/weave.py
%build
-RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
-export RPM_OPT_FLAGS
+# RHEL and Fedora < 19 have a distutils bug that doesn't add this
+# automatically: https://bugzilla.redhat.com/show_bug.cgi?id=849994
+%if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 8)
+export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
+%endif
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
chmod a-x contrib/bash/bzrbashprompt.sh
@@ -143,6 +146,9 @@ rm -rf $RPM_BUILD_ROOT
%doc %{_defaultdocdir}/%{name}-doc-%{version}/*
%changelog
+* Tue May 28 2013 Ondrej Oprala <ooprala at redhat.com 2.5.1-10
+- Conditionally add -fno-strict-aliasing to CFLAGS
+
* Tue May 28 2013 Ondrej Oprala <ooprala at redhat.com 2.5.1-9
- Add gettext to BuildRequires
More information about the scm-commits
mailing list