commit 009aeb3d52f4a1aa03ac9fee18ccd42539a11db4
parent de1dcdb047bfb84d061743b5b53170f23b2516ea
Author: Quentin Rameau <quinq@fifth.space>
Date: Thu, 9 Jun 2016 11:20:55 +0200
[driver] add c flag
Diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
@@ -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)
@@ -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) {
@@ -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);
}
@@ -407,6 +407,9 @@ main(int argc, char *argv[])
case 'S':
Sflag = 1;
break;
+ case 'c':
+ cflag = 1;
+ break;
case 'k':
kflag = 1;
break;
@@ -440,7 +443,7 @@ main(int argc, char *argv[])
for (; *argv; ++argv)
build(*argv);
- if (!(Eflag || Sflag))
+ if (!(Eflag || Sflag || cflag))
linkobjs();
return 0;