[SCM] ffmpeg/jessie: Disable AVX optimization

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Thu Nov 10 20:53:31 UTC 2016


Hi Bálint,

On 10.11.2016 21:32, Bálint Réczey wrote:
> 2016-11-10 21:08 GMT+01:00 Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>:
> Thanks! I will try yasm. There is another build breakage in
> jessie-backports for the record:
> https://buildd.debian.org/status/fetch.php?pkg=ffmpeg&arch=i386&ver=7%3A3.2-2~bpo8%2B1&stamp=1478791165
> ...
> gcc -I. -Isrc/ -D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=2 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC
> -DOPJ_STATIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -g -O2
> -fstack-protector-strong -Wformat -Werror=format-security
> -fno-strict-overflow -fstack-protector-all -fPIE   -std=c99
> -fomit-frame-pointer -fPIC -pthread -I/usr/include/p11-kit-1
> -I/usr/include/harfbuzz -I/usr/include/freetype2
> -I/usr/include/fribidi -I/usr/include/freetype2  -I/usr/include/bs2b
> -I/usr/include/freetype2 -I/usr/include/freetype2
> -I/usr/include/fribidi  -I/usr/include/opus -D_REENTRANT
> -I/usr/include/schroedinger-1.0 -I/usr/include/orc-0.4
> -D_REENTRANT -I/usr/include/SDL2  -g -Wdeclaration-after-statement
> -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
> -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes
> -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body
> -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign
> -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize
> -Werror=format-security -Werror=implicit-function-declaration
> -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat
> -fdiagnostics-color=auto -Wno-maybe-uninitialized  -MMD -MF
> libavformat/asfenc.d -MT libavformat/asfenc.o -c -o
> libavformat/asfenc.o src/libavformat/asfenc.c
> In file included from src/libpostproc/postprocess.c:539:0:
> src/libpostproc/postprocess_template.c: In function 'postProcess_MMX':
> src/libpostproc/postprocess_template.c:3184:5: error: 'asm' operand
> has impossible constraints
>      __asm__ volatile(
>      ^
> src/libpostproc/postprocess_template.c:3101:5: error: 'asm' operand
> has impossible constraints
>      __asm__ volatile(
>      ^

I bet this is due to PIE. Try the following patch:
--- a/configure
+++ b/configure
@@ -3582,8 +3582,6 @@ 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
     ;;
     ?*)
         die "Unknown toolchain $toolchain"

The problem is that gcc before gcc-5 reserves a register for the GOT,
when PIE is enabled, see e.g. [1].

Best regards,
Andreas


1: https://software.intel.com/en-us/blogs/2014/12/26/new-optimizations-for-x86-in-upcoming-gcc-50-32bit-pic-mode



More information about the pkg-multimedia-maintainers mailing list