1.1 --- a/scripts/build/companion_libs/libelf.sh Sun Jul 17 18:56:30 2011 +0200
1.2 +++ b/scripts/build/companion_libs/libelf.sh Sun Jul 24 23:53:14 2011 +0200
1.3 @@ -2,6 +2,7 @@
1.4
1.5 do_libelf_get() { :; }
1.6 do_libelf_extract() { :; }
1.7 +do_libelf_for_build() { :; }
1.8 do_libelf_for_host() { :; }
1.9 do_libelf_for_target() { :; }
1.10
1.11 @@ -21,6 +22,28 @@
1.12
1.13 if [ "${CT_LIBELF}" = "y" ]; then
1.14
1.15 +# Build libelf for running on build
1.16 +# - always build statically
1.17 +# - we do not have build-specific CFLAGS
1.18 +# - install in build-tools prefix
1.19 +do_libelf_for_build() {
1.20 + local -a libelf_opts
1.21 +
1.22 + case "${CT_TOOLCHAIN_TYPE}" in
1.23 + native|cross) return 0;;
1.24 + esac
1.25 +
1.26 + CT_DoStep INFO "Installing libelf for build"
1.27 + CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-build-${CT_BUILD}"
1.28 +
1.29 + libelf_opts+=( "host=${CT_BUILD}" )
1.30 + libelf_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
1.31 + do_libelf_backend "${libelf_opts[@]}"
1.32 +
1.33 + CT_Popd
1.34 + CT_EndStep
1.35 +}
1.36 +
1.37 # Build libelf for running on host
1.38 do_libelf_for_host() {
1.39 local -a libelf_opts