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"
46 prompt "Suffix to the arch-part"
48 Some architectures have multiple variants and being able to specify
49 the variant instead of the arch is quite convenient. This is commonly
50 seen for instance when "armv5tel-" is used as a prefix instead of the
51 more generic "arm-", or with "alphaev6-" instead of "alpha-".
53 Whatever you enter here will be appended to the architecture-part of the
54 tuple, just before the first '-'. It will override any architecture-
55 specific suffix that crosstool-NG may compute.
57 If you are not sure about what this is, leave it blank.
59 #--------------------------------------
60 comment "Generic target options"
62 #--------------------------------------
65 prompt "Build a multilib toolchain (READ HELP!!!)"
67 If you say 'y' here, then the toolchain will also contain the C library
68 optimised for some variants of the selected architecture, besides the
71 This means the build time of the C library will be in O(nb_variants).
73 The list of variants is dependent on the architecture, and is hard-coded
74 in gcc, so it is not possible to say what variants to support, only
75 whether hard-coded variants should be supported or not.
77 NOTE: The multilib feature in crosstool-NG is not well-tested.
78 Use at your own risk, and report success and/or failure.
80 #--------------------------------------
81 config ARCH_SUPPORTS_BOTH_MMU
84 config ARCH_DEFAULT_HAS_MMU
89 prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
90 default y if ARCH_DEFAULT_HAS_MMU
92 If your architecture has an MMU and you want to use it,
95 OTOH, if you don't want to use the MMU, or your arch
96 lacks an MMU, say 'N' here.
98 Note that some architectures (eg. ARM) has variants that
99 lacks an MMU (eg. ARM Cortex-M3), while other variants
100 have one (eg. ARM Cortex-A8).
102 #--------------------------------------
103 config ARCH_SUPPORTS_BOTH_ENDIAN
106 config ARCH_DEFAULT_BE
109 config ARCH_DEFAULT_LE
115 depends on ARCH_SUPPORTS_BOTH_ENDIAN
116 default ARCH_BE if ARCH_DEFAULT_BE
117 default ARCH_LE if ARCH_DEFAULT_LE
125 prompt "Little endian"
131 depends on ARCH_SUPPORTS_BOTH_ENDIAN
132 default "big" if ARCH_BE
133 default "little" if ARCH_LE
135 #--------------------------------------
136 config ARCH_SUPPORTS_32
139 config ARCH_SUPPORTS_64
142 config ARCH_DEFAULT_32
145 config ARCH_DEFAULT_64
150 default "32" if ARCH_32
151 default "64" if ARCH_64
156 default ARCH_32 if ARCH_DEFAULT_32
157 default ARCH_64 if ARCH_DEFAULT_64
162 depends on ARCH_SUPPORTS_32
167 depends on ARCH_SUPPORTS_64
171 #--------------------------------------
172 comment "Target optimisations"
174 config ARCH_SUPPORTS_WITH_ARCH
177 config ARCH_SUPPORTS_WITH_ABI
180 config ARCH_SUPPORTS_WITH_CPU
183 config ARCH_SUPPORTS_WITH_TUNE
186 config ARCH_SUPPORTS_WITH_FLOAT
189 config ARCH_SUPPORTS_WITH_FPU
192 config ARCH_SUPPORTS_SOFTFP
197 prompt "Architecture level"
198 depends on ARCH_SUPPORTS_WITH_ARCH
201 GCC uses this name to determine what kind of instructions it can emit
202 when generating assembly code. This option can be used in conjunction
203 with or instead of the ARCH_CPU option (above), or a (command-line)
206 This is the configuration flag --with-arch=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 "Generate code for the specific ABI"
218 depends on ARCH_SUPPORTS_WITH_ABI
221 Generate code for the given ABI.
223 This is the configuration flag --with-abi=XXXX, and the runtime flag
226 Pick a value from the gcc manual for your choosen gcc version and your
229 Leave blank if you don't know, or if your target architecture does not
234 prompt "Emit assembly for CPU"
235 depends on ARCH_SUPPORTS_WITH_CPU
238 This specifies the name of the target processor. GCC uses this name
239 to determine what kind of instructions it can emit when generating
242 This is the configuration flag --with-cpu=XXXX, and the runtime flag
245 Pick a value from the gcc manual for your choosen gcc version and your
248 Leave blank if you don't know, or if your target architecture does not
253 prompt "Tune for CPU"
254 depends on ARCH_SUPPORTS_WITH_TUNE
257 This option is very similar to the ARCH_CPU option (above), except
258 that instead of specifying the actual target processor type, and hence
259 restricting which instructions can be used, it specifies that GCC should
260 tune the performance of the code as if the target were of the type
261 specified in this option, but still choosing the instructions that it
262 will generate based on the cpu specified by the ARCH_CPU option
263 (above), or a (command-line) -mcpu= option.
265 This is the configuration flag --with-tune=XXXX, and the runtime flag
268 Pick a value from the gcc manual for your choosen gcc version and your
271 Leave blank if you don't know, or if your target architecture does not
276 prompt "Use specific FPU"
277 depends on ARCH_SUPPORTS_WITH_FPU
280 On some targets (eg. ARM), you can specify the kind of FPU to emit
283 This is the configuration flag --with-fpu=XXX, and the runtime flag
286 See below wether to actually emit FP opcodes, or to emulate them.
288 Pick a value from the gcc manual for your choosen gcc version and your
291 Leave blank if you don't know, or if your target architecture does not
296 prompt "Floating point:"
297 depends on ARCH_SUPPORTS_WITH_FLOAT
299 config ARCH_FLOAT_AUTO
301 prompt "auto (let gcc decide)"
303 Instead of explicitly passing a float option, don't
304 pass any float options and let gcc figure it out.
306 For multilib configurations, this may help.
310 prompt "hardware (FPU)"
312 Emit hardware floating point opcodes.
314 If you've got a processor with a FPU, then you want that.
315 If your hardware has no FPU, you still can use HW floating point, but
316 need to compile support for FPU emulation in your kernel. Needless to
317 say that emulating the FPU is /slooowwwww/...
319 One situation you'd want HW floating point without a FPU is if you get
320 binary blobs from different vendors that are compiling this way and
321 can't (don't wan't to) change.
323 config ARCH_FLOAT_SOFTFP
325 prompt "softfp (FPU)"
326 depends on ARCH_SUPPORTS_SOFTFP
328 Emit hardware floating point opcodes but use the software
329 floating point calling convention.
331 Architectures such as ARM use different registers for passing
332 floating point values depending on if they're in software mode
333 or hardware mode. softfp emits FPU instructions but uses the
334 software FP calling convention allowing softfp code to
335 interoperate with legacy software only code.
337 If in doubt, use 'software' or 'hardware' mode instead.
341 prompt "software (no FPU)"
343 Do not emit any hardware floating point opcode.
345 If your processor has no FPU, then you most probably want this, as it
346 is faster than emulating the FPU in the kernel.
352 prompt "Target CFLAGS"
355 Used to add specific options when compiling libraries of the toolchain,
356 that will run on the target (eg. libc.so).
358 Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
359 automatically used. You don't need to specify them here.
361 Leave blank if you don't know better.
363 config TARGET_LDFLAGS
365 prompt "Target LDFLAGS"
368 Used to add specific options when linking libraries of the toolchain,
369 that will run on your target.
371 Leave blank if you don't know better.
375 default "" if ! ARCH_SUPPORTS_WITH_FLOAT
376 default "auto" if ARCH_FLOAT_AUTO
377 default "hard" if ARCH_FLOAT_HW
378 default "soft" if ARCH_FLOAT_SW
379 default "softfp" if ARCH_FLOAT_SOFTFP
381 source "config.gen/arch.in.2"