scripts/build/tools/100-libelf.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Oct 01 18:10:40 2008 +0000 (2008-10-01)
changeset 894 c444ce4b51b9
parent 479 05c62432ec19
child 916 68af6b83ff7e
permissions -rw-r--r--
Save the toolchain configuration to its own file, as an auto-extracting shell script:
- get rid of the 'extractconfig' action, it was cumbersome to use, and badly documented,
- introduce a skeleton for the config script,
- update auto-completion,
- document the config script.

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