[hackers] [scc] [driver] add c flag || Quentin Rameau

From: <git_AT_suckless.org>
Date: Wed, 15 Jun 2016 19:00:06 +0200 (CEST)

commit 009aeb3d52f4a1aa03ac9fee18ccd42539a11db4
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Thu Jun 9 11:20:55 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Wed Jun 15 18:50:46 2016 +0200

    [driver] add c flag

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index d845127..bd5a61b 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -48,7 +48,7 @@ char *argv0;
 static char *arch;
 static char **tmpobjs;
 static int nobjs;
-static int Eflag, Sflag, kflag;
+static int Eflag, Sflag, cflag, kflag;
 
 static void
 cleanfiles(int tool)
_AT_@ -353,7 +353,7 @@ build(char *file)
                         nexttool = Sflag ? LAST_TOOL : AS;
                         break;
                 case AS:
- nexttool = LD;
+ nexttool = cflag ? LAST_TOOL : LD;
                         break;
                 case LD: /* FALLTHROUGH */
                         if (argfile) {
_AT_@ -376,7 +376,7 @@ build(char *file)
 static void
 usage(void)
 {
- die("usage: %s [-E|-kS] [-w] [-m arch] [-o binout]\n"
+ die("usage: %s [-E|-kS] [-w] [-m arch] [-c] [-o binout]\n"
             " [-D macro[=val]]... [-I dir]... file...", argv0);
 }
 
_AT_@ -407,6 +407,9 @@ main(int argc, char *argv[])
         case 'S':
                 Sflag = 1;
                 break;
+ case 'c':
+ cflag = 1;
+ break;
         case 'k':
                 kflag = 1;
                 break;
_AT_@ -440,7 +443,7 @@ main(int argc, char *argv[])
         for (; *argv; ++argv)
                 build(*argv);
 
- if (!(Eflag || Sflag))
+ if (!(Eflag || Sflag || cflag))
                 linkobjs();
 
         return 0;
Received on Wed Jun 15 2016 - 19:00:06 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 15 2016 - 19:00:46 CEST