config/target.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Nov 25 23:57:55 2011 +0100 (2011-11-25)
changeset 2789 e6b5bd481942
parent 2788 b6faa28e76e0
child 2794 561bce585313
permissions -rw-r--r--
config/target: add float support selection

Changeset #149c33923f47 broke the architectures that do not
support the --with-float=X ./configure flag (in gcc). For example,
x86_64 does not support it.

Add a new blind config option that architectures can set to tell
they support floating point selection.

Reported-by: Morten Thunberg Svendsen <mts@doredevelopment.dk>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@1
     1
# Target definition: architecture, optimisations, etc...
yann@1
     2
yann@1
     3
menu "Target options"
yann@1
     4
yann@47
     5
config ARCH
yann@47
     6
    string
yann@628
     7
yann@628
     8
# Pre-declare target optimisation variables
yann@1345
     9
config ARCH_SUPPORTS_BOTH_MMU
yann@1345
    10
config ARCH_SUPPORTS_BOTH_ENDIAN
yann@1633
    11
config ARCH_SUPPORTS_32
yann@1633
    12
config ARCH_SUPPORTS_64
yann@2788
    13
config ARCH_SUPPORTS_WITH_ARCH
yann@2788
    14
config ARCH_SUPPORTS_WITH_ABI
yann@2788
    15
config ARCH_SUPPORTS_WITH_CPU
yann@2788
    16
config ARCH_SUPPORTS_WITH_TUNE
yann@2789
    17
config ARCH_SUPPORTS_WITH_FLOAT
yann@2788
    18
config ARCH_SUPPORTS_WITH_FPU
yann@2788
    19
config ARCH_SUPPORTS_SOFTFP
yann@1345
    20
yann@1345
    21
config ARCH_DEFAULT_HAS_MMU
yann@628
    22
config ARCH_DEFAULT_BE
yann@628
    23
config ARCH_DEFAULT_LE
yann@1633
    24
config ARCH_DEFAULT_32
yann@1633
    25
config ARCH_DEFAULT_64
yann@1345
    26
yann@633
    27
config ARCH_ARCH
yann@633
    28
config ARCH_ABI
yann@633
    29
config ARCH_CPU
yann@633
    30
config ARCH_TUNE
yann@633
    31
config ARCH_FPU
yann@633
    32
config ARCH_BE
yann@633
    33
config ARCH_LE
yann@1638
    34
config ARCH_32
yann@1638
    35
config ARCH_64
yann@1715
    36
config ARCH_BITNESS
yann@628
    37
config ARCH_FLOAT_HW
yann@628
    38
config ARCH_FLOAT_SW
yann@628
    39
config TARGET_CFLAGS
yann@791
    40
config TARGET_LDFLAGS
yann@628
    41
yann@1870
    42
source "config.gen/arch.in"
yann@1
    43
yann@1345
    44
#--------------------------------------
yann@2413
    45
comment "Generic target options"
yann@2413
    46
yann@1345
    47
config ARCH_SUPPORTS_BOTH_MMU
yann@1345
    48
    bool
yann@1345
    49
yann@1345
    50
config ARCH_DEFAULT_HAS_MMU
yann@1345
    51
    bool
yann@1345
    52
yann@1345
    53
config ARCH_USE_MMU
yann@1345
    54
    bool
yann@1345
    55
    prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
yann@1345
    56
    default y if ARCH_DEFAULT_HAS_MMU
yann@1586
    57
    help
yann@1586
    58
      If your architecture has an MMU and you want to use it,
yann@1586
    59
      say 'Y' here.
yann@1586
    60
      
yann@1586
    61
      OTOH, if you don't want to use the MMU, or your arch
yann@1586
    62
      lacks an MMU, say 'N' here.
yann@1586
    63
      
yann@1586
    64
      Note that some architectures (eg. ARM) has variants that
yann@1586
    65
      lacks an MMU (eg. ARM Cortex-M3), while other variants
yann@1586
    66
      have one (eg. ARM Cortex-A8).
yann@1345
    67
yann@1345
    68
#--------------------------------------
yann@136
    69
config ARCH_SUPPORTS_BOTH_ENDIAN
yann@35
    70
    bool
