scripts/build/tools/100-libelf.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Jan 13 20:46:01 2010 +0100 (2010-01-13)
changeset 1732 6b2ae7804c6f
parent 1112 c72aecd1a9ef
permissions -rw-r--r--
debug/gdb: staticaly link to ncurses for the native gdb

Staticaly link the native gdb (the one that runs on the target,
not the cross one that runs on the host) to ncurses.
yann@479
     1
# Build script for libelf
yann@479
     2
yann@479
     3
do_tools_libelf_get() {
yann@479
     4
    # The server hosting libelf will return an "HTTP 300 : Multiple Choices"
yann@479
     5
    # error code if we try to download a file that does not exists there.
yann@479
     6
    # So we have to request the file with an explicit extension.
yann@479
     7
    CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/
yann@479
     8
}
yann@479
     9
yann@479
    10
do_tools_libelf_extract() {
yann@1126
    11
    CT_Extract "libelf-${CT_LIBELF_VERSION}"
yann@1126
    12
    CT_Patch "libelf-${CT_LIBELF_VERSION}"
yann@479
    13
}
yann@479
    14
yann@479
    15
do_tools_libelf_build() {
yann@479
    16
    CT_DoStep INFO "Installing libelf"
yann@479
    17
    mkdir -p "${CT_BUILD_DIR}/build-libelf"
yann@479
    18
    CT_Pushd "${CT_BUILD_DIR}/build-libelf"
yann@479
    19
yann@479
    20
    CT_DoLog EXTRA "Configuring libelf"
yann@479
    21
    CC="${CT_TARGET}-gcc"                                   \
yann@663
    22
    CT_DoExecLog ALL                                        \
yann@479
    23
    "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure"   \
yann@479
    24
        --build=${CT_BUILD}                                 \
yann@479
    25
        --host=${CT_TARGET}                                 \
yann@479
    26
        --target=${CT_TARGET}                               \
yann@479
    27
        --prefix=/usr                                       \
yann@479
    28
        --enable-compat                                     \
yann@479
    29
        --enable-elf64                                      \
yann@479
    30
        --enable-shared                                     \
yann@479
    31
        --enable-extended-format                            \
yann@663
    32
        --enable-static
yann@479
    33
yann@479
    34
    CT_DoLog EXTRA "Building libelf"
yann@663
    35
    CT_DoExecLog ALL make
yann@479
    36
yann@479
    37
    CT_DoLog EXTRA "Installing libelf"
yann@663
    38
    CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install
yann@479
    39
yann@479
    40
    CT_Popd
yann@479
    41
    CT_EndStep
yann@479
    42
}
yann@479
    43