Patchwork LIBC_SLIBDIR_RTLDDIR: substitute arguments in single quotes

login
register
mail settings
Submitter Andreas Schwab
Date Jan. 25, 2018, 10 a.m.
Message ID <mvmefmeqmuz.fsf@suse.de>
Download mbox | patch
Permalink /patch/25540/
State New
Headers show

Comments

Andreas Schwab - Jan. 25, 2018, 10 a.m.
The arguments of the LIBC_SLIBDIR_RTLDDIR macro are used both in unquoted
and single quoted context, so that neither shell nor makefile variable
references work.  Consistently put them in single quotes so that they can
refer to makefile variables.
---
 ChangeLog                                           | 14 ++++++++++++++
 aclocal.m4                                          |  4 ++--
 sysdeps/gnu/configure                               |  4 ++--
 sysdeps/unix/sysv/linux/aarch64/configure           |  4 ++--
 sysdeps/unix/sysv/linux/mips/configure              |  8 ++++----
 sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |  4 ++--
 sysdeps/unix/sysv/linux/s390/s390-64/configure      |  4 ++--
 sysdeps/unix/sysv/linux/sparc/sparc64/configure     |  4 ++--
 sysdeps/unix/sysv/linux/tile/configure              |  4 ++--
 sysdeps/unix/sysv/linux/x86_64/64/configure         |  4 ++--
 sysdeps/unix/sysv/linux/x86_64/x32/configure        |  4 ++--
 11 files changed, 36 insertions(+), 22 deletions(-)
Carlos O'Donell - Jan. 25, 2018, 4:10 p.m.
On 01/25/2018 02:00 AM, Andreas Schwab wrote:
> The arguments of the LIBC_SLIBDIR_RTLDDIR macro are used both in unquoted
> and single quoted context, so that neither shell nor makefile variable
> references work.  Consistently put them in single quotes so that they can
> refer to makefile variables.
> ---
>  ChangeLog                                           | 14 ++++++++++++++
>  aclocal.m4                                          |  4 ++--
>  sysdeps/gnu/configure                               |  4 ++--
>  sysdeps/unix/sysv/linux/aarch64/configure           |  4 ++--
>  sysdeps/unix/sysv/linux/mips/configure              |  8 ++++----
>  sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |  4 ++--
>  sysdeps/unix/sysv/linux/s390/s390-64/configure      |  4 ++--
>  sysdeps/unix/sysv/linux/sparc/sparc64/configure     |  4 ++--
>  sysdeps/unix/sysv/linux/tile/configure              |  4 ++--
>  sysdeps/unix/sysv/linux/x86_64/64/configure         |  4 ++--
>  sysdeps/unix/sysv/linux/x86_64/x32/configure        |  4 ++--
>  11 files changed, 36 insertions(+), 22 deletions(-)
LGTM.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Joseph Myers - Jan. 25, 2018, 4:16 p.m.
On Thu, 25 Jan 2018, Andreas Schwab wrote:

> The arguments of the LIBC_SLIBDIR_RTLDDIR macro are used both in unquoted
> and single quoted context, so that neither shell nor makefile variable
> references work.  Consistently put them in single quotes so that they can
> refer to makefile variables.

Is there some sequence of operations that demonstrates breakage arising 
from this inconsistency, or is it just a cleanup?

(There's at least one bug report - bug 6441 - related to this code, but 
that looks unrelated.)
Andreas Schwab - Jan. 25, 2018, 4:27 p.m.
On Jan 25 2018, Joseph Myers <joseph@codesourcery.com> wrote:

> Is there some sequence of operations that demonstrates breakage arising 
> from this inconsistency, or is it just a cleanup?

The previous version of the RISC-V patches were broken by this, though
the current incarnation use a different approach, so this is no longer a
prerequisite.  But there may be room for improvement now.

Andreas.

Patch

diff --git a/ChangeLog b/ChangeLog
index 70f7d61aad..67131c816b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@ 
+2018-01-25  Andreas Schwab  <schwab@suse.de>
+
+	* aclocal.m4 (LIBC_SLIBDIR_RTLDDIR): Consistently put arguments in
+	single quotes.
+	* sysdeps/gnu/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/aarch64/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/mips/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/s390/s390-64/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/tile/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/x86_64/64/configure: Regenerate.
+	* sysdeps/unix/sysv/linux/x86_64/x32/configure: Regenerate.
+
 2018-01-25  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
 	* scripts/build-many-glibcs.py (checkout_vcs): Add hurd repository
