config/target.in
author Zhenqiang Chen <zhenqiang.chen@linaro.org>
Fri Nov 18 15:29:18 2011 +0800 (2011-11-18)
changeset 2778 986e1c75432a
parent 2739 f320e22f2cba
child 2788 b6faa28e76e0
permissions -rw-r--r--
config/toolchain: Add "Enable nls" in "Toolchain options".

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
     1 # Target definition: architecture, optimisations, etc...
     2 
     3 menu "Target options"
     4 
     5 config ARCH
     6     string
     7 
     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_SUPPORT_ARCH
    14 config ARCH_SUPPORT_ABI
    15 config ARCH_SUPPORT_CPU
    16 config ARCH_SUPPORT_TUNE
    17 config ARCH_SUPPORT_FPU
    18 config ARCH_SUPPORT_SOFTFP
    19 
    20 config ARCH_DEFAULT_HAS_MMU
    21 config ARCH_DEFAULT_BE
    22 config ARCH_DEFAULT_LE
    23 config ARCH_DEFAULT_32
    24 config ARCH_DEFAULT_64
    25 
    26 config ARCH_ARCH
    27 config ARCH_ABI
    28 config ARCH_CPU
    29 config ARCH_TUNE
    30 config ARCH_FPU
    31 config ARCH_BE
    32 config ARCH_LE
    33 config ARCH_32
    34 config ARCH_64
    35 config ARCH_BITNESS
    36 config ARCH_FLOAT_HW
    37 config ARCH_FLOAT_SW
    38 config TARGET_CFLAGS
    39 config TARGET_LDFLAGS
    40 
    41 source "config.gen/arch.in"
    42 
    43 #--------------------------------------
    44 comment "Generic target options"
    45 
    46 config ARCH_SUPPORTS_BOTH_MMU
    47     bool
    48 
    49 config ARCH_DEFAULT_HAS_MMU
    50     bool
    51 
    52 config ARCH_USE_MMU
    53     bool
    54     prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
    55     default y if ARCH_DEFAULT_HAS_MMU
    56     help
    57       If your architecture has an MMU and you want to use it,
    58       say 'Y' here.
    59       
    60       OTOH, if you don't want to use the MMU, or your arch
    61       lacks an MMU, say 'N' here.
    62       
    63       Note that some architectures (eg. ARM) has variants that
    64       lacks an MMU (eg. ARM Cortex-M3), while other variants
    65       have one (eg. ARM Cortex-A8).
    66 
    67 #--------------------------------------
    68 config ARCH_SUPPORTS_BOTH_ENDIAN
    69     bool
    70 
    71 config ARCH_DEFAULT_BE
    72     bool
    73 
    74 config ARCH_DEFAULT_LE
    75     bool
    76 
    77 choice
    78     bool
    79     prompt "Endianness:"
    80     depends on ARCH_SUPPORTS_BOTH_ENDIAN
    81     default ARCH_BE if ARCH_DEFAULT_BE
    82     default ARCH_LE if ARCH_DEFAULT_LE
    83 
    84 config ARCH_BE
    85     bool
    86     prompt "Big endian"
    87 
    88 config ARCH_LE
    89     bool
    90     prompt "Little endian"
    91 
    92 endchoice
    93 
    94 config ARCH_ENDIAN
    95     string
    96     depends on ARCH_SUPPORTS_BOTH_ENDIAN
    97     default "big"       if ARCH_BE
    98     default "little"    if ARCH_LE
    99 
   100 #--------------------------------------
   101 config ARCH_SUPPORTS_32
   102     bool
   103 
   104 config ARCH_SUPPORTS_64
   105     bool
   106 
   107 config ARCH_DEFAULT_32
   108     bool
   109 
   110 config ARCH_DEFAULT_64
   111     bool
   112 
   113 config ARCH_BITNESS
   114     int
   115     default "32"    if ARCH_32
   116     default "64"    if ARCH_64
   117 
   118 choice
   119     bool
   120     prompt "Bitness:"
   121     default ARCH_32 if ARCH_DEFAULT_32
   122     default ARCH_64 if ARCH_DEFAULT_64
   123 
   124 config ARCH_32
   125     bool
   126     prompt "32-bit"
   127     depends on ARCH_SUPPORTS_32
   128 
   129 config ARCH_64
   130     bool
   131     prompt "64-bit"
   132     depends on ARCH_SUPPORTS_64
   133 
   134 endchoice
   135 
   136 #--------------------------------------
   137 comment "Target optimisations"
   138 
   139 config ARCH_SUPPORT_ARCH
   140     bool
   141 
   142 config ARCH_SUPPORT_ABI
   143     bool
   144 
   145 config ARCH_SUPPORT_CPU
   146     bool
   147 
   148 config ARCH_SUPPORT_TUNE
   149     bool
   150 
   151 config ARCH_SUPPORT_FPU
   152     bool
   153 
   154 config ARCH_SUPPORT_SOFTFP
   155     bool
   156 
   157 config ARCH_ARCH
   158     string
   159     prompt "Architecture level"
   160     depends on ARCH_SUPPORT_ARCH
   161     default ""
   162     help
   163       GCC uses this name to determine what kind of instructions it can emit
   164       when generating assembly code. This option can be used in conjunction
   165       with or instead of the ARCH_CPU option (above), or a (command-line)
   166       -mcpu= option.
   167       
   168       This is the configuration flag --with-arch=XXXX, and the runtime flag
   169       -march=XXX.
   170       
   171       Pick a value from the gcc manual for your choosen gcc version and your
   172       target CPU.
   173       
   174       Leave blank if you don't know, or if your target architecture does not
   175       offer this option.
   176 
   177 config ARCH_ABI
   178     string
   179     prompt "Generate code for the specific ABI"
   180     depends on ARCH_SUPPORT_ABI
   181     default ""
   182     help
   183       Generate code for the given ABI.
   184 
   185       This is the configuration flag --with-abi=XXXX, and the runtime flag
   186       -mabi=XXX.
   187 
   188       Pick a value from the gcc manual for your choosen gcc version and your
   189       target CPU.
   190 
   191       Leave blank if you don't know, or if your target architecture does not
   192       offer this option.
   193 
   194 config ARCH_CPU
   195     string
   196     prompt "Emit assembly for CPU"
   197     depends on ARCH_SUPPORT_CPU
   198     default ""
   199     help
   200       This specifies the name of the target processor. GCC uses this name
   201       to determine what kind of instructions it can emit when generating
   202       assembly code.
   203       
   204       This is the configuration flag --with-cpu=XXXX, and the runtime flag
   205       -mcpu=XXX.
   206 
   207       Pick a value from the gcc manual for your choosen gcc version and your
   208       target CPU.
   209       
   210       Leave blank if you don't know, or if your target architecture does not
   211       offer this option.
   212 
   213 config ARCH_TUNE
   214     string
   215     prompt "Tune for CPU"
   216     depends on ARCH_SUPPORT_TUNE
   217     default ""
   218     help
   219       This option is very similar to the ARCH_CPU option (above), except
   220       that instead of specifying the actual target processor type, and hence
   221       restricting which instructions can be used, it specifies that GCC should
   222       tune the performance of the code as if the target were of the type
   223       specified in this option, but still choosing the instructions that it
   224       will generate based on the cpu specified by the ARCH_CPU option
   225       (above), or a (command-line) -mcpu= option.
   226       
   227       This is the configuration flag --with-tune=XXXX, and the runtime flag
   228       -mtune=XXX.
   229       
   230       Pick a value from the gcc manual for your choosen gcc version and your
   231       target CPU.
   232       
   233       Leave blank if you don't know, or if your target architecture does not
   234       offer this option.
   235 
   236 config ARCH_FPU
   237     string
   238     prompt "Use specific FPU"
   239     depends on ARCH_SUPPORT_FPU
   240     default ""
   241     help
   242       On some targets (eg. ARM), you can specify the kind of FPU to emit
   243       code for.
   244 
   245       This is the configuration flag --with-fpu=XXX, and the runtime flag
   246       -mfpu=XXX.
   247       
   248       See below wether to actually emit FP opcodes, or to emulate them.
   249       
   250       Pick a value from the gcc manual for your choosen gcc version and your
   251       target CPU.
   252       
   253       Leave blank if you don't know, or if your target architecture does not
   254       offer this option.
   255 
   256 choice
   257     bool
   258     prompt "Floating point:"
   259 
   260 config ARCH_FLOAT_HW
   261     bool
   262     prompt "hardware (FPU)"
   263     help
   264       Emit hardware floating point opcodes.
   265       
   266       If you've got a processor with a FPU, then you want that.
   267       If your hardware has no FPU, you still can use HW floating point, but
   268       need to compile support for FPU emulation in your kernel. Needless to
   269       say that emulating the FPU is /slooowwwww/...
   270       
   271       One situation you'd want HW floating point without a FPU is if you get
   272       binary blobs from different vendors that are compiling this way and
   273       can't (don't wan't to) change.
   274 
   275 config ARCH_FLOAT_SW
   276     bool
   277     prompt "software"
   278     help
   279       Do not emit any hardware floating point opcode.
   280       
   281       If your processor has no FPU, then you most probably want this, as it
   282       is faster than emulating the FPU in the kernel.
   283 
   284 config ARCH_FLOAT_SOFTFP
   285     bool
   286     prompt "softfp"
   287     depends on ARCH_SUPPORT_SOFTFP
   288     help
   289       Emit hardware floating point opcodes but use the software
   290       floating point calling convention.
   291 
   292       Architectures such as ARM use different registers for passing
   293       floating point values depending on if they're in software mode
   294       or hardware mode.  softfp emits FPU instructions but uses the
   295       software FP calling convention allowing softfp code to
   296       interoperate with legacy software only code.
   297 
   298       If in doubt, use 'software' or 'hardware' mode instead.
   299 
   300 endchoice
   301 
   302 config TARGET_CFLAGS
   303     string
   304     prompt "Target CFLAGS"
   305     default ""
   306     help
   307       Used to add specific options when compiling libraries of the toolchain,
   308       that will run on the target (eg. libc.so).
   309       
   310       Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
   311       automatically used. You don't need to specify them here.
   312       
   313       Leave blank if you don't know better.
   314 
   315 config TARGET_LDFLAGS
   316     string
   317     prompt "Target LDFLAGS"
   318     default ""
   319     help
   320       Used to add specific options when linking libraries of the toolchain,
   321       that will run on your target.
   322       
   323       Leave blank if you don't know better.
   324 
   325 config ARCH_FLOAT
   326     string
   327     default "hard"   if ARCH_FLOAT_HW
   328     default "soft"   if ARCH_FLOAT_SW
   329     default "softfp" if ARCH_FLOAT_SOFTFP
   330 
   331 source "config.gen/arch.in.2"
   332 
   333 endmenu