commit f732da390b6dd2b9033090c9e739daa4cf6a4a5b
parent 369c0899dae84b514d1ef70d6a69bd09fa3557d2
Author: Quentin Rameau <quinq@fifth.space>
Date: Thu, 2 Jun 2016 19:17:14 +0200
[driver] write as(1) output files to .o
Diffstat:
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
@@ -42,7 +42,7 @@ static struct tool {
char *argv0;
static char *arch;
-static char *outfiles[NR_TOOLS];
+static char *outfiles[NR_TOOLS + 1];
static int failedtool = NR_TOOLS;
static int Eflag, Sflag, kflag;
@@ -51,7 +51,7 @@ cleanup(void)
{
int i;
- for (i = 0; i < NR_TOOLS; ++i) {
+ for (i = 0; i < NR_TOOLS + 1; ++i) {
if (outfiles[i]) {
if (i > failedtool)
unlink(outfiles[i]);
@@ -99,6 +99,9 @@ inittool(int tool)
die("scc: target tool path too long");
strcat(t->cmd, t->bin);
break;
+ case AS:
+ t->args[1] = "-o";
+ break;
default:
break;
}
@@ -143,6 +146,10 @@ settool(int tool, char *input, int output)
case CC1:
t->args[1] = input;
break;
+ case AS:
+ outfiles[output] = newfileext(input, "o");
+ t->args[2] = outfiles[output];
+ break;
case TEE:
switch (output) {
case CC2: