scripts/build/companion_libs/cloog.sh
author Kalle Kankare <kalle.kankare@vincit.fi>
Fri Dec 03 12:36:44 2010 +0100 (2010-12-03)
changeset 2216 81b4c0efa46f
parent 2199 ab0759ba292c
child 2262 32c7bbfa3f65
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.
     1 # This file adds the functions to build the CLooG library
     2 # Copyright 2009 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_cloog_get() { :; }
     6 do_cloog_extract() { :; }
     7 do_cloog() { :; }
     8 
     9 # Overide functions depending on configuration
    10 if [ "${CT_CLOOG}" = "y" ]; then
    11 
    12 # Download CLooG
    13 do_cloog_get() {
    14     CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}"  \
    15         ftp://gcc.gnu.org/pub/gcc/infrastructure
    16 }
    17 
    18 # Extract CLooG
    19 do_cloog_extract() {
    20     local _t
    21 
    22     CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
    23 
    24     # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
    25     # while versions 0.15.4 onward do have the version in the dirname.
    26     case "${CT_CLOOG_VERSION}" in
    27         0.15.3) _t="";;
    28         *)      _t="-${CT_CLOOG_VERSION}";;
    29     esac
    30     CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}"
    31     CT_Patch nochdir "cloog-ppl" "${CT_CLOOG_VERSION}"
    32     CT_Popd
    33 }
    34 
    35 do_cloog() {
    36     local _t
    37     local cloog_LDFLAGS
    38     local -a cloog_opts
    39 
    40     # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
    41     # while versions 0.15.4 onward do have the version in the dirname.
    42     case "${CT_CLOOG_VERSION}" in
    43         0.15.3) _t="";;
    44         *)      _t="-${CT_CLOOG_VERSION}";;
    45     esac
    46 
    47     mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
    48     cd "${CT_BUILD_DIR}/build-cloog-ppl"
    49 
    50     CT_DoStep INFO "Installing CLooG/ppl"
    51 
    52     CT_DoLog EXTRA "Configuring CLooG/ppl"
    53 
    54     if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
    55         cloog_opts+=( --enable-shared --disable-static )
    56     else
    57         cloog_opts+=( --disable-shared --enable-static )
    58         cloog_opts+=( --with-host-libstdcxx='-lstdc++' )
    59         cloog_LDFLAGS='-lm'
    60     fi
    61 
    62     CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
    63     LDFLAGS="${cloog_LDFLAGS}"                  \
    64     CT_DoExecLog CFG                            \
    65     "${CT_SRC_DIR}/cloog-ppl${_t}/configure"    \
    66         --build=${CT_BUILD}                     \
    67         --host=${CT_HOST}                       \
    68         --prefix="${CT_COMPLIBS_DIR}"           \
    69         --with-gmp="${CT_COMPLIBS_DIR}"         \
    70         --with-ppl="${CT_COMPLIBS_DIR}"         \
    71         --with-bits=gmp                         \
    72         "${cloog_opts[@]}"
    73 
    74     CT_DoLog EXTRA "Building CLooG/ppl"
    75     CT_DoExecLog ALL make ${PARALLELMFLAGS} libcloog.la
    76 
    77     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    78         CT_DoLog EXTRA "Checking CLooG/ppl"
    79         CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    80     fi
    81 
    82     CT_DoLog EXTRA "Installing CLooG/ppl"
    83     CT_DoExecLog ALL make install-libLTLIBRARIES install-pkgincludeHEADERS
    84 
    85     CT_EndStep
    86 }
    87 
    88 fi # CT_CLOOG