yann@35
    71
yann@347
    72
config ARCH_DEFAULT_BE
yann@347
    73
    bool
yann@347
    74
yann@347
    75
config ARCH_DEFAULT_LE
yann@347
    76
    bool
yann@347
    77
yann@1
    78
choice
yann@1
    79
    bool
yann@1
    80
    prompt "Endianness:"
yann@136
    81
    depends on ARCH_SUPPORTS_BOTH_ENDIAN
yann@347
    82
    default ARCH_BE if ARCH_DEFAULT_BE
yann@347
    83
    default ARCH_LE if ARCH_DEFAULT_LE
yann@1
    84
yann@1
    85
config ARCH_BE
yann@1
    86
    bool
yann@1
    87
    prompt "Big endian"
yann@1
    88
yann@1
    89
config ARCH_LE
yann@1
    90
    bool
yann@1
    91
    prompt "Little endian"
yann@1
    92
yann@1
    93
endchoice
yann@1
    94
yann@2772
    95
config ARCH_ENDIAN
yann@2772
    96
    string
yann@2772
    97
    depends on ARCH_SUPPORTS_BOTH_ENDIAN
yann@2772
    98
    default "big"       if ARCH_BE
yann@2772
    99
    default "little"    if ARCH_LE
yann@2772
   100
yann@1345
   101
#--------------------------------------
yann@1633
   102
config ARCH_SUPPORTS_32
yann@1633
   103
    bool
yann@1633
   104
yann@1633
   105
config ARCH_SUPPORTS_64
yann@1633
   106
    bool
yann@1633
   107
yann@1633
   108
config ARCH_DEFAULT_32
yann@1633
   109
    bool
yann@1633
   110
yann@1633
   111
config ARCH_DEFAULT_64
yann@1633
   112
    bool
yann@1633
   113
yann@1715
   114
config ARCH_BITNESS
yann@1715
   115
    int
yann@1715
   116
    default "32"    if ARCH_32
yann@1715
   117
    default "64"    if ARCH_64
yann@1715
   118
yann@1633
   119
choice
yann@1633
   120
    bool
yann@1633
   121
    prompt "Bitness:"
yann@1638
   122
    default ARCH_32 if ARCH_DEFAULT_32
yann@1638
   123
    default ARCH_64 if ARCH_DEFAULT_64
yann@1633
   124
yann@1638
   125
config ARCH_32
yann@1633
   126
    bool
yann@1633
   127
    prompt "32-bit"
yann@1633
   128
    depends on ARCH_SUPPORTS_32
yann@1633
   129
yann@1638
   130
config ARCH_64
yann@1633
   131
    bool
yann@1633
   132
    prompt "64-bit"
yann@1633
   133
    depends on ARCH_SUPPORTS_64
yann@1633
   134
yann@1633
   135
endchoice
yann@1633
   136
yann@1633
   137
#--------------------------------------
yann@1
   138
comment "Target optimisations"
yann@1
   139
yann@2788
   140
config ARCH_SUPPORTS_WITH_ARCH
yann@631
   141
    bool
yann@631
   142
yann@2788
   143
config ARCH_SUPPORTS_WITH_ABI
yann@631
   144
    bool
yann@631
   145
yann@2788
   146
config ARCH_SUPPORTS_WITH_CPU
yann@631
   147
    bool
yann@631
   148
yann@2788
   149
config ARCH_SUPPORTS_WITH_TUNE
yann@631
   150
    bool
yann@631
   151
yann@2789
   152
config ARCH_SUPPORTS_WITH_FLOAT
yann@2789
   153
    bool
yann@2789
   154
yann@2788
   155
config ARCH_SUPPORTS_WITH_FPU
yann@631
   156
    bool
yann@631
   157
yann@2788
   158
config ARCH_SUPPORTS_SOFTFP
michael@2739
   159
    bool
michael@2739
   160
yann@47
   161
config ARCH_ARCH
yann@47
   162
    string
yann@425
   163
    prompt "Architecture level"
yann@2788
   164
    depends on ARCH_SUPPORTS_WITH_ARCH
yann@47
   165
    default ""
yann@47
   166
    help
yann@47
   167
      GCC uses this name to determine what kind of instructions it can emit
