summaryrefslogtreecommitdiffstats
path: root/meta/conf/machine/include/mips
diff options
context:
space:
mode:
Diffstat (limited to 'meta/conf/machine/include/mips')
-rw-r--r--meta/conf/machine/include/mips/README36
-rw-r--r--meta/conf/machine/include/mips/arch-mips.inc102
2 files changed, 138 insertions, 0 deletions
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 @@
12012/03/30 - Mark Hatle <mark.hatle@windriver.com>
2 - Initial Version
3
4MIPS currently defines 12 ABIs. Combinations of:
5 *) Big/Little Endian
6 *) Hardware/Software Floating Point
7 *) o32, n32, n64 ABI
8
9TUNE_ARCH, the GNU canonical arch, is defined as:
10
11mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}
12
13The package arch is defined in such a way to generated a standard naming
14scheme. The scheme is: <mips variant>[-nf][-n32]
15
16TUNE_PKGARCH is defined as:
17
18${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}
19
20The following is a list of MIPS specific variables:
21
22MIPSPKGSFX_BYTE - This is defined as either blank and "64" for MIPS64 CPUs.
23
24MIPSPKGSFX_ENDIAN - For bigendian hardware this is blank, otherwise it's
25defined as "el".
26
27MIPSPKGSFX_VARIANT_tune-<tune> - In the default tunings it is set to the
28same value as TUNE_ARCH. In custom, optimized tunings, the value should
29be modified to more precisely describe the tuning.
30
31MIPSPKGSFX_FPU - The value is set to "" or "-nf", where "-nf" indicates
32that the tune is using a non-floating point ABI.
33
34MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous
35values are not enough to distringuish the package. "-n32" is added when
36building for N32 ABI.
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
new file mode 100644
index 0000000..02626d3
--- /dev/null
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -0,0 +1,102 @@
1# MIPS Architecture definition
2# 12 defined ABIs, all combinations of:
3# *) Big/Little Endian
4# *) Hardware/Software Floating Point
5# *) o32, n32, n64 ABI
6
7DEFAULTTUNE ?= "mips"
8
9# Endianess
10TUNEVALID[bigendian] = "Enable big-endian mode"
11TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -meb", " -mel", d)}"
12
13# ABI flags
14TUNEVALID[o32] = "MIPS o32 ABI"
15TUNECONFLICTS[o32] = "n32 n64"
16TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "o32", " -mabi=32", "", d)}"
17
18TUNEVALID[n32] = "MIPS64 n32 ABI"
19TUNECONFLICTS[n32] = "o32 n64"
20ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "n32", "n32", "" ,d)}"
21TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "n32", " -mabi=n32", "", d)}"
22
23TUNEVALID[n64] = "MIPS64 n64 ABI"
24TUNECONFLICTS[n64] = "o32 n32"
25TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "n64", " -mabi=64", "", d)}"
26
27# Floating point
28TUNEVALID[fpu-hard] = "Use hardware FPU"
29TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", " -mhard-float", " -msoft-float", d)}"
30TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "", "soft", d)}"
31
32# Package naming
33MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}"
34MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "n64" , "64", "", d)}"
35MIPSPKGSFX_BYTE .= "${@bb.utils.contains("TUNE_FEATURES", "n32" , "64", "", d)}"
36MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}"
37MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}"
38
39TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
40TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
41
42# Base tunes
43AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
44TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
45BASE_LIB_tune-mips = "lib"
46MIPSPKGSFX_VARIANT_tune-mips = "${TUNE_ARCH}"
47PACKAGE_EXTRA_ARCHS_tune-mips = "mips"
48
49TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard"
50BASE_LIB_tune-mips64-n32 = "lib32"
51MIPSPKGSFX_VARIANT_tune-mips64-n32 = "${TUNE_ARCH}"
52PACKAGE_EXTRA_ARCHS_tune-mips64-n32 = "mips64-n32"
53
54TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard"
55BASE_LIB_tune-mips64 = "lib64"
56MIPSPKGSFX_VARIANT_tune-mips64 = "${TUNE_ARCH}"
57PACKAGE_EXTRA_ARCHS_tune-mips64 = "mips64"
58
59TUNE_FEATURES_tune-mipsel = "o32 fpu-hard"
60BASE_LIB_tune-mipsel = "lib"
61MIPSPKGSFX_VARIANT_tune-mipsel = "${TUNE_ARCH}"
62PACKAGE_EXTRA_ARCHS_tune-mipsel = "mipsel"
63
64TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard"
65BASE_LIB_tune-mips64el-n32 = "lib32"
66MIPSPKGSFX_VARIANT_tune-mips64el-n32 = "${TUNE_ARCH}"
67PACKAGE_EXTRA_ARCHS_tune-mips64el-n32 = "mips64el-n32"
68
69TUNE_FEATURES_tune-mips64el = "n64 fpu-hard"
70BASE_LIB_tune-mips64el = "lib64"
71MIPSPKGSFX_VARIANT_tune-mips64el = "${TUNE_ARCH}"
72PACKAGE_EXTRA_ARCHS_tune-mips64el = "mips64el"
73
74TUNE_FEATURES_tune-mips-nf = "o32 bigendian"
75BASE_LIB_tune-mips-nf = "lib"
76MIPSPKGSFX_VARIANT_tune-mips-nf = "${TUNE_ARCH}"
77PACKAGE_EXTRA_ARCHS_tune-mips-nf = "mips-nf"
78
79TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian"
80BASE_LIB_tune-mips64-nf-n32 = "lib32"
81MIPSPKGSFX_VARIANT_tune-mips64-nf-n32 = "${TUNE_ARCH}"
82PACKAGE_EXTRA_ARCHS_tune-mips64-nf-n32 = "mips64-nf-n32"
83
84TUNE_FEATURES_tune-mips64-nf = "n64 bigendian"
85BASE_LIB_tune-mips64-nf = "lib64"
86MIPSPKGSFX_VARIANT_tune-mips64-nf = "${TUNE_ARCH}"
87PACKAGE_EXTRA_ARCHS_tune-mips64-nf = "mips64-nf"
88
89TUNE_FEATURES_tune-mipsel-nf = "o32"
90BASE_LIB_tune-mipsel-nf = "lib"
91MIPSPKGSFX_VARIANT_tune-mipsel-nf = "${TUNE_ARCH}"
92PACKAGE_EXTRA_ARCHS_tune-mipsel-nf = "mipsel-nf"
93
94TUNE_FEATURES_tune-mips64el-nf-n32 = "n32"
95BASE_LIB_tune-mips64el-nf-n32 = "lib32"
96MIPSPKGSFX_VARIANT_tune-mips64el-nf-n32 = "${TUNE_ARCH}"
97PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-n32 = "mips64el-nf-n32"
98
99TUNE_FEATURES_tune-mips64el-nf = "n64"
100BASE_LIB_tune-mips64el-nf = "lib64"
101MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}"
102PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf"