[mod_wsgi] compile with -fno-strict-aliasing to workaround Python

jorton jorton at fedoraproject.org
Tue Dec 11 08:14:12 UTC 2012


commit bad4888d61d5d05c4580488cd46c0a57776586f1
Author: Joe Orton <jorton at redhat.com>
Date:   Tue Dec 11 08:14:09 2012 +0000

    compile with -fno-strict-aliasing to workaround Python
    
      bug http://www.python.org/dev/peps/pep-3123/

 mod_wsgi-3.4-apxsflags.patch |   16 ++++++++++++++++
 mod_wsgi.spec                |    7 ++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/mod_wsgi-3.4-apxsflags.patch b/mod_wsgi-3.4-apxsflags.patch
new file mode 100644
index 0000000..73d0800
--- /dev/null
+++ b/mod_wsgi-3.4-apxsflags.patch
@@ -0,0 +1,16 @@
+--- mod_wsgi-3.4/configure.ac.apxsflags
++++ mod_wsgi-3.4/configure.ac
+@@ -158,8 +158,11 @@ if test -x /usr/bin/lipo; then
+     done
+ fi
+ 
+-CFLAGS="${CFLAGS1} ${CFLAGS2}"
+-LDFLAGS="${LDFLAGS} ${LDFLAGS1} ${LDFLAGS2} ${LDFLAGS3}"
++CFLAGS3=`${APXS} -q CFLAGS`
++LDFLAGS4=`${APXS} -q LDFLAGS`
++
++CFLAGS="${CFLAGS1} ${CFLAGS2} ${CFLAGS3}"
++LDFLAGS="${LDFLAGS} ${LDFLAGS1} ${LDFLAGS2} ${LDFLAGS3} ${LDFLAGS4}"
+ LDLIBS="${LDLIBS} ${LDLIBS1} ${LDLIBS2} ${LDLIBS3}"
+ 
+ AC_SUBST(CFLAGS)
diff --git a/mod_wsgi.spec b/mod_wsgi.spec
index 3a641f4..4948386 100644
--- a/mod_wsgi.spec
+++ b/mod_wsgi.spec
@@ -7,7 +7,7 @@
 
 Name:           mod_wsgi
 Version:        3.4
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        A WSGI interface for Python web applications in Apache
 Group:          System Environment/Libraries
 License:        ASL 2.0
@@ -43,6 +43,7 @@ existing WSGI adapters for mod_python or CGI.
 # Regenerate configure for -coredump patch change to configure.in
 autoconf
 export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}"
+export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
 %configure --enable-shared --with-apxs=%{_httpd_apxs}
 make %{?_smp_mflags}
 
@@ -71,6 +72,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Dec 11 2012 Jan Kaluza <jkaluza at redhat.com> - 3.4-7
+- compile with -fno-strict-aliasing to workaround Python
+  bug http://www.python.org/dev/peps/pep-3123/
+
 * Thu Nov 22 2012 Joe Orton <jorton at redhat.com> - 3.4-6
 - use _httpd_moddir macro
 


More information about the scm-commits mailing list