Add building some binutils libraries for the target, as some utilities might need them.

/trunk/scripts/build/binutils.sh |   32    32     0     0 ++++++++++++++++++++++++++++++++
 /trunk/config/binutils.in        |   22    22     0     0 ++++++++++++++++++++++
 2 files changed, 54 insertions(+)
This commit is contained in:
Yann E. MORIN" 2008-04-27 15:08:15 +00:00
parent 8a6d956634
commit f4012a128e
2 changed files with 54 additions and 0 deletions

View File

@ -76,4 +76,26 @@ config BINUTILS_EXTRA_CONFIG
help help
Extra flags passed onto ./configure when configuring Extra flags passed onto ./configure when configuring
menuconfig BINUTILS_FOR_TARGET
bool
prompt "binutils libraries for the target"
default n
help
Some utilities may need binutils libraries to be available on
the target, eg. oprofile.
if BINUTILS_FOR_TARGET
config BINUTILS_FOR_TARGET_IBERTY
bool
prompt "libiberty"
default y
config BINUTILS_FOR_TARGET_BFD
bool
prompt "libbfd"
default y
endif # BINUTILS_FOR_TARGET
endmenu endmenu

View File

@ -57,5 +57,37 @@ do_binutils() {
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin/${CT_TARGET}-${t}" ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
done |CT_DoLog ALL done |CT_DoLog ALL
# Now on for the target libraries
targets=
[ "${CT_BINUTILS_FOR_TARGET_IBERTY}" = "y" ] && targets="${build_targets} libiberty"
[ "${CT_BINUTILS_FOR_TARGET_BFD}" = "y" ] && targets="${build_targets} bfd"
targets="${targets# }"
if [ -n "${targets}" ]; then
CT_DoStep INFO "Installing binutils for target"
mkdir -p "${CT_BUILD_DIR}/build-binutils-for-target"
CT_Pushd "${CT_BUILD_DIR}/build-binutils-for-target"
CT_DoLog EXTRA "Configuring binutils for target"
"${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
--target=${CT_TARGET} \
--prefix=/usr \
${CT_BINUTILS_EXTRA_CONFIG} \
--disable-nls 2>&1 |CT_DoLog ALL
build_targets=$(echo "${targets}" |sed -r -e 's/(^| +)/\1all-/g;')
install_targets=$(echo "${targets}" |sed -r -e 's/(^| +)/\1install-/g;')
CT_DoLog EXTRA "Building binutils' libraries (${targets}) for target"
make ${PARALLELMFLAGS} ${build_targets} 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing binutils' libraries (${targets}) for target"
make DESTDIR="${CT_SYSROOT_DIR}" ${install_targets} 2>&1 |CT_DoLog ALL
CT_Popd
CT_EndStep
fi
CT_EndStep CT_EndStep
} }