Hello Fabian, hello Sebastian,
as I tried to get a minimal example which shows this "impossible constraints" error I saw that a removal of a seemingly unrelated memset made the error go away. Therefore I tried replacing this memset by a for loop and an assignment and that worked too. At least a package built in my i386-chroot compiled successfully and the package did not lead to a crash inside the i386-qemu-VM (not tested on real hardware).

So probably this could be a better workaround.

Attached you find for completeness all three changes, the first 2 are the same as the last time.

Kind regards,
Bernhard

PS.: If you think this is relevant to the upstream libav bug #850, could you please forward it?
--- libav-11.3/debian/confflags	2015-01-17 18:25:07.000000000 +0000
+++ try2/libav-11.3/debian/confflags	2015-04-23 23:27:54.279081295 +0000
@@ -180,7 +180,7 @@ shared_build_confflags += --enable-share
 shared_build_confflags += --disable-static
 # i386 shared builds must be optimized for 586, cf. #728928, #688384
 ifeq      ($(DEB_HOST_ARCH),i386)
-shared_build_confflags += --cpu=586
+shared_build_confflags += --cpu='i586'
 endif
 
 ## specific to arm architectures
>From 9030c58a780a02fb8256cb75cd39275eaad786d1 Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <miku...@artax.karlin.mff.cuni.cz>
Date: Mon, 15 Sep 2014 05:11:21 -0700
Subject: [PATCH] configure: Disable i686 for i586 and lower CPUs

---
 configure |    1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 6e210bb..a7b3c55 100755
--- a/configure
+++ b/configure
@@ -3296,6 +3296,7 @@ elif enabled x86; then
     case $cpu in
         i[345]86|pentium)
             cpuflags="-march=$cpu"
+            disable i686
             disable mmx
         ;;
         # targets that do NOT support nopl and conditional mov (cmov)
-- 
1.7.10.4

Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset
Author: Bernhard Übelacker <bernha...@vr-web.de>

---
Bug-Debian: https://bugs.debian.org/783082
Last-Update: 2015-04-28

--- libav-11.3.orig/libavcodec/h264_cabac.c
+++ libav-11.3/libavcodec/h264_cabac.c
@@ -2020,7 +2020,11 @@ decode_intra_mb:
         // In deblocking, the quantizer is 0
         h->cur_pic.qscale_table[mb_xy] = 0;
         // All coeffs are present
-        memset(h->non_zero_count[mb_xy], 16, 48);
+        /*memset(h->non_zero_count[mb_xy], 16, 48);*/
+            /* avoiding this memset because it leads at least with gcc4.9.2 to error: 'asm' operand has impossible constraints */
+        for (size_t i = 0; i < 48; i++) {
+            ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16;
+        }
         h->cur_pic.mb_type[mb_xy] = mb_type;
         h->last_qscale_diff = 0;
         return 0;

Reply via email to