Skip to contentSkip to conversation

tune-ppc: Update to pass glibc configure option to get cpu specific support

PATCH Superseded Kumar Gala 2 participants 4 messages Aug 10, 2011

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH v2 1/1 tune-ppc: Update to pass glibc configure option to get cpu specific support

We need --with-cpu based to glibc to get proper support on 603e & e500mc to pickup proper math libs to deal with sqrt. These core do not implement the fsqrt[s] instructions that the normal PPC math libs utilize.

This causes use to not set AVAILTUNES specifically to the sub-arch only as we arent generically compatiable.

---
 meta/conf/machine/include/tune-ppc603e.inc   |    5 ++++-
 meta/conf/machine/include/tune-ppce500mc.inc |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta/conf/machine/include/tune-ppc603e.inc +4 -1
index 9abb694..c673470 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppc603e] = "Enable ppc603e specific processor optimizations"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "-mcpu=603e", "", d)}"
 TUNE_PKGARCH = "${@bb.utils.contains('TUNE_FEATURES', 'ppc603e', 'ppc603e', '${PPCPKGARCH}', d)}"
 
-AVAILTUNES += "ppc603e"
+AVAILTUNES = "ppc603e"
 TUNE_FEATURES_tune-ppc603e = "m32 ppc603e"
 PACKAGE_EXTRA_ARCHS_tune-ppc603e = "powerpc ppc603e"
+
+# glibc configure options to get 603e specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=603e"
meta/conf/machine/include/tune-ppce500mc.inc +4 -1
index b5031f4..cdd87dc 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "-mcpu=e500mc", "", d)}"
 TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "ppce500mc", "${PPCPKGARCH}", d)}"
 
-AVAILTUNES += "ppce500mc"
+AVAILTUNES = "ppce500mc"
 TUNE_FEATURES_tune-ppce500mc = "m32 ppce500mc"
 PACKAGE_EXTRA_ARCHS_tune-ppce500mc = "powerpc ppce500mc"
+
+# glibc configure options to get e500mc specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e500mc"
Signature · 1 line
1.7.3.4
#1 lore raw

I don't think the patch is correct. If these tune files are included, the GLIBC_EXTRA_OECONF is set unconditionally. It is possible to include the tune files, but not actually use the tunings. (There are cases where you might want to inherit specific tunings, etc.)

Instead, I'd suggest you do:

GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "--with-cpu=603e", "", d)}"

(and a similar line for the e500mc)

--Mark

Quoted 44 lines · Kumar Gala

We need --with-cpu based to glibc to get proper support on 603e & e500mc to pickup proper math libs to deal with sqrt. These core do not implement the fsqrt[s] instructions that the normal PPC math libs utilize.

This causes use to not set AVAILTUNES specifically to the sub-arch only as we arent generically compatiable.

---
 meta/conf/machine/include/tune-ppc603e.inc   |    5 ++++-
 meta/conf/machine/include/tune-ppce500mc.inc |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta/conf/machine/include/tune-ppc603e.inc +4 -1
index 9abb694..c673470 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppc603e] = "Enable ppc603e specific processor optimizations"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "-mcpu=603e", "", d)}"
 TUNE_PKGARCH = "${@bb.utils.contains('TUNE_FEATURES', 'ppc603e', 'ppc603e', '${PPCPKGARCH}', d)}"
 
-AVAILTUNES += "ppc603e"
+AVAILTUNES = "ppc603e"
 TUNE_FEATURES_tune-ppc603e = "m32 ppc603e"
 PACKAGE_EXTRA_ARCHS_tune-ppc603e = "powerpc ppc603e"
+
+# glibc configure options to get 603e specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=603e"
meta/conf/machine/include/tune-ppce500mc.inc +4 -1
index b5031f4..cdd87dc 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "-mcpu=e500mc", "", d)}"
 TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "ppce500mc", "${PPCPKGARCH}", d)}"
 
-AVAILTUNES += "ppce500mc"
+AVAILTUNES = "ppce500mc"
 TUNE_FEATURES_tune-ppce500mc = "m32 ppce500mc"
 PACKAGE_EXTRA_ARCHS_tune-ppce500mc = "powerpc ppce500mc"
+
+# glibc configure options to get e500mc specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e500mc"
author
#2 lore raw

Why?

- k

Quoted 65 lines · Mark Hatle

I don't think the patch is correct. If these tune files are included, the GLIBC_EXTRA_OECONF is set unconditionally. It is possible to include the tune files, but not actually use the tunings. (There are cases where you might want to inherit specific tunings, etc.)

Instead, I'd suggest you do:

GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "--with-cpu=603e", "", d)}"

(and a similar line for the e500mc)

--Mark

Quoted 41 lines · Kumar Gala

We need --with-cpu based to glibc to get proper support on 603e & e500mc to pickup proper math libs to deal with sqrt. These core do not implement the fsqrt[s] instructions that the normal PPC math libs utilize.

This causes use to not set AVAILTUNES specifically to the sub-arch only as we arent generically compatiable.

---

