From eed8d50d02d44543c18675bc20a76e18c846fd5c Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 15 Apr 2010 22:42:06 +0200 Subject: complibs/libelf: enable the host build Host libelf is required by gcc-4.5.0 diff --git a/scripts/build/companion_libs/libelf.sh b/scripts/build/companion_libs/libelf.sh index ec16390..8995a34 100644 --- a/scripts/build/companion_libs/libelf.sh +++ b/scripts/build/companion_libs/libelf.sh @@ -21,44 +21,40 @@ do_libelf_extract() { 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 -- cgit v0.10.2-6-g49f6