[hackers] [scc] [driver] fix filename output with as || Quentin Rameau

From: <git_AT_suckless.org>
Date: Wed, 29 Jun 2016 23:52:42 +0200 (CEST)

commit d162e39fe5933c79a34e3d2e9acc3fa572ae11da
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Wed Jun 29 23:50:53 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
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
_AT_@ -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:
Received on Wed Jun 29 2016 - 23:52:42 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 30 2016 - 00:00:47 CEST