From 26bf82c7fba5910a42089a45fd9bf6ff3b49138d Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 30 Apr 2018 13:19:36 +0000 Subject: [PATCH] multimedia/gstreamer1-libav: unbreak FFMPEG=off with CPUTYPE >= haswell In file included from libavcodec/hevc_cabac.c:27: In file included from libavcodec/cabac_functions.h:46: libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available BRANCHLESS_GET_CABAC("%0", "%q0", "(%4)", "%1", "%w1", ^ libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC' "movzbl "statep" , "ret" \n\t"\ ^ --- .../patch-gst-libs_ext_libav_libavutil_x86_asm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 multimedia/gstreamer1-libav/files/patch-gst-libs_ext_libav_libavutil_x86_asm.h diff --git a/multimedia/gstreamer1-libav/files/patch-gst-libs_ext_libav_libavutil_x86_asm.h b/multimedia/gstreamer1-libav/files/patch-gst-libs_ext_libav_libavutil_x86_asm.h new file mode 100644 index 000000000000..a34fbb72955f --- /dev/null +++ b/multimedia/gstreamer1-libav/files/patch-gst-libs_ext_libav_libavutil_x86_asm.h @@ -0,0 +1,11 @@ +--- gst-libs/ext/libav/libavutil/x86/asm.h.orig 2017-09-18 13:21:09 UTC ++++ gst-libs/ext/libav/libavutil/x86/asm.h +@@ -72,7 +72,7 @@ typedef int32_t x86_reg; + typedef int x86_reg; + #endif + +-#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE)) ++#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE && !defined(__clang__))) + #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE)) + + #if ARCH_X86_64 && defined(PIC)