From 04ef136570c221476c76f2432b9832a5128761d6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 25 Jun 2013 13:10:36 -0400 Subject: Also fix "bad substitution" in a makefile. --- diff --git a/patches/08_fix-bad-substitution.patch b/patches/08_fix-bad-substitution.patch index 11acb00..9131a95 100644 --- a/patches/08_fix-bad-substitution.patch +++ b/patches/08_fix-bad-substitution.patch @@ -1,8 +1,9 @@ From: "P. J. McDermott" 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: + 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: . for dir in [...]; do \ test -f $dir/syscalls.list && \ @@ -12,6 +13,11 @@ Description: Fix "bad substitution" errors in shell script 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 + . + The following command will search the upstream source for this non-standard + expansion: + . + grep -ERn '\${[a-zA-Z0-9_]+/[^}]*/[^}]*}' tmp/src/libc 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 @@ -25,3 +31,23 @@ diff -Naur src.orig/libc/sysdeps/unix/make-syscalls.sh src/libc/sysdeps/unix/mak echo "\ \$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\ \$(..)sysdeps/unix/make-syscalls.sh\ +diff -Naur src.orig/libc/sysdeps/unix/Makefile src/libc/sysdeps/unix/Makefile +--- src.orig/libc/sysdeps/unix/Makefile 2012-11-06 12:31:45.000000000 -0500 ++++ src/libc/sysdeps/unix/Makefile 2013-06-25 12:59:59.068197711 -0400 +@@ -51,12 +51,14 @@ + for call in $(unix-stub-syscalls); do \ + case $$call in \ + *@@*) \ +- ver=$${call##*@}; call=$${call%%@*}; ver=$${ver//./_}; \ ++ ver=$${call##*@}; call=$${call%%@*}; \ ++ ver=`echo $ver | sed 's/\./_/g'`; \ + echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \ + echo "versioned_symbol (libc, __$${call}_$${ver}, $$call, $$ver);"\ + ;; \ + *@*) \ +- ver=$${call##*@}; call=$${call%%@*}; ver=$${ver//./_}; \ ++ ver=$${call##*@}; call=$${call%%@*}; \ ++ ver=`echo $ver | sed 's/\./_/g'`; \ + echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \ + echo "compat_symbol (libc, __$${call}_$${ver}, $$call, $$ver);" \ + ;; \ -- cgit v0.9.1