Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # |
| 2 | # X86 Architecture definition (IA32, X86_64, and X32) |
| 3 | # |
| 4 | |
| 5 | DEFAULTTUNE ?= "x86" |
| 6 | TARGET_FPU ?= "" |
| 7 | X86ARCH32 ?= "i586" |
| 8 | X86ARCH64 ?= "x86_64" |
| 9 | |
| 10 | TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}" |
| 11 | |
| 12 | # ELF32 ABI |
| 13 | TUNEVALID[m32] = "IA32 ELF32 standard ABI" |
| 14 | TUNECONFLICTS[m32] = "m64 mx32" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 15 | TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${X86ARCH32}', '' ,d)}" |
| 16 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', ' -m32', '', d)}" |
| 17 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '' ,d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
| 19 | # x32 ABI |
| 20 | TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI" |
| 21 | TUNECONFLICTS[mx32] = "m64 m32" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 22 | TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '${X86ARCH64}', '' ,d)}" |
| 23 | ABIEXTENSION .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x32', '' ,d)}" |
| 24 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', ' -mx32', '', d)}" |
| 25 | TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64', '', d)}" |
| 26 | TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}" |
| 27 | # user mode qemu doesn't support x32 |
| 28 | MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 29 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '' ,d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | |
| 31 | # ELF64 ABI |
| 32 | TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI" |
| 33 | TUNECONFLICTS[m64] = "m32 mx32" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 34 | TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', '${X86ARCH64}', '' ,d)}" |
| 35 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', ' -m64', '', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | |
| 37 | # Default Tune configurations |
| 38 | AVAILTUNES += "x86" |
| 39 | TUNE_FEATURES_tune-x86 = "m32" |
| 40 | BASE_LIB_tune-x86 = "lib" |
| 41 | TUNE_PKGARCH_tune-x86 = "x86" |
| 42 | PACKAGE_EXTRA_ARCHS_tune-x86 = "${TUNE_PKGARCH_tune-x86}" |
| 43 | |
| 44 | AVAILTUNES += "x86-64" |
| 45 | TUNE_FEATURES_tune-x86-64 = "m64" |
| 46 | BASE_LIB_tune-x86-64 = "lib64" |
| 47 | TUNE_PKGARCH_tune-x86-64 = "x86_64" |
| 48 | PACKAGE_EXTRA_ARCHS_tune-x86-64 = "${TUNE_PKGARCH_tune-x86-64}" |
| 49 | |
| 50 | AVAILTUNES += "x86-64-x32" |
| 51 | TUNE_FEATURES_tune-x86-64-x32 = "mx32" |
| 52 | BASE_LIB_tune-x86-64-x32 = "libx32" |
| 53 | TUNE_PKGARCH_tune-x86-64-x32 = "x86_64_x32" |
| 54 | PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "${TUNE_PKGARCH_tune-x86-64-x32}" |