blob: 2edb360b7d9a70b5839ed11bc9df361ecb45c38c [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# X86 Architecture definition (IA32, X86_64, and X32)
3#
4
5DEFAULTTUNE ?= "x86"
6TARGET_FPU ?= ""
7X86ARCH32 ?= "i586"
8X86ARCH64 ?= "x86_64"
9
10TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
11
12# ELF32 ABI
13TUNEVALID[m32] = "IA32 ELF32 standard ABI"
14TUNECONFLICTS[m32] = "m64 mx32"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050015TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${X86ARCH32}', '', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050016TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', ' -m32', '', d)}"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050017MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
19# x32 ABI
20TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
21TUNECONFLICTS[mx32] = "m64 m32"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050022TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '${X86ARCH64}', '', d)}"
23ABIEXTENSION .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x32', '', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050024TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', ' -mx32', '', d)}"
25TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64', '', d)}"
26TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}"
27# user mode qemu doesn't support x32
28MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050029MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030
31# ELF64 ABI
32TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
33TUNECONFLICTS[m64] = "m32 mx32"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050034TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', '${X86ARCH64}', '', d)}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050035TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', ' -m64', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036
37# Default Tune configurations
38AVAILTUNES += "x86"
39TUNE_FEATURES_tune-x86 = "m32"
40BASE_LIB_tune-x86 = "lib"
41TUNE_PKGARCH_tune-x86 = "x86"
42PACKAGE_EXTRA_ARCHS_tune-x86 = "${TUNE_PKGARCH_tune-x86}"
43
44AVAILTUNES += "x86-64"
45TUNE_FEATURES_tune-x86-64 = "m64"
46BASE_LIB_tune-x86-64 = "lib64"
47TUNE_PKGARCH_tune-x86-64 = "x86_64"
48PACKAGE_EXTRA_ARCHS_tune-x86-64 = "${TUNE_PKGARCH_tune-x86-64}"
49
50AVAILTUNES += "x86-64-x32"
51TUNE_FEATURES_tune-x86-64-x32 = "mx32"
52BASE_LIB_tune-x86-64-x32 = "libx32"
53TUNE_PKGARCH_tune-x86-64-x32 = "x86_64_x32"
54PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "${TUNE_PKGARCH_tune-x86-64-x32}"