blob: df0a4593fadb5bc49c266e4bb1ddbfcfafa25276 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: GPL-2.0-only
3#
4
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005def machine_dict(d):
6# TARGET_OS TARGET_ARCH MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
7 machdata = {
8 "darwin9" : {
9 "arm" : (40, 0, 0, True, 32),
10 },
11 "eabi" : {
12 "arm" : (40, 0, 0, True, 32),
13 },
14 "elf" : {
15 "aarch64" : (183, 0, 0, True, 64),
16 "aarch64_be" :(183, 0, 0, False, 64),
17 "i586" : (3, 0, 0, True, 32),
Andrew Geissler82c905d2020-04-13 13:39:40 -050018 "i686" : (3, 0, 0, True, 32),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019 "x86_64": (62, 0, 0, True, 64),
20 "epiphany": (4643, 0, 0, True, 32),
21 "lm32": (138, 0, 0, False, 32),
22 "mips": ( 8, 0, 0, False, 32),
23 "mipsel": ( 8, 0, 0, True, 32),
24 "microblaze": (189, 0, 0, False, 32),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025 "microblazeel":(189, 0, 0, True, 32),
26 "powerpc": (20, 0, 0, False, 32),
27 "riscv32": (243, 0, 0, True, 32),
28 "riscv64": (243, 0, 0, True, 64),
29 },
30 "linux" : {
31 "aarch64" : (183, 0, 0, True, 64),
32 "aarch64_be" :(183, 0, 0, False, 64),
33 "arm" : (40, 97, 0, True, 32),
34 "armeb": (40, 97, 0, False, 32),
35 "powerpc": (20, 0, 0, False, 32),
36 "powerpc64": (21, 0, 0, False, 64),
Andrew Geissler82c905d2020-04-13 13:39:40 -050037 "powerpc64le": (21, 0, 0, True, 64),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038 "i386": ( 3, 0, 0, True, 32),
39 "i486": ( 3, 0, 0, True, 32),
40 "i586": ( 3, 0, 0, True, 32),
41 "i686": ( 3, 0, 0, True, 32),
42 "x86_64": (62, 0, 0, True, 64),
43 "ia64": (50, 0, 0, True, 64),
44 "alpha": (36902, 0, 0, True, 64),
45 "hppa": (15, 3, 0, False, 32),
46 "m68k": ( 4, 0, 0, False, 32),
47 "mips": ( 8, 0, 0, False, 32),
48 "mipsel": ( 8, 0, 0, True, 32),
49 "mips64": ( 8, 0, 0, False, 64),
50 "mips64el": ( 8, 0, 0, True, 64),
51 "mipsisa32r6": ( 8, 0, 0, False, 32),
52 "mipsisa32r6el": ( 8, 0, 0, True, 32),
53 "mipsisa64r6": ( 8, 0, 0, False, 64),
54 "mipsisa64r6el": ( 8, 0, 0, True, 64),
55 "nios2": (113, 0, 0, True, 32),
56 "riscv32": (243, 0, 0, True, 32),
57 "riscv64": (243, 0, 0, True, 64),
58 "s390": (22, 0, 0, False, 32),
59 "sh4": (42, 0, 0, True, 32),
60 "sparc": ( 2, 0, 0, False, 32),
61 "microblaze": (189, 0, 0, False, 32),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080062 "microblazeel":(189, 0, 0, True, 32),
63 },
64 "linux-musl" : {
65 "aarch64" : (183, 0, 0, True, 64),
66 "aarch64_be" :(183, 0, 0, False, 64),
67 "arm" : ( 40, 97, 0, True, 32),
68 "armeb": ( 40, 97, 0, False, 32),
69 "powerpc": ( 20, 0, 0, False, 32),
Brad Bishop19323692019-04-05 15:28:33 -040070 "powerpc64": ( 21, 0, 0, False, 64),
Andrew Geissler82c905d2020-04-13 13:39:40 -050071 "powerpc64le": (21, 0, 0, True, 64),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080072 "i386": ( 3, 0, 0, True, 32),
73 "i486": ( 3, 0, 0, True, 32),
74 "i586": ( 3, 0, 0, True, 32),
75 "i686": ( 3, 0, 0, True, 32),
76 "x86_64": ( 62, 0, 0, True, 64),
77 "mips": ( 8, 0, 0, False, 32),
78 "mipsel": ( 8, 0, 0, True, 32),
79 "mips64": ( 8, 0, 0, False, 64),
80 "mips64el": ( 8, 0, 0, True, 64),
81 "microblaze": (189, 0, 0, False, 32),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080082 "microblazeel":(189, 0, 0, True, 32),
83 "riscv32": (243, 0, 0, True, 32),
84 "riscv64": (243, 0, 0, True, 64),
85 "sh4": ( 42, 0, 0, True, 32),
86 },
87 "uclinux-uclibc" : {
88 "bfin": ( 106, 0, 0, True, 32),
89 },
90 "linux-gnueabi" : {
91 "arm" : (40, 0, 0, True, 32),
92 "armeb" : (40, 0, 0, False, 32),
93 },
94 "linux-musleabi" : {
95 "arm" : (40, 0, 0, True, 32),
96 "armeb" : (40, 0, 0, False, 32),
97 },
98 "linux-gnuspe" : {
99 "powerpc": (20, 0, 0, False, 32),
100 },
101 "linux-muslspe" : {
102 "powerpc": (20, 0, 0, False, 32),
103 },
104 "linux-gnu" : {
105 "powerpc": (20, 0, 0, False, 32),
106 "sh4": (42, 0, 0, True, 32),
107 },
108 "linux-gnu_ilp32" : {
109 "aarch64" : (183, 0, 0, True, 32),
110 },
111 "linux-gnux32" : {
112 "x86_64": (62, 0, 0, True, 32),
113 },
114 "linux-muslx32" : {
115 "x86_64": (62, 0, 0, True, 32),
116 },
117 "linux-gnun32" : {
118 "mips64": ( 8, 0, 0, False, 32),
119 "mips64el": ( 8, 0, 0, True, 32),
120 "mipsisa64r6": ( 8, 0, 0, False, 32),
121 "mipsisa64r6el":( 8, 0, 0, True, 32),
122 },
123 }
124
125 # Add in any extra user supplied data which may come from a BSP layer, removing the
126 # need to always change this class directly
127 extra_machdata = (d and d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS" or None) or "").split()
128 for m in extra_machdata:
129 call = m + "(machdata, d)"
130 locs = { "machdata" : machdata, "d" : d}
131 machdata = bb.utils.better_eval(call, locs)
132
133 return machdata