# HG changeset patch # User "Yann E. MORIN" # Date 1234348826 0 # Node ID 1fc98c1419a7b61e6e4e65d6fc8f0465321fe775 # Parent ad9f144b5c65b986fb76b03b1f374a0da39bd3e6 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(-) diff -r ad9f144b5c65 -r 1fc98c1419a7 config/libc/uClibc.in --- a/config/libc/uClibc.in Tue Feb 10 08:52:13 2009 +0000 +++ b/config/libc/uClibc.in Wed Feb 11 10:40:26 2009 +0000 @@ -124,6 +124,16 @@ 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 -r ad9f144b5c65 -r 1fc98c1419a7 scripts/build/libc/uClibc.sh --- a/scripts/build/libc/uClibc.sh Tue Feb 10 08:52:13 2009 +0000 +++ b/scripts/build/libc/uClibc.sh Wed Feb 11 10:40:26 2009 +0000 @@ -142,38 +142,23 @@ ${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