ref: 9483a25dc24cfcfede04bc1a7dcb1af421a108fd
parent: 4cdc5ac5e85a06bfd6f12d9aa29f367ca7342714
author: Quentin Rameau <[email protected]>
date: Thu Jun 2 15:40:44 EDT 2016
[driver] add support for I flag
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -144,7 +144,7 @@
switch (tool) {
case CC1:
- t->args[1] = input;
+ t->args[t->nargs + 1] = input;
break;
case AS:
outfiles[output] = newfileext(input, "o");
@@ -277,7 +277,7 @@
static void
usage(void)
{
- die("usage: %s [-E|-kS] [-m arch] input ...", argv0);
+ die("usage: %s [-E|-kS] [-m arch] [-I dir]... input ...", argv0);
}
int
@@ -291,6 +291,10 @@
case 'E':
Eflag = 1;
ADDARG(CC1, "-E");
+ break;
+ case 'I':
+ ADDARG(CC1, "-I");
+ ADDARG(CC1, EARGF(usage()));
break;
case 'S':
Sflag = 1;