klibc-bot for Ben Hutchings
2020-Dec-12 23:27 UTC
[klibc] [klibc:master] klcc: Force make to use a shell to run 'command'
Commit-ID: 7e60022568f727fd264e796a10ce154486a3c56c Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=7e60022568f727fd264e796a10ce154486a3c56c Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Sat, 12 Dec 2020 22:17:50 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 12 Dec 2020 22:17:50 +0100 [klibc] klcc: Force make to use a shell to run 'command' GNU make has an optimisation to run some commands without using the shell, and its rules for recognising whether the shell is needed can be buggy. In particular, older versions don't recognise that 'command' may be a shell built-in, and try to run it as if it's an external command. Add a redirection to the commamd line, to inhibit this optimisation. Reported-by: Greg Thelen <gthelen at google.com> References: https://lists.zytor.com/archives/klibc/2020-September/004548.html References: https://git.kernel.org/linus/913ab9780fc021298949cc5514d6255a008e69f9 Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- klcc/Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klcc/Kbuild b/klcc/Kbuild index ca46c6ce..82ca0e84 100644 --- a/klcc/Kbuild +++ b/klcc/Kbuild @@ -36,7 +36,7 @@ targets := $(KLIBCCROSS)klcc quiet_cmd_klcc = GEN $@ cmd_klcc = $(PERL) $< $(srctree)/$(src)/klcc.in \ $(obj)/$(KLIBCCROSS)klibc.config \ - $(shell command -v $(PERL)) \ + $(shell command -v $(PERL) 2>/dev/null) \ > $@ || ( rm -f $@ ; exit 1 ) && \ chmod a+x $@ $(obj)/$(KLIBCCROSS)klcc: $(src)/makeklcc.pl $(src)/klcc.in \