blob: 369190dd661db6f90c6001d85263e601e0bc5254 [file] [log] [blame]
Bob Haarmanac82f6c2020-09-08 18:59:40 +00001Use printf instead of echo to write the rustc shell script. This causes the
2"\\n" sequences to be interpreted as newlines instead of writing them literally.
3
4diff --git a/run_rustc/Makefile b/run_rustc/Makefile
5index 8cd16ae..698d60b 100644
6--- a/run_rustc/Makefile
7+++ b/run_rustc/Makefile
8@@ -103,7 +103,7 @@ ifeq ($(RUSTC_VERSION),1.19.0)
9 else
10 cp $(OUTDIR)build-rustc/release/rustc_binary $(BINDIR)rustc_binary
11 endif
12- echo '#!/bin/sh\nd=$$(dirname $$0)\nLD_LIBRARY_PATH="$(abspath $(LIBDIR))" $$d/rustc_binary $$@' >$@
13+ printf '#!/bin/sh\nd=$$(dirname $$0)\nLD_LIBRARY_PATH="%s" $$d/rustc_binary $$@\n' $(abspath $(LIBDIR)) >$@
14 chmod +x $@
15
16 $(BINDIR)hello_world: $(RUST_SRC)test/run-pass/hello.rs $(LIBDIR)libstd.rlib $(BINDIR)rustc