libc/uClibc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.
Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <712995e3e719fbbe24af.1349931201@localhost.localdomain>
PatchWork-Id: 190794
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
6 do_ppl_extract() { :; }
7 do_ppl_for_build() { :; }
8 do_ppl_for_host() { :; }
10 # Overide functions depending on configuration
11 if [ "${CT_PPL}" = "y" ]; then
15 CT_GetFile "ppl-${CT_PPL_VERSION}" \
16 http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION} \
17 ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION} \
18 ftp://gcc.gnu.org/pub/gcc/infrastructure
23 CT_Extract "ppl-${CT_PPL_VERSION}"
24 CT_Patch "ppl" "${CT_PPL_VERSION}"
27 # Build PPL for running on build
28 # - always build statically
29 # - we do not have build-specific CFLAGS
30 # - install in build-tools prefix
34 case "${CT_TOOLCHAIN_TYPE}" in
35 native|cross) return 0;;
38 CT_DoStep INFO "Installing PPL for build"
39 CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-build-${CT_BUILD}"
41 ppl_opts+=( "host=${CT_BUILD}" )
42 ppl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
43 do_ppl_backend "${ppl_opts[@]}"
49 # Build PPL for running on host
53 CT_DoStep INFO "Installing PPL for host"
54 CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}"
56 ppl_opts+=( "host=${CT_HOST}" )
57 ppl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
58 ppl_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
59 do_ppl_backend "${ppl_opts[@]}"
66 # Parameter : description : type : default
67 # host : machine to run on : tuple : (none)
68 # prefix : prefix to install into : dir : (none)
69 # cflags : host cflags to use : string : (empty)
80 CT_DoLog EXTRA "Configuring PPL"
84 CXXFLAGS="${cflags}" \
85 "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
88 --prefix="${prefix}" \
89 --with-libgmp-prefix="${prefix}" \
90 --with-libgmpxx-prefix="${prefix}" \
91 --with-gmp-prefix="${prefix}" \
94 --disable-assertions \
98 --enable-interfaces='c c++' \
102 # --enable-optimization=speed or sspeed (yes, with 2 's')
104 CT_DoLog EXTRA "Building PPL"
105 CT_DoExecLog ALL make ${JOBSFLAGS}
107 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
108 CT_DoLog EXTRA "Checking PPL"
109 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
112 CT_DoLog EXTRA "Installing PPL"
113 CT_DoExecLog ALL make install
115 # Remove spuriously installed file
116 CT_DoExecLog ALL rm -f "${prefix}/bin/ppl-config"