2010-02-17 22:41:17 +00:00
|
|
|
# Build script for libelf
|
|
|
|
|
|
|
|
do_libelf_get() { :; }
|
|
|
|
do_libelf_extract() { :; }
|
|
|
|
do_libelf() { :; }
|
|
|
|
do_libelf_target() { :; }
|
|
|
|
|
|
|
|
if [ "${CT_LIBELF}" = "y" -o "${CT_LIBELF_TARGET}" = "y" ]; then
|
|
|
|
|
|
|
|
do_libelf_get() {
|
|
|
|
# The server hosting libelf will return an "HTTP 300 : Multiple Choices"
|
|
|
|
# error code if we try to download a file that does not exists there.
|
|
|
|
# So we have to request the file with an explicit extension.
|
|
|
|
CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/
|
|
|
|
}
|
|
|
|
|
|
|
|
do_libelf_extract() {
|
|
|
|
CT_Extract "libelf-${CT_LIBELF_VERSION}"
|
2010-04-11 21:18:10 +00:00
|
|
|
CT_Patch "libelf" "${CT_LIBELF_VERSION}"
|
2010-02-17 22:41:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ "${CT_LIBELF}" = "y" ]; then
|
|
|
|
|
|
|
|
do_libelf() {
|
2010-04-15 20:42:06 +00:00
|
|
|
CT_DoStep INFO "Installing libelf"
|
|
|
|
mkdir -p "${CT_BUILD_DIR}/build-libelf"
|
|
|
|
CT_Pushd "${CT_BUILD_DIR}/build-libelf"
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Configuring libelf"
|
|
|
|
|
2011-03-20 00:08:22 +00:00
|
|
|
CT_DoExecLog CFG \
|
2010-12-03 11:36:44 +00:00
|
|
|
CC="${CT_HOST}-gcc" \
|
2010-12-29 01:34:18 +00:00
|
|
|
CFLAGS="-fPIC" \
|
2010-04-15 20:42:06 +00:00
|
|
|
"${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 \
|
2011-04-06 20:30:57 +00:00
|
|
|
--disable-shared \
|
|
|
|
--enable-static
|
2010-04-15 20:42:06 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building libelf"
|
|
|
|
CT_DoExecLog ALL make
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing libelf"
|
|
|
|
CT_DoExecLog ALL make install
|
|
|
|
|
|
|
|
CT_Popd
|
|
|
|
CT_EndStep
|
2010-02-17 22:41:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fi # CT_LIBELF
|
|
|
|
|
|
|
|
if [ "${CT_LIBELF_TARGET}" = "y" ]; then
|
|
|
|
|
|
|
|
do_libelf_target() {
|
|
|
|
CT_DoStep INFO "Installing libelf for the target"
|
2010-04-15 20:35:04 +00:00
|
|
|
mkdir -p "${CT_BUILD_DIR}/build-libelf-for-target"
|
|
|
|
CT_Pushd "${CT_BUILD_DIR}/build-libelf-for-target"
|
2010-02-17 22:41:17 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Configuring libelf"
|
2011-03-20 00:08:22 +00:00
|
|
|
CT_DoExecLog CFG \
|
2010-02-17 22:41:17 +00:00
|
|
|
CC="${CT_TARGET}-gcc" \
|
2010-12-29 01:34:18 +00:00
|
|
|
CFLAGS="-fPIC" \
|
2011-08-21 15:54:12 +00:00
|
|
|
RANLIB="${CT_TARGET}-ranlib" \
|
2010-02-17 22:41:17 +00:00
|
|
|
"${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
|
|
|
|
--build=${CT_BUILD} \
|
|
|
|
--host=${CT_TARGET} \
|
|
|
|
--target=${CT_TARGET} \
|
|
|
|
--prefix=/usr \
|
|
|
|
--enable-compat \
|
|
|
|
--enable-elf64 \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-extended-format \
|
|
|
|
--enable-static
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
fi # CT_LIBELF_TARGET
|
|
|
|
|
|
|
|
fi # CT_LIBELF || CT_LIBELF_TARGET
|