shithub: scc

Download patch

ref: 2e2a465fb6824ea30a921aef2e545859fc1ccf9e
parent: 994ab1e07787574e639eeb35e6da2a33a1e53bc2
author: Quentin Rameau <quinq@fifth.space>
date: Mon Mar 13 08:32:37 EDT 2017

[driver] In cpp mode without pathname, read stdin

--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -281,6 +281,8 @@
 			return LD;
 		if (!strcmp(dot, ".a"))
 			return LD;
+	} else if (!strcmp(file, "-")) {
+		return CC1;
 	}
 
 	die("scc: do not recognize filetype of %s", file);
@@ -503,6 +505,9 @@
 
 	for (; *argv; --argc, ++argv)
 		goto operand;
+
+	if (Eflag && linkchain.n == 0)
+		newitem(&linkchain, "-");
 
 	if (Eflag && Mflag ||
             (Eflag || Mflag) && (Sflag || kflag) ||