config/target.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 21 22:00:52 2008 +0000 (2008-05-21)
changeset 527 4ac12179ef23
parent 447 db8bd468b0c0
child 531 77df8ff1f383
permissions -rw-r--r--
Introduce target-specific LDFLAGS, the same way we have CFLAGS for the target.
It seems to be helping gcc somewhat into telling the correct endianness to ld that sticks with little endian even when the target is big (eg armeb-unknown-linux-uclibcgnueabi).
There's still work to do, especially finish the gcc part that is not in this commit.

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