libc/eglibc: fix installed scripts 1.9
authorBryan Hundven <bryanhundven@gmail.com>
Wed Dec 22 22:42:11 2010 +0100 (2010-12-22)
branch1.9
changeset 2232f0318bba39bc
parent 2231 7842cbae1fb3
child 2254 361e852ef8c1
libc/eglibc: fix installed scripts

Like rev 2002, eglibc installs some bash scripts, but use the path to the
buildtool bash as the interpreter (on the shebang line). This is only a
symlink to the real bash, and thus is not available at runtime.

Fix that by assuming that shell on the target *will* be /bin/bash.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
(transplanted from 6884dcb80121ebc8ce17deee62716ed75fc29393)
scripts/build/libc/eglibc.sh
     1.1 --- a/scripts/build/libc/eglibc.sh	Sat Dec 18 23:08:12 2010 +0100
     1.2 +++ b/scripts/build/libc/eglibc.sh	Wed Dec 22 22:42:11 2010 +0100
     1.3 @@ -306,6 +306,19 @@
     1.4      CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'"
     1.5      CT_DoLog DEBUG "Extra CC args passed    : '${extra_cc_args}'"
     1.6  
     1.7 +    # ./configure is mislead by our tools override wrapper for bash
     1.8 +    # so just tell it where the real bash is _on_the_target_!
     1.9 +    # Notes:
    1.10 +    # - ${ac_cv_path_BASH_SHELL} is only used to set BASH_SHELL
    1.11 +    # - ${BASH_SHELL}            is only used to set BASH
    1.12 +    # - ${BASH}                  is only used to set the shebang
    1.13 +    #                            in two scripts to run on the target
    1.14 +    # So we can safely bypass bash detection at compile time.
    1.15 +    # Should this change in a future eglibc release, we'd better
    1.16 +    # directly mangle the generated scripts _after_ they get built,
    1.17 +    # or even after they get installed... eglibc is such a sucker...
    1.18 +    echo "ac_cv_path_BASH_SHELL=/bin/bash" >config.cache
    1.19 +
    1.20      BUILD_CC="${CT_BUILD}-gcc"                                      \
    1.21      CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} ${OPTIMIZE}"  \
    1.22      CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \
    1.23 @@ -320,6 +333,7 @@
    1.24          --disable-profile                                           \
    1.25          --without-gd                                                \
    1.26          --without-cvs                                               \
    1.27 +        --cache-file=config.cache                                   \
    1.28          "${extra_config[@]}"                                        \
    1.29          ${CT_LIBC_GLIBC_EXTRA_CONFIG}
    1.30