From: Kumar Gala <galak@kernel.crashing.org>
To: openembedded-core@lists.openembedded.org
Cc: yocto@yoctoproject.org
Subject: [PATCH v2 5/5] flac: fix build issues with e500v2 (gnuspe) toolchain
Date: Tue, 19 Jul 2011 12:41:36 -0500 [thread overview]
Message-ID: <1311097296-17200-6-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1311097296-17200-5-git-send-email-galak@kernel.crashing.org>
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>
---
.../flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch | 74 ++++++++++++++++++++
meta/recipes-multimedia/flac/flac_1.2.1.bb | 5 +-
2 files changed, 77 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-multimedia/flac/flac-1.2.1/0001-No-AltiVec-on-SPE.patch
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 0000000..8626336
--- /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
+
diff --git a/meta/recipes-multimedia/flac/flac_1.2.1.bb b/meta/recipes-multimedia/flac/flac_1.2.1.bb
index 92bcec6..fc8e14f 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 \
file://include/FLAC/all.h;beginline=64;endline=69;md5=64474f2b22e9e77b28d8b8b25c983a48"
DEPENDS = "libogg"
-PR = "r0"
+PR = "r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/flac/flac-${PV}.tar.gz \
file://disable-xmms-plugin.patch;patch=1 \
file://flac-gcc43-fixes.patch;patch=1 \
- file://xmms.m4"
+ file://xmms.m4 \
+ file://0001-No-AltiVec-on-SPE.patch"
SRC_URI[md5sum] = "153c8b15a54da428d1f0fadc756c22c7"
SRC_URI[sha256sum] = "9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf"
--
1.7.3.4
next prev parent reply other threads:[~2011-07-19 17:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 17:41 [PATCH v2 0/5] Add support for PowerPC e500v2/SPE Kumar Gala
2011-07-19 17:41 ` [PATCH v2 1/5] gcc: Add gcc configure for PowerPC e500v2/SPE embedded floating point ABI Kumar Gala
2011-07-19 17:41 ` [PATCH v2 2/5] tclibc-*libc: Utilize TARGET_FPU for gnuspe setting Kumar Gala
2011-07-19 17:41 ` [PATCH v2 3/5] tune-ppce500v2: Add a tune file for PowerPC e500v2 cores Kumar Gala
2011-07-19 17:41 ` [PATCH v2 4/5] openssl: Add handling for linux-gnuspe-powerpc Kumar Gala
2011-07-19 17:41 ` Kumar Gala [this message]
2011-07-20 17:05 ` [PATCH v2 0/5] Add support for PowerPC e500v2/SPE Saul Wold
2011-07-20 20:33 ` Kumar Gala
2011-07-20 20:49 ` Saul Wold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311097296-17200-6-git-send-email-galak@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox