# HG changeset patch # User "Yann E. MORIN" # Date 1271364126 -7200 # Node ID fb0e7cfd0394dfc08989771577cd7ba80e041d4b # Parent 7a489a7b5d55e0fc44adb286aa14e896ee69736c complibs/libelf: enable the host build Host libelf is required by gcc-4.5.0 diff -r 7a489a7b5d55 -r fb0e7cfd0394 scripts/build/companion_libs/libelf.sh --- a/scripts/build/companion_libs/libelf.sh Thu Apr 15 22:35:04 2010 +0200 +++ b/scripts/build/companion_libs/libelf.sh Thu Apr 15 22:42:06 2010 +0200 @@ -21,44 +21,40 @@ if [ "${CT_LIBELF}" = "y" ]; then -# Uncomment when we need it for gcc-4.5 -# WARNING! This function is absolutely UNTESTED yet! do_libelf() { - : # Remove this line! and uncomment the following lines -# local -a libelf_opts -# -# CT_DoStep INFO "Installing libelf" -# mkdir -p "${CT_BUILD_DIR}/build-libelf" -# CT_Pushd "${CT_BUILD_DIR}/build-libelf" -# -# CT_DoLog EXTRA "Configuring libelf" -# -# if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then -# libelf_opts+=( --enable-shared --disable-static ) -# else -# libelf_opts+=( --disable-shared --enable-static ) -# fi -# -# CC="${CT_TARGET}-gcc" \ -# CT_DoExecLog ALL \ -# "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ -# --build=${CT_BUILD} \ -# --host=${CT_HOST} \ -# --target=${CT_TARGET} \ -# --prefix="${CT_COMPLIBS_DIR}" \ -# --enable-compat \ -# --enable-elf64 \ -# --enable-extended-format \ -# "${libelf_opts[@]}" -# -# 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_EndStep + local -a libelf_opts + + CT_DoStep INFO "Installing libelf" + mkdir -p "${CT_BUILD_DIR}/build-libelf" + CT_Pushd "${CT_BUILD_DIR}/build-libelf" + + CT_DoLog EXTRA "Configuring libelf" + + if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then + libelf_opts+=( --enable-shared --disable-static ) + else + libelf_opts+=( --disable-shared --enable-static ) + fi + + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --target=${CT_TARGET} \ + --prefix="${CT_COMPLIBS_DIR}" \ + --enable-compat \ + --enable-elf64 \ + --enable-extended-format \ + "${libelf_opts[@]}" + + CT_DoLog EXTRA "Building libelf" + CT_DoExecLog ALL make + + CT_DoLog EXTRA "Installing libelf" + CT_DoExecLog ALL make install + + CT_Popd + CT_EndStep } fi # CT_LIBELF