yann@479: # Build script for libelf yann@479: yann@1811: do_libelf_get() { :; } yann@1811: do_libelf_extract() { :; } yann@1811: do_libelf() { :; } yann@1811: do_libelf_target() { :; } yann@1811: yann@1811: if [ "${CT_LIBELF}" = "y" -o "${CT_LIBELF_TARGET}" = "y" ]; then yann@1811: yann@1811: do_libelf_get() { yann@479: # The server hosting libelf will return an "HTTP 300 : Multiple Choices" yann@479: # error code if we try to download a file that does not exists there. yann@479: # So we have to request the file with an explicit extension. yann@479: CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/ yann@479: } yann@479: yann@1811: do_libelf_extract() { yann@1126: CT_Extract "libelf-${CT_LIBELF_VERSION}" yann@1126: CT_Patch "libelf-${CT_LIBELF_VERSION}" yann@479: } yann@479: yann@1811: if [ "${CT_LIBELF}" = "y" ]; then yann@1811: yann@1811: # Uncomment when we need it for gcc-4.5 yann@1811: # WARNING! This function is absolutely UNTESTED yet! yann@1811: do_libelf() { yann@1892: : # Remove this line! and uncomment the following lines yann@1892: # local -a libelf_opts yann@1892: # yann@1811: # CT_DoStep INFO "Installing libelf" yann@1811: # mkdir -p "${CT_BUILD_DIR}/build-libelf" yann@1811: # CT_Pushd "${CT_BUILD_DIR}/build-libelf" yann@1811: # yann@1811: # CT_DoLog EXTRA "Configuring libelf" yann@1892: # yann@1892: # if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then yann@1892: # libelf_opts+=( --enable-shared --disable-static ) yann@1892: # else yann@1892: # libelf_opts+=( --disable-shared --enable-static ) yann@1892: # fi yann@1892: # yann@1811: # CC="${CT_TARGET}-gcc" \ yann@1811: # CT_DoExecLog ALL \ yann@1811: # "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ yann@1811: # --build=${CT_BUILD} \ yann@1811: # --host=${CT_HOST} \ yann@1811: # --target=${CT_TARGET} \ yann@1893: # --prefix="${CT_COMPLIBS_DIR}" \ yann@1811: # --enable-compat \ yann@1811: # --enable-elf64 \ yann@1892: # --enable-extended-format \ yann@1892: # "${libelf_opts[@]}" yann@1811: # yann@1811: # CT_DoLog EXTRA "Building libelf" yann@1811: # CT_DoExecLog ALL make yann@1811: # yann@1811: # CT_DoLog EXTRA "Installing libelf" yann@1811: # CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install yann@1811: # yann@1811: # CT_Popd yann@1811: # CT_EndStep yann@1811: } yann@1811: yann@1811: fi # CT_LIBELF yann@1811: yann@1811: if [ "${CT_LIBELF_TARGET}" = "y" ]; then yann@1811: yann@1811: do_libelf_target() { yann@1811: CT_DoStep INFO "Installing libelf for the target" yann@479: mkdir -p "${CT_BUILD_DIR}/build-libelf" yann@479: CT_Pushd "${CT_BUILD_DIR}/build-libelf" yann@479: yann@479: CT_DoLog EXTRA "Configuring libelf" yann@479: CC="${CT_TARGET}-gcc" \ yann@663: CT_DoExecLog ALL \ yann@479: "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ yann@479: --build=${CT_BUILD} \ yann@479: --host=${CT_TARGET} \ yann@479: --target=${CT_TARGET} \ yann@479: --prefix=/usr \ yann@479: --enable-compat \ yann@479: --enable-elf64 \ yann@479: --enable-shared \ yann@479: --enable-extended-format \ yann@663: --enable-static yann@479: yann@479: CT_DoLog EXTRA "Building libelf" yann@663: CT_DoExecLog ALL make yann@479: yann@479: CT_DoLog EXTRA "Installing libelf" yann@663: CT_DoExecLog ALL make instroot="${CT_SYSROOT_DIR}" install yann@479: yann@479: CT_Popd yann@479: CT_EndStep yann@479: } yann@479: yann@1811: fi # CT_LIBELF_TARGET yann@1811: yann@1811: fi # CT_LIBELF || CT_LIBELF_TARGET