1.1 --- a/scripts/build/companion_libs/libelf.sh Thu Apr 15 22:35:04 2010 +0200
1.2 +++ b/scripts/build/companion_libs/libelf.sh Mon May 17 14:11:08 2010 +0200
1.3 @@ -21,44 +21,40 @@
1.4
1.5 if [ "${CT_LIBELF}" = "y" ]; then
1.6
1.7 -# Uncomment when we need it for gcc-4.5
1.8 -# WARNING! This function is absolutely UNTESTED yet!
1.9 do_libelf() {
1.10 - : # Remove this line! and uncomment the following lines
1.11 -# local -a libelf_opts
1.12 -#
1.13 -# CT_DoStep INFO "Installing libelf"
1.14 -# mkdir -p "${CT_BUILD_DIR}/build-libelf"
1.15 -# CT_Pushd "${CT_BUILD_DIR}/build-libelf"
1.16 -#
1.17 -# CT_DoLog EXTRA "Configuring libelf"
1.18 -#
1.19 -# if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
1.20 -# libelf_opts+=( --enable-shared --disable-static )
1.21 -# else
1.22 -# libelf_opts+=( --disable-shared --enable-static )
1.23 -# fi
1.24 -#
1.25 -# CC="${CT_TARGET}-gcc" \
1.26 -# CT_DoExecLog ALL \
1.27 -# "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
1.28 -# --build=${CT_BUILD} \
1.29 -# --host=${CT_HOST} \
1.30 -# --target=${CT_TARGET} \
1.31 -# --prefix="${CT_COMPLIBS_DIR}" \
1.32 -# --enable-compat \
1.33 -# --enable-elf64 \
1.34 -# --enable-extended-format \
1.35 -# "${libelf_opts[@]}"
1.36 -#
1.37 -# CT_DoLog EXTRA "Building libelf"
1.38 -# CT_DoExecLog ALL make
1.39 -#
1.40 -# CT_DoLog EXTRA "Installing libelf"
1.41 -# CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install
1.42 -#
1.43 -# CT_Popd
1.44 -# CT_EndStep
1.45 + local -a libelf_opts
1.46 +
1.47 + CT_DoStep INFO "Installing libelf"
1.48 + mkdir -p "${CT_BUILD_DIR}/build-libelf"
1.49 + CT_Pushd "${CT_BUILD_DIR}/build-libelf"
1.50 +
1.51 + CT_DoLog EXTRA "Configuring libelf"
1.52 +
1.53 + if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
1.54 + libelf_opts+=( --enable-shared --disable-static )
1.55 + else
1.56 + libelf_opts+=( --disable-shared --enable-static )
1.57 + fi
1.58 +
1.59 + CT_DoExecLog ALL \
1.60 + "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
1.61 + --build=${CT_BUILD} \
1.62 + --host=${CT_HOST} \
1.63 + --target=${CT_TARGET} \
1.64 + --prefix="${CT_COMPLIBS_DIR}" \
1.65 + --enable-compat \
1.66 + --enable-elf64 \
1.67 + --enable-extended-format \
1.68 + "${libelf_opts[@]}"
1.69 +
1.70 + CT_DoLog EXTRA "Building libelf"
1.71 + CT_DoExecLog ALL make
1.72 +
1.73 + CT_DoLog EXTRA "Installing libelf"
1.74 + CT_DoExecLog ALL make install
1.75 +
1.76 + CT_Popd
1.77 + CT_EndStep
1.78 }
1.79
1.80 fi # CT_LIBELF