config/target.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Thu Jan 10 00:27:13 2013 +0100 (2013-01-10)
changeset 3159 fb71cad4b085
parent 3140 d9e78e89b3f6
child 3169 9d0b37f08a10
permissions -rw-r--r--
arch/arm: OABI is no more, switch to only EABI

Well, leave the prompt as an OBSOLETE thing, scheduled to
be removed soon.

As an indication OABI lives its last days, gcc-4.8 will no
longer recognise non-EABI targets.

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