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