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