mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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 > [build-dir]/sysd-syscallsT sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad substitution This patch simply replaces the three instances of the Bash-only syntax in these files with an echo and sed command substitution. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
committed by
Mike Frysinger
parent
e74a6fd906
commit
0a834ddecb
@ -275,7 +275,7 @@ while read file srcfile caller syscall args strong weak; do
|
||||
# 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\
|
||||
|
Reference in New Issue
Block a user