config/target.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Oct 21 23:45:55 2009 +0200 (2009-10-21)
changeset 1586 1fbb4a9d94fc
parent 1345 27fec561af53
child 1633 95c28d483690
permissions -rw-r--r--
config: add help for the MMU/noMMU entry
     1 # Target definition: architecture, optimisations, etc...
     2 
     3 menu "Target options"
     4 
     5 config ARCH
     6     string
     7 
     8 config ARCH_64
     9     bool
    10     default n
    11 
    12 # Pre-declare target optimisation variables
    13 config ARCH_SUPPORTS_BOTH_MMU
    14 config ARCH_SUPPORTS_BOTH_ENDIAN
    15 config ARCH_SUPPORT_ARCH
    16 config ARCH_SUPPORT_ABI
    17 config ARCH_SUPPORT_CPU
    18 config ARCH_SUPPORT_TUNE
    19 config ARCH_SUPPORT_FPU
    20 
    21 config ARCH_DEFAULT_HAS_MMU
    22 config ARCH_DEFAULT_BE
    23 config ARCH_DEFAULT_LE
    24 
    25 config ARCH_ARCH
    26 config ARCH_ABI
    27 config ARCH_CPU
    28 config ARCH_TUNE
    29 config ARCH_FPU
    30 config ARCH_BE
    31 config ARCH_LE
    32 config ARCH_FLOAT_HW
    33 config ARCH_FLOAT_SW
    34 config TARGET_CFLAGS
    35 config TARGET_LDFLAGS
    36 
    37 comment "General target options"
    38 
    39 source config.gen/arch.in
    40 
    41 #--------------------------------------
    42 config ARCH_SUPPORTS_BOTH_MMU
    43     bool
    44     default n
    45 
    46 config ARCH_DEFAULT_HAS_MMU
    47     bool
    48     default n
    49 
    50 config ARCH_USE_MMU
    51     bool
    52     prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
    53     default n if ! ARCH_DEFAULT_HAS_MMU
    54     default y if ARCH_DEFAULT_HAS_MMU
    55     help
    56       If your architecture has an MMU and you want to use it,
    57       say 'Y' here.
    58       
    59       OTOH, if you don't want to use the MMU, or your arch
    60       lacks an MMU, say 'N' here.
    61       
    62       Note that some architectures (eg. ARM) has variants that
    63       lacks an MMU (eg. ARM Cortex-M3), while other variants
    64       have one (eg. ARM Cortex-A8).
    65 
    66 #--------------------------------------
    67 config ARCH_SUPPORTS_BOTH_ENDIAN
    68     bool
    69     default n
    70 
    71 config ARCH_DEFAULT_BE
    72     bool
    73     default n
    74 
    75 config ARCH_DEFAULT_LE
    76     bool
    77     default n
    78 
    79 choice
    80     bool
    81     prompt "Endianness:"
    82     depends on ARCH_SUPPORTS_BOTH_ENDIAN
    83     default ARCH_BE if ARCH_DEFAULT_BE
    84     default ARCH_LE if ARCH_DEFAULT_LE
    85 
    86 config ARCH_BE
    87     bool
    88     prompt "Big endian"
    89 
    90 config ARCH_LE
    91     bool
    92     prompt "Little endian"
    93 
    94 endchoice
    95 
    96 #--------------------------------------
    97 comment "Target optimisations"
    98 
    99 config ARCH_SUPPORT_ARCH
   100     bool
   101     default n
   102 
   103 config ARCH_SUPPORT_ABI
   104     bool
   105     default n
   106 
   107 config ARCH_SUPPORT_CPU
   108     bool
   109     default n
   110 
   111 config ARCH_SUPPORT_TUNE
   112     bool
   113     default n
   114 
   115 config ARCH_SUPPORT_FPU
   116     bool
   117     default n
   118 
   119 config ARCH_ARCH
   120     string
   121     prompt "Architecture level"
   122     depends on ARCH_SUPPORT_ARCH
   123     default ""
   124     help
   125       GCC uses this name to determine what kind of instructions it can emit
   126       when generating assembly code. This option can be used in conjunction
   127       with or instead of the ARCH_CPU option (above), or a (command-line)
   128       -mcpu= option.
   129       
   130       This is the configuration flag --with-arch=XXXX, and the runtime flag
   131       -march=XXX.
   132       
   133       Pick a value from the gcc manual for your choosen gcc version and your
   134       target CPU.
   135       
   136       Leave blank if you don't know, or if your target architecture does not
   137       offer this option.
   138 
   139 config ARCH_ABI
   140     string
   141     prompt "Generate code for the specific ABI"
   142     depends on ARCH_SUPPORT_ABI
   143     default ""
   144     help
   145       Generate code for the given ABI.
   146 
   147       This is the configuration flag --with-abi=XXXX, and the runtime flag
   148       -mabi=XXX.
   149 
   150       Pick a value from the gcc manual for your choosen gcc version and your
   151       target CPU.
   152 
   153       Leave blank if you don't know, or if your target architecutre does not
   154       offer this option.
   155 
   156 config ARCH_CPU
   157     string
   158     prompt "Emit assembly for CPU"
   159     depends on ARCH_SUPPORT_CPU
   160     default ""
   161     help
   162       This specifies the name of the target processor. GCC uses this name
   163       to determine what kind of instructions it can emit when generating
   164       assembly code.
   165       
   166       This is the configuration flag --with-cpu=XXXX, and the runtime flag
   167       -mcpu=XXX.
   168 
   169       Pick a value from the gcc manual for your choosen gcc version and your
   170       target CPU.
   171       
   172       Leave blank if you don't know, or if your target architecture does not
   173       offer this option.
   174 
   175 config ARCH_TUNE
   176     string
   177     prompt "Tune for CPU"
   178     depends on ARCH_SUPPORT_TUNE
   179     default ""
   180     help
   181       This option is very similar to the ARCH_CPU option (above), except
   182       that instead of specifying the actual target processor type, and hence
   183       restricting which instructions can be used, it specifies that GCC should
   184       tune the performance of the code as if the target were of the type
   185       specified in this option, but still choosing the instructions that it
   186       will generate based on the cpu specified by the ARCH_CPU option
   187       (above), or a (command-line) -mcpu= option.
   188       
   189       This is the configuration flag --with-tune=XXXX, and the runtime flag
   190       -mtune=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_FPU
   199     string
   200     prompt "Use specific FPU"
   201     depends on ARCH_SUPPORT_FPU
   202     default ""
   203     help
   204       On some targets (eg. ARM), you can specify the kind of FPU to emit
   205       code for.
   206 
   207       This is the configuration flag --with-fpu=XXX, and the runtime flag
   208       -mfpu=XXX.
   209       
   210       See below wether to actually emit FP opcodes, or to emulate them.
   211       
   212       Pick a value from the gcc manual for your choosen gcc version and your
   213       target CPU.
   214       
   215       Leave blank if you don't know, or if your target architecture does not
   216       offer this option.
   217 
   218 choice
   219     bool
   220     prompt "Floating point:"
   221 
   222 config ARCH_FLOAT_HW
   223     bool
   224     prompt "hardware (FPU)"
   225     help
   226       Emit hardware floating point opcodes.
   227       
   228       If you've got a processor with a FPU, then you want that.
   229       If your hardware has no FPU, you still can use HW floating point, but
   230       need to compile support for FPU emulation in your kernel. Needless to
   231       say that emulating the FPU is /slooowwwww/...
   232       
   233       One situation you'd want HW floating point without a FPU is if you get
   234       binary blobs from different vendors that are compiling this way and
   235       can't (don't wan't to) change.
   236 
   237 config ARCH_FLOAT_SW
   238     bool
   239     prompt "software"
   240     help
   241       Do not emit any hardware floating point opcode.
   242       
   243       If your processor has no FPU, then you most probably want this, as it
   244       is faster than emulating the FPU in the kernel.
   245 
   246 endchoice
   247 
   248 config TARGET_CFLAGS
   249     string
   250     prompt "Target CFLAGS"
   251     default ""
   252     help
   253       Used to add specific options when compiling libraries of the toolchain,
   254       that will run on the target (eg. libc.so).
   255       
   256       Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
   257       automaticaly used. You don't need to specify them here.
   258       
   259       Leave blank if you don't know better.
   260 
   261 config TARGET_LDFLAGS
   262     string
   263     prompt "Target LDFLAGS"
   264     default ""
   265     help
   266       Used to add specific options when linking libraries of the toolchain,
   267       that will run on your target.
   268       
   269       Leave blank if you don't know better.
   270 
   271 endmenu