diff options
author | P. J. McDermott <pjm@nac.net> | 2013-09-11 15:08:22 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-09-11 15:08:22 (EDT) |
commit | e7866e7c9879411417635dbebe7e2a1b9c6b02ee (patch) | |
tree | f574c0a9eba3c04f37dbdfa3421bf3a109c703e8 /patches | |
parent | 2ee09205983638153c137b1c9e74bca6c9d0a56f (diff) |
Update patch information.
Diffstat (limited to 'patches')
-rw-r--r-- | patches/03_fix-bad-substitution.patch | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/patches/03_fix-bad-substitution.patch b/patches/03_fix-bad-substitution.patch index 5f86556..8211614 100644 --- a/patches/03_fix-bad-substitution.patch +++ b/patches/03_fix-bad-substitution.patch @@ -1,23 +1,26 @@ -From: "P. J. McDermott" <pjm@nac.net> -Description: Fix "bad substitution" errors in shell script - sysdeps/unix/make-syscalls.sh and sysdeps/unix/Makefile use GNU Bash's - "${parameter/pattern/string}" parameter expansion. Non-Bash shells (e.g. - BusyBox ash built with CONFIG_ASH_BASH_COMPAT disabled) don't support this - syntax: - . +Author: "P. J. McDermott" <pjm@nac.net> +Forwarded: https://sourceware.org/ml/libc-alpha/2013-09/msg00286.html +Subject: Don't use Bash-specific ${parameter/pattern/string} expansion + +sysdeps/unix/make-syscalls.sh and sysdeps/unix/Makefile use GNU Bash's +${parameter/pattern/string} parameter expansion. Non-Bash shells (e.g. +dash or BusyBox ash when built with CONFIG_ASH_BASH_COMPAT disabled) +don't support this expansion syntax. So glibc will fail to build when +$(SHELL) expands to a path that isn't provided by Bash. + +An example build failure: + for dir in [...]; do \ test -f $dir/syscalls.list && \ { sysdirs='[...]' \ asm_CPP='gcc -c -I[...] -D_LIBC_REENTRANT -include include/libc-symbols.h -DASSEMBLER -g -Wa,--noexecstack -E -x assembler-with-cpp' \ /bin/sh sysdeps/unix/make-syscalls.sh $dir || exit 1; }; \ test $dir = sysdeps/unix && break; \ - done > /usr/src/eglibc_2.17~r22751+sip1-1/tmp/libcbuild/sysd-syscallsT + done > [build-dir]/sysd-syscallsT sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad substitution - . - The following command will search the upstream source for this non-standard - expansion: - . - grep -ERn '\${[a-zA-Z0-9_]+/[^}]*/[^}]*}' tmp/src/libc + +This patch simply replaces the three instances of the Bash-only syntax +in these files with an echo and sed command substitution. diff -Naur src.orig/libc/sysdeps/unix/make-syscalls.sh src/libc/sysdeps/unix/make-syscalls.sh --- src.orig/libc/sysdeps/unix/make-syscalls.sh 2012-12-02 16:11:45.000000000 -0500 |