diff options
Diffstat (limited to 'meta/recipes-multimedia/flac')
-rw-r--r-- | meta/recipes-multimedia/flac/flac-1.2.1/asm-pic.patch | 99 | ||||
-rw-r--r-- | meta/recipes-multimedia/flac/flac_1.2.1.bb | 5 |
2 files changed, 102 insertions, 2 deletions
diff --git a/meta/recipes-multimedia/flac/flac-1.2.1/asm-pic.patch b/meta/recipes-multimedia/flac/flac-1.2.1/asm-pic.patch new file mode 100644 index 0000000000..43f29cf1ee --- /dev/null +++ b/meta/recipes-multimedia/flac/flac-1.2.1/asm-pic.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From 12022d90dd3adc9f37dc2b16358cbecfe3c5be1c Mon Sep 17 00:00:00 2001 | ||
5 | From: Samuli Suominen <drac@gentoo.org> | ||
6 | Date: Sun, 15 Jul 2012 15:45:10 +1000 | ||
7 | Subject: [PATCH] Fix assembler code to make it PIC so the dynamic linker does | ||
8 | not have to do text relocations on-the-fly. Patch from Gentoo | ||
9 | via Jaren Stangret <sirjaren@gmail.com> | ||
10 | |||
11 | Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com> | ||
12 | --- | ||
13 | src/libFLAC/ia32/bitreader_asm.nasm | 27 +++++++++++++++++++++++++++ | ||
14 | 1 files changed, 27 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/src/libFLAC/ia32/bitreader_asm.nasm b/src/libFLAC/ia32/bitreader_asm.nasm | ||
17 | index c6bb8c2..4cd0ea2 100644 | ||
18 | --- a/src/libFLAC/ia32/bitreader_asm.nasm | ||
19 | +++ b/src/libFLAC/ia32/bitreader_asm.nasm | ||
20 | @@ -140,8 +140,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap | ||
21 | %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE | ||
22 | mov edi, _FLAC__crc16_table | ||
23 | %else | ||
24 | +%ifdef OBJ_FORMAT_elf | ||
25 | + mov edi, [esp + 16] ; saved ebx (GOT base) | ||
26 | + lea edi, [edi + FLAC__crc16_table wrt ..gotoff] | ||
27 | +%else | ||
28 | mov edi, FLAC__crc16_table | ||
29 | %endif | ||
30 | +%endif | ||
31 | ;; eax (ax) crc a.k.a. br->read_crc | ||
32 | ;; ebx (bl) intermediate result index into FLAC__crc16_table[] | ||
33 | ;; ecx br->crc16_align | ||
34 | @@ -216,8 +221,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap | ||
35 | %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE | ||
36 | mov edi, _FLAC__crc16_table | ||
37 | %else | ||
38 | +%ifdef OBJ_FORMAT_elf | ||
39 | + mov edi, [esp + 16] ; saved ebx (GOT base) | ||
40 | + lea edi, [edi + FLAC__crc16_table wrt ..gotoff] | ||
41 | +%else | ||
42 | mov edi, FLAC__crc16_table | ||
43 | %endif | ||
44 | +%endif | ||
45 | ;; eax (ax) crc a.k.a. br->read_crc | ||
46 | ;; ebx (bl) intermediate result index into FLAC__crc16_table[] | ||
47 | ;; ecx br->crc16_align | ||
48 | @@ -316,8 +326,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap | ||
49 | %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE | ||
50 | call _bitreader_read_from_client_ | ||
51 | %else | ||
52 | +%ifdef OBJ_FORMAT_elf | ||
53 | + mov ebx, [esp + 20] ; saved ebx (GOT base) | ||
54 | + call bitreader_read_from_client_ wrt ..plt | ||
55 | +%else | ||
56 | call bitreader_read_from_client_ | ||
57 | %endif | ||
58 | +%endif | ||
59 | pop edx ; /* discard, unused */ | ||
60 | pop ecx ; /* restore */ | ||
61 | mov esi, [ebp + 16] ; cwords = br->consumed_words; | ||
62 | @@ -363,13 +378,20 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap | ||
63 | mov [ebp + 16], esi ; br->consumed_words = cwords; | ||
64 | mov [ebp + 20], ecx ; br->consumed_bits = cbits; | ||
65 | push ecx ; /* save */ | ||
66 | + push ebx ; /* save */ | ||
67 | push ebp ; /* push br argument */ | ||
68 | %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE | ||
69 | call _bitreader_read_from_client_ | ||
70 | %else | ||
71 | +%ifdef OBJ_FORMAT_elf | ||
72 | + mov ebx, [esp + 24] ; saved ebx (GOT base) | ||
73 | + call bitreader_read_from_client_ wrt ..plt | ||
74 | +%else | ||
75 | call bitreader_read_from_client_ | ||
76 | %endif | ||
77 | +%endif | ||
78 | pop edx ; /* discard, unused */ | ||
79 | + pop ebx ; /* restore */ | ||
80 | pop ecx ; /* restore */ | ||
81 | mov esi, [ebp + 16] ; cwords = br->consumed_words; | ||
82 | ; ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits; | ||
83 | @@ -438,8 +460,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap | ||
84 | %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE | ||
85 | mov edi, _FLAC__crc16_table | ||
86 | %else | ||
87 | +%ifdef OBJ_FORMAT_elf | ||
88 | + mov edi, [esp + 24] ; saved ebx (GOT base) | ||
89 | + lea edi, [edi + FLAC__crc16_table wrt ..gotoff] | ||
90 | +%else | ||
91 | mov edi, FLAC__crc16_table | ||
92 | %endif | ||
93 | +%endif | ||
94 | ;; eax (ax) crc a.k.a. br->read_crc | ||
95 | ;; ebx (bl) intermediate result index into FLAC__crc16_table[] | ||
96 | ;; ecx br->crc16_align | ||
97 | -- | ||
98 | 1.7.2.5 | ||
99 | |||
diff --git a/meta/recipes-multimedia/flac/flac_1.2.1.bb b/meta/recipes-multimedia/flac/flac_1.2.1.bb index 6520b714d8..903de6dc9a 100644 --- a/meta/recipes-multimedia/flac/flac_1.2.1.bb +++ b/meta/recipes-multimedia/flac/flac_1.2.1.bb | |||
@@ -14,13 +14,14 @@ LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \ | |||
14 | file://include/FLAC/all.h;beginline=64;endline=69;md5=64474f2b22e9e77b28d8b8b25c983a48" | 14 | file://include/FLAC/all.h;beginline=64;endline=69;md5=64474f2b22e9e77b28d8b8b25c983a48" |
15 | DEPENDS = "libogg" | 15 | DEPENDS = "libogg" |
16 | 16 | ||
17 | PR = "r2" | 17 | PR = "r3" |
18 | 18 | ||
19 | SRC_URI = "${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \ | 19 | SRC_URI = "${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \ |
20 | file://disable-xmms-plugin.patch \ | 20 | file://disable-xmms-plugin.patch \ |
21 | file://flac-gcc43-fixes.patch \ | 21 | file://flac-gcc43-fixes.patch \ |
22 | file://xmms.m4 \ | 22 | file://xmms.m4 \ |
23 | file://0001-No-AltiVec-on-SPE.patch" | 23 | file://0001-No-AltiVec-on-SPE.patch \ |
24 | file://asm-pic.patch" | ||
24 | 25 | ||
25 | SRC_URI[md5sum] = "153c8b15a54da428d1f0fadc756c22c7" | 26 | SRC_URI[md5sum] = "153c8b15a54da428d1f0fadc756c22c7" |
26 | SRC_URI[sha256sum] = "9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf" | 27 | SRC_URI[sha256sum] = "9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf" |