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