Fix installing uClibc headers for versions prior to 0.9.30.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu May 07 18:56:31 2009 +0000 (2009-05-07)
changeset 132656a811a04414
parent 1325 82d5bd04b320
child 1327 5fd1f22a6062
Fix installing uClibc headers for versions prior to 0.9.30.
Fix a comment about installing uClibc.
Automatically enable // build for uClibc versions that can be built in //.

-------- diffstat follows --------
/trunk/scripts/build/libc/uClibc.sh | 32 23 9 0 +++++++++++++++++++++++---------
/trunk/config/libc/uClibc.in | 12 7 5 0 +++++++-----
2 files changed, 30 insertions(+), 14 deletions(-)
config/libc/uClibc.in
scripts/build/libc/uClibc.sh
     1.1 --- a/config/libc/uClibc.in	Thu May 07 18:53:49 2009 +0000
     1.2 +++ b/config/libc/uClibc.in	Thu May 07 18:56:31 2009 +0000
     1.3 @@ -38,10 +38,12 @@
     1.4  config LIBC_V_0_9_30
     1.5      bool
     1.6      prompt "0.9.30"
     1.7 +    select LIBC_UCLIBC_0_9_30_or_later
     1.8  
     1.9  config LIBC_V_0_9_30_1
    1.10      bool
    1.11      prompt "0.9.30.1"
    1.12 +    select LIBC_UCLIBC_0_9_30_or_later
    1.13  
    1.14  # CT_INSERT_VERSION_ABOVE
    1.15  # Don't remove above line!
    1.16 @@ -72,14 +74,14 @@
    1.17  # CT_INSERT_VERSION_STRING_ABOVE
    1.18  # Don't remove above line!
    1.19  
    1.20 +config LIBC_UCLIBC_0_9_30_or_later
    1.21 +    bool
    1.22 +    default n
    1.23 +    select LIBC_UCLIBC_PARALLEL
    1.24 +
    1.25  config LIBC_UCLIBC_PARALLEL
    1.26      bool
    1.27 -    prompt "Build uClibc in //" if LIBC_V_snapshot || LIBC_V_specific_date
    1.28      default n
    1.29 -    help
    1.30 -      Build uClibc using parallel jobs.
    1.31 -      Some 'old' versions won't build in //, but it works starting with
    1.32 -      0.9.30 release candidates.
    1.33  
    1.34  choice
    1.35      bool
     2.1 --- a/scripts/build/libc/uClibc.sh	Thu May 07 18:53:49 2009 +0000
     2.2 +++ b/scripts/build/libc/uClibc.sh	Thu May 07 18:56:31 2009 +0000
     2.3 @@ -54,6 +54,8 @@
     2.4  
     2.5  # This functions installs uClibc's headers
     2.6  do_libc_headers() {
     2.7 +    local install_rule
     2.8 +
     2.9      CT_DoStep INFO "Installing C library headers"
    2.10  
    2.11      mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
    2.12 @@ -61,7 +63,7 @@
    2.13  
    2.14      # Simply copy files until uClibc has the ablity to build out-of-tree
    2.15      CT_DoLog EXTRA "Copying sources to build dir"
    2.16 -    { cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
    2.17 +    tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
    2.18  
    2.19      # Retrieve the config file
    2.20      cp "${CT_CONFIG_DIR}/uClibc.config" .config
    2.21 @@ -76,8 +78,14 @@
    2.22      CT_DoLog EXTRA "Building headers"
    2.23      CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" headers
    2.24  
    2.25 +    if [ "${CT_LIBC_UCLIBC_0_9_30_or_later}" = "y" ]; then
    2.26 +        install_rule=install_headers
    2.27 +    else
    2.28 +        install_rule=install_dev
    2.29 +    fi
    2.30 +
    2.31      CT_DoLog EXTRA "Installing headers"
    2.32 -    CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" install_headers
    2.33 +    CT_DoExecLog ALL make ${CT_LIBC_UCLIBC_VERBOSITY} CROSS= PREFIX="${CT_SYSROOT_DIR}/" ${install_rule}"
    2.34  
    2.35      CT_EndStep
    2.36  }
    2.37 @@ -96,7 +104,7 @@
    2.38  
    2.39      # Simply copy files until uClibc has the ablity to build out-of-tree
    2.40      CT_DoLog EXTRA "Copying sources to build dir"
    2.41 -    { cd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}"; tar cf - .; } |tar xf -
    2.42 +    tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
    2.43  
    2.44      # Retrieve the config file
    2.45      cp "${CT_CONFIG_DIR}/uClibc.config" .config
    2.46 @@ -126,14 +134,20 @@
    2.47           ${CT_LIBC_UCLIBC_VERBOSITY}                    \
    2.48           all
    2.49  
    2.50 -    # YEM-FIXME: we want to install libraries in $SYSROOT/lib, but we don't want
    2.51 -    # to install headers in $SYSROOT/include, thus making only install_runtime.
    2.52 -    # Plus, the headers were previously installed earlier with install_headers,
    2.53 -    # so all should be well. Unfortunately, the install_headers target does not
    2.54 -    # install crti.o and consorts... :-( So reverting to target 'install'.
    2.55 -    # Note: PARALLELMFLAGS is not usefull for installation.
    2.56 +    # YEM-FIXME:
    2.57 +    # - we want to install 'runtime' files, eg. lib*.{a,so*}, crti.o and
    2.58 +    #   such files, except the headers as they already are installed
    2.59 +    # - "make install_dev" installs the headers, the crti.o... and the
    2.60 +    #   static libs, but not the dynamic libs
    2.61 +    # - "make install_runtime" installs the dynamic libs only
    2.62 +    # - "make install" calls install_runtime and install_dev
    2.63 +    # - so we're left with re-installing the headers... Sigh...
    2.64 +    #
    2.65      # We do _not_ want to strip anything for now, in case we specifically
    2.66      # asked for a debug toolchain, hence the STRIPTOOL= assignment
    2.67 +    #
    2.68 +    # Note: PARALLELMFLAGS is not usefull for installation.
    2.69 +    #
    2.70      CT_DoLog EXTRA "Installing C library"
    2.71      CT_DoExecLog ALL                    \
    2.72      make CROSS=${CT_TARGET}-            \