Following private discussion, this version of the patch enables -fno-strict-aliasing selectively by architecture, to avoid possibly slowing down those that don't need it.

(I included sparc, which currently works, because the big-endian code is undefined as opposed to guaranteed wrong, and hence might break later from an apparently unrelated change.)

If this is what the problem is, it is still present in 2.12rc, and the same fix should work there.
diff -up debian/rules_orig debian/rules
--- debian/rules_orig	2013-09-12 23:01:10.938897982 +0100
+++ debian/rules	2013-09-16 23:55:27.712339252 +0100
@@ -6,8 +6,14 @@
 
 #http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 mipsel ia64 armel armhf arm64))
 CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
+else
+#required on big-endian architectures, see bug 722115
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) -fno-strict-aliasing
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) -fno-strict-aliasing
+endif
 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
 CMAKE_FLAGS = \

Reply via email to