From 7df176fd2422fceaa34594e4f8181c76592fba66 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 24 Sep 2010 15:08:54 -0400 Subject: [PATCH] Add "-fno-strict-aliasing" to compilation flags Fixes a slew of: "dereferencing type-punned pointer will break strict-aliasing rules" warnings from GCC for lines of the form: Py_INCREF(Py_True); and Py_INCREF(Py_False); due to the cast from PyIntObject* to PyObject* GCC is technically correct here; see: http://www.python.org/dev/peps/pep-3123/ though this is unlikely to lead to non-working machine code. --- python-crypto.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python-crypto.spec b/python-crypto.spec index dd79332..2b2bd19 100644 --- a/python-crypto.spec +++ b/python-crypto.spec @@ -4,7 +4,7 @@ Summary: Cryptography library for Python Name: python-crypto Version: 2.3 -Release: 1%{?dist} +Release: 2%{?dist} # Mostly Public Domain apart from parts of HMAC.py and setup.py, which are Python License: Public Domain and Python Group: Development/Libraries @@ -42,7 +42,7 @@ SHA), and various encryption algorithms (AES, DES, RSA, ElGamal etc.). %{__chmod} -x src/_fastmath.c %build -CFLAGS="%{optflags}" %{__python} setup.py build +CFLAGS="%{optflags} -fno-strict-aliasing" %{__python} setup.py build %install %{__rm} -rf %{buildroot} @@ -74,6 +74,9 @@ PYTHONPATH=%{buildroot}%{python_sitearch} %{__python} pct-speedtest.py %{python_sitearch}/Crypto/ %changelog +* Fri Sep 24 2010 David Malcolm - 2.3-2 +- add "-fno-strict-aliasing" to compilation flags + * Fri Aug 27 2010 Paul Howarth - 2.3-1 - Update to 2.3 - Fix NameError when attempting to use deprecated getRandomNumber() function