[SCM] ffmpeg/jessie: Fix FTBFS on i386 due to PIC/PIE incompatible ASM
rbalint at users.alioth.debian.org
rbalint at users.alioth.debian.org
Fri Dec 23 16:35:57 UTC 2016
The following commit has been merged in the jessie branch:
commit 43ce003a535068b5e96d41477b03ab0ecd327841
Author: Balint Reczey <balint at balintreczey.hu>
Date: Fri Dec 23 14:47:56 2016 +0100
Fix FTBFS on i386 due to PIC/PIE incompatible ASM
diff --git a/debian/patches/0001-swscale-also-save-ebx-register-when-using-PIE.patch b/debian/patches/0001-swscale-also-save-ebx-register-when-using-PIE.patch
new file mode 100644
index 0000000..b26f2af
--- /dev/null
+++ b/debian/patches/0001-swscale-also-save-ebx-register-when-using-PIE.patch
@@ -0,0 +1,105 @@
+From 3fb0605598d568ad947070643bd2e2369479be76 Mon Sep 17 00:00:00 2001
+From: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
+Date: Fri, 16 Dec 2016 02:29:56 +0100
+Subject: [PATCH] swscale: also save ebx register when using PIE
+
+Otherwise the build fails when configuring with --toolchain=hardened
+--disable-pic on i386 using gcc 4.8:
+error: PIC register clobbered by '%ebx' in 'asm'
+
+Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
+---
+ libswscale/x86/hscale_fast_bilinear_simd.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/libswscale/x86/hscale_fast_bilinear_simd.c b/libswscale/x86/hscale_fast_bilinear_simd.c
+index 2cba5f0..3f0f5f5 100644
+--- a/libswscale/x86/hscale_fast_bilinear_simd.c
++++ b/libswscale/x86/hscale_fast_bilinear_simd.c
+@@ -199,7 +199,7 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst,
+ #if ARCH_X86_64
+ uint64_t retsave;
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ uint64_t ebxsave;
+ #endif
+ #endif
+@@ -209,7 +209,7 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst,
+ "mov -8(%%rsp), %%"FF_REG_a" \n\t"
+ "mov %%"FF_REG_a", %5 \n\t" // retsave
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ "mov %%"FF_REG_b", %5 \n\t" // ebxsave
+ #endif
+ #endif
+@@ -255,7 +255,7 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst,
+ "mov %5, %%"FF_REG_a" \n\t"
+ "mov %%"FF_REG_a", -8(%%rsp) \n\t"
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ "mov %5, %%"FF_REG_b" \n\t"
+ #endif
+ #endif
+@@ -264,12 +264,12 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst,
+ #if ARCH_X86_64
+ ,"m"(retsave)
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ ,"m" (ebxsave)
+ #endif
+ #endif
+ : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D
+-#if ARCH_X86_64 || !defined(PIC)
++#if ARCH_X86_64 || !(defined(PIC) || defined(__PIE__))
+ ,"%"FF_REG_b
+ #endif
+ );
+@@ -289,7 +289,7 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,
+ #if ARCH_X86_64
+ DECLARE_ALIGNED(8, uint64_t, retsave);
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ DECLARE_ALIGNED(8, uint64_t, ebxsave);
+ #endif
+ #endif
+@@ -298,7 +298,7 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,
+ "mov -8(%%rsp), %%"FF_REG_a" \n\t"
+ "mov %%"FF_REG_a", %7 \n\t" // retsave
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ "mov %%"FF_REG_b", %7 \n\t" // ebxsave
+ #endif
+ #endif
+@@ -332,7 +332,7 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,
+ "mov %7, %%"FF_REG_a" \n\t"
+ "mov %%"FF_REG_a", -8(%%rsp) \n\t"
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ "mov %7, %%"FF_REG_b" \n\t"
+ #endif
+ #endif
+@@ -341,12 +341,12 @@ void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,
+ #if ARCH_X86_64
+ ,"m"(retsave)
+ #else
+-#if defined(PIC)
++#if defined(PIC) || defined(__PIE__)
+ ,"m" (ebxsave)
+ #endif
+ #endif
+ : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D
+-#if ARCH_X86_64 || !defined(PIC)
++#if ARCH_X86_64 || !(defined(PIC) || defined(__PIE__))
+ ,"%"FF_REG_b
+ #endif
+ );
+--
+2.10.2
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..415ca20
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-swscale-also-save-ebx-register-when-using-PIE.patch
--
ffmpeg packaging
More information about the pkg-multimedia-commits
mailing list