scripts/build/tools/100-libelf.sh
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 479 05c62432ec19
child 916 68af6b83ff7e
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(-)
yann@479
     1
# Build script for libelf
yann@479
     2
yann@479
     3
is_enabled="${CT_LIBELF}"
yann@479
     4
yann@479
     5
do_print_filename() {
yann@479
     6
    [ "{CT_LIBELF}" = "y" ] || return 0
yann@479
     7
    echo "libelf-${CT_LIBELF_VERSION}"
yann@479
     8
}
yann@479
     9
yann@479
    10
do_tools_libelf_get() {
yann@479
    11
    # The server hosting libelf will return an "HTTP 300 : Multiple Choices"
yann@479
    12
    # error code if we try to download a file that does not exists there.
yann@479
    13
    # So we have to request the file with an explicit extension.
yann@479
    14
    CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/
yann@479
    15
}
yann@479
    16
yann@479
    17
do_tools_libelf_extract() {
yann@479
    18
    CT_ExtractAndPatch "libelf-${CT_LIBELF_VERSION}"
yann@479
    19
}
yann@479
    20
yann@479
    21
do_tools_libelf_build() {
yann@479
    22
    CT_DoStep INFO "Installing libelf"
yann@479
    23
    mkdir -p "${CT_BUILD_DIR}/build-libelf"
yann@479
    24
    CT_Pushd "${CT_BUILD_DIR}/build-libelf"
yann@479
    25
yann@479
    26
    CT_DoLog EXTRA "Configuring libelf"
yann@479
    27
    CC="${CT_TARGET}-gcc"                                   \
yann@663
    28
    CT_DoExecLog ALL                                        \
yann@479
    29
    "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure"   \
yann@479
    30
        --build=${CT_BUILD}                                 \
yann@479
    31
        --host=${CT_TARGET}                                 \
yann@479
    32
        --target=${CT_TARGET}                               \
yann@479
    33
        --prefix=/usr                                       \
yann@479
    34
        --enable-compat                                     \
yann@479
    35
        --enable-elf64                                      \
yann@479
    36
        --enable-shared                                     \
yann@479
    37
        --enable-extended-format                            \
yann@663
    38
        --enable-static
yann@479
    39
yann@479
    40
    CT_DoLog EXTRA "Building libelf"
yann@663
    41
    CT_DoExecLog ALL make
yann@479
    42
yann@479
    43
    CT_DoLog EXTRA "Installing libelf"
yann@663
    44
    CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install
yann@479
    45
yann@479
    46
    CT_Popd
yann@479
    47
    CT_EndStep
yann@479
    48
}
yann@479
    49