[SCM] ffmpeg/jessie: Disable PIE on i386 by patching configure to fix FTBFS

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Fri Dec 9 19:41:43 UTC 2016


The following commit has been merged in the jessie branch:
commit c140ea2680e6d0693253bd5ccafcef8fb72ae848
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Fri Nov 11 10:06:27 2016 +0100

    Disable PIE on i386 by patching configure to fix FTBFS

diff --git a/debian/control b/debian/control
index 023ab4c..c1e5dd9 100644
--- a/debian/control
+++ b/debian/control
@@ -147,6 +147,8 @@ Build-Depends:
  libzmq3-dev,
 # --enable-libzvbi
  libzvbi-dev,
+# For applying patches conditionally
+ patch,
 # The opencl API is considered experimental.
 # # --enable-opencl
 # ocl-icd-opencl-dev [!hurd-any] | opencl-dev [!hurd-any],
diff --git a/debian/patches/disable-pie.patch b/debian/patches/disable-pie.patch
new file mode 100644
index 0000000..5629925
--- /dev/null
+++ b/debian/patches/disable-pie.patch
@@ -0,0 +1,15 @@
+diff --git a/configure b/configure
+index 7476ca8..856cacc 100755
+--- a/configure
++++ b/configure
+@@ -3578,8 +3578,8 @@ case "$toolchain" in
+         add_cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+         add_cflags   -fno-strict-overflow -fstack-protector-all
+         add_ldflags  -Wl,-z,relro -Wl,-z,now
+-        add_cflags   -fPIE
+-        add_ldexeflags -fPIE -pie
++#        add_cflags   -fPIE
++#        add_ldexeflags -fPIE -pie
+     ;;
+     ?*)
+         die "Unknown toolchain $toolchain"
diff --git a/debian/rules b/debian/rules
index b56ac70..705efaf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -198,12 +198,20 @@ endif
 
 # Add configuration options:
 override_dh_auto_configure:
+	# Compilation with PIE fails on i386 due to some ASM code
+ifneq (,$(filter $(DEB_HOST_ARCH),i386))
+	patch -p1 < debian/patches/disable-pie.patch
+endif
+
 	$(foreach flavor,$(FLAVORS),mkdir -p debian/$(flavor);)
 	$(foreach flavor,$(FLAVORS),set -e; echo " *** $(flavor) ***"; cd debian/$(flavor); ../../configure $(CONFIG) $(CONFIG_$(flavor)) || (cat config.log && exit 1); cd ../.. ;)
 	touch override_dh_auto_configure
 
 # Remove the subdirectories generated for the flavors.
 override_dh_auto_clean:
+ifneq (,$(filter $(DEB_HOST_ARCH),i386))
+	-patch -R -p1 < debian/patches/disable-pie.patch
+endif
 	$(foreach flavor,$(FLAVORS),[ ! -d debian/$(flavor) ] || rm -r debian/$(flavor);)
 
 # Create doxygen documentation:

-- 
ffmpeg packaging



More information about the pkg-multimedia-commits mailing list