Package: x264
Version: 2:0.142.2389+git956c8d8-4
Tags: patch

Version 2:0.142.2389+git956c8d8-2 of the x264 package introduced the use of the compiler flag -fno-aggressive-loop-optimizations to fix/workaround a problem (leading to a segfault) when the code was built with gcc 4.8.

However -fno-aggressive-loop-optimizations doesn't exist in 4.6 or 4.7 this lead to build failures on sparc and sh4. It will also lead to build failures for anyone who tries to backport the unstable x264 packages to stable.

The sparc build failure was fixed in 2:0.142.2389+git956c8d8-4 by special casing the sparc architecture to not pass the flag but I belive this was a bad soloution for two reasons.

1: it doesn't fix the build failure for sh4, backporters or anyone else who might run into it 2: afaict the issue worked arround by -fno-aggressive-loop-optimizations is not architecture specific, so if/when sparc switches it's default compiler to 4.8 you will want -fno-aggressive-loop-optimizations on sparc.

It makes far more sense IMO to just check the compiler version and act accordingly. Patch to do that is attatched.
diff -Nru x264-0.142.2389+git956c8d8/debian/changelog 
x264-0.142.2389+git956c8d8/debian/changelog
--- x264-0.142.2389+git956c8d8/debian/changelog 2014-04-05 21:46:49.000000000 
+0000
+++ x264-0.142.2389+git956c8d8/debian/changelog 2014-04-17 23:58:45.000000000 
+0000
@@ -1,3 +1,11 @@
+x264 (2:0.142.2389+git956c8d8-4.1) UNRELEASED; urgency=medium
+
+  * Check gcc version directly to determine whether or not 
+    -fno-aggressive-loop-optimizations should be set rather than assuming based
+    on architecture.
+
+ -- Peter Michael Green <plugw...@debian.org>  Thu, 17 Apr 2014 23:49:00 +0000
+
 x264 (2:0.142.2389+git956c8d8-4) unstable; urgency=low
 
   * Do not set -fno-aggressive-loop-optimizations on sparc, which was
diff -Nru x264-0.142.2389+git956c8d8/debian/confflags 
x264-0.142.2389+git956c8d8/debian/confflags
--- x264-0.142.2389+git956c8d8/debian/confflags 2014-04-05 21:45:43.000000000 
+0000
+++ x264-0.142.2389+git956c8d8/debian/confflags 2014-04-18 00:07:12.000000000 
+0000
@@ -111,9 +111,11 @@
 endif
 endif
 
-# See Bug#743713, the debian sparc port is currently stuck with gcc 4.6
-# -fno-aggressive-loop-optimizations was introduced only in gcc 4.8
-ifneq (sparc,$(DEB_HOST_GNU_CPU))
+# See Bug#743713, the debian sparc and sh4 ports are currently stuck with.
+#  gcc 4.6  -fno-aggressive-loop-optimizations was introduced only in gcc 4.8
+# this conditional will also help any backporters.
+HAVEGCC4.8 :=$(shell dpkg --compare-versions `gcc --version | grep ^gcc | sed 
's/^.* //g'` ge 4.8 && echo yes || echo no)
+ifeq (yes,$(HAVEGCC4.8))
 common_confflags += --extra-cflags=-fno-aggressive-loop-optimizations
 endif
 
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to