[SCM] ffmpeg/jessie: Use GCC 4.8 on i386 instead of disabling PIE

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 28bf7882e24c55b659a111dfcc1b6554d55865bd
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Fri Dec 9 21:23:01 2016 +0100

    Use GCC 4.8 on i386 instead of disabling PIE

diff --git a/debian/control b/debian/control
index 5373e12..283fd53 100644
--- a/debian/control
+++ b/debian/control
@@ -26,6 +26,9 @@ Build-Depends:
  flite1-dev,
 # --enable-frei0r
  frei0r-plugins-dev <!stage1>,
+# GCC 4.9 breaks the build with PIE enabled on i386
+ gcc-4.8 [i386],
+ g++-4.8 [i386],
 # --enable-ladspa
  ladspa-sdk,
 # --enable-libass
@@ -153,8 +156,6 @@ 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
deleted file mode 100644
index 5629925..0000000
--- a/debian/patches/disable-pie.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-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 c7b7b8a..dcdc11a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -116,6 +116,12 @@ ifneq (,$(filter $(DEB_BUILD_OPTIONS),noopt))
 	CONFIG += --disable-optimizations
 endif
 
+# Compilation with PIE fails on i386 due to some ASM code with GCC 4.9
+ifneq (,$(filter $(DEB_HOST_ARCH),i386))
+	CC := gcc-4.8
+	CXX := g++-4.8
+endif
+
 # Respect CC/CXX from the environment, if they differ from the default.
 # Don't set them if they equal the default, because that disables autodetection needed for cross-building.
 ifneq ($(CC),cc)
@@ -199,20 +205,12 @@ 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