From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 714CB3858C50; Tue, 18 Oct 2022 11:12:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 714CB3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666091533; bh=mJxuEZPR4ZfxlQKG7c50cCUmYmaQL/ttpErkkJ/5xOU=; h=From:To:Subject:Date:From; b=xA2t5d0pjbFUVQBLR9y984mmvTKQtqHInIkyfu6/hO6Cx3xa9F/s6gDbQ0HkZC3SU br/FPrvgbJn3bbEby3fIgFSuf1zYTgAWrMmUHnCPVAqgmwW8vm68MJmvk62BGV7XRU VaJtfZLvxcE3J2X+ump7FfDEpInXDKh/pFyIpo+c= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3357] libgcc: Quote variable in Makefile.in X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 92ef7822bfd4ea3393e0a1dd40b4abef9fce027f X-Git-Newrev: e73fe9e162af7b875a54cd78ddbb6bf26d8b06c2 Message-Id: <20221018111213.714CB3858C50@sourceware.org> Date: Tue, 18 Oct 2022 11:12:13 +0000 (GMT) List-Id: https://gcc.gnu.org/g:e73fe9e162af7b875a54cd78ddbb6bf26d8b06c2 commit r13-3357-ge73fe9e162af7b875a54cd78ddbb6bf26d8b06c2 Author: Jonathan Wakely 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)