yann@47
   168
      when generating assembly code. This option can be used in conjunction
yann@47
   169
      with or instead of the ARCH_CPU option (above), or a (command-line)
yann@47
   170
      -mcpu= option.
yann@47
   171
      
yann@47
   172
      This is the configuration flag --with-arch=XXXX, and the runtime flag
yann@47
   173
      -march=XXX.
yann@47
   174
      
yann@47
   175
      Pick a value from the gcc manual for your choosen gcc version and your
yann@47
   176
      target CPU.
yann@47
   177
      
yann@47
   178
      Leave blank if you don't know, or if your target architecture does not
yann@47
   179
      offer this option.
yann@47
   180
yann@45
   181
config ARCH_ABI
yann@45
   182
    string
yann@45
   183
    prompt "Generate code for the specific ABI"
yann@2788
   184
    depends on ARCH_SUPPORTS_WITH_ABI
yann@45
   185
    default ""
yann@45
   186
    help
yann@45
   187
      Generate code for the given ABI.
yann@45
   188
yann@47
   189
      This is the configuration flag --with-abi=XXXX, and the runtime flag
yann@47
   190
      -mabi=XXX.
yann@47
   191
yann@45
   192
      Pick a value from the gcc manual for your choosen gcc version and your
yann@45
   193
      target CPU.
yann@45
   194
antony@2564
   195
      Leave blank if you don't know, or if your target architecture does not
yann@45
   196
      offer this option.
yann@45
   197
yann@1
   198
config ARCH_CPU
yann@1
   199
    string
yann@1
   200
    prompt "Emit assembly for CPU"
yann@2788
   201
    depends on ARCH_SUPPORTS_WITH_CPU
yann@1
   202
    default ""
yann@1
   203
    help
yann@283
   204
      This specifies the name of the target processor. GCC uses this name
yann@1
   205
      to determine what kind of instructions it can emit when generating
yann@1
   206
      assembly code.
yann@1
   207
      
yann@47
   208
      This is the configuration flag --with-cpu=XXXX, and the runtime flag
yann@47
   209
      -mcpu=XXX.
yann@47
   210
yann@1
   211
      Pick a value from the gcc manual for your choosen gcc version and your
yann@1
   212
      target CPU.
yann@1
   213
      
yann@1
   214
      Leave blank if you don't know, or if your target architecture does not
yann@1
   215
      offer this option.
yann@1
   216
yann@1
   217
config ARCH_TUNE
yann@1
   218
    string
yann@1
   219
    prompt "Tune for CPU"
yann@2788
   220
    depends on ARCH_SUPPORTS_WITH_TUNE
yann@1
   221
    default ""
yann@1
   222
    help
yann@1
   223
      This option is very similar to the ARCH_CPU option (above), except
yann@1
   224
      that instead of specifying the actual target processor type, and hence
yann@1
   225
      restricting which instructions can be used, it specifies that GCC should
yann@1
   226
      tune the performance of the code as if the target were of the type
yann@1
   227
      specified in this option, but still choosing the instructions that it
yann@1
   228
      will generate based on the cpu specified by the ARCH_CPU option
yann@1
   229
      (above), or a (command-line) -mcpu= option.
yann@1
   230
      
yann@47
   231
      This is the configuration flag --with-tune=XXXX, and the runtime flag
yann@47
   232
      -mtune=XXX.
yann@1
   233
      
yann@1
   234
      Pick a value from the gcc manual for your choosen gcc version and your
yann@1
   235
      target CPU.
yann@1
   236
      
yann@1
   237
      Leave blank if you don't know, or if your target architecture does not
yann@1
   238
      offer this option.
yann@1
   239
yann@1
   240
config ARCH_FPU
yann@1
   241
    string
yann@47
   242
    prompt "Use specific FPU"
yann@2788
   243
    depends on ARCH_SUPPORTS_WITH_FPU
yann@1
   244
    default ""
yann@1
   245
    help
yann@1
   246
      On some targets (eg. ARM), you can specify the kind of FPU to emit
yann@1
   247
      code for.
yann@47
   248
yann@47
   249
      This is the configuration flag --with-fpu=XXX, and the runtime flag
