summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-02-11 10:40:26 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-02-11 10:40:26 (GMT)
commitf962e240a3dc68ff10de71e12ceccd80151ab922 (patch)
treeb1886c07ab5f75631e5a8036e6de482b9a305286
parentf621e51c3d41d3f69a9d0cf986bded3fab12be62 (diff)
On some hosts (eg. Cygwin), it's not possible to build the uClibc hostutils. Offer an option to enable/disable the uClibc hostutils build.
/trunk/scripts/build/libc/uClibc.sh | 39 12 27 0 ++++++++++++--------------------------- /trunk/config/libc/uClibc.in | 10 10 0 0 ++++++++++ 2 files changed, 22 insertions(+), 27 deletions(-)
-rw-r--r--config/libc/uClibc.in10
-rw-r--r--scripts/build/libc/uClibc.sh39
2 files changed, 22 insertions, 27 deletions
diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in
index 91882df..ef04c98 100644
--- a/config/libc/uClibc.in
+++ b/config/libc/uClibc.in
@@ -124,6 +124,16 @@ config LIBC_UCLIBC_DEBUG_LEVEL
default 1 if LIBC_UCLIBC_DEBUG_LEVEL_1
default 2 if LIBC_UCLIBC_DEBUG_LEVEL_2
+config LIBC_UCLIBC_BUILD_CROSS_LDD
+ bool
+ prompt "Build cross-ldd"
+ default y
+ help
+ Say 'y' here to build a cross-ldd to run in the host.
+
+ Building a cross-ldd only works on ELF systems, that is,
+ if you build under Cygwin, you *must* say 'n' here.
+
config LIBC_UCLIBC_CONFIG_FILE
string
prompt "Configuration file"
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index a7c92cc..4598cb7 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -142,38 +142,23 @@ do_libc() {
${CT_LIBC_UCLIBC_VERBOSITY} \
install
+ if [ "${CT_LIBC_UCLIBC_BUILD_CROSS_LDD}" = "y" ]; then
+ CT_DoLog EXTRA "Building C library cross-ldd"
+ CT_DoExecLog ALL \
+ make PREFIX="${CT_SYSROOT_DIR}/" \
+ ${CT_LIBC_UCLIBC_VERBOSITY} \
+ -C utils hostutils
+
+ CT_DoLog EXTRA "Installing C library cross-ldd"
+ CT_DoExecLog ALL install -m 0755 utils/ldd.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldd"
+ fi
+
CT_EndStep
}
# This function is used to install those components needing the final C compiler
do_libc_finish() {
- # Build and install host-side ldd
- CT_DoStep INFO "Finishing C library"
-
- mkdir -p "${CT_BUILD_DIR}/build-libc-finish"
- cd "${CT_BUILD_DIR}/build-libc-finish"
-
- # Simply copy files until uClibc has the ablity to build out-of-tree
- CT_DoLog EXTRA "Copying sources to build dir"
- { cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
-
- # Retrieve the config file
- cp "${CT_STATE_DIR}/uClibc.config" .config
-
- CT_DoLog EXTRA "Applying configuration"
- CT_DoYes "" |CT_DoExecLog ALL \
- make CROSS=${CT_TARGET}- \
- PREFIX="${CT_SYSROOT_DIR}/" \
- oldconfig
-
- CT_DoLog EXTRA "Installing C library host utils"
- CT_DoExecLog ALL \
- make PREFIX="${CT_SYSROOT_DIR}/" \
- ${CT_LIBC_UCLIBC_VERBOSITY} \
- -C utils hostutils
- CT_DoExecLog ALL install -m 0755 utils/ldd.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldd"
-
- CT_EndStep
+ :
}
# Initialises the .config file to sensible values