1 # Target definition: architecture, optimisations, etc...
8 # Pre-declare target optimisation variables
9 config ARCH_SUPPORTS_BOTH_MMU
10 config ARCH_SUPPORTS_BOTH_ENDIAN
11 config ARCH_SUPPORTS_32
12 config ARCH_SUPPORTS_64
13 config ARCH_SUPPORTS_WITH_ARCH
14 config ARCH_SUPPORTS_WITH_ABI
15 config ARCH_SUPPORTS_WITH_CPU
16 config ARCH_SUPPORTS_WITH_TUNE
17 config ARCH_SUPPORTS_WITH_FLOAT
18 config ARCH_SUPPORTS_WITH_FPU
19 config ARCH_SUPPORTS_SOFTFP
21 config ARCH_DEFAULT_HAS_MMU
22 config ARCH_DEFAULT_BE
23 config ARCH_DEFAULT_LE
24 config ARCH_DEFAULT_32
25 config ARCH_DEFAULT_64
42 source "config.gen/arch.in"
44 #--------------------------------------
45 comment "Generic target options"
47 #--------------------------------------
50 prompt "Build a multilib toolchain (EXPERIMENTAL)"
51 depends on EXPERIMENTAL
53 If you say 'y' here, then the toolchain will also contain the C library
54 optimised for some variants of the selected architecture, besides the
57 This means the build time of the C library will be in O(nb_variants).
59 The list of variants is dependent on the architecture, and is hard-coded
60 in gcc, so it is not possible to say what variants to support, only
61 whether hard-coded variants should be supported or not.
63 #--------------------------------------
64 config ARCH_SUPPORTS_BOTH_MMU
67 config ARCH_DEFAULT_HAS_MMU
72 prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
73 default y if ARCH_DEFAULT_HAS_MMU
75 If your architecture has an MMU and you want to use it,
78 OTOH, if you don't want to use the MMU, or your arch
79 lacks an MMU, say 'N' here.
81 Note that some architectures (eg. ARM) has variants that
82 lacks an MMU (eg. ARM Cortex-M3), while other variants
83 have one (eg. ARM Cortex-A8).
85 #--------------------------------------
86 config ARCH_SUPPORTS_BOTH_ENDIAN
89 config ARCH_DEFAULT_BE
92 config ARCH_DEFAULT_LE
98 depends on ARCH_SUPPORTS_BOTH_ENDIAN
99 default ARCH_BE if ARCH_DEFAULT_BE
100 default ARCH_LE if ARCH_DEFAULT_LE
108 prompt "Little endian"
114 depends on ARCH_SUPPORTS_BOTH_ENDIAN
115 default "big" if ARCH_BE
116 default "little" if ARCH_LE
118 #--------------------------------------
119 config ARCH_SUPPORTS_32
122 config ARCH_SUPPORTS_64
125 config ARCH_DEFAULT_32
128 config ARCH_DEFAULT_64
133 default "32" if ARCH_32
134 default "64" if ARCH_64
139 default ARCH_32 if ARCH_DEFAULT_32
140 default ARCH_64 if ARCH_DEFAULT_64
145 depends on ARCH_SUPPORTS_32
150 depends on ARCH_SUPPORTS_64
154 #--------------------------------------
155 comment "Target optimisations"
157 config ARCH_SUPPORTS_WITH_ARCH
160 config ARCH_SUPPORTS_WITH_ABI
163 config ARCH_SUPPORTS_WITH_CPU
166 config ARCH_SUPPORTS_WITH_TUNE
169 config ARCH_SUPPORTS_WITH_FLOAT
172 config ARCH_SUPPORTS_WITH_FPU
175 config ARCH_SUPPORTS_SOFTFP
180 prompt "Architecture level"
181 depends on ARCH_SUPPORTS_WITH_ARCH
184 GCC uses this name to determine what kind of instructions it can emit
185 when generating assembly code. This option can be used in conjunction
186 with or instead of the ARCH_CPU option (above), or a (command-line)
189 This is the configuration flag --with-arch=XXXX, and the runtime flag
192 Pick a value from the gcc manual for your choosen gcc version and your
195 Leave blank if you don't know, or if your target architecture does not
200 prompt "Generate code for the specific ABI"
201 depends on ARCH_SUPPORTS_WITH_ABI
204 Generate code for the given ABI.
206 This is the configuration flag --with-abi=XXXX, and the runtime flag
209 Pick a value from the gcc manual for your choosen gcc version and your
212 Leave blank if you don't know, or if your target architecture does not
217 prompt "Emit assembly for CPU"
218 depends on ARCH_SUPPORTS_WITH_CPU
221 This specifies the name of the target processor. GCC uses this name
222 to determine what kind of instructions it can emit when generating
225 This is the configuration flag --with-cpu=XXXX, and the runtime flag
228 Pick a value from the gcc manual for your choosen gcc version and your
231 Leave blank if you don't know, or if your target architecture does not
236 prompt "Tune for CPU"
237 depends on ARCH_SUPPORTS_WITH_TUNE
240 This option is very similar to the ARCH_CPU option (above), except
241 that instead of specifying the actual target processor type, and hence
242 restricting which instructions can be used, it specifies that GCC should
243 tune the performance of the code as if the target were of the type
244 specified in this option, but still choosing the instructions that it
245 will generate based on the cpu specified by the ARCH_CPU option
246 (above), or a (command-line) -mcpu= option.
248 This is the configuration flag --with-tune=XXXX, and the runtime flag
251 Pick a value from the gcc manual for your choosen gcc version and your
254 Leave blank if you don't know, or if your target architecture does not
259 prompt "Use specific FPU"
260 depends on ARCH_SUPPORTS_WITH_FPU
263 On some targets (eg. ARM), you can specify the kind of FPU to emit
266 This is the configuration flag --with-fpu=XXX, and the runtime flag
269 See below wether to actually emit FP opcodes, or to emulate them.
271 Pick a value from the gcc manual for your choosen gcc version and your
274 Leave blank if you don't know, or if your target architecture does not
279 prompt "Floating point:"
280 depends on ARCH_SUPPORTS_WITH_FLOAT
284 prompt "hardware (FPU)"
286 Emit hardware floating point opcodes.
288 If you've got a processor with a FPU, then you want that.
289 If your hardware has no FPU, you still can use HW floating point, but
290 need to compile support for FPU emulation in your kernel. Needless to
291 say that emulating the FPU is /slooowwwww/...
293 One situation you'd want HW floating point without a FPU is if you get
294 binary blobs from different vendors that are compiling this way and
295 can't (don't wan't to) change.
301 Do not emit any hardware floating point opcode.
303 If your processor has no FPU, then you most probably want this, as it
304 is faster than emulating the FPU in the kernel.
306 config ARCH_FLOAT_SOFTFP
309 depends on ARCH_SUPPORTS_SOFTFP
311 Emit hardware floating point opcodes but use the software
312 floating point calling convention.
314 Architectures such as ARM use different registers for passing
315 floating point values depending on if they're in software mode
316 or hardware mode. softfp emits FPU instructions but uses the
317 software FP calling convention allowing softfp code to
318 interoperate with legacy software only code.
320 If in doubt, use 'software' or 'hardware' mode instead.
326 prompt "Target CFLAGS"
329 Used to add specific options when compiling libraries of the toolchain,
330 that will run on the target (eg. libc.so).
332 Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
333 automatically used. You don't need to specify them here.
335 Leave blank if you don't know better.
337 config TARGET_LDFLAGS
339 prompt "Target LDFLAGS"
342 Used to add specific options when linking libraries of the toolchain,
343 that will run on your target.
345 Leave blank if you don't know better.
349 default "" if ! ARCH_SUPPORTS_WITH_FLOAT
350 default "hard" if ARCH_FLOAT_HW
351 default "soft" if ARCH_FLOAT_SW
352 default "softfp" if ARCH_FLOAT_SOFTFP
354 source "config.gen/arch.in.2"