scripts/build/tools/100-libelf.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Mar 03 17:41:59 2009 +0000 (2009-03-03)
changeset 1219 2b875ed306c2
parent 1112 c72aecd1a9ef
permissions -rw-r--r--
Allow user to add a directory component in the sys-root path.
Rename CT_DEBUG_INSTALL_DIR to CT_DEBUGROOT_DIR (to match CT_SYSROOT_DIR).
As a side effect, fix creating lib64->lib symlinks.

/trunk/scripts/build/debug/100-dmalloc.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/400-ltrace.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 6 3 3 0 +++---
/trunk/scripts/build/debug/500-strace.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/200-duma.sh | 6 3 3 0 +++---
/trunk/scripts/crosstool-NG.sh.in | 16 7 9 0 +++++++---------
/trunk/scripts/functions | 2 1 1 0 +-
/trunk/config/toolchain.in | 17 17 0 0 +++++++++++++++++
8 files changed, 34 insertions(+), 19 deletions(-)
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