complibs: add frontends for building to run on the build machine
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 24 23:53:14 2011 +0200 (2011-07-24)
changeset 292922e495b7bee8
parent 2928 3f70dd642d34
child 2930 79201a2826fd
complibs: add frontends for building to run on the build machine

In canadian-cross, we need the companion libraries running on the
build machine, to be able to build the two core gcc.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/companion_libs/cloog.sh
scripts/build/companion_libs/gmp.sh
scripts/build/companion_libs/libelf.sh
scripts/build/companion_libs/mpc.sh
scripts/build/companion_libs/mpfr.sh
scripts/build/companion_libs/ppl.sh
     1.1 --- a/scripts/build/companion_libs/cloog.sh	Sun Jul 24 23:52:28 2011 +0200
     1.2 +++ b/scripts/build/companion_libs/cloog.sh	Sun Jul 24 23:53:14 2011 +0200
     1.3 @@ -4,6 +4,7 @@
     1.4  
     1.5  do_cloog_get() { :; }
     1.6  do_cloog_extract() { :; }
     1.7 +do_cloog_for_build() { :; }
     1.8  do_cloog_for_host() { :; }
     1.9  
    1.10  # Overide functions depending on configuration
    1.11 @@ -33,6 +34,28 @@
    1.12      fi
    1.13  }
    1.14  
    1.15 +# Build CLooG/PPL for running on build
    1.16 +# - always build statically
    1.17 +# - we do not have build-specific CFLAGS
    1.18 +# - install in build-tools prefix
    1.19 +do_cloog_for_build() {
    1.20 +    local -a cloog_opts
    1.21 +
    1.22 +    case "${CT_TOOLCHAIN_TYPE}" in
    1.23 +        native|cross)   return 0;;
    1.24 +    esac
    1.25 +
    1.26 +    CT_DoStep INFO "Installing CLooG/PPL for build"
    1.27 +    CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-build-${CT_BUILD}"
    1.28 +
    1.29 +    cloog_opts+=( "host=${CT_BUILD}" )
    1.30 +    cloog_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    1.31 +    do_cloog_backend "${cloog_opts[@]}"
    1.32 +
    1.33 +    CT_Popd
    1.34 +    CT_EndStep
    1.35 +}
    1.36 +
    1.37  # Build CLooG/PPL for running on host
    1.38  do_cloog_for_host() {
    1.39      local -a cloog_opts
     2.1 --- a/scripts/build/companion_libs/gmp.sh	Sun Jul 24 23:52:28 2011 +0200
     2.2 +++ b/scripts/build/companion_libs/gmp.sh	Sun Jul 24 23:53:14 2011 +0200
     2.3 @@ -4,6 +4,7 @@
     2.4  
     2.5  do_gmp_get() { :; }
     2.6  do_gmp_extract() { :; }
     2.7 +do_gmp_for_build() { :; }
     2.8  do_gmp_for_host() { :; }
     2.9  
    2.10  # Overide functions depending on configuration
    2.11 @@ -20,6 +21,28 @@
    2.12      CT_Patch "gmp" "${CT_GMP_VERSION}"
    2.13  }
    2.14  
    2.15 +# Build GMP for running on build
    2.16 +# - always build statically
    2.17 +# - we do not have build-specific CFLAGS
    2.18 +# - install in build-tools prefix
    2.19 +do_gmp_for_build() {
    2.20 +    local -a gmp_opts
    2.21 +
    2.22 +    case "${CT_TOOLCHAIN_TYPE}" in
    2.23 +        native|cross)   return 0;;
    2.24 +    esac
    2.25 +
    2.26 +    CT_DoStep INFO "Installing GMP for build"
    2.27 +    CT_mkdir_pushd "${CT_BUILD_DIR}/build-gmp-build-${CT_BUILD}"
    2.28 +
    2.29 +    gmp_opts+=( "host=${CT_BUILD}" )
    2.30 +    gmp_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    2.31 +    do_gmp_backend "${gmp_opts[@]}"
    2.32 +
    2.33 +    CT_Popd
    2.34 +    CT_EndStep
    2.35 +}
    2.36 +
    2.37  # Build GMP for running on host
    2.38  do_gmp_for_host() {
    2.39      local -a gmp_opts
     3.1 --- a/scripts/build/companion_libs/libelf.sh	Sun Jul 24 23:52:28 2011 +0200
     3.2 +++ b/scripts/build/companion_libs/libelf.sh	Sun Jul 24 23:53:14 2011 +0200
     3.3 @@ -2,6 +2,7 @@
     3.4  
     3.5  do_libelf_get() { :; }
     3.6  do_libelf_extract() { :; }
     3.7 +do_libelf_for_build() { :; }
     3.8  do_libelf_for_host() { :; }
     3.9  do_libelf_for_target() { :; }
    3.10  
    3.11 @@ -21,6 +22,28 @@
    3.12  
    3.13  if [ "${CT_LIBELF}" = "y" ]; then
    3.14  
    3.15 +# Build libelf for running on build
    3.16 +# - always build statically
    3.17 +# - we do not have build-specific CFLAGS
    3.18 +# - install in build-tools prefix
    3.19 +do_libelf_for_build() {
    3.20 +    local -a libelf_opts
    3.21 +
    3.22 +    case "${CT_TOOLCHAIN_TYPE}" in
    3.23 +        native|cross)   return 0;;
    3.24 +    esac
    3.25 +
    3.26 +    CT_DoStep INFO "Installing libelf for build"
    3.27 +    CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-build-${CT_BUILD}"
    3.28 +
    3.29 +    libelf_opts+=( "host=${CT_BUILD}" )
    3.30 +    libelf_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    3.31 +    do_libelf_backend "${libelf_opts[@]}"
    3.32 +
    3.33 +    CT_Popd
    3.34 +    CT_EndStep
    3.35 +}
    3.36 +
    3.37  # Build libelf for running on host
    3.38  do_libelf_for_host() {
    3.39      local -a libelf_opts
     4.1 --- a/scripts/build/companion_libs/mpc.sh	Sun Jul 24 23:52:28 2011 +0200
     4.2 +++ b/scripts/build/companion_libs/mpc.sh	Sun Jul 24 23:53:14 2011 +0200
     4.3 @@ -4,6 +4,7 @@
     4.4  
     4.5  do_mpc_get() { :; }
     4.6  do_mpc_extract() { :; }
     4.7 +do_mpc_for_build() { :; }
     4.8  do_mpc_for_host() { :; }
     4.9  
    4.10  # Overide functions depending on configuration
    4.11 @@ -21,6 +22,28 @@
    4.12      CT_Patch "mpc" "${CT_MPC_VERSION}"
    4.13  }
    4.14  
    4.15 +# Build MPC for running on build
    4.16 +# - always build statically
    4.17 +# - we do not have build-specific CFLAGS
    4.18 +# - install in build-tools prefix
    4.19 +do_mpc_for_build() {
    4.20 +    local -a mpc_opts
    4.21 +
    4.22 +    case "${CT_TOOLCHAIN_TYPE}" in
    4.23 +        native|cross)   return 0;;
    4.24 +    esac
    4.25 +
    4.26 +    CT_DoStep INFO "Installing MPC for build"
    4.27 +    CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-build-${CT_BUILD}"
    4.28 +
    4.29 +    mpc_opts+=( "host=${CT_BUILD}" )
    4.30 +    mpc_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    4.31 +    do_mpc_backend "${mpc_opts[@]}"
    4.32 +
    4.33 +    CT_Popd
    4.34 +    CT_EndStep
    4.35 +}
    4.36 +
    4.37  # Build MPC for running on host
    4.38  do_mpc_for_host() {
    4.39      local -a mpc_opts
     5.1 --- a/scripts/build/companion_libs/mpfr.sh	Sun Jul 24 23:52:28 2011 +0200
     5.2 +++ b/scripts/build/companion_libs/mpfr.sh	Sun Jul 24 23:53:14 2011 +0200
     5.3 @@ -4,6 +4,7 @@
     5.4  
     5.5  do_mpfr_get() { :; }
     5.6  do_mpfr_extract() { :; }
     5.7 +do_mpfr_for_build() { :; }
     5.8  do_mpfr_for_host() { :; }
     5.9  
    5.10  # Overide function depending on configuration
    5.11 @@ -63,6 +64,28 @@
    5.12      esac
    5.13  }
    5.14  
    5.15 +# Build MPFR for running on build
    5.16 +# - always build statically
    5.17 +# - we do not have build-specific CFLAGS
    5.18 +# - install in build-tools prefix
    5.19 +do_mpfr_for_build() {
    5.20 +    local -a mpfr_opts
    5.21 +
    5.22 +    case "${CT_TOOLCHAIN_TYPE}" in
    5.23 +        native|cross)   return 0;;
    5.24 +    esac
    5.25 +
    5.26 +    CT_DoStep INFO "Installing MPFR for build"
    5.27 +    CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpfr-build-${CT_BUILD}"
    5.28 +
    5.29 +    mpfr_opts+=( "host=${CT_BUILD}" )
    5.30 +    mpfr_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    5.31 +    do_mpfr_backend "${mpfr_opts[@]}"
    5.32 +
    5.33 +    CT_Popd
    5.34 +    CT_EndStep
    5.35 +}
    5.36 +
    5.37  # Build MPFR for running on host
    5.38  do_mpfr_for_host() {
    5.39      local -a mpfr_opts
     6.1 --- a/scripts/build/companion_libs/ppl.sh	Sun Jul 24 23:52:28 2011 +0200
     6.2 +++ b/scripts/build/companion_libs/ppl.sh	Sun Jul 24 23:53:14 2011 +0200
     6.3 @@ -4,6 +4,7 @@
     6.4  
     6.5  do_ppl_get() { :; }
     6.6  do_ppl_extract() { :; }
     6.7 +do_ppl_for_build() { :; }
     6.8  do_ppl_for_host() { :; }
     6.9  
    6.10  # Overide functions depending on configuration
    6.11 @@ -23,6 +24,28 @@
    6.12      CT_Patch "ppl" "${CT_PPL_VERSION}"
    6.13  }
    6.14  
    6.15 +# Build PPL for running on build
    6.16 +# - always build statically
    6.17 +# - we do not have build-specific CFLAGS
    6.18 +# - install in build-tools prefix
    6.19 +do_ppl_for_build() {
    6.20 +    local -a ppl_opts
    6.21 +
    6.22 +    case "${CT_TOOLCHAIN_TYPE}" in
    6.23 +        native|cross)   return 0;;
    6.24 +    esac
    6.25 +
    6.26 +    CT_DoStep INFO "Installing PPL for build"
    6.27 +    CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-build-${CT_BUILD}"
    6.28 +
    6.29 +    ppl_opts+=( "host=${CT_BUILD}" )
    6.30 +    ppl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    6.31 +    do_ppl_backend "${ppl_opts[@]}"
    6.32 +
    6.33 +    CT_Popd
    6.34 +    CT_EndStep
    6.35 +}
    6.36 +
    6.37  # Build PPL for running on host
    6.38  do_ppl_for_host() {
    6.39      local -a ppl_opts