config/target.in
author Zhenqiang Chen <zhenqiang.chen@linaro.org>
Fri Nov 18 16:22:52 2011 +0800 (2011-11-18)
changeset 2856 7723b8457efa
parent 2794 561bce585313
child 3140 d9e78e89b3f6
permissions -rw-r--r--
debug/gdb: --disable-sim for CT_GDB_CROSS.

sim was already disabled for CT_GDB_NATIVE.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@anciens.enib.fr: make it a config option]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     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_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
    20 
    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
    26 
    27 config ARCH_ARCH
    28 config ARCH_ABI
    29 config ARCH_CPU
    30 config ARCH_TUNE
    31 config ARCH_FPU
    32 config ARCH_BE
    33 config ARCH_LE
    34 config ARCH_32
    35 config ARCH_64
    36 config ARCH_BITNESS
    37 config ARCH_FLOAT_HW
    38 config ARCH_FLOAT_SW
    39 config TARGET_CFLAGS
    40 config TARGET_LDFLAGS
    41 
    42 source "config.gen/arch.in"
    43 
    44 #--------------------------------------
    45 comment "Generic target options"
    46 
    47 #--------------------------------------
    48 config MULTILIB
    49     bool
    50     prompt "Build a multilib toolchain (EXPERIMENTAL)"
    51     depends on EXPERIMENTAL
    52     help
    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
    55       default settings.
    56       
    57       This means the build time of the C library will be in O(nb_variants).
    58       
    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.
    62 
    63 #--------------------------------------
    64 config ARCH_SUPPORTS_BOTH_MMU
    65     bool
    66 
    67 config ARCH_DEFAULT_HAS_MMU
    68     bool
    69 
    70 config ARCH_USE_MMU
    71     bool
    72     prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
    73     default y if ARCH_DEFAULT_HAS_MMU
    74     help
    75       If your architecture has an MMU and you want to use it,
    76       say 'Y' here.
    77       
    78       OTOH, if you don't want to use the MMU, or your arch
    79       lacks an MMU, say 'N' here.
    80       
    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).
    84 
    85 #--------------------------------------
    86 config ARCH_SUPPORTS_BOTH_ENDIAN
    87     bool
    88 
    89 config ARCH_DEFAULT_BE
    90     bool
    91 
    92 config ARCH_DEFAULT_LE
    93     bool
    94 
    95 choice
    96     bool
    97     prompt "Endianness:"
    98     depends on ARCH_SUPPORTS_BOTH_ENDIAN
    99     default ARCH_BE if ARCH_DEFAULT_BE
   100     default ARCH_LE if ARCH_DEFAULT_LE
   101 
   102 config ARCH_BE
   103     bool
   104     prompt "Big endian"
   105 
   106 config ARCH_LE
   107     bool
   108     prompt "Little endian"
   109 
   110 endchoice
   111 
   112 config ARCH_ENDIAN
   113     string
   114     depends on ARCH_SUPPORTS_BOTH_ENDIAN
   115     default "big"       if ARCH_BE
   116     default "little"    if ARCH_LE
   117 
   118 #--------------------------------------
   119 config ARCH_SUPPORTS_32
   120     bool
   121 
   122 config ARCH_SUPPORTS_64
   123     bool
   124 
   125 config ARCH_DEFAULT_32
   126     bool
   127 
   128 config ARCH_DEFAULT_64
   129     bool
   130 
   131 config ARCH_BITNESS
   132     int
   133     default "32"    if ARCH_32
   134     default "64"    if ARCH_64
   135 
   136 choice
   137     bool
   138     prompt "Bitness:"
   139     default ARCH_32 if ARCH_DEFAULT_32
   140     default ARCH_64 if ARCH_DEFAULT_64
   141 
   142 config ARCH_32
   143     bool
   144     prompt "32-bit"
   145     depends on ARCH_SUPPORTS_32
   146 
   147 config ARCH_64
   148     bool
   149     prompt "64-bit"
   150     depends on ARCH_SUPPORTS_64
   151 
   152 endchoice
   153 
   154 #--------------------------------------
   155 comment "Target optimisations"
   156 
   157 config ARCH_SUPPORTS_WITH_ARCH
   158     bool
   159 
   160 config ARCH_SUPPORTS_WITH_ABI
   161     bool
   162 
   163 config ARCH_SUPPORTS_WITH_CPU
   164     bool
   165 
   166 config ARCH_SUPPORTS_WITH_TUNE
   167     bool
   168 
   169 config ARCH_SUPPORTS_WITH_FLOAT
   170     bool
   171 
   172 config ARCH_SUPPORTS_WITH_FPU
   173     bool
   174 
   175 config ARCH_SUPPORTS_SOFTFP
   176     bool
   177 
   178 config ARCH_ARCH
   179     string
   180     prompt "Architecture level"
   181     depends on ARCH_SUPPORTS_WITH_ARCH
   182     default ""
   183     help
   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)
   187       -mcpu= option.
   188       
   189       This is the configuration flag --with-arch=XXXX, and the runtime flag
   190       -march=XXX.
   191       
   192       Pick a value from the gcc manual for your choosen gcc version and your
   193       target CPU.
   194       
   195       Leave blank if you don't know, or if your target architecture does not
   196       offer this option.
   197 
   198 config ARCH_ABI
   199     string
   200     prompt "Generate code for the specific ABI"
   201     depends on ARCH_SUPPORTS_WITH_ABI
   202     default ""
   203     help
   204       Generate code for the given ABI.
   205 
   206       This is the configuration flag --with-abi=XXXX, and the runtime flag
   207       -mabi=XXX.
   208 
   209       Pick a value from the gcc manual for your choosen gcc version and your
   210       target CPU.
   211 
   212       Leave blank if you don't know, or if your target architecture does not
   213       offer this option.
   214 
   215 config ARCH_CPU
   216     string
   217     prompt "Emit assembly for CPU"
   218     depends on ARCH_SUPPORTS_WITH_CPU
   219     default ""
   220     help
   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
   223       assembly code.
   224       
   225       This is the configuration flag --with-cpu=XXXX, and the runtime flag
   226       -mcpu=XXX.
   227 
   228       Pick a value from the gcc manual for your choosen gcc version and your
   229       target CPU.
   230       
   231       Leave blank if you don't know, or if your target architecture does not
   232       offer this option.
   233 
   234 config ARCH_TUNE
   235     string
   236     prompt "Tune for CPU"
   237     depends on ARCH_SUPPORTS_WITH_TUNE
   238     default ""
   239     help
   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.
   247       
   248       This is the configuration flag --with-tune=XXXX, and the runtime flag
   249       -mtune=XXX.
   250       
   251       Pick a value from the gcc manual for your choosen gcc version and your
   252       target CPU.
   253       
   254       Leave blank if you don't know, or if your target architecture does not
   255       offer this option.
   256 
   257 config ARCH_FPU
   258     string
   259     prompt "Use specific FPU"
   260     depends on ARCH_SUPPORTS_WITH_FPU
   261     default ""
   262     help
   263       On some targets (eg. ARM), you can specify the kind of FPU to emit
   264       code for.
   265 
   266       This is the configuration flag --with-fpu=XXX, and the runtime flag
   267       -mfpu=XXX.
   268       
   269       See below wether to actually emit FP opcodes, or to emulate them.
   270       
   271       Pick a value from the gcc manual for your choosen gcc version and your
   272       target CPU.
   273       
   274       Leave blank if you don't know, or if your target architecture does not
   275       offer this option.
   276 
   277 choice
   278     bool
   279     prompt "Floating point:"
   280     depends on ARCH_SUPPORTS_WITH_FLOAT
   281 
   282 config ARCH_FLOAT_HW
   283     bool
   284     prompt "hardware (FPU)"
   285     help
   286       Emit hardware floating point opcodes.
   287       
   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/...
   292       
   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.
   296 
   297 config ARCH_FLOAT_SW
   298     bool
   299     prompt "software"
   300     help
   301       Do not emit any hardware floating point opcode.
   302       
   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.
   305 
   306 config ARCH_FLOAT_SOFTFP
   307     bool
   308     prompt "softfp"
   309     depends on ARCH_SUPPORTS_SOFTFP
   310     help
   311       Emit hardware floating point opcodes but use the software
   312       floating point calling convention.
   313 
   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.
   319 
   320       If in doubt, use 'software' or 'hardware' mode instead.
   321 
   322 endchoice
   323 
   324 config TARGET_CFLAGS
   325     string
   326     prompt "Target CFLAGS"
   327     default ""
   328     help
   329       Used to add specific options when compiling libraries of the toolchain,
   330       that will run on the target (eg. libc.so).
   331       
   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.
   334       
   335       Leave blank if you don't know better.
   336 
   337 config TARGET_LDFLAGS
   338     string
   339     prompt "Target LDFLAGS"
   340     default ""
   341     help
   342       Used to add specific options when linking libraries of the toolchain,
   343       that will run on your target.
   344       
   345       Leave blank if you don't know better.
   346 
   347 config ARCH_FLOAT
   348     string
   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
   353 
   354 source "config.gen/arch.in.2"
   355 
   356 endmenu