libc/glibc: fix installed scripts
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jul 01 00:24:04 2010 +0200 (2010-07-01)
changeset 20021be81b72dea4
parent 1994 a760d9cf03e0
child 2003 b74a48609d81
libc/glibc: fix installed scripts

glibc installs some bash-scripts, but uses the path to the buildtool
bash as 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 bash on the target *will* be /bin/bash.
scripts/build/libc/glibc.sh
     1.1 --- a/scripts/build/libc/glibc.sh	Sun Jun 27 16:40:21 2010 +0200
     1.2 +++ b/scripts/build/libc/glibc.sh	Thu Jul 01 00:24:04 2010 +0200
     1.3 @@ -409,6 +409,19 @@
     1.4          echo libc_cv_c_cleanup=yes
     1.5      fi >config.cache
     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 glibc release, we'd better
    1.16 +    # directly mangle the generated scripts _after_ they get built,
    1.17 +    # or even after they get installed... glibc is such a sucker...
    1.18 +    echo "ac_cv_path_BASH_SHELL=/bin/bash" >>config.cache
    1.19 +
    1.20      # Configure with --prefix the way we want it on the target...
    1.21      # There are a whole lot of settings here.  You'll probably want
    1.22      # to read up on what they all mean, and customize a bit, possibly by setting GLIBC_EXTRA_CONFIG