[PATCH] libc/eglibc: fix installed scripts

Bryan Hundven bryanhundven@gmail.com
Tue Dec 21 21:08:00 GMT 2010


 scripts/build/libc/eglibc.sh |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)


# HG changeset patch
# User Bryan Hundven <bryanhundven@gmail.com>
# Date 1292965645 28800
# Node ID 0a4524764218d9d5e1e8197c8672d3ba1432216e
# Parent  13e4f7126cf76604d53510f9571e6422991774fd
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.

diff -r 13e4f7126cf7 -r 0a4524764218 scripts/build/libc/eglibc.sh
--- a/scripts/build/libc/eglibc.sh	Tue Dec 14 11:49:18 2010 -0800
+++ b/scripts/build/libc/eglibc.sh	Tue Dec 21 13:07:25 2010 -0800
@@ -314,6 +314,19 @@
     CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'"
     CT_DoLog DEBUG "Extra CC args passed    : '${extra_cc_args}'"
 
+    # ./configure is mislead by our tools override wrapper for bash
+    # so just tell it where the real bash is _on_the_target_!
+    # Notes:
+    # - ${ac_cv_path_BASH_SHELL} is only used to set BASH_SHELL
+    # - ${BASH_SHELL}            is only used to set BASH
+    # - ${BASH}                  is only used to set the shebang
+    #                            in two scripts to run on the target
+    # So we can safely bypass bash detection at compile time.
+    # Should this change in a future eglibc release, we'd better
+    # directly mangle the generated scripts _after_ they get built,
+    # or even after they get installed... eglibc is such a sucker...
+    echo "ac_cv_path_BASH_SHELL=/bin/bash" >config.cache
+
     BUILD_CC="${CT_BUILD}-gcc"                                      \
     CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} ${OPTIMIZE}"  \
     CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \
@@ -328,6 +341,7 @@
         --disable-profile                                           \
         --without-gd                                                \
         --without-cvs                                               \
+        --cache-file=config.cache                                   \
         "${extra_config[@]}"                                        \
         ${CT_LIBC_GLIBC_EXTRA_CONFIG}
     

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list