diff --git a/aclocal.m4 b/aclocal.m4
index fe2a3713cc..08fa1ac6d0 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -293,8 +293,8 @@  AC_DEFUN([LIBC_SLIBDIR_RTLDDIR],
 [test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/$1
-  libc_cv_rtlddir=/$2
+  libc_cv_slibdir='/$1'
+  libc_cv_rtlddir='/$2'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/$1';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
index 71243ad0c6..c15d1087e8 100644
--- a/sysdeps/gnu/configure
+++ b/sysdeps/gnu/configure
@@ -9,8 +9,8 @@ 
 test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib
-  libc_cv_rtlddir=/lib
+  libc_cv_slibdir='/lib'
+  libc_cv_rtlddir='/lib'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/aarch64/configure b/sysdeps/unix/sysv/linux/aarch64/configure
index f48472c5b6..27d50e1d3c 100644
--- a/sysdeps/unix/sysv/linux/aarch64/configure
+++ b/sysdeps/unix/sysv/linux/aarch64/configure
@@ -6,8 +6,8 @@  arch_minimum_kernel=3.7.0
 test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib64
-  libc_cv_rtlddir=/lib
+  libc_cv_slibdir='/lib64'
+  libc_cv_rtlddir='/lib'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib64';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index a5513fad48..1ee7f41a36 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -442,8 +442,8 @@  mips/mips64/n64/*)
   test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib64
-  libc_cv_rtlddir=/lib64
+  libc_cv_slibdir='/lib64'
+  libc_cv_rtlddir='/lib64'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib64';
     # Locale data can be shared between 32-bit and 64-bit libraries.
@@ -456,8 +456,8 @@  mips/mips64/n32/*)
   test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib32
-  libc_cv_rtlddir=/lib32
+  libc_cv_slibdir='/lib32'
+  libc_cv_rtlddir='/lib32'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib32';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
index 4e7fcf1d97..ae7f254da4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -4,8 +4,8 @@ 
 test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib64
-  libc_cv_rtlddir=/lib64
+  libc_cv_slibdir='/lib64'
+  libc_cv_rtlddir='/lib64'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib64';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/configure b/sysdeps/unix/sysv/linux/s390/s390-64/configure
index 7392cdfb42..e8e84362d4 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/configure
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/configure
@@ -4,8 +4,8 @@ 
 test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib64
-  libc_cv_rtlddir=/lib
+  libc_cv_slibdir='/lib64'
+  libc_cv_rtlddir='/lib'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib64';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/configure b/sysdeps/unix/sysv/linux/sparc/sparc64/configure
index 8f88eff4a3..4b92a40bd2 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/configure
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/configure
@@ -4,8 +4,8 @@ 
 test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib64
-  libc_cv_rtlddir=/lib64
+  libc_cv_slibdir='/lib64'
+  libc_cv_rtlddir='/lib64'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib64';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/tile/configure b/sysdeps/unix/sysv/linux/tile/configure
index 63f9686971..32ce16c957 100644
--- a/sysdeps/unix/sysv/linux/tile/configure
+++ b/sysdeps/unix/sysv/linux/tile/configure
@@ -8,8 +8,8 @@  tile/tilegx32)
   test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib32
-  libc_cv_rtlddir=/lib32
+  libc_cv_slibdir='/lib32'
+  libc_cv_rtlddir='/lib32'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib32';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/configure b/sysdeps/unix/sysv/linux/x86_64/64/configure
index 9d1a8d271d..9d298faba7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/configure
+++ b/sysdeps/unix/sysv/linux/x86_64/64/configure
@@ -4,8 +4,8 @@ 
 test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/lib64
-  libc_cv_rtlddir=/lib64
+  libc_cv_slibdir='/lib64'
+  libc_cv_rtlddir='/lib64'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/lib64';
     # Locale data can be shared between 32-bit and 64-bit libraries.
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/configure b/sysdeps/unix/sysv/linux/x86_64/x32/configure
index 1417da4785..4837a308ce 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/configure
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/configure
@@ -6,8 +6,8 @@  arch_minimum_kernel=3.4.0
 test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/libx32
-  libc_cv_rtlddir=/libx32
+  libc_cv_slibdir='/libx32'
+  libc_cv_rtlddir='/libx32'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/libx32';
     # Locale data can be shared between 32-bit and 64-bit libraries.