diff options
-rw-r--r-- | meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch | 74 | ||||
-rw-r--r-- | meta/recipes-multimedia/flac/flac_1.2.1.bb | 5 |
2 files changed, 77 insertions, 2 deletions
diff --git a/meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch b/meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch new file mode 100644 index 0000000000..86263368b8 --- /dev/null +++ b/meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From f9b017c2c958d968cc5dfd36dc68fc8e5fb89a58 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> | ||
3 | Date: Fri, 11 Jun 2010 09:48:58 +0200 | ||
4 | Subject: [PATCH] No AltiVec on SPE | ||
5 | |||
6 | Consider *gnuspe which matches powerpc-unknown-linux-gnuspe where | ||
7 | AltiVec is not available at all. This triplet uses SPE which is | ||
8 | incompatible with AltiVec shares the same opcode range and can't be used | ||
9 | at all. | ||
10 | |||
11 | Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> | ||
12 | --- | ||
13 | configure.in | 8 ++++++++ | ||
14 | src/libFLAC/Makefile.am | 10 +++++++++- | ||
15 | 2 files changed, 17 insertions(+), 1 deletions(-) | ||
16 | |||
17 | diff --git a/configure.in b/configure.in | ||
18 | index bfa6d8e..17b7c73 100644 | ||
19 | --- a/configure.in | ||
20 | +++ b/configure.in | ||
21 | @@ -82,6 +82,14 @@ case "$host" in | ||
22 | *) OBJ_FORMAT=elf ;; | ||
23 | esac | ||
24 | AC_SUBST(OBJ_FORMAT) | ||
25 | +case "$host" in | ||
26 | + *-gnuspe) | ||
27 | + abi_spe=true | ||
28 | + AC_DEFINE(FLAC__CPU_PPC_SPE) | ||
29 | + AH_TEMPLATE(FLAC__CPU_PPC_SPE, [define if building for PowerPC with SPE ABI]) | ||
30 | + ;; | ||
31 | +esac | ||
32 | +AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue) | ||
33 | |||
34 | # only needed because of ntohl() usage, can get rid of after that's gone: | ||
35 | case "$host" in | ||
36 | diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am | ||
37 | index cbfb0ac..5785372 100644 | ||
38 | --- a/src/libFLAC/Makefile.am | ||
39 | +++ b/src/libFLAC/Makefile.am | ||
40 | @@ -40,8 +40,13 @@ if FLaC__SYS_DARWIN | ||
41 | CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM | ||
42 | else | ||
43 | # Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific | ||
44 | +CPUCFLAGS = | ||
45 | +if FLaC__CPU_PPC_SPE | ||
46 | +else | ||
47 | +CPUCFLAGS += -maltivec -mabi=altivec | ||
48 | +endif | ||
49 | #@@@ PPC optimizations temporarily disabled | ||
50 | -CPUCFLAGS = -maltivec -mabi=altivec -DFLAC__NO_ASM | ||
51 | +CPUCFLAGS += -DFLAC__NO_ASM | ||
52 | endif | ||
53 | endif | ||
54 | |||
55 | @@ -58,6 +63,8 @@ endif | ||
56 | if FLaC__CPU_PPC | ||
57 | ARCH_SUBDIRS = ppc | ||
58 | if FLaC__HAS_AS__TEMPORARILY_DISABLED | ||
59 | +if FLaC__CPU_PPC_SPE | ||
60 | +else | ||
61 | LOCAL_EXTRA_LIBADD = ppc/as/libFLAC-asm.la | ||
62 | LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning" | ||
63 | else | ||
64 | @@ -68,6 +75,7 @@ endif | ||
65 | endif | ||
66 | endif | ||
67 | endif | ||
68 | +endif | ||
69 | |||
70 | libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ | ||
71 | |||
72 | -- | ||
73 | 1.5.6.5 | ||
74 | |||
diff --git a/meta/recipes-multimedia/flac/flac_1.2.1.bb b/meta/recipes-multimedia/flac/flac_1.2.1.bb index 92bcec63e9..fc8e14f429 100644 --- a/meta/recipes-multimedia/flac/flac_1.2.1.bb +++ b/meta/recipes-multimedia/flac/flac_1.2.1.bb | |||
@@ -14,12 +14,13 @@ 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 = "r0" | 17 | PR = "r1" |
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;patch=1 \ | 20 | file://disable-xmms-plugin.patch;patch=1 \ |
21 | file://flac-gcc43-fixes.patch;patch=1 \ | 21 | file://flac-gcc43-fixes.patch;patch=1 \ |
22 | file://xmms.m4" | 22 | file://xmms.m4 \ |
23 | file://0001-No-AltiVec-on-SPE.patch" | ||
23 | 24 | ||
24 | SRC_URI[md5sum] = "153c8b15a54da428d1f0fadc756c22c7" | 25 | SRC_URI[md5sum] = "153c8b15a54da428d1f0fadc756c22c7" |
25 | SRC_URI[sha256sum] = "9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf" | 26 | SRC_URI[sha256sum] = "9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf" |