commit d162e39fe5933c79a34e3d2e9acc3fa572ae11da
Author: Quentin Rameau <[email protected]>
AuthorDate: Wed Jun 29 23:50:53 2016 +0200
Commit: Quentin Rameau <[email protected]>
CommitDate: Wed Jun 29 23:50:53 2016 +0200
[driver] fix filename output with as
We would use outfile for as whenever it was set, regardless of the
output target.
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index 8d7eedb..a68b796 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -184,7 +184,8 @@ settool(int tool, char *infile, int nexttool)
addarg(tool, t->outfile);
break;
case AS:
- t->outfile = outfile ? outfile : outfilename(infile, "o");
+ t->outfile = (cflag && outfile) ? outfile :
+ outfilename(infile, "o");
addarg(tool, t->outfile);
break;
case LD: