aboutsummaryrefslogtreecommitdiff
blob: 4c4af0c56acfa43552adecf56f3ceabccf6291e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
import catalyst.arch

class generic_mips(catalyst.arch.generic_arch):
	"Abstract base class for all mips builders [Big-endian]"
	def __init__(self,myspec):
		catalyst.arch.generic_arch.__init__(self,myspec)
		self.settings["CHROOT"]="chroot"
		self.settings["CHOST"]="mips-unknown-linux-gnu"

class generic_mipsel(catalyst.arch.generic_arch):
	"Abstract base class for all mipsel builders [Little-endian]"
	def __init__(self,myspec):
		catalyst.arch.generic_arch.__init__(self,myspec)
		self.settings["CHROOT"]="chroot"
		self.settings["CHOST"]="mipsel-unknown-linux-gnu"

class generic_mips64(catalyst.arch.generic_arch):
	"Abstract base class for all mips64 builders [Big-endian]"
	def __init__(self,myspec):
		catalyst.arch.generic_arch.__init__(self,myspec)
		self.settings["CHROOT"]="chroot"
		self.settings["CHOST"]="mips64-unknown-linux-gnu"

class generic_mips64el(catalyst.arch.generic_arch):
	"Abstract base class for all mips64el builders [Little-endian]"
	def __init__(self,myspec):
		catalyst.arch.generic_arch.__init__(self,myspec)
		self.settings["CHROOT"]="chroot"
		self.settings["CHOST"]="mips64el-unknown-linux-gnu"

class generic_multilib(catalyst.arch.generic_arch):
	"Abstract base class for MIPS multilib"
	def __init__(self,myspec):
		catalyst.arch.generic_arch.__init__(self,myspec)
		self.settings["HOSTUSE"]=["multilib"]

class arch_mips1(generic_mips):
	"Builder class for MIPS I [Big-endian]"
	def __init__(self,myspec):
		generic_mips.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips1 -mabi=32 -pipe"

class arch_mips3(generic_mips):
	"Builder class for MIPS III [Big-endian]"
	def __init__(self,myspec):
		generic_mips.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -mabi=32 -pipe"

class arch_mips3_n32(generic_mips64):
	"Builder class for MIPS III [Big-endian N32]"
	def __init__(self,myspec):
		generic_mips64.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -mabi=n32 -pipe"

class arch_mips3_n64(generic_mips64):
	"Builder class for MIPS III [Big-endian N64]"
	def __init__(self,myspec):
		generic_mips64.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -mabi=64 -pipe"

class arch_mips3_multilib(generic_mips64,generic_multilib):
	"Builder class for MIPS III [Big-endian multilib]"
	def __init__(self,myspec):
		generic_mips64.__init__(self,myspec)
		generic_multilib.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -pipe"

class arch_mips4(generic_mips64):
	"Builder class for MIPS IV [Big-endian]"
	def __init__(self,myspec):
		generic_mips64.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -mabi=32 -pipe"

class arch_mips4_n32(generic_mips64):
	"Builder class for MIPS IV [Big-endian N32]"
	def __init__(self,myspec):
		generic_mips64.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -mabi=n32 -pipe"

class arch_mips4_n64(generic_mips64):
	"Builder class for MIPS IV [Big-endian N64]"
	def __init__(self,myspec):
		generic_mips64.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -mabi=64 -pipe"

class arch_mips4_multilib(generic_mips64,generic_multilib):
	"Builder class for MIPS IV [Big-endian multilib]"
	def __init__(self,myspec):
		generic_mips64.__init__(self,myspec)
		generic_multilib.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -pipe"

class arch_mipsel1(generic_mipsel):
	"Builder class for all MIPS I [Little-endian]"
	def __init__(self,myspec):
		generic_mipsel.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips1 -mabi=32 -pipe"

class arch_mipsel3(generic_mipsel):
	"Builder class for all MIPS III [Little-endian]"
	def __init__(self,myspec):
		generic_mipsel.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -mabi=32 -pipe"

class arch_mipsel3_n32(generic_mips64el):
	"Builder class for all MIPS III [Little-endian N32]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -mabi=n32 -pipe"

class arch_mipsel3_n64(generic_mips64el):
	"Builder class for MIPS III [Little-endian N64]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -mabi=64 -pipe"

class arch_mipsel3_multilib(generic_mips64el,generic_multilib):
	"Builder class for MIPS III [Little-endian multilib]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		generic_multilib.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips3 -pipe"

class arch_loongson2e(generic_mipsel):
	"Builder class for all Loongson 2E [Little-endian]"
	def __init__(self,myspec):
		generic_mipsel.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -march=loongson2e -mabi=32 -pipe -mplt"

class arch_loongson2e_n32(generic_mips64el):
	"Builder class for all Loongson 2E [Little-endian N32]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -march=loongson2e -mabi=n32 -pipe -mplt"

class arch_loongson2f(generic_mipsel):
	"Builder class for all Loongson 2F [Little-endian]"
	def __init__(self,myspec):
		generic_mipsel.__init__(self,myspec)
		self.settings["CFLAGS"]="-O3 -march=loongson2f -mabi=32 -pipe -mplt -Wa,-mfix-loongson2f-nop"

class arch_loongson2f_n32(generic_mips64el):
	"Builder class for all Loongson 2F [Little-endian N32]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O3 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop"

class arch_mipsel4(generic_mips64el):
	"Builder class for all MIPS IV [Little-endian]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -mabi=32 -pipe"

class arch_mipsel4_n32(generic_mips64el):
	"Builder class for all MIPS IV [Little-endian N32]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -mabi=n32 -pipe"

class arch_mipsel4_n64(generic_mips64el):
	"Builder class for MIPS IV [Little-endian N64]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -mabi=64 -pipe"

class arch_mipsel4_multilib(generic_mips64el,generic_multilib):
	"Builder class for MIPS IV [Little-endian multilib]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		generic_multilib.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -mips4 -pipe"

class arch_cobalt(generic_mipsel):
	"Builder class for all cobalt [Little-endian]"
	def __init__(self,myspec):
		generic_mipsel.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -march=r5000 -mabi=32 -pipe"
		self.settings["HOSTUSE"]=["cobalt"]

class arch_cobalt_n32(generic_mips64el):
	"Builder class for all cobalt [Little-endian N32]"
	def __init__(self,myspec):
		generic_mips64el.__init__(self,myspec)
		self.settings["CFLAGS"]="-O2 -march=r5000 -mabi=n32 -pipe"
		self.settings["HOSTUSE"]=["cobalt"]

_subarch_map = {
	"cobalt"		: arch_cobalt,
	"cobalt_n32"	: arch_cobalt_n32,
	"mips"			: arch_mips1,
	"mips1"			: arch_mips1,
	"mips3"			: arch_mips3,
	"mips3_n32"		: arch_mips3_n32,
	"mips3_n64"		: arch_mips3_n64,
	"mips3_multilib": arch_mips3_multilib,
	"mips4"			: arch_mips4,
	"mips4_n32"		: arch_mips4_n32,
	"mips4_n64"		: arch_mips4_n64,
	"mips4_multilib": arch_mips4_multilib,
	"mipsel"		: arch_mipsel1,
	"mipsel1"		: arch_mipsel1,
	"mipsel3"		: arch_mipsel3,
	"mipsel3_n32"	: arch_mipsel3_n32,
	"mipsel3_n64"	: arch_mipsel3_n64,
	"mipsel3_multilib"	: arch_mipsel3_multilib,
	"mipsel4"		: arch_mipsel4,
	"mipsel4_n32"	: arch_mipsel4_n32,
	"mipsel4_n64"	: arch_mipsel4_n64,
	"mipsel4_multilib"	: arch_mipsel4_multilib,
	"loongson2e"		: arch_loongson2e,
	"loongson2e_n32"	: arch_loongson2e_n32,
	"loongson2f"		: arch_loongson2f,
	"loongson2f_n32"	: arch_loongson2f_n32,
}

_machine_map = ("mips","mips64")

# vim: ts=4 sw=4 sta noet sts=4 ai