diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2011-07-19 12:41:36 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-20 15:27:35 +0100 |
commit | 2097906db6673eaace011828d4057641ec4e4265 (patch) | |
tree | 893580f574ac598bf0f54735660fb1ce6d9952ac /meta/recipes-multimedia/flac/flac-1.2.1 | |
parent | 9f952b2349df8c813fe7cffee49767c794be020a (diff) | |
download | poky-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>
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.patch | 74 |
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 @@ | |||
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 | |||