aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2015-05-14 14:59:23 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2015-05-14 16:38:46 -0300
commit95b07fbcc702a83b421cb5d0488ba2817d3123c1 (patch)
treee44b1b4e7d6f2610e3e59a23ab36c8e9e0bbc0a1 /sysdeps
parent5695d46f5dc0ff2ffbcb0c52b1f6c2ada09c39dc (diff)
downloadglibc-95b07fbcc702a83b421cb5d0488ba2817d3123c1.tar
glibc-95b07fbcc702a83b421cb5d0488ba2817d3123c1.tar.gz
glibc-95b07fbcc702a83b421cb5d0488ba2817d3123c1.tar.bz2
glibc-95b07fbcc702a83b421cb5d0488ba2817d3123c1.zip
Fix non-portable echo usage in sysdeps/unix/make-syscalls.sh
This patch changes the way make-syscall-sh script uses echo to follow POSIX spec.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/make-syscalls.sh23
1 files changed, 14 insertions, 9 deletions
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index 910a22c0e1..12f664e86e 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -272,28 +272,33 @@ while read file srcfile caller syscall args strong weak; do
vdso_symbol="${vdso_syscall%@*}"
vdso_symver="${vdso_syscall#*@}"
vdso_symver=`echo "$vdso_symver" | sed 's/\./_/g'`
- echo "\
+ cat <<EOF
+
\$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\
\$(..)sysdeps/unix/make-syscalls.sh
\$(make-target-directory)
(echo '#include <dl-vdso.h>'; \\
- echo 'extern void *${strong}_ifunc (void) __asm (\"${strong}\");'; \\
+ echo 'extern void *${strong}_ifunc (void) __asm ("${strong}");'; \\
echo 'void *'; \\
echo '${strong}_ifunc (void)'; \\
echo '{'; \\
echo ' PREPARE_VERSION_KNOWN (symver, ${vdso_symver});'; \\
- echo ' return _dl_vdso_vsym (\"${vdso_symbol}\", &symver);'; \\
+ echo ' return _dl_vdso_vsym ("${vdso_symbol}", &symver);'; \\
echo '}'; \\
- echo 'asm (\".type ${strong}, %gnu_indirect_function\");'; \\"
+ echo 'asm (".type ${strong}, %gnu_indirect_function");'; \\
+EOF
# This is doing "libc_hidden_def (${strong})", but the compiler
# doesn't know that we've defined ${strong} in the same file, so
# we can't do it the normal way.
- echo "\
- echo 'asm (\".globl __GI_${strong}\\n\"'; \\
- echo ' \"__GI_${strong} = ${strong}\");'; \\"
+ cat <<EOF
+ echo 'asm (".globl __GI_${strong}");'; \\
+ echo 'asm ("__GI_${strong} = ${strong}");'; \\
+EOF
emit_weak_aliases
- echo ' ) | $(compile-stdin.c) '"\
-\$(foreach p,\$(patsubst %$file,%,\$(basename \$(@F))),\$(\$(p)CPPFLAGS))"
+ cat <<EOF
+ ) | \$(compile-stdin.c) \
+\$(foreach p,\$(patsubst %$file,%,\$(basename \$(@F))),\$(\$(p)CPPFLAGS))
+EOF
fi
if test $shared_only = t; then