From e73fe9e162af7b875a54cd78ddbb6bf26d8b06c2 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 12 Oct 2022 12:35:00 +0100 Subject: [PATCH] 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. --- libgcc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 1fe708a93f73..6e2a0470944f 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) -- 2.47.2