Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Add support for PowerPC e500v2/SPE
@ 2011-07-19 17:41 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-20 17:05 ` [PATCH v2 0/5] Add support for PowerPC e500v2/SPE Saul Wold
  0 siblings, 2 replies; 9+ messages in thread
From: Kumar Gala @ 2011-07-19 17:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

The majority of support for the PowerPC e500v2/SPE target already
exists.  However some minor cleans are required to get things working
completely.

The e500v2 utilizes a unique floating point programming model / ABI from
other PowerPC targets and thus requires special handling.

- k



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/5] gcc: Add gcc configure for PowerPC e500v2/SPE embedded floating point ABI
  2011-07-19 17:41 [PATCH v2 0/5] Add support for PowerPC e500v2/SPE Kumar Gala
@ 2011-07-19 17:41 ` Kumar Gala
  2011-07-19 17:41   ` [PATCH v2 2/5] tclibc-*libc: Utilize TARGET_FPU for gnuspe setting Kumar Gala
  2011-07-20 17:05 ` [PATCH v2 0/5] Add support for PowerPC e500v2/SPE Saul Wold
  1 sibling, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2011-07-19 17:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

The e500v2 core utilizes a unique floating point programming model / ABI.
We utilize TARGET_FPU = "ppc-efd" to distinguish this choice (Embedded
scalar single-precision floating-point).  When building the toolchain for
this ABI we need configure gcc with --enable-e500_double.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 meta/recipes-devtools/gcc/gcc-4.6.inc    |    2 +-
 meta/recipes-devtools/gcc/gcc-common.inc |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index 56064b5..b719155 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r8"
+PR = "r9"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index 7bf036c..1684e78 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -12,6 +12,8 @@ FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
 def get_gcc_fpu_setting(bb, d):
     if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
         return "--with-float=soft"
+    if bb.data.getVar('TARGET_FPU', d, 1) in [ 'ppc-efd' ]:
+        return "--enable-e500_double"
     return ""
 
 def get_gcc_mips_plt_setting(bb, d):
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/5] tclibc-*libc: Utilize TARGET_FPU for gnuspe setting
  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   ` Kumar Gala
  2011-07-19 17:41     ` [PATCH v2 3/5] tune-ppce500v2: Add a tune file for PowerPC e500v2 cores Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2011-07-19 17:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

Its possible that BASE_PACKAGE_ARCH isn't set to ppce500 or ppce500v2 when
we build native toolchains.  So we can utilize TARGET_FPU being set to
'ppc-efd' or 'ppc-efs' to determine if we should enable the gnuspe ABI.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 meta/conf/distro/include/tclibc-eglibc.inc |    2 +-
 meta/conf/distro/include/tclibc-glibc.inc  |    2 +-
 meta/conf/distro/include/tclibc-uclibc.inc |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

* Use ppc-efs, ppc-efd instead of spe
* Added change to uclibc as well

diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
index e070aad..9fab4dc 100644
--- a/meta/conf/distro/include/tclibc-eglibc.inc
+++ b/meta/conf/distro/include/tclibc-eglibc.inc
@@ -5,7 +5,7 @@
 TARGET_OS = "linux"
 TARGET_OS_arm = "linux-gnueabi"
 TARGET_OS_armeb = "linux-gnueabi"
-TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('BASE_PACKAGE_ARCH',d,1) in ['ppce500', 'ppce500v2']]}"
+TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
 
 # Add glibc overrides to the overrides for eglibc.
 OVERRIDES .= ":libc-glibc"
diff --git a/meta/conf/distro/include/tclibc-glibc.inc b/meta/conf/distro/include/tclibc-glibc.inc
index 5e7afc1..0370dfa 100644
--- a/meta/conf/distro/include/tclibc-glibc.inc
+++ b/meta/conf/distro/include/tclibc-glibc.inc
@@ -5,7 +5,7 @@
 TARGET_OS = "linux"
 TARGET_OS_arm = "linux-gnueabi"
 TARGET_OS_armeb = "linux-gnueabi"
-TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('BASE_PACKAGE_ARCH',d,1) in ['ppce500', 'ppce500v2']]}"
+TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
 
 # Add glibc to the overrides.
 OVERRIDES =. "libc-glibc:"
diff --git a/meta/conf/distro/include/tclibc-uclibc.inc b/meta/conf/distro/include/tclibc-uclibc.inc
index 65693a9..2ccda5b 100644
--- a/meta/conf/distro/include/tclibc-uclibc.inc
+++ b/meta/conf/distro/include/tclibc-uclibc.inc
@@ -5,6 +5,7 @@
 TARGET_OS = "linux-uclibc"
 TARGET_OS_arm = "linux-uclibceabi"
 TARGET_OS_armeb = "linux-uclibceabi"
+TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
 
 # Add uclibc overrides to the overrides.
 OVERRIDES =. "libc-uclibc:"
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/5] tune-ppce500v2: Add a tune file for PowerPC e500v2 cores
  2011-07-19 17:41   ` [PATCH v2 2/5] tclibc-*libc: Utilize TARGET_FPU for gnuspe setting Kumar Gala
@ 2011-07-19 17:41     ` Kumar Gala
  2011-07-19 17:41       ` [PATCH v2 4/5] openssl: Add handling for linux-gnuspe-powerpc Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2011-07-19 17:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 meta/conf/machine/include/tune-ppce500v2.inc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 meta/conf/machine/include/tune-ppce500v2.inc

* Removed TARGET_OS_powerpc (not needed)

diff --git a/meta/conf/machine/include/tune-ppce500v2.inc b/meta/conf/machine/include/tune-ppce500v2.inc
new file mode 100644
index 0000000..d76dbc9
--- /dev/null
+++ b/meta/conf/machine/include/tune-ppce500v2.inc
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mcpu=8548 -mabi=spe -mspe"
+BASE_PACKAGE_ARCH = "ppce500v2"
+FEED_ARCH = "ppce500v2"
+PACKAGE_EXTRA_ARCHS = "powerpc ppce500v2"
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 4/5] openssl: Add handling for linux-gnuspe-powerpc
  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       ` Kumar Gala
  2011-07-19 17:41         ` [PATCH v2 5/5] flac: fix build issues with e500v2 (gnuspe) toolchain Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2011-07-19 17:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

If trying to build for an e500v2 target openssl will fail to build since
the configure script didn't know how to handle a 'gnuspe' target.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 meta/recipes-connectivity/openssl/openssl.inc      |    3 +++
 .../recipes-connectivity/openssl/openssl_0.9.8r.bb |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index 39143ad..79620b3 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -80,6 +80,9 @@ do_configure () {
 	linux-powerpc)
 		target=linux-ppc
 		;;
+	linux-gnuspe-powerpc)
+		target=linux-ppc
+		;;
 	linux-supersparc)
 		target=linux-sparcv8
 		;;
diff --git a/meta/recipes-connectivity/openssl/openssl_0.9.8r.bb b/meta/recipes-connectivity/openssl/openssl_0.9.8r.bb
index ea83cb8..344747f 100644
--- a/meta/recipes-connectivity/openssl/openssl_0.9.8r.bb
+++ b/meta/recipes-connectivity/openssl/openssl_0.9.8r.bb
@@ -1,6 +1,6 @@
 require openssl.inc
 
-PR = "r3"
+PR = "r4"
 SRC_URI += "file://debian/ca.patch \
             file://debian/config-hurd.patch;apply=no \
             file://debian/debian-targets.patch \
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 5/5] flac: fix build issues with e500v2 (gnuspe) toolchain
  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
  0 siblings, 0 replies; 9+ messages in thread
From: Kumar Gala @ 2011-07-19 17:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: yocto

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




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/5] Add support for PowerPC e500v2/SPE
  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-20 17:05 ` Saul Wold
  2011-07-20 20:33   ` Kumar Gala
  1 sibling, 1 reply; 9+ messages in thread
From: Saul Wold @ 2011-07-20 17:05 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: yocto

On 07/19/2011 10:41 AM, Kumar Gala wrote:
> The majority of support for the PowerPC e500v2/SPE target already
> exists.  However some minor cleans are required to get things working
> completely.
>
> The e500v2 utilizes a unique floating point programming model / ABI from
> other PowerPC targets and thus requires special handling.
>
> - k
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Merged into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/5] Add support for PowerPC e500v2/SPE
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2011-07-20 20:33 UTC (permalink / raw)
  To: Saul Wold; +Cc: yocto, Patches and discussions about the oe-core layer


On Jul 20, 2011, at 12:05 PM, Saul Wold wrote:

> On 07/19/2011 10:41 AM, Kumar Gala wrote:
>> The majority of support for the PowerPC e500v2/SPE target already
>> exists.  However some minor cleans are required to get things working
>> completely.
>> 
>> The e500v2 utilizes a unique floating point programming model / ABI from
>> other PowerPC targets and thus requires special handling.
>> 
>> - k
>> 
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>> 
> 
> Merged into OE-Core
> 
> Thanks
> 	Sau!

Thanks, how does this propagate to poky?

- k



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/5] Add support for PowerPC e500v2/SPE
  2011-07-20 20:33   ` Kumar Gala
@ 2011-07-20 20:49     ` Saul Wold
  0 siblings, 0 replies; 9+ messages in thread
From: Saul Wold @ 2011-07-20 20:49 UTC (permalink / raw)
  To: Kumar Gala; +Cc: yocto, Patches and discussions about the oe-core layer

On 07/20/2011 01:33 PM, Kumar Gala wrote:
>
> On Jul 20, 2011, at 12:05 PM, Saul Wold wrote:
>
>> On 07/19/2011 10:41 AM, Kumar Gala wrote:
>>> The majority of support for the PowerPC e500v2/SPE target already
>>> exists.  However some minor cleans are required to get things working
>>> completely.
>>>
>>> The e500v2 utilizes a unique floating point programming model / ABI from
>>> other PowerPC targets and thus requires special handling.
>>>
>>> - k
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>>
>>
>> Merged into OE-Core
>>
>> Thanks
>> 	Sau!
>
> Thanks, how does this propagate to poky?
>
> - k
>
Kumar,

Once it's in OE-Core Richard (the maintainer of both) does a merge into 
the poky git repo, so by the time you get an ACK email, it should be 
propagated already.

Sau!



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-07-20 20:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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         ` [PATCH v2 5/5] flac: fix build issues with e500v2 (gnuspe) toolchain Kumar Gala
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox