summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-04-15 20:42:06 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-04-15 20:42:06 (GMT)
commiteed8d50d02d44543c18675bc20a76e18c846fd5c (patch)
tree2824df93562986acfcb0547887258090eca5d07c /scripts
parent9962be4d9c98fd3b59f41848ede2346a6cc1a762 (diff)
complibs/libelf: enable the host build
Host libelf is required by gcc-4.5.0
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/companion_libs/libelf.sh70
1 files changed, 33 insertions, 37 deletions
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