shithub: scc

Download patch

ref: ee0956cca3f5a2e8ea346336086e37296b3767d9
parent: 2472ad09ad5d993096556543f2c5ce8f786223c1
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Oct 31 01:10:10 EDT 2021

driver/posix: Print full path to the tool

Having the full path to the executed tool makes much
easier to reproduce problems in the spawed tools
because you can just copy paste the line and execute
it.

--- a/src/cmd/cc/posix/cc.c
+++ b/src/cmd/cc/posix/cc.c
@@ -337,7 +337,8 @@
 		if (!dflag && tool != CC1 && tool != LD)
 			dup2(devnullfd, 2);
 		if (dflag) {
-			for (ap = t->args.s; *ap; ap++)
+			fprintf(stderr, "%s", t->cmd);
+			for (ap = t->args.s+1; *ap; ap++)
 				fprintf(stderr, " %s", *ap);
 			putc('\n', stderr);
 		}