From: martin@martin.st
Description: ppc: Fix compilation for ppc64le
Origin: upstream, http://patches.libav.org/patch/50835/

Patch taken from
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1263802,
with some minor fixups.

This fixes compilation for this target (tested with a cross compiler),
but it's completely untested in practice so far (qemu doesn't support
it yet, and I don't have any such hardware to test it on).

--- mythtv-0.27.1+fixes.20140624.aa822f5.orig/mythtv/external/FFmpeg/libavcodec/ppc/asm.S
+++ mythtv-0.27.1+fixes.20140624.aa822f5/mythtv/external/FFmpeg/libavcodec/ppc/asm.S
@@ -36,12 +36,20 @@
 
 .macro extfunc name
     .global X(\name)
+#if _CALL_ELF == 2
+    .text
+X(\name):
+    addis %r2, %r12, .TOC.-X(\name)@ha
+    addi %r2, %r2, .TOC.-X(\name)@l
+    .localentry X(\name), .-X(\name)
+#else
     .section .opd, "aw"
 X(\name):
     .quad L(\name), .TOC.@tocbase, 0
     .previous
     .type X(\name), STT_FUNC
 L(\name):
+#endif
 .endm
 
 .macro movrel rd, sym, gp
