mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-20 05:17:54 +00:00
799672a641
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(-)
256 lines
6.4 KiB
Plaintext
256 lines
6.4 KiB
Plaintext
# Target definition: architecture, optimisations, etc...
|
|
|
|
menu "Target options"
|
|
|
|
config ARCH
|
|
string
|
|
|
|
# Pre-declare target optimisation variables
|
|
config ARCH_SUPPORT_ARCH
|
|
config ARCH_SUPPORT_ABI
|
|
config ARCH_SUPPORT_CPU
|
|
config ARCH_SUPPORT_TUNE
|
|
config ARCH_SUPPORT_FPU
|
|
config ARCH_SUPPORTS_BOTH_ENDIAN
|
|
config ARCH_DEFAULT_BE
|
|
config ARCH_DEFAULT_LE
|
|
config ARCH_ARCH
|
|
config ARCH_ABI
|
|
config ARCH_CPU
|
|
config ARCH_TUNE
|
|
config ARCH_FPU
|
|
config ARCH_BE
|
|
config ARCH_LE
|
|
config ARCH_FLOAT_HW
|
|
config ARCH_FLOAT_SW
|
|
config TARGET_CFLAGS
|
|
config TARGET_LDFLAGS
|
|
|
|
comment "General target options"
|
|
|
|
config BARE_METAL
|
|
bool
|
|
prompt "Bare metal (EXPERIMENTAL)"
|
|
default n
|
|
depends on EXPERIMENTAL
|
|
help
|
|
Say 'y' here if you want a simple C compiler with no C library.
|
|
|
|
You probably want to say 'y' here if you plan to use your compiler
|
|
to build only kernels or bootloaders
|
|
|
|
'Bare metal' also refer to those programs that run without any kernel.
|
|
|
|
choice
|
|
bool
|
|
prompt "Target architecture:"
|
|
|
|
source config.gen/arch.in
|
|
|
|
endchoice
|
|
|
|
config ARCH_SUPPORTS_BOTH_ENDIAN
|
|
bool
|
|
default n
|
|
|
|
config ARCH_DEFAULT_BE
|
|
bool
|
|
default n
|
|
|
|
config ARCH_DEFAULT_LE
|
|
bool
|
|
default n
|
|
|
|
choice
|
|
bool
|
|
prompt "Endianness:"
|
|
depends on ARCH_SUPPORTS_BOTH_ENDIAN
|
|
default ARCH_BE if ARCH_DEFAULT_BE
|
|
default ARCH_LE if ARCH_DEFAULT_LE
|
|
|
|
config ARCH_BE
|
|
bool
|
|
prompt "Big endian"
|
|
|
|
config ARCH_LE
|
|
bool
|
|
prompt "Little endian"
|
|
|
|
endchoice
|
|
|
|
comment "Target optimisations"
|
|
|
|
config ARCH_SUPPORT_ARCH
|
|
bool
|
|
default n
|
|
|
|
config ARCH_SUPPORT_ABI
|
|
bool
|
|
default n
|
|
|
|
config ARCH_SUPPORT_CPU
|
|
bool
|
|
default n
|
|
|
|
config ARCH_SUPPORT_TUNE
|
|
bool
|
|
default n
|
|
|
|
config ARCH_SUPPORT_FPU
|
|
bool
|
|
default n
|
|
|
|
config ARCH_ARCH
|
|
string
|
|
prompt "Architecture level"
|
|
depends on ARCH_SUPPORT_ARCH
|
|
default ""
|
|
help
|
|
GCC uses this name to determine what kind of instructions it can emit
|
|
when generating assembly code. This option can be used in conjunction
|
|
with or instead of the ARCH_CPU option (above), or a (command-line)
|
|
-mcpu= option.
|
|
|
|
This is the configuration flag --with-arch=XXXX, and the runtime flag
|
|
-march=XXX.
|
|
|
|
Pick a value from the gcc manual for your choosen gcc version and your
|
|
target CPU.
|
|
|
|
Leave blank if you don't know, or if your target architecture does not
|
|
offer this option.
|
|
|
|
config ARCH_ABI
|
|
string
|
|
prompt "Generate code for the specific ABI"
|
|
depends on ARCH_SUPPORT_ABI
|
|
default ""
|
|
help
|
|
Generate code for the given ABI.
|
|
|
|
This is the configuration flag --with-abi=XXXX, and the runtime flag
|
|
-mabi=XXX.
|
|
|
|
Pick a value from the gcc manual for your choosen gcc version and your
|
|
target CPU.
|
|
|
|
Leave blank if you don't know, or if your target architecutre does not
|
|
offer this option.
|
|
|
|
config ARCH_CPU
|
|
string
|
|
prompt "Emit assembly for CPU"
|
|
depends on ARCH_SUPPORT_CPU
|
|
default ""
|
|
help
|
|
This specifies the name of the target processor. GCC uses this name
|
|
to determine what kind of instructions it can emit when generating
|
|
assembly code.
|
|
|
|
This is the configuration flag --with-cpu=XXXX, and the runtime flag
|
|
-mcpu=XXX.
|
|
|
|
Pick a value from the gcc manual for your choosen gcc version and your
|
|
target CPU.
|
|
|
|
Leave blank if you don't know, or if your target architecture does not
|
|
offer this option.
|
|
|
|
config ARCH_TUNE
|
|
string
|
|
prompt "Tune for CPU"
|
|
depends on ARCH_SUPPORT_TUNE
|
|
default ""
|
|
help
|
|
This option is very similar to the ARCH_CPU option (above), except
|
|
that instead of specifying the actual target processor type, and hence
|
|
restricting which instructions can be used, it specifies that GCC should
|
|
tune the performance of the code as if the target were of the type
|
|
specified in this option, but still choosing the instructions that it
|
|
will generate based on the cpu specified by the ARCH_CPU option
|
|
(above), or a (command-line) -mcpu= option.
|
|
|
|
This is the configuration flag --with-tune=XXXX, and the runtime flag
|
|
-mtune=XXX.
|
|
|
|
Pick a value from the gcc manual for your choosen gcc version and your
|
|
target CPU.
|
|
|
|
Leave blank if you don't know, or if your target architecture does not
|
|
offer this option.
|
|
|
|
config ARCH_FPU
|
|
string
|
|
prompt "Use specific FPU"
|
|
depends on ARCH_SUPPORT_FPU
|
|
default ""
|
|
help
|
|
On some targets (eg. ARM), you can specify the kind of FPU to emit
|
|
code for.
|
|
|
|
This is the configuration flag --with-fpu=XXX, and the runtime flag
|
|
-mfpu=XXX.
|
|
|
|
See below wether to actually emit FP opcodes, or to emulate them.
|
|
|
|
Pick a value from the gcc manual for your choosen gcc version and your
|
|
target CPU.
|
|
|
|
Leave blank if you don't know, or if your target architecture does not
|
|
offer this option.
|
|
|
|
choice
|
|
bool
|
|
prompt "Floating point:"
|
|
|
|
config ARCH_FLOAT_HW
|
|
bool
|
|
prompt "hardware (FPU)"
|
|
help
|
|
Emit hardware floating point opcodes.
|
|
|
|
If you've got a processor with a FPU, then you want that.
|
|
If your hardware has no FPU, you still can use HW floating point, but
|
|
need to compile support for FPU emulation in your kernel. Needless to
|
|
say that emulating the FPU is /slooowwwww/...
|
|
|
|
One situation you'd want HW floating point without a FPU is if you get
|
|
binary blobs from different vendors that are compiling this way and
|
|
can't (don't wan't to) change.
|
|
|
|
config ARCH_FLOAT_SW
|
|
bool
|
|
prompt "software"
|
|
help
|
|
Do not emit any hardware floating point opcode.
|
|
|
|
If your processor has no FPU, then you most probably want this, as it
|
|
is faster than emulating the FPU in the kernel.
|
|
|
|
endchoice
|
|
|
|
config TARGET_CFLAGS
|
|
string
|
|
prompt "Target CFLAGS"
|
|
default ""
|
|
help
|
|
Used to add specific options when compiling libraries of the toolchain,
|
|
that will run on the target (eg. libc.so).
|
|
|
|
Note that the options above for ARCH, ABI, CPU, TUNE and FPU will be
|
|
automaticaly used. You don't need to specify them here.
|
|
|
|
Leave blank if you don't know better.
|
|
|
|
config TARGET_LDFLAGS
|
|
string
|
|
prompt "Target LDFLAGS"
|
|
default ""
|
|
help
|
|
Used to add specific options when linking libraries of the toolchain,
|
|
that will run on your target.
|
|
|
|
Leave blank if you don't know better.
|
|
|
|
endmenu
|