blob: 4cc9a9a09720cfbc2dc4842b34170f4021a9708c [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),
Brad Bishop19323692019-04-05 15:28:33 -040066 "powerpc64": ( 21, 0, 0, False, 64),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080067 "i386": ( 3, 0, 0, True, 32),
68 "i486": ( 3, 0, 0, True, 32),
69 "i586": ( 3, 0, 0, True, 32),
70 "i686": ( 3, 0, 0, True, 32),
71 "x86_64": ( 62, 0, 0, True, 64),
72 "mips": ( 8, 0, 0, False, 32),
73 "mipsel": ( 8, 0, 0, True, 32),
74 "mips64": ( 8, 0, 0, False, 64),
75 "mips64el": ( 8, 0, 0, True, 64),
76 "microblaze": (189, 0, 0, False, 32),
77 "microblazeeb":(189, 0, 0, False, 32),
78 "microblazeel":(189, 0, 0, True, 32),
79 "riscv32": (243, 0, 0, True, 32),
80 "riscv64": (243, 0, 0, True, 64),
81 "sh4": ( 42, 0, 0, True, 32),
82 },
83 "uclinux-uclibc" : {
84 "bfin": ( 106, 0, 0, True, 32),
85 },
86 "linux-gnueabi" : {
87 "arm" : (40, 0, 0, True, 32),
88 "armeb" : (40, 0, 0, False, 32),
89 },
90 "linux-musleabi" : {
91 "arm" : (40, 0, 0, True, 32),
92 "armeb" : (40, 0, 0, False, 32),
93 },
94 "linux-gnuspe" : {
95 "powerpc": (20, 0, 0, False, 32),
96 },
97 "linux-muslspe" : {
98 "powerpc": (20, 0, 0, False, 32),
99 },
100 "linux-gnu" : {
101 "powerpc": (20, 0, 0, False, 32),
102 "sh4": (42, 0, 0, True, 32),
103 },
104 "linux-gnu_ilp32" : {
105 "aarch64" : (183, 0, 0, True, 32),
106 },
107 "linux-gnux32" : {
108 "x86_64": (62, 0, 0, True, 32),
109 },
110 "linux-muslx32" : {
111 "x86_64": (62, 0, 0, True, 32),
112 },
113 "linux-gnun32" : {
114 "mips64": ( 8, 0, 0, False, 32),
115 "mips64el": ( 8, 0, 0, True, 32),
116 "mipsisa64r6": ( 8, 0, 0, False, 32),
117 "mipsisa64r6el":( 8, 0, 0, True, 32),
118 },
119 }
120
121 # Add in any extra user supplied data which may come from a BSP layer, removing the
122 # need to always change this class directly
123 extra_machdata = (d and d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS" or None) or "").split()
124 for m in extra_machdata:
125 call = m + "(machdata, d)"
126 locs = { "machdata" : machdata, "d" : d}
127 machdata = bb.utils.better_eval(call, locs)
128
129 return machdata