config/target.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Sep 06 14:00:28 2007 +0000 (2007-09-06)
changeset 368 9355e869a76b
parent 347 10d6514f4f94
child 373 34612b693dde
permissions -rw-r--r--
ARM defaults to LE, MIPS to BE. Reflect this in the target configuration options.
     1 # Target definition: architecture, optimisations, etc...
     2 
     3 menu "Target options"
     4 
     5 comment "General target options"
     6 
     7 config ARCH
     8     string
     9     default "arm"     if ARCH_ARM
    10     default "mips"    if ARCH_MIPS
    11     default "x86"     if ARCH_x86
    12     default "x86_64"  if ARCH_x86_64
    13 
    14 choice
    15     bool
    16     prompt "Target architecture:"
    17     default ARCH_x86
    18 
    19 config ARCH_ARM
    20     bool
    21     prompt "arm"
    22     select ARCH_SUPPORTS_BOTH_ENDIAN
    23     select ARCH_DEFAULT_LE
    24 
    25 config ARCH_MIPS
    26     bool
    27     prompt "mips"
    28     select ARCH_SUPPORTS_BOTH_ENDIAN
    29     select ARCH_DEFAULT_BE
    30 
    31 config ARCH_x86
    32     bool
    33     prompt "x86"
    34 
    35 config ARCH_x86_64
    36     bool
    37     prompt "x86_64"
    38 
    39 endchoice
    40 
    41 config ARCH_SUPPORTS_BOTH_ENDIAN
    42     bool
    43     default n
    44 
    45 config ARCH_DEFAULT_BE
    46     bool
    47     default n
    48 
    49 config ARCH_DEFAULT_LE
    50     bool
    51     default n
    52 
    53 choice
    54     bool
    55     prompt "Endianness:"
    56     depends on ARCH_SUPPORTS_BOTH_ENDIAN
    57     default ARCH_BE if ARCH_DEFAULT_BE
    58     default ARCH_LE if ARCH_DEFAULT_LE
    59 
    60 config ARCH_BE
    61     bool
    62     prompt "Big endian"
    63 
    64 config ARCH_LE
    65     bool
    66     prompt "Little endian"
    67 
    68 endchoice
    69 
    70 comment "Target optimisations"
    71 
    72 config ARCH_ARCH
    73     string
    74     prompt "Achitecture level"
    75     default ""
    76     help
    77       GCC uses this name to determine what kind of instructions it can emit
    78       when generating assembly code. This option can be used in conjunction
    79       with or instead of the ARCH_CPU option (above), or a (command-line)
    80       -mcpu= option.
    81       
    82       This is the configuration flag --with-arch=XXXX, and the runtime flag
    83       -march=XXX.
    84       
    85       Pick a value from the gcc manual for your choosen gcc version and your
    86       target CPU.
    87       
    88       Leave blank if you don't know, or if your target architecture does not
    89       offer this option.
    90 
    91 config ARCH_ABI
    92     string
    93     prompt "Generate code for the specific ABI"
    94     default ""
    95     help
    96       Generate code for the given ABI.
    97 
    98       This is the configuration flag --with-abi=XXXX, and the runtime flag
    99       -mabi=XXX.
   100 
   101       Pick a value from the gcc manual for your choosen gcc version and your
   102       target CPU.
   103 
   104       Leave blank if you don't know, or if your target architecutre does not
   105       offer this option.
   106 
   107 config ARCH_CPU
   108     string
   109     prompt "Emit assembly for CPU"
   110     default ""
   111     help
   112       This specifies the name of the target processor. GCC uses this name
   113       to determine what kind of instructions it can emit when generating
   114       assembly code.
   115       
   116       This is the configuration flag --with-cpu=XXXX, and the runtime flag
   117       -mcpu=XXX.
   118 
   119       Pick a value from the gcc manual for your choosen gcc version and your
   120       target CPU.
   121       
   122       Leave blank if you don't know, or if your target architecture does not
   123       offer this option.
   124 
   125 config ARCH_TUNE
   126     string
   127     prompt "Tune for CPU"
   128     default ""
   129     help
   130       This option is very similar to the ARCH_CPU option (above), except
   131       that instead of specifying the actual target processor type, and hence
   132       restricting which instructions can be used, it specifies that GCC should
   133       tune the performance of the code as if the target were of the type
   134       specified in this option, but still choosing the instructions that it
   135       will generate based on the cpu specified by the ARCH_CPU option
   136       (above), or a (command-line) -mcpu= option.
   137       
   138       This is the configuration flag --with-tune=XXXX, and the runtime flag
   139       -mtune=XXX.
   140       
   141       Pick a value from the gcc manual for your choosen gcc version and your
   142       target CPU.
   143       
   144       Leave blank if you don't know, or if your target architecture does not
   145       offer this option.
   146 
   147 config ARCH_FPU
   148     string
   149     prompt "Use specific FPU"
   150     default ""
   151     help
   152       On some targets (eg. ARM), you can specify the kind of FPU to emit
   153       code for.
   154 
   155       This is the configuration flag --with-fpu=XXX, and the runtime flag
   156       -mfpu=XXX.
   157       
   158       See below wether to actually emit FP opcodes, or to emulate them.
   159       
   160       Pick a value from the gcc manual for your choosen gcc version and your
   161       target CPU.
   162       
   163       Leave blank if you don't know, or if your target architecture does not
   164       offer this option.
   165 
   166 choice
   167     bool
   168     prompt "Floating point:"
   169 
   170 config ARCH_FLOAT_HW
   171     bool
   172     prompt "hardware (FPU)"
   173     help
   174       Emit hardware floating point opcodes.
   175       
   176       If you've got a processor with a FPU, then you want that.
   177       If your hardware has no FPU, you still can use HW floating point, but
   178       need to compile support for FPU emulation in your kernel. Needless to
   179       say that emulating the FPU is /slooowwwww/...
   180       
   181       One situation you'd want HW floating point without a FPU is if you get
   182       binary blobs from different vendors that are compiling this way and
   183       can't (don't wan't to) change.
   184 
   185 config ARCH_FLOAT_SW
   186     bool
   187     prompt "software"
   188     help
   189       Do not emit any hardware floating point opcode.
   190       
   191       If your processor has no FPU, then you most probably want this, as it
   192       is faster than emulating the FPU in the kernel.
   193 
   194 endchoice
   195 
   196 config TARGET_CFLAGS
   197     string
   198     prompt "Target CFLAGS"
   199     default ""
   200     help
   201       Used to add specific options when compiling libraries of the toolchain,
   202       that will run on the target (eg. libc.so).
   203       
   204       Note that the options above for CPU, tune, arch and FPU will be
   205       automaticaly used. You don't need to specify them here.
   206       
   207       Leave blank if you don't know better.
   208 
   209 endmenu