scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit d162e39fe5933c79a34e3d2e9acc3fa572ae11da
parent 946ce5f09e298d5bbcc1f7f099aa79041cdd94b6
Author: Quentin Rameau <quinq@fifth.space>
Date:   Wed, 29 Jun 2016 23:50:53 +0200

[driver] fix filename output with as

We would use outfile for as whenever it was set, regardless of the
output target.

Diffstat:
Mdriver/posix/scc.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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: