~ubuntu-branches/ubuntu/utopic/libav/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/ftbfs-ppc64el.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-05-29 07:34:56 UTC
  • Revision ID: package-import@ubuntu.com-20140529073456-q808b3f4saf5z7ui
Tags: 6:10.1-1ubuntu1
* add patch to fix FTBFS on ppc64el, LP: #1263802
* add patch to fix FTBFS on arm64, LP: #1323144

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: martin@martin.st
 
2
Description: ppc: Fix compilation for ppc64le
 
3
Origin: upstream, http://patches.libav.org/patch/50835/
 
4
 
 
5
Patch taken from
 
6
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1263802,
 
7
with some minor fixups.
 
8
 
 
9
This fixes compilation for this target (tested with a cross compiler),
 
10
but it's completely untested in practice so far (qemu doesn't support
 
11
it yet, and I don't have any such hardware to test it on).
 
12
---
 
13
 libavcodec/ppc/asm.S | 8 ++++++++
 
14
 1 file changed, 8 insertions(+)
 
15
 
 
16
diff --git a/libavcodec/ppc/asm.S b/libavcodec/ppc/asm.S
 
17
index 4d4285b..141dee9 100644
 
18
--- a/libavcodec/ppc/asm.S
 
19
+++ b/libavcodec/ppc/asm.S
 
20
@@ -36,12 +36,20 @@
 
21
 
 
22
 .macro extfunc name
 
23
     .global X(\name)
 
24
+#if _CALL_ELF == 2
 
25
+    .text
 
26
+X(\name):
 
27
+    addis %r2, %r12, .TOC.-X(\name)@ha
 
28
+    addi %r2, %r2, .TOC.-X(\name)@l
 
29
+    .localentry X(\name), .-X(\name)
 
30
+#else
 
31
     .section .opd, "aw"
 
32
 X(\name):
 
33
     .quad L(\name), .TOC.@tocbase, 0
 
34
     .previous
 
35
     .type X(\name), STT_FUNC
 
36
 L(\name):
 
37
+#endif
 
38
 .endm
 
39
 
 
40
 .macro movrel rd, sym, gp