scripts/build/companion_libs/ppl.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Mar 28 01:05:18 2011 +0200 (2011-03-28)
changeset 2362 0888065f8c4d
parent 2275 9ab4392430ad
child 2364 13ea34c908fa
permissions -rw-r--r--
cc/gcc: cleanup the _or_later logic

So far, we've had a version always select appropriate _or_later option,
which in turn would select all previous _or_later options.

Because the dependencies on companion libs were cumulative, that was
working OK. But the upcoming 4.6 will no longer depend on libelf, so
we can't keep the cumulative scheme we've been using so far.

Have each release family select the corresponding dependencies, instead
of relying on selecting previous _or_later.

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