Patchwork [3/7,v2] conf/machine/include: Cleanup MIPS tunings to match README

login
register
mail settings
Submitter Mark Hatle
Date April 3, 2012, 8:07 p.m.
Message ID <cb731e1f6d08aba906b97a15a66b8a2d75d5e9ba.1333483453.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/25125/
State Accepted
Commit efbfa2ace3362393a20340af93e8dcab17a8619a
Headers show

Comments

Mark Hatle - April 3, 2012, 8:07 p.m.
Cleanup the MIPS tunings to match the new tuning README file.  Also
add a MIPS specific README file to explain the MIPS specifical
architectural issues.

Finally correct the variant configurations within the tune-mips32.inc.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/conf/machine/include/mips/README        |   36 ++++++++++++++++++++++++
 meta/conf/machine/include/mips/arch-mips.inc |   38 ++++++++++++++++++++++++-
 meta/conf/machine/include/tune-mips32.inc    |   17 ++++++++---
 3 files changed, 84 insertions(+), 7 deletions(-)
 create mode 100644 meta/conf/machine/include/mips/README

Patch

diff --git a/meta/conf/machine/include/mips/README b/meta/conf/machine/include/mips/README
new file mode 100644
index 0000000..c375f31
--- /dev/null
+++ b/meta/conf/machine/include/mips/README
@@ -0,0 +1,36 @@ 
+2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
+  - Initial Version
+
+MIPS currently defines 12 ABIs.  Combinations of:
+ *) Big/Little Endian
+ *) Hardware/Software Floating Point
+ *) o32, n32, n64 ABI
+
+TUNE_ARCH, the GNU canonical arch, is defined as:
+
+mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}
+
+The package arch is defined in such a way to generated a standard naming
+scheme.  The scheme is: <mips variant>[-nf][-n32]
+
+TUNE_PKGARCH is defined as:
+
+${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}
+
+The following is a list of MIPS specific variables:
+
+MIPSPKGSFX_BYTE - This is defined as either blank and "64" for MIPS64 CPUs.
+
+MIPSPKGSFX_ENDIAN - For bigendian hardware this is blank, otherwise it's
+defined as "el".
+
+MIPSPKGSFX_VARIANT_tune-<tune> - In the default tunings it is set to the
+same value as TUNE_ARCH.  In custom, optimized tunings, the value should
+be modified to more precisely describe the tuning.
+
+MIPSPKGSFX_FPU - The value is set to "" or "-nf", where "-nf" indicates 
+that the tune is using a non-floating point ABI.
+
+MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous
+values are not enough to distringuish the package.  "-n32" is added when
+building for N32 ABI.
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index b7ded76..8758ecd 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -36,32 +36,66 @@  MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf",
 MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}"
 
 TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
-TUNE_PKGARCH ?= "${TUNE_ARCH}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
+TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
 
 # Base tunes
 AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
 TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
 BASE_LIB_tune-mips = "lib"
+MIPSPKGSFX_VARIANT_tune-mips = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips = "mips"
+
 TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard"
 BASE_LIB_tune-mips64-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-n32 = "mips64-n32"
+
 TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard"
 BASE_LIB_tune-mips64 = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64 = "mips64"
+
 TUNE_FEATURES_tune-mipsel = "o32 fpu-hard"
 BASE_LIB_tune-mipsel = "lib"
+MIPSPKGSFX_VARIANT_tune-mipsel = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsel = "mipsel"
+
 TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard"
 BASE_LIB_tune-mips64el-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64el-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-n32 = "mips64el-n32"
+
 TUNE_FEATURES_tune-mips64el = "n64 fpu-hard"
 BASE_LIB_tune-mips64el = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64el = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el = "mips64el"
+
 TUNE_FEATURES_tune-mips-nf = "o32 bigendian"
 BASE_LIB_tune-mips-nf = "lib"
+MIPSPKGSFX_VARIANT_tune-mips-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips-nf = "mips-nf"
+
 TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian"
 BASE_LIB_tune-mips64-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-nf-n32 = "mips64-nf-n32"
+
 TUNE_FEATURES_tune-mips64-nf = "n64 bigendian"
 BASE_LIB_tune-mips64-nf = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-nf = "mips64-nf"
+
 TUNE_FEATURES_tune-mipsel-nf = "o32"
 BASE_LIB_tune-mipsel-nf = "lib"
+MIPSPKGSFX_VARIANT_tune-mipsel-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsel-nf = "mipsel-nf"
+
 TUNE_FEATURES_tune-mips64el-nf-n32 = "n32"
 BASE_LIB_tune-mips64el-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64el-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-n32 = "mips64el-nf-n32"
+
 TUNE_FEATURES_tune-mips64el-nf = "n64"
 BASE_LIB_tune-mips64el-nf = "lib64"
-
+MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf"
diff --git a/meta/conf/machine/include/tune-mips32.inc b/meta/conf/machine/include/tune-mips32.inc
index 45d865e..93ed5ee 100644
--- a/meta/conf/machine/include/tune-mips32.inc
+++ b/meta/conf/machine/include/tune-mips32.inc
@@ -7,12 +7,19 @@  TUNE_CONFLICTS[mips32] = "n64 n32"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips32", "-march=mips32", "", d)}"
 
 AVAILTUNES += "mips32 mips32el mips32-nf mips32el-nf"
+
 TUNE_FEATURES_tune-mips32 = "${TUNE_FEATURES_tune-mips} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32 = "mips"
+MIPSPKGSFX_VARIANT_tune-mips32 = "mips32"
+PACKAGE_EXTRA_ARCHS_tune-mips32 = "mips mips32"
+
 TUNE_FEATURES_tune-mips32el = "${TUNE_FEATURES_tune-mipsel} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32el = "mipsel"
+MIPSPKGSFX_VARIANT_tune-mips32el = "mips32el"
+PACKAGE_EXTRA_ARCHS_tune-mips32el = "mipsel mips32el"
+
 TUNE_FEATURES_tune-mips32-nf = "${TUNE_FEATURES_tune-mips-nf} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32-nf = "mips-nf"
-TUNE_FEATURES_tune-mips32el-nf = "${TUNE_FEATURES_tune-mipsel-nf} mips32"
-PACKAGE_EXTRA_ARCHS_tune-mips32el-nf = "mipsel-nf"
+MIPSPKGSFX_VARIANT_tune-mips32-nf = "mips32"
+PACKAGE_EXTRA_ARCHS_tune-mips32-nf = "mips-nf mips32-nf"
 
+TUNE_FEATURES_tune-mips32el-nf = "${TUNE_FEATURES_tune-mipsel-nf} mips32"
+MIPSPKGSFX_VARIANT_tune-mips32el-nf = "mips32el"
+PACKAGE_EXTRA_ARCHS_tune-mips32el-nf = "mipsel-nf mips32el-nf"