yann@1: # Target definition: architecture, optimisations, etc... yann@1: yann@1: menu "Target options" yann@1: yann@47: config ARCH yann@47: string yann@628: yann@628: # Pre-declare target optimisation variables yann@1345: config ARCH_SUPPORTS_BOTH_MMU yann@1345: config ARCH_SUPPORTS_BOTH_ENDIAN yann@1633: config ARCH_SUPPORTS_32 yann@1633: config ARCH_SUPPORTS_64 yann@631: config ARCH_SUPPORT_ARCH yann@631: config ARCH_SUPPORT_ABI yann@631: config ARCH_SUPPORT_CPU yann@631: config ARCH_SUPPORT_TUNE yann@631: config ARCH_SUPPORT_FPU michael@2739: config ARCH_SUPPORT_SOFTFP yann@1345: yann@1345: config ARCH_DEFAULT_HAS_MMU yann@628: config ARCH_DEFAULT_BE yann@628: config ARCH_DEFAULT_LE yann@1633: config ARCH_DEFAULT_32 yann@1633: config ARCH_DEFAULT_64 yann@1345: yann@633: config ARCH_ARCH yann@633: config ARCH_ABI yann@633: config ARCH_CPU yann@633: config ARCH_TUNE yann@633: config ARCH_FPU yann@633: config ARCH_BE yann@633: config ARCH_LE yann@1638: config ARCH_32 yann@1638: config ARCH_64 yann@1715: config ARCH_BITNESS yann@628: config ARCH_FLOAT_HW yann@628: config ARCH_FLOAT_SW yann@628: config TARGET_CFLAGS yann@791: config TARGET_LDFLAGS yann@628: yann@1870: source "config.gen/arch.in" yann@1: yann@1345: #-------------------------------------- yann@2413: comment "Generic target options" yann@2413: yann@1345: config ARCH_SUPPORTS_BOTH_MMU yann@1345: bool yann@1345: yann@1345: config ARCH_DEFAULT_HAS_MMU yann@1345: bool yann@1345: yann@1345: config ARCH_USE_MMU yann@1345: bool yann@1345: prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU yann@1345: default y if ARCH_DEFAULT_HAS_MMU yann@1586: help yann@1586: If your architecture has an MMU and you want to use it, yann@1586: say 'Y' here. yann@1586: yann@1586: OTOH, if you don't want to use the MMU, or your arch yann@1586: lacks an MMU, say 'N' here. yann@1586: yann@1586: Note that some architectures (eg. ARM) has variants that yann@1586: lacks an MMU (eg. ARM Cortex-M3), while other variants yann@1586: have one (eg. ARM Cortex-A8). yann@1345: yann@1345: #-------------------------------------- yann@136: config ARCH_SUPPORTS_BOTH_ENDIAN yann@35: bool yann@35: yann@347: config ARCH_DEFAULT_BE yann@347: bool yann@347: yann@347: config ARCH_DEFAULT_LE yann@347: bool yann@347: yann@1: choice yann@1: bool yann@1: prompt "Endianness:" yann@136: depends on ARCH_SUPPORTS_BOTH_ENDIAN yann@347: default ARCH_BE if ARCH_DEFAULT_BE yann@347: default ARCH_LE if ARCH_DEFAULT_LE yann@1: yann@1: config ARCH_BE yann@1: bool yann@1: prompt "Big endian" yann@1: yann@1: config ARCH_LE yann@1: bool yann@1: prompt "Little endian" yann@1: yann@1: endchoice yann@1: yann@1345: #-------------------------------------- yann@1633: config ARCH_SUPPORTS_32 yann@1633: bool yann@1633: yann@1633: config ARCH_SUPPORTS_64 yann@1633: bool yann@1633: yann@1633: config ARCH_DEFAULT_32 yann@1633: bool yann@1633: yann@1633: config ARCH_DEFAULT_64 yann@1633: bool yann@1633: yann@1715: config ARCH_BITNESS yann@1715: int yann@1715: default "32" if ARCH_32 yann@1715: default "64" if ARCH_64 yann@1715: yann@1633: choice yann@1633: bool yann@1633: prompt "Bitness:" yann@1638: default ARCH_32 if ARCH_DEFAULT_32 yann@1638: default ARCH_64 if ARCH_DEFAULT_64 yann@1633: yann@1638: config ARCH_32 yann@1633: bool yann@1633: prompt "32-bit" yann@1633: depends on ARCH_SUPPORTS_32 yann@1633: yann@1638: config ARCH_64 yann@1633: bool yann@1633: prompt "64-bit" yann@1633: depends on ARCH_SUPPORTS_64 yann@1633: yann@1633: endchoice yann@1633: yann@1633: #-------------------------------------- yann@1: comment "Target optimisations" yann@1: yann@631: config ARCH_SUPPORT_ARCH yann@631: bool yann@631: yann@631: config ARCH_SUPPORT_ABI yann@631: bool yann@631: yann@631: config ARCH_SUPPORT_CPU yann@631: bool yann@631: yann@631: config ARCH_SUPPORT_TUNE yann@631: bool yann@631: yann@631: config ARCH_SUPPORT_FPU yann@631: bool yann@631: michael@2739: config ARCH_SUPPORT_SOFTFP michael@2739: bool michael@2739: yann@47: config ARCH_ARCH yann@47: string yann@425: prompt "Architecture level" yann@631: depends on ARCH_SUPPORT_ARCH yann@47: default "" yann@47: help yann@47: GCC uses this name to determine what kind of instructions it can emit yann@47: when generating assembly code. This option can be used in conjunction yann@47: with or instead of the ARCH_CPU option (above), or a (command-line) yann@47: -mcpu= option. yann@47: yann@47: This is the configuration flag --with-arch=XXXX, and the runtime flag yann@47: -march=XXX. yann@47: yann@47: Pick a value from the gcc manual for your choosen gcc version and your yann@47: target CPU. yann@47: yann@47: Leave blank if you don't know, or if your target architecture does not yann@47: offer this option. yann@47: yann@45: config ARCH_ABI yann@45: string yann@45: prompt "Generate code for the specific ABI" yann@631: depends on ARCH_SUPPORT_ABI yann@45: default "" yann@45: help yann@45: Generate code for the given ABI. yann@45: yann@47: This is the configuration flag --with-abi=XXXX, and the runtime flag yann@47: -mabi=XXX. yann@47: yann@45: Pick a value from the gcc manual for your choosen gcc version and your yann@45: target CPU. yann@45: antony@2564: Leave blank if you don't know, or if your target architecture does not yann@45: offer this option. yann@45: yann@1: config ARCH_CPU yann@1: string yann@1: prompt "Emit assembly for CPU" yann@631: depends on ARCH_SUPPORT_CPU yann@1: default "" yann@1: help yann@283: This specifies the name of the target processor. GCC uses this name yann@1: to determine what kind of instructions it can emit when generating yann@1: assembly code. yann@1: yann@47: This is the configuration flag --with-cpu=XXXX, and the runtime flag yann@47: -mcpu=XXX. yann@47: yann@1: Pick a value from the gcc manual for your choosen gcc version and your yann@1: target CPU. yann@1: yann@1: Leave blank if you don't know, or if your target architecture does not yann@1: offer this option. yann@1: yann@1: config ARCH_TUNE yann@1: string yann@1: prompt "Tune for CPU" yann@631: depends on ARCH_SUPPORT_TUNE yann@1: default "" yann@1: help yann@1: This option is very similar to the ARCH_CPU option (above), except yann@1: that instead of specifying the actual target processor type, and hence yann@1: restricting which instructions can be used, it specifies that GCC should yann@1: tune the performance of the code as if the target were of the type yann@1: specified in this option, but still choosing the instructions that it yann@1: will generate based on the cpu specified by the ARCH_CPU option yann@1: (above), or a (command-line) -mcpu= option. yann@1: yann@47: This is the configuration flag --with-tune=XXXX, and the runtime flag yann@47: -mtune=XXX. yann@1: yann@1: Pick a value from the gcc manual for your choosen gcc version and your yann@1: target CPU. yann@1: yann@1: Leave blank if you don't know, or if your target architecture does not yann@1: offer this option. yann@1: yann@1: config ARCH_FPU yann@1: string yann@47: prompt "Use specific FPU" yann@631: depends on ARCH_SUPPORT_FPU yann@1: default "" yann@1: help yann@1: On some targets (eg. ARM), you can specify the kind of FPU to emit yann@1: code for. yann@47: yann@47: This is the configuration flag --with-fpu=XXX, and the runtime flag yann@47: -mfpu=XXX. yann@1: yann@1: See below wether to actually emit FP opcodes, or to emulate them. yann@1: yann@1: Pick a value from the gcc manual for your choosen gcc version and your yann@1: target CPU. yann@1: yann@1: Leave blank if you don't know, or if your target architecture does not yann@1: offer this option. yann@1: yann@1: choice yann@1: bool yann@1: prompt "Floating point:" yann@1: yann@1: config ARCH_FLOAT_HW yann@1: bool yann@1: prompt "hardware (FPU)" yann@1: help yann@1: Emit hardware floating point opcodes. yann@1: yann@1: If you've got a processor with a FPU, then you want that. yann@1: If your hardware has no FPU, you still can use HW floating point, but yann@1: need to compile support for FPU emulation in your kernel. Needless to yann@1: say that emulating the FPU is /slooowwwww/... yann@1: yann@1: One situation you'd want HW floating point without a FPU is if you get yann@1: binary blobs from different vendors that are compiling this way and yann@1: can't (don't wan't to) change. yann@1: yann@1: config ARCH_FLOAT_SW yann@1: bool yann@1: prompt "software" yann@1: help yann@1: Do not emit any hardware floating point opcode. yann@1: yann@1: If your processor has no FPU, then you most probably want this, as it yann@1: is faster than emulating the FPU in the kernel. yann@1: michael@2739: config ARCH_FLOAT_SOFTFP michael@2739: bool michael@2739: prompt "softfp" michael@2739: depends on ARCH_SUPPORT_SOFTFP michael@2739: help michael@2739: Emit hardware floating point opcodes but use the software michael@2739: floating point calling convention. michael@2739: michael@2739: Architectures such as ARM use different registers for passing michael@2739: floating point values depending on if they're in software mode michael@2739: or hardware mode. softfp emits FPU instructions but uses the michael@2739: software FP calling convention allowing softfp code to michael@2739: interoperate with legacy software only code. michael@2739: michael@2739: If in doubt, use 'software' or 'hardware' mode instead. michael@2739: yann@1: endchoice yann@1: yann@1: config TARGET_CFLAGS yann@1: string yann@41: prompt "Target CFLAGS" yann@1: default "" yann@1: help yann@1: Used to add specific options when compiling libraries of the toolchain, yann@1: that will run on the target (eg. libc.so). yann@1: yann@531: Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be antony@2564: automatically used. You don't need to specify them here. yann@1: yann@1: Leave blank if you don't know better. yann@1: yann@767: config TARGET_LDFLAGS yann@767: string yann@767: prompt "Target LDFLAGS" yann@767: default "" yann@767: help yann@767: Used to add specific options when linking libraries of the toolchain, yann@767: that will run on your target. yann@767: yann@767: Leave blank if you don't know better. yann@767: michael@2737: config ARCH_FLOAT michael@2737: string michael@2737: default "hard" if ARCH_FLOAT_HW michael@2737: default "soft" if ARCH_FLOAT_SW michael@2739: default "softfp" if ARCH_FLOAT_SOFTFP michael@2737: yann@2413: source "config.gen/arch.in.2" yann@2413: yann@1: endmenu