summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch')
-rw-r--r--meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch74
1 files changed, 74 insertions, 0 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 @@
1From f9b017c2c958d968cc5dfd36dc68fc8e5fb89a58 Mon Sep 17 00:00:00 2001
2From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3Date: Fri, 11 Jun 2010 09:48:58 +0200
4Subject: [PATCH] No AltiVec on SPE
5
6Consider *gnuspe which matches powerpc-unknown-linux-gnuspe where
7AltiVec is not available at all. This triplet uses SPE which is
8incompatible with AltiVec shares the same opcode range and can't be used
9at all.
10
11Signed-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
17diff --git a/configure.in b/configure.in
18index 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
36diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am
37index 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--
731.5.6.5
74