scripts/build/tools/100-libelf.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 24 15:40:58 2008 +0000 (2008-10-24)
changeset 973 6709d9a12f69
parent 663 3c8d3ef50106
child 1112 c72aecd1a9ef
permissions -rw-r--r--
Make ltrace finally build:
- copy sources to build directory, as it does not build out-of-tree
- add a patch to make it build for non *-linux-gnu host tuples
- add a patch to make it cross-build correctly

/trunk/patches/ltrace/0.4/100-fix-build-with-exotic-linux-host-OS.patch | 26 26 0 0 +++
/trunk/patches/ltrace/0.4/110-allow-cross-compile.patch | 89 89 0 0 ++++++++++
/trunk/scripts/build/debug/400-ltrace.sh | 5 3 2 0 +
3 files changed, 118 insertions(+), 2 deletions(-)
     1 # Build script for libelf
     2 
     3 do_print_filename() {
     4     echo "libelf-${CT_LIBELF_VERSION}"
     5 }
     6 
     7 do_tools_libelf_get() {
     8     # The server hosting libelf will return an "HTTP 300 : Multiple Choices"
     9     # error code if we try to download a file that does not exists there.
    10     # So we have to request the file with an explicit extension.
    11     CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/
    12 }
    13 
    14 do_tools_libelf_extract() {
    15     CT_ExtractAndPatch "libelf-${CT_LIBELF_VERSION}"
    16 }
    17 
    18 do_tools_libelf_build() {
    19     CT_DoStep INFO "Installing libelf"
    20     mkdir -p "${CT_BUILD_DIR}/build-libelf"
    21     CT_Pushd "${CT_BUILD_DIR}/build-libelf"
    22 
    23     CT_DoLog EXTRA "Configuring libelf"
    24     CC="${CT_TARGET}-gcc"                                   \
    25     CT_DoExecLog ALL                                        \
    26     "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure"   \
    27         --build=${CT_BUILD}                                 \
    28         --host=${CT_TARGET}                                 \
    29         --target=${CT_TARGET}                               \
    30         --prefix=/usr                                       \
    31         --enable-compat                                     \
    32         --enable-elf64                                      \
    33         --enable-shared                                     \
    34         --enable-extended-format                            \
    35         --enable-static
    36 
    37     CT_DoLog EXTRA "Building libelf"
    38     CT_DoExecLog ALL make
    39 
    40     CT_DoLog EXTRA "Installing libelf"
    41     CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install
    42 
    43     CT_Popd
    44     CT_EndStep
    45 }
    46