yann@47
   250
      -mfpu=XXX.
yann@1
   251
      
yann@1
   252
      See below wether to actually emit FP opcodes, or to emulate them.
yann@1
   253
      
yann@1
   254
      Pick a value from the gcc manual for your choosen gcc version and your
yann@1
   255
      target CPU.
yann@1
   256
      
yann@1
   257
      Leave blank if you don't know, or if your target architecture does not
yann@1
   258
      offer this option.
yann@1
   259
yann@1
   260
choice
yann@1
   261
    bool
yann@1
   262
    prompt "Floating point:"
yann@1
   263
yann@1
   264
config ARCH_FLOAT_HW
yann@1
   265
    bool
yann@1
   266
    prompt "hardware (FPU)"
yann@1
   267
    help
yann@1
   268
      Emit hardware floating point opcodes.
yann@1
   269
      
yann@1
   270
      If you've got a processor with a FPU, then you want that.
yann@1
   271
      If your hardware has no FPU, you still can use HW floating point, but
yann@1
   272
      need to compile support for FPU emulation in your kernel. Needless to
yann@1
   273
      say that emulating the FPU is /slooowwwww/...
yann@1
   274
      
yann@1
   275
      One situation you'd want HW floating point without a FPU is if you get
yann@1
   276
      binary blobs from different vendors that are compiling this way and
yann@1
   277
      can't (don't wan't to) change.
yann@1
   278
yann@1
   279
config ARCH_FLOAT_SW
yann@1
   280
    bool
yann@1
   281
    prompt "software"
yann@1
   282
    help
yann@1
   283
      Do not emit any hardware floating point opcode.
yann@1
   284
      
yann@1
   285
      If your processor has no FPU, then you most probably want this, as it
yann@1
   286
      is faster than emulating the FPU in the kernel.
yann@1
   287
michael@2739
   288
config ARCH_FLOAT_SOFTFP
michael@2739
   289
    bool
michael@2739
   290
    prompt "softfp"
yann@2788
   291
    depends on ARCH_SUPPORTS_SOFTFP
michael@2739
   292
    help
michael@2739
   293
      Emit hardware floating point opcodes but use the software
michael@2739
   294
      floating point calling convention.
michael@2739
   295
michael@2739
   296
      Architectures such as ARM use different registers for passing
michael@2739
   297
      floating point values depending on if they're in software mode
michael@2739
   298
      or hardware mode.  softfp emits FPU instructions but uses the
michael@2739
   299
      software FP calling convention allowing softfp code to
michael@2739
   300
      interoperate with legacy software only code.
michael@2739
   301
michael@2739
   302
      If in doubt, use 'software' or 'hardware' mode instead.
michael@2739
   303
yann@1
   304
endchoice
yann@1
   305
yann@1
   306
config TARGET_CFLAGS
yann@1
   307
    string
yann@41
   308
    prompt "Target CFLAGS"
yann@1
   309
    default ""
yann@1
   310
    help
yann@1
   311
      Used to add specific options when compiling libraries of the toolchain,
yann@1
   312
      that will run on the target (eg. libc.so).
yann@1
   313
      
yann@531
   314
      Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
antony@2564
   315
      automatically used. You don't need to specify them here.
yann@1
   316
      
yann@1
   317
      Leave blank if you don't know better.
yann@1
   318
yann@767
   319
config TARGET_LDFLAGS
yann@767
   320
    string
yann@767
   321
    prompt "Target LDFLAGS"
yann@767
   322
    default ""
yann@767
   323
    help
yann@767
   324
      Used to add specific options when linking libraries of the toolchain,
yann@767
   325
      that will run on your target.
yann@767
   326
      
yann@767
   327
      Leave blank if you don't know better.
yann@767
   328
michael@2737
   329
config ARCH_FLOAT
michael@2737
   330
    string
michael@2737
   331
    default "hard"   if ARCH_FLOAT_HW
michael@2737
   332
    default "soft"   if ARCH_FLOAT_SW
michael@2739
   333
    default "softfp" if ARCH_FLOAT_SOFTFP
michael@2737
   334
yann@2413
   335
source "config.gen/arch.in.2"
yann@2413
   336
yann@1
   337
endmenu