scripts/build/debug/100-dmalloc.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Aug 07 15:18:18 2008 +0000 (2008-08-07)
changeset 767 fe5e42bf7bbc
parent 523 010f6f4e4dd6
child 857 d72e65fe38d4
permissions -rw-r--r--
Introduce four new ARCH specific variables that CT_DoArchValues can set if they want:
- CT_ARCH_CC_CORE_EXTRA_CONFIG
- CT_ARCH_CC_EXTRA_CONFIG
- CT_ARCH_TARGET_CLFAGS
- CT_ARCH_TARGET_LDFLAGS
This will hopefully enable architectures to specify specific flags.
PowerPC will need them to introduce SPE (coming RSN).

/trunk/scripts/crosstool.sh | 2 2 0 0 ++
/trunk/scripts/functions | 4 2 2 0 ++--
/trunk/docs/overview.txt | 45 22 23 0 ++++++++++++++++++++++-----------------------
/trunk/config/target.in | 10 10 0 0 ++++++++++
4 files changed, 36 insertions(+), 25 deletions(-)
     1 # Build script for the dmalloc debug library facility
     2 
     3 is_enabled="${CT_DMALLOC}"
     4 
     5 do_print_filename() {
     6     [ "${CT_DMALLOC}" = "y" ] || return 0
     7     echo "dmalloc-${CT_DMALLOC_VERSION}"
     8 }
     9 
    10 do_debug_dmalloc_get() {
    11     CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/
    12 }
    13 
    14 do_debug_dmalloc_extract() {
    15     CT_ExtractAndPatch "dmalloc-${CT_DMALLOC_VERSION}"
    16 }
    17 
    18 do_debug_dmalloc_build() {
    19     CT_DoStep INFO "Installing dmalloc"
    20     CT_DoLog EXTRA "Configuring dmalloc"
    21 
    22     mkdir -p "${CT_BUILD_DIR}/build-dmalloc"
    23     cd "${CT_BUILD_DIR}/build-dmalloc"
    24 
    25     extra_config=
    26     case "${CT_CC_LANG_CXX}" in
    27         y)  extra_config="${extra_config} --enable-cxx";;
    28         *)  extra_config="${extra_config} --disable-cxx";;
    29     esac
    30     case "${CT_THREADS_NONE}" in
    31         y)  extra_config="${extra_config} --disable-threads";;
    32         *)  extra_config="${extra_config} --enable-threads";;
    33     esac
    34     case "${CT_SHARED_LIBS}" in
    35         y)  extra_config="${extra_config} --enable-shlib";;
    36         *)  extra_config="${extra_config} --disable-shlib";;
    37     esac
    38 
    39     CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
    40 
    41     LD="${CT_TARGET}-ld"                                        \
    42     AR="${CT_TARGET}-ar"                                        \
    43     CT_DoExecLog ALL                                            \
    44     "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure"     \
    45         --prefix=/usr                                           \
    46         --build="${CT_BUILD}"                                   \
    47         --host="${CT_TARGET}"                                   \
    48         ${extra_config}
    49 
    50     CT_DoLog EXTRA "Building dmalloc"
    51     CT_DoExecLog ALL make 2>&1 |CT_DoLog ALL
    52 
    53     CT_DoLog EXTRA "Installing dmalloc"
    54     CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" installincs installlib
    55     CT_DoExecLog ALL make DESTDIR="${CT_DEBUG_INSTALL_DIR}" installutil
    56 
    57     CT_EndStep
    58 }