summaryrefslogtreecommitdiff
path: root/scripts/build/binutils/sstrip.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-17 16:29:35 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-17 16:29:35 (GMT)
commit533e5c128c4c955a88c16d7469a569a2c4f8cfe3 (patch)
treeee32052719188e09063a14b4c693873b4586ed73 /scripts/build/binutils/sstrip.sh
parent08161250ed65a9b91d680a305d01acd8052f937f (diff)
binutils: split binutils to backend/frontend, a-la cc_core
Move the actual binutils code to a backend function that builds the required combo of build/host/target as requested by a frontend. This split is currently a no-op, but is required for the upcoming canadian-cross rework, where we'll be needing to build two binutils, one for build/build/target, and one for build/host/target. This applies to the three binutils: - GNU binutils - elf2flt - sstrip Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/build/binutils/sstrip.sh')
-rw-r--r--scripts/build/binutils/sstrip.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/build/binutils/sstrip.sh b/scripts/build/binutils/sstrip.sh
index 4653495..b68d337 100644
--- a/scripts/build/binutils/sstrip.sh
+++ b/scripts/build/binutils/sstrip.sh
@@ -1,8 +1,8 @@
# This will build and install sstrip to run on host and sstrip target files
-do_sstrip_get() { :; }
-do_sstrip_extract() { :; }
-do_sstrip() { :; }
+do_sstrip_get() { :; }
+do_sstrip_extract() { :; }
+do_sstrip_for_host() { :; }
if [ "${CT_SSTRIP}" = "y" ]; then
do_sstrip_get() {
@@ -19,11 +19,13 @@ if [ "${CT_SSTRIP}" = "y" ]; then
CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
}
- do_sstrip() {
+ # Build sstrip for host -> target
+ # Note: we don't need sstrip to run on the build machine,
+ # so we do not need the frontend/backend stuff...
+ do_sstrip_for_host() {
local sstrip_cflags
- CT_DoStep INFO "Installing sstrip"
- mkdir -p "${CT_BUILD_DIR}/build-sstrip"
- cd "${CT_BUILD_DIR}/build-sstrip"
+ CT_DoStep INFO "Installing sstrip for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-sstrip-host"
if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
sstrip_cflags="-static"
@@ -35,6 +37,7 @@ if [ "${CT_SSTRIP}" = "y" ]; then
CT_DoLog EXTRA "Installing sstrip"
CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
+ CT_Popd
CT_EndStep
}
fi