1.1 --- a/scripts/build/libc/uClibc.sh Fri Mar 27 23:40:07 2009 +0000
1.2 +++ b/scripts/build/libc/uClibc.sh Thu May 07 18:56:31 2009 +0000
1.3 @@ -54,6 +54,8 @@
1.4
1.5 # This functions installs uClibc's headers
1.6 do_libc_headers() {
1.7 + local install_rule
1.8 +
1.9 CT_DoStep INFO "Installing C library headers"
1.10
1.11 mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
1.12 @@ -61,7 +63,7 @@
1.13
1.14 # Simply copy files until uClibc has the ablity to build out-of-tree
1.15 CT_DoLog EXTRA "Copying sources to build dir"
1.16 - { cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
1.17 + tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
1.18
1.19 # Retrieve the config file
1.20 cp "${CT_CONFIG_DIR}/uClibc.config" .config
1.21 @@ -76,8 +78,14 @@
1.22 CT_DoLog EXTRA "Building headers"
1.23 CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" headers
1.24
1.25 + if [ "${CT_LIBC_UCLIBC_0_9_30_or_later}" = "y" ]; then
1.26 + install_rule=install_headers
1.27 + else
1.28 + install_rule=install_dev
1.29 + fi
1.30 +
1.31 CT_DoLog EXTRA "Installing headers"
1.32 - CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" install_headers
1.33 + CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" ${install_rule}"
1.34
1.35 CT_EndStep
1.36 }
1.37 @@ -96,7 +104,7 @@
1.38
1.39 # Simply copy files until uClibc has the ablity to build out-of-tree
1.40 CT_DoLog EXTRA "Copying sources to build dir"
1.41 - { cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
1.42 + tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
1.43
1.44 # Retrieve the config file
1.45 cp "${CT_CONFIG_DIR}/uClibc.config" .config
1.46 @@ -126,14 +134,20 @@
1.47 ${CT_LIBC_UCLIBC_VERBOSITY} \
1.48 all
1.49
1.50 - # YEM-FIXME: we want to install libraries in $SYSROOT/lib, but we don't want
1.51 - # to install headers in $SYSROOT/include, thus making only install_runtime.
1.52 - # Plus, the headers were previously installed earlier with install_headers,
1.53 - # so all should be well. Unfortunately, the install_headers target does not
1.54 - # install crti.o and consorts... :-( So reverting to target 'install'.
1.55 - # Note: PARALLELMFLAGS is not usefull for installation.
1.56 + # YEM-FIXME:
1.57 + # - we want to install 'runtime' files, eg. lib*.{a,so*}, crti.o and
1.58 + # such files, except the headers as they already are installed
1.59 + # - "make install_dev" installs the headers, the crti.o... and the
1.60 + # static libs, but not the dynamic libs
1.61 + # - "make install_runtime" installs the dynamic libs only
1.62 + # - "make install" calls install_runtime and install_dev
1.63 + # - so we're left with re-installing the headers... Sigh...
1.64 + #
1.65 # We do _not_ want to strip anything for now, in case we specifically
1.66 # asked for a debug toolchain, hence the STRIPTOOL= assignment
1.67 + #
1.68 + # Note: PARALLELMFLAGS is not usefull for installation.
1.69 + #
1.70 CT_DoLog EXTRA "Installing C library"
1.71 CT_DoExecLog ALL \
1.72 make CROSS=${CT_TARGET}- \