config/target.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Sep 14 16:21:07 2008 +0000 (2008-09-14)
changeset 850 ef8549b58b6f
parent 791 78b6d5e1213d
child 854 f347a40db591
permissions -rw-r--r--
Introduce a new EXPERIMENTAL feature: BARE_METAL.
This should ultimately llow to build bare-metal compilers, for targets that have no kernel and no C library.
Move the C library build script to their own sub-directory; introduce an empty build script for bare-metal.
Move the compiler build script to its own sub-directory.
Move the kernel build script to its own sub-directory; introduce an empty build script for bare-metal.
Update the ARM target tuples to enable bare-metal targets.
Add two ARM bare-metal samples.
Add latest Linux kernel versions.

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