mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-06-01 23:30:51 +00:00
complibs: split companion libraries to backend/frontend, a-la cc_core
Move the actual complibs codes to backend functions that builds the required combo of build/host/target as requested by a frontend. This split is currently a no-op, but is required for the upcoming canadian-cross rework, where we'll be needing to build the complibs twice, one for build/build, and one for build/host. This applies to the six companion libraries: - GMP - MPFR - PPL - Cloog/PPL - MPC - libelf Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
533e5c128c
commit
2e3cc45633
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
do_cloog_get() { :; }
|
do_cloog_get() { :; }
|
||||||
do_cloog_extract() { :; }
|
do_cloog_extract() { :; }
|
||||||
do_cloog() { :; }
|
do_cloog_for_host() { :; }
|
||||||
|
|
||||||
# Overide functions depending on configuration
|
# Overide functions depending on configuration
|
||||||
if [ "${CT_CLOOG}" = "y" ]; then
|
if [ "${CT_CLOOG}" = "y" ]; then
|
||||||
@ -33,25 +33,49 @@ do_cloog_extract() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_cloog() {
|
# Build CLooG/PPL for running on host
|
||||||
|
do_cloog_for_host() {
|
||||||
|
local -a cloog_opts
|
||||||
|
|
||||||
|
CT_DoStep INFO "Installing CLooG/PPL for host"
|
||||||
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-host-${CT_HOST}"
|
||||||
|
|
||||||
|
cloog_opts+=( "host=${CT_HOST}" )
|
||||||
|
cloog_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
|
||||||
|
cloog_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
|
||||||
|
do_cloog_backend "${cloog_opts[@]}"
|
||||||
|
|
||||||
|
CT_Popd
|
||||||
|
CT_EndStep
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build ClooG/PPL
|
||||||
|
# Parameter : description : type : default
|
||||||
|
# host : machine to run on : tuple : (none)
|
||||||
|
# prefix : prefix to install into : dir : (none)
|
||||||
|
# cflags : host cflags to use : string : (empty)
|
||||||
|
do_cloog_backend() {
|
||||||
|
local host
|
||||||
|
local prefix
|
||||||
|
local cflags
|
||||||
local cloog_src_dir="${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
|
local cloog_src_dir="${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
|
||||||
|
local arg
|
||||||
|
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
|
for arg in "$@"; do
|
||||||
cd "${CT_BUILD_DIR}/build-cloog-ppl"
|
eval "${arg// /\\ }"
|
||||||
|
done
|
||||||
CT_DoStep INFO "Installing CLooG/ppl"
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Configuring CLooG/ppl"
|
CT_DoLog EXTRA "Configuring CLooG/ppl"
|
||||||
|
|
||||||
CT_DoExecLog CFG \
|
CT_DoExecLog CFG \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CFLAGS="${cflags}" \
|
||||||
LIBS="-lm" \
|
LIBS="-lm" \
|
||||||
"${cloog_src_dir}/configure" \
|
"${cloog_src_dir}/configure" \
|
||||||
--build=${CT_BUILD} \
|
--build=${CT_BUILD} \
|
||||||
--host=${CT_HOST} \
|
--host=${host} \
|
||||||
--prefix="${CT_COMPLIBS_DIR}" \
|
--prefix="${prefix}" \
|
||||||
--with-gmp="${CT_COMPLIBS_DIR}" \
|
--with-gmp="${prefix}" \
|
||||||
--with-ppl="${CT_COMPLIBS_DIR}" \
|
--with-ppl="${prefix}" \
|
||||||
--with-bits=gmp \
|
--with-bits=gmp \
|
||||||
--with-host-libstdcxx='-lstdc++' \
|
--with-host-libstdcxx='-lstdc++' \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
@ -67,8 +91,6 @@ do_cloog() {
|
|||||||
|
|
||||||
CT_DoLog EXTRA "Installing CLooG/ppl"
|
CT_DoLog EXTRA "Installing CLooG/ppl"
|
||||||
CT_DoExecLog ALL make install-libLTLIBRARIES install-pkgincludeHEADERS
|
CT_DoExecLog ALL make install-libLTLIBRARIES install-pkgincludeHEADERS
|
||||||
|
|
||||||
CT_EndStep
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fi # CT_CLOOG
|
fi # CT_CLOOG
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
do_gmp_get() { :; }
|
do_gmp_get() { :; }
|
||||||
do_gmp_extract() { :; }
|
do_gmp_extract() { :; }
|
||||||
do_gmp() { :; }
|
do_gmp_for_host() { :; }
|
||||||
|
|
||||||
# Overide functions depending on configuration
|
# Overide functions depending on configuration
|
||||||
if [ "${CT_GMP}" = "y" ]; then
|
if [ "${CT_GMP}" = "y" ]; then
|
||||||
@ -20,20 +20,45 @@ do_gmp_extract() {
|
|||||||
CT_Patch "gmp" "${CT_GMP_VERSION}"
|
CT_Patch "gmp" "${CT_GMP_VERSION}"
|
||||||
}
|
}
|
||||||
|
|
||||||
do_gmp() {
|
# Build GMP for running on host
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-gmp"
|
do_gmp_for_host() {
|
||||||
cd "${CT_BUILD_DIR}/build-gmp"
|
local -a gmp_opts
|
||||||
|
|
||||||
CT_DoStep INFO "Installing GMP"
|
CT_DoStep INFO "Installing GMP for host"
|
||||||
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-gmp-host-${CT_HOST}"
|
||||||
|
|
||||||
|
gmp_opts+=( "host=${CT_HOST}" )
|
||||||
|
gmp_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
|
||||||
|
gmp_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
|
||||||
|
do_gmp_backend "${gmp_opts[@]}"
|
||||||
|
|
||||||
|
CT_Popd
|
||||||
|
CT_EndStep
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build GMP
|
||||||
|
# Parameter : description : type : default
|
||||||
|
# host : machine to run on : tuple : (none)
|
||||||
|
# prefix : prefix to install into : dir : (none)
|
||||||
|
# cflags : host cflags to use : string : (empty)
|
||||||
|
do_gmp_backend() {
|
||||||
|
local host
|
||||||
|
local prefix
|
||||||
|
local cflags
|
||||||
|
local arg
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
eval "${arg// /\\ }"
|
||||||
|
done
|
||||||
|
|
||||||
CT_DoLog EXTRA "Configuring GMP"
|
CT_DoLog EXTRA "Configuring GMP"
|
||||||
|
|
||||||
CT_DoExecLog CFG \
|
CT_DoExecLog CFG \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \
|
CFLAGS="${cflags} -fexceptions" \
|
||||||
"${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
|
"${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
|
||||||
--build=${CT_BUILD} \
|
--build=${CT_BUILD} \
|
||||||
--host=${CT_HOST} \
|
--host=${host} \
|
||||||
--prefix="${CT_COMPLIBS_DIR}" \
|
--prefix="${prefix}" \
|
||||||
--enable-fft \
|
--enable-fft \
|
||||||
--enable-mpbsd \
|
--enable-mpbsd \
|
||||||
--enable-cxx \
|
--enable-cxx \
|
||||||
@ -50,8 +75,6 @@ do_gmp() {
|
|||||||
|
|
||||||
CT_DoLog EXTRA "Installing GMP"
|
CT_DoLog EXTRA "Installing GMP"
|
||||||
CT_DoExecLog ALL make install
|
CT_DoExecLog ALL make install
|
||||||
|
|
||||||
CT_EndStep
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fi # CT_GMP
|
fi # CT_GMP
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
do_libelf_get() { :; }
|
do_libelf_get() { :; }
|
||||||
do_libelf_extract() { :; }
|
do_libelf_extract() { :; }
|
||||||
do_libelf() { :; }
|
do_libelf_for_host() { :; }
|
||||||
do_libelf_for_target() { :; }
|
do_libelf_for_target() { :; }
|
||||||
|
|
||||||
if [ "${CT_LIBELF}" = "y" -o "${CT_LIBELF_TARGET}" = "y" ]; then
|
if [ "${CT_LIBELF}" = "y" -o "${CT_LIBELF_TARGET}" = "y" ]; then
|
||||||
@ -21,32 +21,17 @@ do_libelf_extract() {
|
|||||||
|
|
||||||
if [ "${CT_LIBELF}" = "y" ]; then
|
if [ "${CT_LIBELF}" = "y" ]; then
|
||||||
|
|
||||||
do_libelf() {
|
# Build libelf for running on host
|
||||||
CT_DoStep INFO "Installing libelf"
|
do_libelf_for_host() {
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-libelf"
|
local -a libelf_opts
|
||||||
CT_Pushd "${CT_BUILD_DIR}/build-libelf"
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Configuring libelf"
|
CT_DoStep INFO "Installing libelf for host"
|
||||||
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-host-${CT_HOST}"
|
||||||
|
|
||||||
CT_DoExecLog CFG \
|
libelf_opts+=( "host=${CT_HOST}" )
|
||||||
CC="${CT_HOST}-gcc" \
|
libelf_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
|
||||||
CFLAGS="-fPIC" \
|
libelf_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
|
||||||
"${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
|
do_libelf_backend "${libelf_opts[@]}"
|
||||||
--build=${CT_BUILD} \
|
|
||||||
--host=${CT_HOST} \
|
|
||||||
--target=${CT_TARGET} \
|
|
||||||
--prefix="${CT_COMPLIBS_DIR}" \
|
|
||||||
--enable-compat \
|
|
||||||
--enable-elf64 \
|
|
||||||
--enable-extended-format \
|
|
||||||
--disable-shared \
|
|
||||||
--enable-static
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Building libelf"
|
|
||||||
CT_DoExecLog ALL make
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Installing libelf"
|
|
||||||
CT_DoExecLog ALL make install
|
|
||||||
|
|
||||||
CT_Popd
|
CT_Popd
|
||||||
CT_EndStep
|
CT_EndStep
|
||||||
@ -57,31 +42,16 @@ fi # CT_LIBELF
|
|||||||
if [ "${CT_LIBELF_TARGET}" = "y" ]; then
|
if [ "${CT_LIBELF_TARGET}" = "y" ]; then
|
||||||
|
|
||||||
do_libelf_for_target() {
|
do_libelf_for_target() {
|
||||||
|
local -a libelf_opts
|
||||||
|
|
||||||
CT_DoStep INFO "Installing libelf for the target"
|
CT_DoStep INFO "Installing libelf for the target"
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-libelf-for-target"
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-target-${CT_TARGET}"
|
||||||
CT_Pushd "${CT_BUILD_DIR}/build-libelf-for-target"
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Configuring libelf"
|
libelf_opts+=( "destdir=${CT_SYSROOT_DIR}" )
|
||||||
CT_DoExecLog CFG \
|
libelf_opts+=( "host=${CT_TARGET}" )
|
||||||
CC="${CT_TARGET}-gcc" \
|
libelf_opts+=( "prefix=/usr" )
|
||||||
CFLAGS="-fPIC" \
|
libelf_opts+=( "shared=y" )
|
||||||
RANLIB="${CT_TARGET}-ranlib" \
|
do_libelf_backend "${libelf_opts[@]}"
|
||||||
"${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
|
|
||||||
--build=${CT_BUILD} \
|
|
||||||
--host=${CT_TARGET} \
|
|
||||||
--target=${CT_TARGET} \
|
|
||||||
--prefix=/usr \
|
|
||||||
--enable-compat \
|
|
||||||
--enable-elf64 \
|
|
||||||
--enable-shared \
|
|
||||||
--enable-extended-format \
|
|
||||||
--enable-static
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Building libelf"
|
|
||||||
CT_DoExecLog ALL make
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Installing libelf"
|
|
||||||
CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install
|
|
||||||
|
|
||||||
CT_Popd
|
CT_Popd
|
||||||
CT_EndStep
|
CT_EndStep
|
||||||
@ -89,4 +59,54 @@ do_libelf_for_target() {
|
|||||||
|
|
||||||
fi # CT_LIBELF_TARGET
|
fi # CT_LIBELF_TARGET
|
||||||
|
|
||||||
|
# Build libelf
|
||||||
|
# Parameter : description : type : default
|
||||||
|
# destdir : out-of-tree install dir : string : /
|
||||||
|
# host : machine to run on : tuple : (none)
|
||||||
|
# prefix : prefix to install into : dir : (none)
|
||||||
|
# cflags : host cflags to use : string : (empty)
|
||||||
|
# shared : also buils shared lib : bool : n
|
||||||
|
do_libelf_backend() {
|
||||||
|
local destdir="/"
|
||||||
|
local host
|
||||||
|
local prefix
|
||||||
|
local cflags
|
||||||
|
local shared
|
||||||
|
local -a extra_config
|
||||||
|
local arg
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
eval "${arg// /\\ }"
|
||||||
|
done
|
||||||
|
|
||||||
|
CT_DoLog EXTRA "Configuring libelf"
|
||||||
|
|
||||||
|
if [ "${shared}" = "y" ]; then
|
||||||
|
extra_config+=( --enable-shared )
|
||||||
|
else
|
||||||
|
extra_config+=( --disable-shared )
|
||||||
|
fi
|
||||||
|
|
||||||
|
CT_DoExecLog CFG \
|
||||||
|
CC="${host}-gcc" \
|
||||||
|
RANLIB="${host}-ranlib" \
|
||||||
|
CFLAGS="${cflags} -fPIC" \
|
||||||
|
"${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
|
||||||
|
--build=${CT_BUILD} \
|
||||||
|
--host=${host} \
|
||||||
|
--target=${CT_TARGET} \
|
||||||
|
--prefix="${prefix}" \
|
||||||
|
--enable-compat \
|
||||||
|
--enable-elf64 \
|
||||||
|
--enable-extended-format \
|
||||||
|
--enable-static \
|
||||||
|
"${extra_config[@]}"
|
||||||
|
|
||||||
|
CT_DoLog EXTRA "Building libelf"
|
||||||
|
CT_DoExecLog ALL make
|
||||||
|
|
||||||
|
CT_DoLog EXTRA "Installing libelf"
|
||||||
|
CT_DoExecLog ALL make instroot="${destdir}" install
|
||||||
|
}
|
||||||
|
|
||||||
fi # CT_LIBELF || CT_LIBELF_TARGET
|
fi # CT_LIBELF || CT_LIBELF_TARGET
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
do_mpc_get() { :; }
|
do_mpc_get() { :; }
|
||||||
do_mpc_extract() { :; }
|
do_mpc_extract() { :; }
|
||||||
do_mpc() { :; }
|
do_mpc_for_host() { :; }
|
||||||
|
|
||||||
# Overide functions depending on configuration
|
# Overide functions depending on configuration
|
||||||
if [ "${CT_MPC}" = "y" ]; then
|
if [ "${CT_MPC}" = "y" ]; then
|
||||||
@ -21,22 +21,47 @@ do_mpc_extract() {
|
|||||||
CT_Patch "mpc" "${CT_MPC_VERSION}"
|
CT_Patch "mpc" "${CT_MPC_VERSION}"
|
||||||
}
|
}
|
||||||
|
|
||||||
do_mpc() {
|
# Build MPC for running on host
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-mpc"
|
do_mpc_for_host() {
|
||||||
cd "${CT_BUILD_DIR}/build-mpc"
|
local -a mpc_opts
|
||||||
|
|
||||||
CT_DoStep INFO "Installing MPC"
|
CT_DoStep INFO "Installing MPC for host"
|
||||||
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-host-${CT_HOST}"
|
||||||
|
|
||||||
|
mpc_opts+=( "host=${CT_HOST}" )
|
||||||
|
mpc_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
|
||||||
|
mpc_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
|
||||||
|
do_mpc_backend "${mpc_opts[@]}"
|
||||||
|
|
||||||
|
CT_Popd
|
||||||
|
CT_EndStep
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build MPC
|
||||||
|
# Parameter : description : type : default
|
||||||
|
# host : machine to run on : tuple : (none)
|
||||||
|
# prefix : prefix to install into : dir : (none)
|
||||||
|
# cflags : host cflags to use : string : (empty)
|
||||||
|
do_mpc_backend() {
|
||||||
|
local host
|
||||||
|
local prefix
|
||||||
|
local cflags
|
||||||
|
local arg
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
eval "${arg// /\\ }"
|
||||||
|
done
|
||||||
|
|
||||||
CT_DoLog EXTRA "Configuring MPC"
|
CT_DoLog EXTRA "Configuring MPC"
|
||||||
|
|
||||||
CT_DoExecLog CFG \
|
CT_DoExecLog CFG \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CFLAGS="${cflags}" \
|
||||||
"${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
|
"${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
|
||||||
--build=${CT_BUILD} \
|
--build=${CT_BUILD} \
|
||||||
--host=${CT_HOST} \
|
--host=${host} \
|
||||||
--prefix="${CT_COMPLIBS_DIR}" \
|
--prefix="${prefix}" \
|
||||||
--with-gmp="${CT_COMPLIBS_DIR}" \
|
--with-gmp="${prefix}" \
|
||||||
--with-mpfr="${CT_COMPLIBS_DIR}" \
|
--with-mpfr="${prefix}" \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--enable-static
|
--enable-static
|
||||||
|
|
||||||
@ -50,8 +75,6 @@ do_mpc() {
|
|||||||
|
|
||||||
CT_DoLog EXTRA "Installing MPC"
|
CT_DoLog EXTRA "Installing MPC"
|
||||||
CT_DoExecLog ALL make install
|
CT_DoExecLog ALL make install
|
||||||
|
|
||||||
CT_EndStep
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fi # CT_MPC
|
fi # CT_MPC
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
do_mpfr_get() { :; }
|
do_mpfr_get() { :; }
|
||||||
do_mpfr_extract() { :; }
|
do_mpfr_extract() { :; }
|
||||||
do_mpfr() { :; }
|
do_mpfr_for_host() { :; }
|
||||||
|
|
||||||
# Overide function depending on configuration
|
# Overide function depending on configuration
|
||||||
if [ "${CT_MPFR}" = "y" ]; then
|
if [ "${CT_MPFR}" = "y" ]; then
|
||||||
@ -63,11 +63,36 @@ do_mpfr_extract() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
do_mpfr() {
|
# Build MPFR for running on host
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-mpfr"
|
do_mpfr_for_host() {
|
||||||
cd "${CT_BUILD_DIR}/build-mpfr"
|
local -a mpfr_opts
|
||||||
|
|
||||||
CT_DoStep INFO "Installing MPFR"
|
CT_DoStep INFO "Installing MPFR for host"
|
||||||
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpfr-host-${CT_HOST}"
|
||||||
|
|
||||||
|
mpfr_opts+=( "host=${CT_HOST}" )
|
||||||
|
mpfr_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
|
||||||
|
mpfr_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
|
||||||
|
do_mpfr_backend "${mpfr_opts[@]}"
|
||||||
|
|
||||||
|
CT_Popd
|
||||||
|
CT_EndStep
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build MPFR
|
||||||
|
# Parameter : description : type : default
|
||||||
|
# host : machine to run on : tuple : (none)
|
||||||
|
# prefix : prefix to install into : dir : (none)
|
||||||
|
# cflags : host cflags to use : string : (empty)
|
||||||
|
do_mpfr_backend() {
|
||||||
|
local host
|
||||||
|
local prefix
|
||||||
|
local cflags
|
||||||
|
local arg
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
eval "${arg// /\\ }"
|
||||||
|
done
|
||||||
|
|
||||||
# Under Cygwin, we can't build a thread-safe library
|
# Under Cygwin, we can't build a thread-safe library
|
||||||
case "${CT_HOST}" in
|
case "${CT_HOST}" in
|
||||||
@ -77,16 +102,15 @@ do_mpfr() {
|
|||||||
*) mpfr_opts+=( --enable-thread-safe );;
|
*) mpfr_opts+=( --enable-thread-safe );;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
CT_DoLog EXTRA "Configuring MPFR"
|
CT_DoLog EXTRA "Configuring MPFR"
|
||||||
CT_DoExecLog CFG \
|
CT_DoExecLog CFG \
|
||||||
CC="${CT_HOST}-gcc" \
|
CC="${host}-gcc" \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
||||||
"${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
|
"${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
|
||||||
--build=${CT_BUILD} \
|
--build=${CT_BUILD} \
|
||||||
--host=${CT_HOST} \
|
--host=${host} \
|
||||||
--prefix="${CT_COMPLIBS_DIR}" \
|
--prefix="${prefix}" \
|
||||||
--with-gmp="${CT_COMPLIBS_DIR}" \
|
--with-gmp="${prefix}" \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--enable-static
|
--enable-static
|
||||||
|
|
||||||
@ -100,8 +124,6 @@ do_mpfr() {
|
|||||||
|
|
||||||
CT_DoLog EXTRA "Installing MPFR"
|
CT_DoLog EXTRA "Installing MPFR"
|
||||||
CT_DoExecLog ALL make install
|
CT_DoExecLog ALL make install
|
||||||
|
|
||||||
CT_EndStep
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fi # CT_MPFR
|
fi # CT_MPFR
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
do_ppl_get() { :; }
|
do_ppl_get() { :; }
|
||||||
do_ppl_extract() { :; }
|
do_ppl_extract() { :; }
|
||||||
do_ppl() { :; }
|
do_ppl_for_host() { :; }
|
||||||
|
|
||||||
# Overide functions depending on configuration
|
# Overide functions depending on configuration
|
||||||
if [ "${CT_PPL}" = "y" ]; then
|
if [ "${CT_PPL}" = "y" ]; then
|
||||||
@ -23,25 +23,49 @@ do_ppl_extract() {
|
|||||||
CT_Patch "ppl" "${CT_PPL_VERSION}"
|
CT_Patch "ppl" "${CT_PPL_VERSION}"
|
||||||
}
|
}
|
||||||
|
|
||||||
do_ppl() {
|
# Build PPL for running on host
|
||||||
mkdir -p "${CT_BUILD_DIR}/build-ppl"
|
do_ppl_for_host() {
|
||||||
cd "${CT_BUILD_DIR}/build-ppl"
|
local -a ppl_opts
|
||||||
|
|
||||||
CT_DoStep INFO "Installing PPL"
|
CT_DoStep INFO "Installing PPL for host"
|
||||||
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}"
|
||||||
|
|
||||||
|
ppl_opts+=( "host=${CT_HOST}" )
|
||||||
|
ppl_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
|
||||||
|
ppl_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
|
||||||
|
do_ppl_backend "${ppl_opts[@]}"
|
||||||
|
|
||||||
|
CT_Popd
|
||||||
|
CT_EndStep
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build PPL
|
||||||
|
# Parameter : description : type : default
|
||||||
|
# host : machine to run on : tuple : (none)
|
||||||
|
# prefix : prefix to install into : dir : (none)
|
||||||
|
# cflags : host cflags to use : string : (empty)
|
||||||
|
do_ppl_backend() {
|
||||||
|
local host
|
||||||
|
local prefix
|
||||||
|
local cflags
|
||||||
|
local arg
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
eval "${arg// /\\ }"
|
||||||
|
done
|
||||||
|
|
||||||
CT_DoLog EXTRA "Configuring PPL"
|
CT_DoLog EXTRA "Configuring PPL"
|
||||||
|
|
||||||
|
|
||||||
CT_DoExecLog CFG \
|
CT_DoExecLog CFG \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CFLAGS="${cflags}" \
|
||||||
CXXFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CXXFLAGS="${cflags}" \
|
||||||
"${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
|
"${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
|
||||||
--build=${CT_BUILD} \
|
--build=${CT_BUILD} \
|
||||||
--host=${CT_HOST} \
|
--host=${host} \
|
||||||
--prefix="${CT_COMPLIBS_DIR}" \
|
--prefix="${prefix}" \
|
||||||
--with-libgmp-prefix="${CT_COMPLIBS_DIR}" \
|
--with-libgmp-prefix="${prefix}" \
|
||||||
--with-libgmpxx-prefix="${CT_COMPLIBS_DIR}" \
|
--with-libgmpxx-prefix="${prefix}" \
|
||||||
--with-gmp-prefix="${CT_COMPLIBS_DIR}" \
|
--with-gmp-prefix="${prefix}" \
|
||||||
--enable-watchdog \
|
--enable-watchdog \
|
||||||
--disable-debugging \
|
--disable-debugging \
|
||||||
--disable-assertions \
|
--disable-assertions \
|
||||||
@ -66,9 +90,7 @@ do_ppl() {
|
|||||||
CT_DoExecLog ALL make install
|
CT_DoExecLog ALL make install
|
||||||
|
|
||||||
# Remove spuriously installed file
|
# Remove spuriously installed file
|
||||||
CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/ppl-config"
|
CT_DoExecLog ALL rm -f "${prefix}/bin/ppl-config"
|
||||||
|
|
||||||
CT_EndStep
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fi # CT_PPL
|
fi # CT_PPL
|
||||||
|
12
steps.mk
12
steps.mk
@ -17,12 +17,12 @@ help-env::
|
|||||||
# Please keep the last line with a '\' and keep the following empy line:
|
# Please keep the last line with a '\' and keep the following empy line:
|
||||||
# it helps when diffing and merging.
|
# it helps when diffing and merging.
|
||||||
CT_STEPS := libc_check_config \
|
CT_STEPS := libc_check_config \
|
||||||
gmp \
|
gmp_for_host \
|
||||||
mpfr \
|
mpfr_for_host \
|
||||||
ppl \
|
ppl_for_host \
|
||||||
cloog \
|
cloog_for_host \
|
||||||
mpc \
|
mpc_for_host \
|
||||||
libelf \
|
libelf_for_host \
|
||||||
binutils_for_host \
|
binutils_for_host \
|
||||||
elf2flt_for_host \
|
elf2flt_for_host \
|
||||||
sstrip_for_host \
|
sstrip_for_host \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user