summaryrefslogtreecommitdiff
path: root/scripts/build/companion_libs/libelf.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-24 21:53:14 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-24 21:53:14 (GMT)
commitae3b564fb808cd89098dbcab444b49b742ab53b2 (patch)
tree1c3431e3a850bbe9c0895ff14fc1f62842d1579b /scripts/build/companion_libs/libelf.sh
parent518a1ff137ed5e1a2c3251d4672549985c0cc2d5 (diff)
complibs: add frontends for building to run on the build machine
In canadian-cross, we need the companion libraries running on the build machine, to be able to build the two core gcc. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/build/companion_libs/libelf.sh')
-rw-r--r--scripts/build/companion_libs/libelf.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/build/companion_libs/libelf.sh b/scripts/build/companion_libs/libelf.sh
index 3384575..c10a7bf 100644
--- a/scripts/build/companion_libs/libelf.sh
+++ b/scripts/build/companion_libs/libelf.sh
@@ -2,6 +2,7 @@
do_libelf_get() { :; }
do_libelf_extract() { :; }
+do_libelf_for_build() { :; }
do_libelf_for_host() { :; }
do_libelf_for_target() { :; }
@@ -21,6 +22,28 @@ do_libelf_extract() {
if [ "${CT_LIBELF}" = "y" ]; then
+# Build libelf for running on build
+# - always build statically
+# - we do not have build-specific CFLAGS
+# - install in build-tools prefix
+do_libelf_for_build() {
+ local -a libelf_opts
+
+ case "${CT_TOOLCHAIN_TYPE}" in
+ native|cross) return 0;;
+ esac
+
+ CT_DoStep INFO "Installing libelf for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-build-${CT_BUILD}"
+
+ libelf_opts+=( "host=${CT_BUILD}" )
+ libelf_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
+ do_libelf_backend "${libelf_opts[@]}"
+
+ CT_Popd
+ CT_EndStep
+}
+
# Build libelf for running on host
do_libelf_for_host() {
local -a libelf_opts