blob: 46c884a7758b97b4fd832fa0debb224e0f5e6b92 [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 },
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050064 "linux-android" : {
65 "aarch64" : (183, 0, 0, True, 64),
66 "i686": ( 3, 0, 0, True, 32),
67 "x86_64": (62, 0, 0, True, 64),
68 },
69 "linux-androideabi" : {
70 "arm" : (40, 97, 0, True, 32),
71 },
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080072 "linux-musl" : {
73 "aarch64" : (183, 0, 0, True, 64),
74 "aarch64_be" :(183, 0, 0, False, 64),
75 "arm" : ( 40, 97, 0, True, 32),
76 "armeb": ( 40, 97, 0, False, 32),
77 "powerpc": ( 20, 0, 0, False, 32),
Brad Bishop19323692019-04-05 15:28:33 -040078 "powerpc64": ( 21, 0, 0, False, 64),
Andrew Geissler82c905d2020-04-13 13:39:40 -050079 "powerpc64le": (21, 0, 0, True, 64),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080080 "i386": ( 3, 0, 0, True, 32),
81 "i486": ( 3, 0, 0, True, 32),
82 "i586": ( 3, 0, 0, True, 32),
83 "i686": ( 3, 0, 0, True, 32),
84 "x86_64": ( 62, 0, 0, True, 64),
85 "mips": ( 8, 0, 0, False, 32),
86 "mipsel": ( 8, 0, 0, True, 32),
87 "mips64": ( 8, 0, 0, False, 64),
88 "mips64el": ( 8, 0, 0, True, 64),
89 "microblaze": (189, 0, 0, False, 32),
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080090 "microblazeel":(189, 0, 0, True, 32),
91 "riscv32": (243, 0, 0, True, 32),
92 "riscv64": (243, 0, 0, True, 64),
93 "sh4": ( 42, 0, 0, True, 32),
94 },
95 "uclinux-uclibc" : {
96 "bfin": ( 106, 0, 0, True, 32),
97 },
98 "linux-gnueabi" : {
99 "arm" : (40, 0, 0, True, 32),
100 "armeb" : (40, 0, 0, False, 32),
101 },
102 "linux-musleabi" : {
103 "arm" : (40, 0, 0, True, 32),
104 "armeb" : (40, 0, 0, False, 32),
105 },
106 "linux-gnuspe" : {
107 "powerpc": (20, 0, 0, False, 32),
108 },
109 "linux-muslspe" : {
110 "powerpc": (20, 0, 0, False, 32),
111 },
112 "linux-gnu" : {
113 "powerpc": (20, 0, 0, False, 32),
114 "sh4": (42, 0, 0, True, 32),
115 },
116 "linux-gnu_ilp32" : {
117 "aarch64" : (183, 0, 0, True, 32),
118 },
119 "linux-gnux32" : {
120 "x86_64": (62, 0, 0, True, 32),
121 },
122 "linux-muslx32" : {
123 "x86_64": (62, 0, 0, True, 32),
124 },
125 "linux-gnun32" : {
126 "mips64": ( 8, 0, 0, False, 32),
127 "mips64el": ( 8, 0, 0, True, 32),
128 "mipsisa64r6": ( 8, 0, 0, False, 32),
129 "mipsisa64r6el":( 8, 0, 0, True, 32),
130 },
131 }
132
133 # Add in any extra user supplied data which may come from a BSP layer, removing the
134 # need to always change this class directly
135 extra_machdata = (d and d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS" or None) or "").split()
136 for m in extra_machdata:
137 call = m + "(machdata, d)"
138 locs = { "machdata" : machdata, "d" : d}
139 machdata = bb.utils.better_eval(call, locs)
140
141 return machdata