1 # Build script for libelf
4 do_libelf_extract() { :; }
6 do_libelf_target() { :; }
8 if [ "${CT_LIBELF}" = "y" -o "${CT_LIBELF_TARGET}" = "y" ]; then
11 # The server hosting libelf will return an "HTTP 300 : Multiple Choices"
12 # error code if we try to download a file that does not exists there.
13 # So we have to request the file with an explicit extension.
14 CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/
18 CT_Extract "libelf-${CT_LIBELF_VERSION}"
19 CT_Patch "libelf" "${CT_LIBELF_VERSION}"
22 if [ "${CT_LIBELF}" = "y" ]; then
24 # Uncomment when we need it for gcc-4.5
25 # WARNING! This function is absolutely UNTESTED yet!
27 : # Remove this line! and uncomment the following lines
28 # local -a libelf_opts
30 # CT_DoStep INFO "Installing libelf"
31 # mkdir -p "${CT_BUILD_DIR}/build-libelf"
32 # CT_Pushd "${CT_BUILD_DIR}/build-libelf"
34 # CT_DoLog EXTRA "Configuring libelf"
36 # if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
37 # libelf_opts+=( --enable-shared --disable-static )
39 # libelf_opts+=( --disable-shared --enable-static )
42 # CC="${CT_TARGET}-gcc" \
44 # "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
45 # --build=${CT_BUILD} \
47 # --target=${CT_TARGET} \
48 # --prefix="${CT_COMPLIBS_DIR}" \
51 # --enable-extended-format \
54 # CT_DoLog EXTRA "Building libelf"
55 # CT_DoExecLog ALL make
57 # CT_DoLog EXTRA "Installing libelf"
58 # CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install
66 if [ "${CT_LIBELF_TARGET}" = "y" ]; then
69 CT_DoStep INFO "Installing libelf for the target"
70 mkdir -p "${CT_BUILD_DIR}/build-libelf"
71 CT_Pushd "${CT_BUILD_DIR}/build-libelf"
73 CT_DoLog EXTRA "Configuring libelf"
74 CC="${CT_TARGET}-gcc" \
76 "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \
79 --target=${CT_TARGET} \
84 --enable-extended-format \
87 CT_DoLog EXTRA "Building libelf"
90 CT_DoLog EXTRA "Installing libelf"
91 CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install
99 fi # CT_LIBELF || CT_LIBELF_TARGET