commit c3a50031fc81663f985a3abfc0efa2c0ea3ee5eb
Author: Quentin Rameau <[email protected]>
AuthorDate: Mon Mar 13 12:32:37 2017 +0100
Commit: Quentin Rameau <[email protected]>
CommitDate: Fri Mar 17 10:18:33 2017 +0100
[driver] In cpp mode without pathname, read stdin
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index cdfdb38..038bdcd 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -281,6 +281,8 @@ toolfor(char *file)
return LD;
if (!strcmp(dot, ".a"))
return LD;
+ } else if (!strcmp(file, "-")) {
+ return CC1;
}
die("scc: do not recognize filetype of %s", file);
@@ -504,6 +506,9 @@ operand:
for (; *argv; --argc, ++argv)
goto operand;
+ if (Eflag && linkchain.n == 0)
+ newitem(&linkchain, "-");
+
if (Eflag && Mflag ||
(Eflag || Mflag) && (Sflag || kflag) ||
linkchain.n == 0 ||