public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3357] libgcc: Quote variable in Makefile.in
@ 2022-10-18 11:12 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-10-18 11:12 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e73fe9e162af7b875a54cd78ddbb6bf26d8b06c2

commit r13-3357-ge73fe9e162af7b875a54cd78ddbb6bf26d8b06c2
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Oct 12 12:35:00 2022 +0100

    libgcc: Quote variable in Makefile.in
    
    If the xgcc executable has not been built (or has been removed by 'make
    clean') then the command to print the multilib dir fails, and so the
    MULTIOSDIR variable is empty. That then causes:
    /bin/sh: line 0: test: !=: unary operator expected
    
    We can avoid it by quoting the variable.
    
    libgcc/ChangeLog:
    
            * Makefile.in: Quote variable.

Diff:
---
 libgcc/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 1fe708a93f7..6e2a0470944 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -310,7 +310,7 @@ CRTSTUFF_T_CFLAGS =
 MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory)
 MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
 
-MULTIOSSUBDIR := $(shell if test $(MULTIOSDIR) != .; then echo /$(MULTIOSDIR); fi)
+MULTIOSSUBDIR := $(shell if test "$(MULTIOSDIR)" != .; then echo /$(MULTIOSDIR); fi)
 inst_libdir = $(libsubdir)$(MULTISUBDIR)
 inst_slibdir = $(slibdir)$(MULTIOSSUBDIR)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-18 11:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 11:12 [gcc r13-3357] libgcc: Quote variable in Makefile.in Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).