summaryrefslogtreecommitdiff
path: root/meta/recipes-multimedia/flac/flac-1.2.1
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:24:57 +0100
commit0cb68387f9aca914c603a26e85a2ea405f721f53 (patch)
treea258cee4bc410ea830ab623f11662125b4761ab4 /meta/recipes-multimedia/flac/flac-1.2.1
parentd42a262c1fe41bd774be85f3df1baf144fc8e67d (diff)
downloadopenembedded-core-0cb68387f9aca914c603a26e85a2ea405f721f53.tar.gz
openembedded-core-0cb68387f9aca914c603a26e85a2ea405f721f53.tar.bz2
openembedded-core-0cb68387f9aca914c603a26e85a2ea405f721f53.zip
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 Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'meta/recipes-multimedia/flac/flac-1.2.1')
-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 @@
+From f9b017c2c958d968cc5dfd36dc68fc8e5fb89a58 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Fri, 11 Jun 2010 09:48:58 +0200
+Subject: [PATCH] No AltiVec on SPE
+
+Consider *gnuspe which matches powerpc-unknown-linux-gnuspe where
+AltiVec is not available at all. This triplet uses SPE which is
+incompatible with AltiVec shares the same opcode range and can't be used
+at all.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ configure.in | 8 ++++++++
+ src/libFLAC/Makefile.am | 10 +++++++++-
+ 2 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index bfa6d8e..17b7c73 100644
+--- a/configure.in
++++ b/configure.in
+@@ -82,6 +82,14 @@ case "$host" in
+ *) OBJ_FORMAT=elf ;;
+ esac
+ AC_SUBST(OBJ_FORMAT)
++case "$host" in
++ *-gnuspe)
++ abi_spe=true
++ AC_DEFINE(FLAC__CPU_PPC_SPE)
++ AH_TEMPLATE(FLAC__CPU_PPC_SPE, [define if building for PowerPC with SPE ABI])
++ ;;
++esac
++AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue)
+
+ # only needed because of ntohl() usage, can get rid of after that's gone:
+ case "$host" in
+diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am
+index cbfb0ac..5785372 100644
+--- a/src/libFLAC/Makefile.am
++++ b/src/libFLAC/Makefile.am
+@@ -40,8 +40,13 @@ if FLaC__SYS_DARWIN
+ CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM
+ else
+ # Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
++CPUCFLAGS =
++if FLaC__CPU_PPC_SPE
++else
++CPUCFLAGS += -maltivec -mabi=altivec
++endif
+ #@@@ PPC optimizations temporarily disabled
+-CPUCFLAGS = -maltivec -mabi=altivec -DFLAC__NO_ASM
++CPUCFLAGS += -DFLAC__NO_ASM
+ endif
+ endif
+
+@@ -58,6 +63,8 @@ endif
+ if FLaC__CPU_PPC
+ ARCH_SUBDIRS = ppc
+ if FLaC__HAS_AS__TEMPORARILY_DISABLED
++if FLaC__CPU_PPC_SPE
++else
+ LOCAL_EXTRA_LIBADD = ppc/as/libFLAC-asm.la
+ LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning"
+ else
+@@ -68,6 +75,7 @@ endif
+ endif
+ endif
+ endif
++endif
+
+ libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@
+
+--
+1.5.6.5
+