diff -r ddaae597fd7c -r 22e495b7bee8 scripts/build/companion_libs/mpc.sh --- a/scripts/build/companion_libs/mpc.sh Sun Jul 17 18:56:30 2011 +0200 +++ b/scripts/build/companion_libs/mpc.sh Sun Jul 24 23:53:14 2011 +0200 @@ -4,6 +4,7 @@ do_mpc_get() { :; } do_mpc_extract() { :; } +do_mpc_for_build() { :; } do_mpc_for_host() { :; } # Overide functions depending on configuration @@ -21,6 +22,28 @@ CT_Patch "mpc" "${CT_MPC_VERSION}" } +# Build MPC for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_mpc_for_build() { + local -a mpc_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing MPC for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-build-${CT_BUILD}" + + mpc_opts+=( "host=${CT_BUILD}" ) + mpc_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + do_mpc_backend "${mpc_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build MPC for running on host do_mpc_for_host() { local -a mpc_opts