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(-)
1.1 --- a/config/libc/uClibc.in Tue Feb 10 08:52:13 2009 +0000
1.2 +++ b/config/libc/uClibc.in Wed Feb 11 10:40:26 2009 +0000
1.3 @@ -124,6 +124,16 @@
1.4 default 1 if LIBC_UCLIBC_DEBUG_LEVEL_1
1.5 default 2 if LIBC_UCLIBC_DEBUG_LEVEL_2
1.6
1.7 +config LIBC_UCLIBC_BUILD_CROSS_LDD
1.8 + bool
1.9 + prompt "Build cross-ldd"
1.10 + default y
1.11 + help
1.12 + Say 'y' here to build a cross-ldd to run in the host.
1.13 +
1.14 + Building a cross-ldd only works on ELF systems, that is,
1.15 + if you build under Cygwin, you *must* say 'n' here.
1.16 +
1.17 config LIBC_UCLIBC_CONFIG_FILE
1.18 string
1.19 prompt "Configuration file"
2.1 --- a/scripts/build/libc/uClibc.sh Tue Feb 10 08:52:13 2009 +0000
2.2 +++ b/scripts/build/libc/uClibc.sh Wed Feb 11 10:40:26 2009 +0000
2.3 @@ -142,38 +142,23 @@
2.4 ${CT_LIBC_UCLIBC_VERBOSITY} \
2.5 install
2.6
2.7 + if [ "${CT_LIBC_UCLIBC_BUILD_CROSS_LDD}" = "y" ]; then
2.8 + CT_DoLog EXTRA "Building C library cross-ldd"
2.9 + CT_DoExecLog ALL \
2.10 + make PREFIX="${CT_SYSROOT_DIR}/" \
2.11 + ${CT_LIBC_UCLIBC_VERBOSITY} \
2.12 + -C utils hostutils
2.13 +
2.14 + CT_DoLog EXTRA "Installing C library cross-ldd"
2.15 + CT_DoExecLog ALL install -m 0755 utils/ldd.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldd"
2.16 + fi
2.17 +
2.18 CT_EndStep
2.19 }
2.20
2.21 # This function is used to install those components needing the final C compiler
2.22 do_libc_finish() {
2.23 - # Build and install host-side ldd
2.24 - CT_DoStep INFO "Finishing C library"
2.25 -
2.26 - mkdir -p "${CT_BUILD_DIR}/build-libc-finish"
2.27 - cd "${CT_BUILD_DIR}/build-libc-finish"
2.28 -
2.29 - # Simply copy files until uClibc has the ablity to build out-of-tree
2.30 - CT_DoLog EXTRA "Copying sources to build dir"
2.31 - { cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
2.32 -
2.33 - # Retrieve the config file
2.34 - cp "${CT_STATE_DIR}/uClibc.config" .config
2.35 -
2.36 - CT_DoLog EXTRA "Applying configuration"
2.37 - CT_DoYes "" |CT_DoExecLog ALL \
2.38 - make CROSS=${CT_TARGET}- \
2.39 - PREFIX="${CT_SYSROOT_DIR}/" \
2.40 - oldconfig
2.41 -
2.42 - CT_DoLog EXTRA "Installing C library host utils"
2.43 - CT_DoExecLog ALL \
2.44 - make PREFIX="${CT_SYSROOT_DIR}/" \
2.45 - ${CT_LIBC_UCLIBC_VERBOSITY} \
2.46 - -C utils hostutils
2.47 - CT_DoExecLog ALL install -m 0755 utils/ldd.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldd"
2.48 -
2.49 - CT_EndStep
2.50 + :
2.51 }
2.52
2.53 # Initialises the .config file to sensible values