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 (READ HELP!!!)"
52 If you say 'y' here, then the toolchain will also contain the C library
53 optimised for some variants of the selected architecture, besides the
56 This means the build time of the C library will be in O(nb_variants).
58 The list of variants is dependent on the architecture, and is hard-coded
59 in gcc, so it is not possible to say what variants to support, only
60 whether hard-coded variants should be supported or not.
62 NOTE: The multilib feature in crosstool-NG is not well-tested.
63 Use at your own risk, and report success and/or failure.
65 #--------------------------------------
66 config ARCH_SUPPORTS_BOTH_MMU
69 config ARCH_DEFAULT_HAS_MMU
74 prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
75 default y if ARCH_DEFAULT_HAS_MMU
77 If your architecture has an MMU and you want to use it,
80 OTOH, if you don't want to use the MMU, or your arch
81 lacks an MMU, say 'N' here.
83 Note that some architectures (eg. ARM) has variants that
84 lacks an MMU (eg. ARM Cortex-M3), while other variants
85 have one (eg. ARM Cortex-A8).
87 #--------------------------------------
88 config ARCH_SUPPORTS_BOTH_ENDIAN
91 config ARCH_DEFAULT_BE
94 config ARCH_DEFAULT_LE
100 depends on ARCH_SUPPORTS_BOTH_ENDIAN
101 default ARCH_BE if ARCH_DEFAULT_BE
102 default ARCH_LE if ARCH_DEFAULT_LE
110 prompt "Little endian"
116 depends on ARCH_SUPPORTS_BOTH_ENDIAN
117 default "big" if ARCH_BE
118 default "little" if ARCH_LE
120 #--------------------------------------
121 config ARCH_SUPPORTS_32
124 config ARCH_SUPPORTS_64
127 config ARCH_DEFAULT_32
130 config ARCH_DEFAULT_64
135 default "32" if ARCH_32
136 default "64" if ARCH_64
141 default ARCH_32 if ARCH_DEFAULT_32
142 default ARCH_64 if ARCH_DEFAULT_64
147 depends on ARCH_SUPPORTS_32
152 depends on ARCH_SUPPORTS_64
156 #--------------------------------------
157 comment "Target optimisations"
159 config ARCH_SUPPORTS_WITH_ARCH
162 config ARCH_SUPPORTS_WITH_ABI
165 config ARCH_SUPPORTS_WITH_CPU
168 config ARCH_SUPPORTS_WITH_TUNE
171 config ARCH_SUPPORTS_WITH_FLOAT
174 config ARCH_SUPPORTS_WITH_FPU
177 config ARCH_SUPPORTS_SOFTFP
182 prompt "Architecture level"
183 depends on ARCH_SUPPORTS_WITH_ARCH
186 GCC uses this name to determine what kind of instructions it can emit
187 when generating assembly code. This option can be used in conjunction
188 with or instead of the ARCH_CPU option (above), or a (command-line)
191 This is the configuration flag --with-arch=XXXX, and the runtime flag
194 Pick a value from the gcc manual for your choosen gcc version and your
197 Leave blank if you don't know, or if your target architecture does not
202 prompt "Generate code for the specific ABI"
203 depends on ARCH_SUPPORTS_WITH_ABI
206 Generate code for the given ABI.
208 This is the configuration flag --with-abi=XXXX, and the runtime flag
211 Pick a value from the gcc manual for your choosen gcc version and your
214 Leave blank if you don't know, or if your target architecture does not
219 prompt "Emit assembly for CPU"
220 depends on ARCH_SUPPORTS_WITH_CPU
223 This specifies the name of the target processor. GCC uses this name
224 to determine what kind of instructions it can emit when generating
227 This is the configuration flag --with-cpu=XXXX, and the runtime flag
230 Pick a value from the gcc manual for your choosen gcc version and your
233 Leave blank if you don't know, or if your target architecture does not
238 prompt "Tune for CPU"
239 depends on ARCH_SUPPORTS_WITH_TUNE
242 This option is very similar to the ARCH_CPU option (above), except
243 that instead of specifying the actual target processor type, and hence
244 restricting which instructions can be used, it specifies that GCC should
245 tune the performance of the code as if the target were of the type
246 specified in this option, but still choosing the instructions that it
247 will generate based on the cpu specified by the ARCH_CPU option
248 (above), or a (command-line) -mcpu= option.
250 This is the configuration flag --with-tune=XXXX, and the runtime flag
253 Pick a value from the gcc manual for your choosen gcc version and your
256 Leave blank if you don't know, or if your target architecture does not
261 prompt "Use specific FPU"
262 depends on ARCH_SUPPORTS_WITH_FPU
265 On some targets (eg. ARM), you can specify the kind of FPU to emit
268 This is the configuration flag --with-fpu=XXX, and the runtime flag
271 See below wether to actually emit FP opcodes, or to emulate them.
273 Pick a value from the gcc manual for your choosen gcc version and your
276 Leave blank if you don't know, or if your target architecture does not
281 prompt "Floating point:"
282 depends on ARCH_SUPPORTS_WITH_FLOAT
286 prompt "hardware (FPU)"
288 Emit hardware floating point opcodes.
290 If you've got a processor with a FPU, then you want that.
291 If your hardware has no FPU, you still can use HW floating point, but
292 need to compile support for FPU emulation in your kernel. Needless to
293 say that emulating the FPU is /slooowwwww/...
295 One situation you'd want HW floating point without a FPU is if you get
296 binary blobs from different vendors that are compiling this way and
297 can't (don't wan't to) change.
299 config ARCH_FLOAT_SOFTFP
301 prompt "softfp (FPU)"
302 depends on ARCH_SUPPORTS_SOFTFP
304 Emit hardware floating point opcodes but use the software
305 floating point calling convention.
307 Architectures such as ARM use different registers for passing
308 floating point values depending on if they're in software mode
309 or hardware mode. softfp emits FPU instructions but uses the
310 software FP calling convention allowing softfp code to
311 interoperate with legacy software only code.
313 If in doubt, use 'software' or 'hardware' mode instead.
317 prompt "software (no FPU)"
319 Do not emit any hardware floating point opcode.
321 If your processor has no FPU, then you most probably want this, as it
322 is faster than emulating the FPU in the kernel.
328 prompt "Target CFLAGS"
331 Used to add specific options when compiling libraries of the toolchain,
332 that will run on the target (eg. libc.so).
334 Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
335 automatically used. You don't need to specify them here.
337 Leave blank if you don't know better.
339 config TARGET_LDFLAGS
341 prompt "Target LDFLAGS"
344 Used to add specific options when linking libraries of the toolchain,
345 that will run on your target.
347 Leave blank if you don't know better.
351 default "" if ! ARCH_SUPPORTS_WITH_FLOAT
352 default "hard" if ARCH_FLOAT_HW
353 default "soft" if ARCH_FLOAT_SW
354 default "softfp" if ARCH_FLOAT_SOFTFP
356 source "config.gen/arch.in.2"