meta/conf/machine/include/tune-ppc603e.inc   |    5 ++++-
meta/conf/machine/include/tune-ppce500mc.inc |    5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
meta/conf/machine/include/tune-ppc603e.inc +0 -0
index 9abb694..c673470 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppc603e] = "Enable ppc603e specific processor optimizations"

TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "-mcpu=603e", "", d)}" TUNE_PKGARCH = "${@bb.utils.contains('TUNE_FEATURES', 'ppc603e', 'ppc603e', '${PPCPKGARCH}', d)}"

meta/conf/machine/include/tune-ppc603e.inc +1 -1
-AVAILTUNES += "ppc603e"
+AVAILTUNES = "ppc603e"

TUNE_FEATURES_tune-ppc603e = "m32 ppc603e" PACKAGE_EXTRA_ARCHS_tune-ppc603e = "powerpc ppc603e"

meta/conf/machine/include/tune-ppc603e.inc +3 -0
+
+# glibc configure options to get 603e specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=603e"
meta/conf/machine/include/tune-ppce500mc.inc +0 -0
index b5031f4..cdd87dc 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations"

TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "-mcpu=e500mc", "", d)}" TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "ppce500mc", "${PPCPKGARCH}", d)}"

meta/conf/machine/include/tune-ppce500mc.inc +1 -1
-AVAILTUNES += "ppce500mc"
+AVAILTUNES = "ppce500mc"

TUNE_FEATURES_tune-ppce500mc = "m32 ppce500mc" PACKAGE_EXTRA_ARCHS_tune-ppce500mc = "powerpc ppce500mc"

meta/conf/machine/include/tune-ppce500mc.inc TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations" · line 14

Quoted 3 lines
meta/conf/machine/include/tune-ppce500mc.inc +3 -0
+
+# glibc configure options to get e500mc specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e500mc"

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 10 lines · Kumar Gala

Why?

- k

Quoted 4 lines · Mark Hatle

I don't think the patch is correct. If these tune files are included, the GLIBC_EXTRA_OECONF is set unconditionally. It is possible to include the tune files, but not actually use the tunings. (There are cases where you might want to inherit specific tunings, etc.)

It's general convention. While it might not make sense in this one case, I do expect that tuning will inherit other tunings regularly.

Lets say someone out there invents a variant of the 603e that has altivec. They could create a new tune file.. Then in the tune file they would include the ppc603e-tune.inc file, and add a new tune feature for this new processor that would enable -maltivec or something like that.

Many cores are derived from other cores and simply have different capabilities added to them by compiler or assembler flags.... (This is especially true in the ARM and MIPS world, but we should be aware of it and use the same conventions on all tune files so things are more consistent.)

--Mark

Quoted 66 lines
Quoted 47 lines

Instead, I'd suggest you do:

GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "--with-cpu=603e", "", d)}"

(and a similar line for the e500mc)

--Mark

Quoted 37 lines · Kumar Gala

We need --with-cpu based to glibc to get proper support on 603e & e500mc to pickup proper math libs to deal with sqrt. These core do not implement the fsqrt[s] instructions that the normal PPC math libs utilize.

This causes use to not set AVAILTUNES specifically to the sub-arch only as we arent generically compatiable.

---

meta/conf/machine/include/tune-ppc603e.inc   |    5 ++++-
meta/conf/machine/include/tune-ppce500mc.inc |    5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
meta/conf/machine/include/tune-ppc603e.inc +0 -0
index 9abb694..c673470 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppc603e] = "Enable ppc603e specific processor optimizations"

TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "-mcpu=603e", "", d)}" TUNE_PKGARCH = "${@bb.utils.contains('TUNE_FEATURES', 'ppc603e', 'ppc603e', '${PPCPKGARCH}', d)}"

meta/conf/machine/include/tune-ppc603e.inc +1 -1
-AVAILTUNES += "ppc603e"
+AVAILTUNES = "ppc603e"

TUNE_FEATURES_tune-ppc603e = "m32 ppc603e" PACKAGE_EXTRA_ARCHS_tune-ppc603e = "powerpc ppc603e"

meta/conf/machine/include/tune-ppc603e.inc +3 -0
+
+# glibc configure options to get 603e specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=603e"
meta/conf/machine/include/tune-ppce500mc.inc +0 -0
index b5031f4..cdd87dc 100644
@@ -6,6 +6,9 @@ TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations"

TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "-mcpu=e500mc", "", d)}" TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "ppce500mc", "${PPCPKGARCH}", d)}"

Quoted 13 lines

meta/conf/machine/include/tune-ppce500mc.inc TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations" · line 14

Quoted 7 lines
meta/conf/machine/include/tune-ppce500mc.inc +1 -1
-AVAILTUNES += "ppce500mc"
+AVAILTUNES = "ppce500mc"

TUNE_FEATURES_tune-ppce500mc = "m32 ppce500mc" PACKAGE_EXTRA_ARCHS_tune-ppce500mc = "powerpc ppce500mc"

meta/conf/machine/include/tune-ppce500mc.inc +3 -0
+
+# glibc configure options to get e500mc specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e500mc"

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core