[hackers] [scc] [driver] add support for I flag || Quentin Rameau

From: <git_AT_suckless.org>
Date: Thu, 2 Jun 2016 19:41:18 +0200 (CEST)

commit fb01281f08252d887b251ae3542f92dbed61093e
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Thu Jun 2 19:40:44 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Thu Jun 2 19:40:44 2016 +0200

    [driver] add support for I flag

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index 2bf2aba..052df6f 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -144,7 +144,7 @@ settool(int tool, char *input, int output)
 
         switch (tool) {
         case CC1:
- t->args[1] = input;
+ t->args[t->nargs + 1] = input;
                 break;
         case AS:
                 outfiles[output] = newfileext(input, "o");
_AT_@ -277,7 +277,7 @@ build(char *file)
 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
_AT_@ -292,6 +292,10 @@ main(int argc, char *argv[])
                 Eflag = 1;
                 ADDARG(CC1, "-E");
                 break;
+ case 'I':
+ ADDARG(CC1, "-I");
+ ADDARG(CC1, EARGF(usage()));
+ break;
         case 'S':
                 Sflag = 1;
                 break;
Received on Thu Jun 02 2016 - 19:41:18 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 02 2016 - 19:48:13 CEST