summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2011-07-19 12:41:36 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-20 15:27:35 +0100
commit2097906db6673eaace011828d4057641ec4e4265 (patch)
tree893580f574ac598bf0f54735660fb1ce6d9952ac
parent9f952b2349df8c813fe7cffee49767c794be020a (diff)
downloadpoky-2097906db6673eaace011828d4057641ec4e4265.tar.gz
flac: fix build issues with e500v2 (gnuspe) toolchain
For a PPC target flac will try to build with altivec optimizations. Altivec and SPE are mutually exclusive options. Between flac's configure choices and the ppce500v2 tune file options we'd end up with a compile invocation with the following arguments: -mabi=spe -mspe -mabi=altivec -maltivec Which would cause the compile to fail due to the mutual exclusion. Pulled in a patch from the debian SPE port that addresses this issue: http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/2010-June/010212.html (From OE-Core rev: 0cb68387f9aca914c603a26e85a2ea405f721f53) Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch74
-rw-r--r--meta/recipes-multimedia/flac/flac_1.2.1.bb5
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 @@
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
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"
15DEPENDS = "libogg" 15DEPENDS = "libogg"
16 16
17PR = "r0" 17PR = "r1"
18 18
19SRC_URI = "${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \ 19SRC_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
24SRC_URI[md5sum] = "153c8b15a54da428d1f0fadc756c22c7" 25SRC_URI[md5sum] = "153c8b15a54da428d1f0fadc756c22c7"
25SRC_URI[sha256sum] = "9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf" 26SRC_URI[sha256sum] = "9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf"