scripts/build/companion_libs/ppl.sh
author Kalle Kankare <kalle.kankare@vincit.fi>
Fri Dec 03 12:36:44 2010 +0100 (2010-12-03)
changeset 2216 81b4c0efa46f
parent 2099 1bb063c8a0ca
child 2275 9ab4392430ad
permissions -rw-r--r--
complibs/libelf: use host compiler

It appears, that the configure scripts of libelf versions 0.8.13 and
0.8.12 do not honour the --host option. The compiler must be given as an
environment variable or the process will use the command "gcc" as the
compiler.

It seems that this is already done in the function do_libelf_target in
scripts/build/companion_libs/libelf.sh, but not in function do_libelf.
yann@1324
     1
# This file adds the functions to build the PPL library
yann@1324
     2
# Copyright 2009 Yann E. MORIN
yann@1324
     3
# Licensed under the GPL v2. See COPYING in the root of this package
yann@1324
     4
yann@1324
     5
do_ppl_get() { :; }
yann@1324
     6
do_ppl_extract() { :; }
yann@1324
     7
do_ppl() { :; }
yann@1324
     8
yann@1324
     9
# Overide functions depending on configuration
yann@1808
    10
if [ "${CT_PPL}" = "y" ]; then
yann@1324
    11
yann@1324
    12
# Download PPL
yann@1324
    13
do_ppl_get() {
yann@1324
    14
    CT_GetFile "ppl-${CT_PPL_VERSION}"                                      \
yann@1324
    15
        http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION}  \
yann@1369
    16
        ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION}            \
yann@1369
    17
        ftp://gcc.gnu.org/pub/gcc/infrastructure
yann@1324
    18
}
yann@1324
    19
yann@1324
    20
# Extract PPL
yann@1324
    21
do_ppl_extract() {
yann@1324
    22
    CT_Extract "ppl-${CT_PPL_VERSION}"
yann@1901
    23
    CT_Patch "ppl" "${CT_PPL_VERSION}"
yann@1324
    24
}
yann@1324
    25
yann@1324
    26
do_ppl() {
yann@1892
    27
    local -a ppl_opts
yann@1892
    28
yann@1324
    29
    mkdir -p "${CT_BUILD_DIR}/build-ppl"
yann@1324
    30
    cd "${CT_BUILD_DIR}/build-ppl"
yann@1324
    31
yann@1324
    32
    CT_DoStep INFO "Installing PPL"
yann@1324
    33
yann@1324
    34
    CT_DoLog EXTRA "Configuring PPL"
yann@1892
    35
yann@1892
    36
    if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
yann@1892
    37
        ppl_opts+=( --enable-shared --disable-static )
yann@1892
    38
    else
yann@1892
    39
        ppl_opts+=( --disable-shared --enable-static )
yann@1892
    40
    fi
yann@1892
    41
yann@1379
    42
    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
yann@1379
    43
    CXXFLAGS="${CT_CFLAGS_FOR_HOST}"                \
anthony@2154
    44
    CT_DoExecLog CFG                                \
yann@1324
    45
    "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
yann@1324
    46
        --build=${CT_BUILD}                         \
yann@1324
    47
        --host=${CT_HOST}                           \
yann@1893
    48
        --prefix="${CT_COMPLIBS_DIR}"               \
yann@1893
    49
        --with-libgmp-prefix="${CT_COMPLIBS_DIR}"   \
yann@1893
    50
        --with-libgmpxx-prefix="${CT_COMPLIBS_DIR}" \
yann@1324
    51
        --disable-debugging                         \
yann@1324
    52
        --disable-assertions                        \
yann@1324
    53
        --disable-ppl_lcdd                          \
yann@1892
    54
        --disable-ppl_lpsol                         \
yann@1892
    55
        "${ppl_opts[@]}"
yann@1324
    56
yann@1324
    57
    # Maybe-options:
yann@1324
    58
    # --enable-interfaces=...
yann@1324
    59
    # --enable-optimization=speed  or sspeed (yes, with 2 's')
yann@1324
    60
yann@1324
    61
    CT_DoLog EXTRA "Building PPL"
yann@1324
    62
    CT_DoExecLog ALL make ${PARALLELMFLAGS}
yann@1324
    63
yann@1890
    64
    if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
yann@1324
    65
        CT_DoLog EXTRA "Checking PPL"
yann@1324
    66
        CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
yann@1324
    67
    fi
yann@1324
    68
yann@1324
    69
    CT_DoLog EXTRA "Installing PPL"
yann@1324
    70
    CT_DoExecLog ALL make install
yann@1324
    71
yann@1397
    72
    # Remove spuriously installed file
yann@1397
    73
    CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/ppl-config"
yann@1397
    74
yann@1324
    75
    CT_EndStep
yann@1324
    76
}
yann@1324
    77
yann@1808
    78
fi # CT_PPL