config/target.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jan 07 23:05:30 2010 +0100 (2010-01-07)
changeset 1704 6df0d71a7a55
parent 1633 95c28d483690
child 1715 18eb650d191a
permissions -rw-r--r--
config: don't force the vendor part in the tuple

Note however that some configurations (eg. arm-elf) will still
have the vendor part 'unknown' forced in (by config.sub).
     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_SUPPORT_ARCH
    14 config ARCH_SUPPORT_ABI
    15 config ARCH_SUPPORT_CPU
    16 config ARCH_SUPPORT_TUNE
    17 config ARCH_SUPPORT_FPU
    18 
    19 config ARCH_DEFAULT_HAS_MMU
    20 config ARCH_DEFAULT_BE
    21 config ARCH_DEFAULT_LE
    22 config ARCH_DEFAULT_32
    23 config ARCH_DEFAULT_64
    24 
    25 config ARCH_ARCH
    26 config ARCH_ABI
    27 config ARCH_CPU
    28 config ARCH_TUNE
    29 config ARCH_FPU
    30 config ARCH_BE
    31 config ARCH_LE
    32 config ARCH_32
    33 config ARCH_64
    34 config ARCH_FLOAT_HW
    35 config ARCH_FLOAT_SW
    36 config TARGET_CFLAGS
    37 config TARGET_LDFLAGS
    38 
    39 comment "General target options"
    40 
    41 source config.gen/arch.in
    42 
    43 #--------------------------------------
    44 config ARCH_SUPPORTS_BOTH_MMU
    45     bool
    46     default n
    47 
    48 config ARCH_DEFAULT_HAS_MMU
    49     bool
    50     default n
    51 
    52 config ARCH_USE_MMU
    53     bool
    54     prompt "Use the MMU" if ARCH_SUPPORTS_BOTH_MMU
    55     default n if ! ARCH_DEFAULT_HAS_MMU
    56     default y if ARCH_DEFAULT_HAS_MMU
    57     help
    58       If your architecture has an MMU and you want to use it,
    59       say 'Y' here.
    60       
    61       OTOH, if you don't want to use the MMU, or your arch
    62       lacks an MMU, say 'N' here.
    63       
    64       Note that some architectures (eg. ARM) has variants that
    65       lacks an MMU (eg. ARM Cortex-M3), while other variants
    66       have one (eg. ARM Cortex-A8).
    67 
    68 #--------------------------------------
    69 config ARCH_SUPPORTS_BOTH_ENDIAN
    70     bool
    71     default n
    72 
    73 config ARCH_DEFAULT_BE
    74     bool
    75     default n
    76 
    77 config ARCH_DEFAULT_LE
    78     bool
    79     default n
    80 
    81 choice
    82     bool
    83     prompt "Endianness:"
    84     depends on ARCH_SUPPORTS_BOTH_ENDIAN
    85     default ARCH_BE if ARCH_DEFAULT_BE
    86     default ARCH_LE if ARCH_DEFAULT_LE
    87 
    88 config ARCH_BE
    89     bool
    90     prompt "Big endian"
    91 
    92 config ARCH_LE
    93     bool
    94     prompt "Little endian"
    95 
    96 endchoice
    97 
    98 #--------------------------------------
    99 config ARCH_SUPPORTS_32
   100     bool
   101     default n
   102 
   103 config ARCH_SUPPORTS_64
   104     bool
   105     default n
   106 
   107 config ARCH_DEFAULT_32
   108     bool
   109     default n
   110 
   111 config ARCH_DEFAULT_64
   112     bool
   113     default n
   114 
   115 choice
   116     bool
   117     prompt "Bitness:"
   118     default ARCH_32 if ARCH_DEFAULT_32
   119     default ARCH_64 if ARCH_DEFAULT_64
   120 
   121 config ARCH_32
   122     bool
   123     prompt "32-bit"
   124     depends on ARCH_SUPPORTS_32
   125 
   126 config ARCH_64
   127     bool
   128     prompt "64-bit"
   129     depends on ARCH_SUPPORTS_64
   130 
   131 endchoice
   132 
   133 #--------------------------------------
   134 comment "Target optimisations"
   135 
   136 config ARCH_SUPPORT_ARCH
   137     bool
   138     default n
   139 
   140 config ARCH_SUPPORT_ABI
   141     bool
   142     default n
   143 
   144 config ARCH_SUPPORT_CPU
   145     bool
   146     default n
   147 
   148 config ARCH_SUPPORT_TUNE
   149     bool
   150     default n
   151 
   152 config ARCH_SUPPORT_FPU
   153     bool
   154     default n
   155 
   156 config ARCH_ARCH
   157     string
   158     prompt "Architecture level"
   159     depends on ARCH_SUPPORT_ARCH
   160     default ""
   161     help
   162       GCC uses this name to determine what kind of instructions it can emit
   163       when generating assembly code. This option can be used in conjunction
   164       with or instead of the ARCH_CPU option (above), or a (command-line)
   165       -mcpu= option.
   166       
   167       This is the configuration flag --with-arch=XXXX, and the runtime flag
   168       -march=XXX.
   169       
   170       Pick a value from the gcc manual for your choosen gcc version and your
   171       target CPU.
   172       
   173       Leave blank if you don't know, or if your target architecture does not
   174       offer this option.
   175 
   176 config ARCH_ABI
   177     string
   178     prompt "Generate code for the specific ABI"
   179     depends on ARCH_SUPPORT_ABI
   180     default ""
   181     help
   182       Generate code for the given ABI.
   183 
   184       This is the configuration flag --with-abi=XXXX, and the runtime flag
   185       -mabi=XXX.
   186 
   187       Pick a value from the gcc manual for your choosen gcc version and your
   188       target CPU.
   189 
   190       Leave blank if you don't know, or if your target architecutre does not
   191       offer this option.
   192 
   193 config ARCH_CPU
   194     string
   195     prompt "Emit assembly for CPU"
   196     depends on ARCH_SUPPORT_CPU
   197     default ""
   198     help
   199       This specifies the name of the target processor. GCC uses this name
   200       to determine what kind of instructions it can emit when generating
   201       assembly code.
   202       
   203       This is the configuration flag --with-cpu=XXXX, and the runtime flag
   204       -mcpu=XXX.
   205 
   206       Pick a value from the gcc manual for your choosen gcc version and your
   207       target CPU.
   208       
   209       Leave blank if you don't know, or if your target architecture does not
   210       offer this option.
   211 
   212 config ARCH_TUNE
   213     string
   214     prompt "Tune for CPU"
   215     depends on ARCH_SUPPORT_TUNE
   216     default ""
   217     help
   218       This option is very similar to the ARCH_CPU option (above), except
   219       that instead of specifying the actual target processor type, and hence
   220       restricting which instructions can be used, it specifies that GCC should
   221       tune the performance of the code as if the target were of the type
   222       specified in this option, but still choosing the instructions that it
   223       will generate based on the cpu specified by the ARCH_CPU option
   224       (above), or a (command-line) -mcpu= option.
   225       
   226       This is the configuration flag --with-tune=XXXX, and the runtime flag
   227       -mtune=XXX.
   228       
   229       Pick a value from the gcc manual for your choosen gcc version and your
   230       target CPU.
   231       
   232       Leave blank if you don't know, or if your target architecture does not
   233       offer this option.
   234 
   235 config ARCH_FPU
   236     string
   237     prompt "Use specific FPU"
   238     depends on ARCH_SUPPORT_FPU
   239     default ""
   240     help
   241       On some targets (eg. ARM), you can specify the kind of FPU to emit
   242       code for.
   243 
   244       This is the configuration flag --with-fpu=XXX, and the runtime flag
   245       -mfpu=XXX.
   246       
   247       See below wether to actually emit FP opcodes, or to emulate them.
   248       
   249       Pick a value from the gcc manual for your choosen gcc version and your
   250       target CPU.
   251       
   252       Leave blank if you don't know, or if your target architecture does not
   253       offer this option.
   254 
   255 choice
   256     bool
   257     prompt "Floating point:"
   258 
   259 config ARCH_FLOAT_HW
   260     bool
   261     prompt "hardware (FPU)"
   262     help
   263       Emit hardware floating point opcodes.
   264       
   265       If you've got a processor with a FPU, then you want that.
   266       If your hardware has no FPU, you still can use HW floating point, but
   267       need to compile support for FPU emulation in your kernel. Needless to
   268       say that emulating the FPU is /slooowwwww/...
   269       
   270       One situation you'd want HW floating point without a FPU is if you get
   271       binary blobs from different vendors that are compiling this way and
   272       can't (don't wan't to) change.
   273 
   274 config ARCH_FLOAT_SW
   275     bool
   276     prompt "software"
   277     help
   278       Do not emit any hardware floating point opcode.
   279       
   280       If your processor has no FPU, then you most probably want this, as it
   281       is faster than emulating the FPU in the kernel.
   282 
   283 endchoice
   284 
   285 config TARGET_CFLAGS
   286     string
   287     prompt "Target CFLAGS"
   288     default ""
   289     help
   290       Used to add specific options when compiling libraries of the toolchain,
   291       that will run on the target (eg. libc.so).
   292       
   293       Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
   294       automaticaly used. You don't need to specify them here.
   295       
   296       Leave blank if you don't know better.
   297 
   298 config TARGET_LDFLAGS
   299     string
   300     prompt "Target LDFLAGS"
   301     default ""
   302     help
   303       Used to add specific options when linking libraries of the toolchain,
   304       that will run on your target.
   305       
   306       Leave blank if you don't know better.
   307 
   308 endmenu