Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |
| 7 | DEFAULTTUNE ?= "mips" |
| 8 | |
| 9 | # Endianess |
| 10 | TUNEVALID[bigendian] = "Enable big-endian mode" |
| 11 | TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -meb", " -mel", d)}" |
| 12 | |
| 13 | # ABI flags |
| 14 | TUNEVALID[o32] = "MIPS o32 ABI" |
| 15 | TUNECONFLICTS[o32] = "n32 n64" |
| 16 | TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "o32", " -mabi=32", "", d)}" |
| 17 | |
| 18 | TUNEVALID[n32] = "MIPS64 n32 ABI" |
| 19 | TUNECONFLICTS[n32] = "o32 n64" |
| 20 | ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "n32", "n32", "" ,d)}" |
| 21 | TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "n32", " -mabi=n32", "", d)}" |
| 22 | |
| 23 | TUNEVALID[n64] = "MIPS64 n64 ABI" |
| 24 | TUNECONFLICTS[n64] = "o32 n32" |
| 25 | TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "n64", " -mabi=64", "", d)}" |
| 26 | |
| 27 | # Floating point |
| 28 | TUNEVALID[fpu-hard] = "Use hardware FPU" |
| 29 | TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", " -mhard-float", " -msoft-float", d)}" |
| 30 | TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "", "soft", d)}" |
| 31 | |
| 32 | # Package naming |
| 33 | MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}" |
| 34 | MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "n64" , "64", "", d)}" |
| 35 | MIPSPKGSFX_BYTE .= "${@bb.utils.contains("TUNE_FEATURES", "n32" , "64", "", d)}" |
| 36 | MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}" |
| 37 | MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}" |
| 38 | |
| 39 | TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}" |
| 40 | TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}" |
| 41 | |
| 42 | # Base tunes |
| 43 | AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf" |
| 44 | TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard" |
| 45 | BASE_LIB_tune-mips = "lib" |
| 46 | MIPSPKGSFX_VARIANT_tune-mips = "${TUNE_ARCH}" |
| 47 | PACKAGE_EXTRA_ARCHS_tune-mips = "mips" |
| 48 | |
| 49 | TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard" |
| 50 | BASE_LIB_tune-mips64-n32 = "lib32" |
| 51 | MIPSPKGSFX_VARIANT_tune-mips64-n32 = "${TUNE_ARCH}" |
| 52 | PACKAGE_EXTRA_ARCHS_tune-mips64-n32 = "mips64-n32" |
| 53 | |
| 54 | TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard" |
| 55 | BASE_LIB_tune-mips64 = "lib64" |
| 56 | MIPSPKGSFX_VARIANT_tune-mips64 = "${TUNE_ARCH}" |
| 57 | PACKAGE_EXTRA_ARCHS_tune-mips64 = "mips64" |
| 58 | |
| 59 | TUNE_FEATURES_tune-mipsel = "o32 fpu-hard" |
| 60 | BASE_LIB_tune-mipsel = "lib" |
| 61 | MIPSPKGSFX_VARIANT_tune-mipsel = "${TUNE_ARCH}" |
| 62 | PACKAGE_EXTRA_ARCHS_tune-mipsel = "mipsel" |
| 63 | |
| 64 | TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard" |
| 65 | BASE_LIB_tune-mips64el-n32 = "lib32" |
| 66 | MIPSPKGSFX_VARIANT_tune-mips64el-n32 = "${TUNE_ARCH}" |
| 67 | PACKAGE_EXTRA_ARCHS_tune-mips64el-n32 = "mips64el-n32" |
| 68 | |
| 69 | TUNE_FEATURES_tune-mips64el = "n64 fpu-hard" |
| 70 | BASE_LIB_tune-mips64el = "lib64" |
| 71 | MIPSPKGSFX_VARIANT_tune-mips64el = "${TUNE_ARCH}" |
| 72 | PACKAGE_EXTRA_ARCHS_tune-mips64el = "mips64el" |
| 73 | |
| 74 | TUNE_FEATURES_tune-mips-nf = "o32 bigendian" |
| 75 | BASE_LIB_tune-mips-nf = "lib" |
| 76 | MIPSPKGSFX_VARIANT_tune-mips-nf = "${TUNE_ARCH}" |
| 77 | PACKAGE_EXTRA_ARCHS_tune-mips-nf = "mips-nf" |
| 78 | |
| 79 | TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian" |
| 80 | BASE_LIB_tune-mips64-nf-n32 = "lib32" |
| 81 | MIPSPKGSFX_VARIANT_tune-mips64-nf-n32 = "${TUNE_ARCH}" |
| 82 | PACKAGE_EXTRA_ARCHS_tune-mips64-nf-n32 = "mips64-nf-n32" |
| 83 | |
| 84 | TUNE_FEATURES_tune-mips64-nf = "n64 bigendian" |
| 85 | BASE_LIB_tune-mips64-nf = "lib64" |
| 86 | MIPSPKGSFX_VARIANT_tune-mips64-nf = "${TUNE_ARCH}" |
| 87 | PACKAGE_EXTRA_ARCHS_tune-mips64-nf = "mips64-nf" |
| 88 | |
| 89 | TUNE_FEATURES_tune-mipsel-nf = "o32" |
| 90 | BASE_LIB_tune-mipsel-nf = "lib" |
| 91 | MIPSPKGSFX_VARIANT_tune-mipsel-nf = "${TUNE_ARCH}" |
| 92 | PACKAGE_EXTRA_ARCHS_tune-mipsel-nf = "mipsel-nf" |
| 93 | |
| 94 | TUNE_FEATURES_tune-mips64el-nf-n32 = "n32" |
| 95 | BASE_LIB_tune-mips64el-nf-n32 = "lib32" |
| 96 | MIPSPKGSFX_VARIANT_tune-mips64el-nf-n32 = "${TUNE_ARCH}" |
| 97 | PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-n32 = "mips64el-nf-n32" |
| 98 | |
| 99 | TUNE_FEATURES_tune-mips64el-nf = "n64" |
| 100 | BASE_LIB_tune-mips64el-nf = "lib64" |
| 101 | MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}" |
| 102 | PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf" |