Patchwork [2/2] Make ppce300c3 tune hard-float by default

login
register
mail settings
Submitter Mats Kärrman
Date April 1, 2014, 4:20 p.m.
Message ID <ED3E0BCACD909541BA94A34C4A164D4C5B3AAA35@post.tritech.se>
Download mbox | patch
Permalink /patch/69855/
State New
Headers show

Comments

Mats Kärrman - April 1, 2014, 4:20 p.m.
The tuning file for PowerPC e300c3 is soft-float. In OE-classic it was hard-
float and it should be as the c3 has an fpu. I have modified the tuning file
to include both a hard-float version (using the existing ppce300c3 name) and
an optional soft-float version (called ppce300c3-nf).

The following patch also passes a "--with-cpu=e300c3" argument to GLIBC.
For this to have any effect the sqrt/sqrtf implementations added by the
"glibc.fix_sqrt2.patch" are required and also an additional "Implies" file
(added to the mentioned patch as a separate patch for eglibc_2.19).

Tested with eglibc 2.19 on PowerPC MPC5125.

Signed-off-by: Mats Karrman <mats.karrman@tritech.se>
---
 meta/conf/machine/include/tune-ppce300c3.inc |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/conf/machine/include/tune-ppce300c3.inc b/meta/conf/machine/include/tune-ppce300c3.inc
index 9431222..b19cf22 100644
--- a/meta/conf/machine/include/tune-ppce300c3.inc
+++ b/meta/conf/machine/include/tune-ppce300c3.inc
@@ -2,10 +2,22 @@  DEFAULTTUNE ?= "ppce300c3"
 
 require conf/machine/include/powerpc/arch-powerpc.inc
 
+AVAILTUNES += "ppce300c3 ppce300c3-nf"
+
+# hard-float
 TUNEVALID[ppce300c3] = "Enable ppce300c3 specific processor optimizations"
+TUNE_FEATURES_tune-ppce300c3 = "${TUNE_FEATURES_tune-powerpc} ppce300c3"
+TUNE_PKGARCH_tune-ppce300c3 = "ppce300c3"
+PACKAGE_EXTRA_ARCHS_tune-ppce300c3 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce300c3"
 TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce300c3", " -mcpu=e300c3", "", d)}"
 
-AVAILTUNES += "ppce300c3"
-TUNE_FEATURES_tune-ppce300c3 = "m32 fpu-soft ppce300c3"
-TUNE_PKGARCH_tune-ppce300c3 = "ppce300c3"
-PACKAGE_EXTRA_ARCHS_tune-ppce300c3 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} ppce300c3"
+# glibc config options to make use of e300c3 (603e) specific sqrt/sqrtf routines
+GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppce300c3", "--with-cpu=e300c3", "", d)}"
+
+# soft-float
+TUNEVALID[ppce300c3-nf] = "Enable ppce300c3 specific processor optimizations (no fpu)"
+TUNE_FEATURES_tune-ppce300c3-nf = "${TUNE_FEATURES_tune-powerpc-nf} ppce300c3-nf"
+TUNE_PKGARCH_tune-ppce300c3-nf = "ppce300c3-nf"
+PACKAGE_EXTRA_ARCHS_tune-ppce300c3-nf = "${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} ppce300c3-nf"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce300c3-nf", " -mcpu=e300c3", "", d)}"
+