config/target.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sat May 10 12:33:37 2014 +0200 (2014-05-10)
changeset 3308 b571b3566915
parent 3150 1d6fd9bde73c
child 3310 6fb47591d19d
permissions -rw-r--r--
scripts: remove references to curl

It's been a while we're not using curl anymore.

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