diff -r d304c8a7bfa8 -r 3f70dd642d34 scripts/build/binutils/elf2flt.sh --- a/scripts/build/binutils/elf2flt.sh Sun Jul 17 18:29:35 2011 +0200 +++ b/scripts/build/binutils/elf2flt.sh Sun Jul 24 23:52:28 2011 +0200 @@ -6,6 +6,7 @@ # Default: do nothing do_elf2flt_get() { :; } do_elf2flt_extract() { :; } +do_elf2flt_for_build() { :; } do_elf2flt_for_host() { :; } if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then @@ -25,6 +26,27 @@ CT_Patch "elf2flt-cvs" "${CT_ELF2FLT_VERSION}" } +# Build elf2flt for build -> target +do_elf2flt_for_build() { + local -a elf2flt_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing elf2flt for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-build-${CT_BUILD}" + + elf2flt_opts+=( "host=${CT_BUILD}" ) + elf2flt_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_HOST}" ) + + do_elf2flt_backend "${elf2flt_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build elf2flt for host -> target do_elf2flt_for_host() { local -a elf2flt_opts @@ -36,6 +58,7 @@ elf2flt_opts+=( "prefix=${CT_PREFIX_DIR}" ) elf2flt_opts+=( "static_build=${CT_STATIC_TOOLCHAIN}" ) elf2flt_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) + elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" ) do_elf2flt_backend "${elf2flt_opts[@]}" @@ -75,14 +98,14 @@ local prefix local static_build local cflags + local binutils_bld + local binutils_src local arg for arg in "$@"; do eval "${arg// /\\ }" done - elf2flt_opts= - binutils_bld="${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" binutils_src="${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" CT_DoLog EXTRA "Configuring elf2flt"