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