summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-06-25 13:06:57 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-06-25 13:06:57 (EDT)
commit21b6020b8bf501ead8ac9f1326b61242bfeca1da (patch)
tree58d7a418a83429692b3a850e78b4a1509930b7d3 /patches
parent8978919fb4cb51094c82f981ddcfac5e536af34a (diff)
Fix "bad substitution" in make-syscalls.sh.
Diffstat (limited to 'patches')
-rw-r--r--patches/08_fix-bad-substitution.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/08_fix-bad-substitution.patch b/patches/08_fix-bad-substitution.patch
new file mode 100644
index 0000000..11acb00
--- /dev/null
+++ b/patches/08_fix-bad-substitution.patch
@@ -0,0 +1,27 @@
+From: "P. J. McDermott" <pjm@nac.net>
+Description: Fix "bad substitution" errors in shell script
+ make-syscalls.sh uses 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:
+ .
+ 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
+ sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad 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
++++ src/libc/sysdeps/unix/make-syscalls.sh 2013-06-25 12:01:55.178740324 -0400
+@@ -279,7 +279,7 @@
+ # name in the vDSO and KERNEL_X.Y is its symbol version.
+ vdso_symbol="${vdso_syscall%@*}"
+ vdso_symver="${vdso_syscall#*@}"
+- vdso_symver="${vdso_symver//./_}"
++ vdso_symver=`echo $vdso_symver | sed 's/\./_/g'`
+ echo "\
+ \$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\
+ \$(..)sysdeps/unix/make-syscalls.sh\