summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2007-10-22 21:43:52 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2007-10-22 21:43:52 +0000
commit323fb3e0ba92d4f25decb144a0ca8df20a8836ee (patch)
tree6d91d307ca240229ef28d059a07c54dd1609d628 /usr.bin
parent5a94dc522ac59100f25e000c478dbed494e6e296 (diff)
Pull from master repo:
Pass the right file and not a temporary to as if cc is invoked with .s files. ok ragge@, otto@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/pcc/cc/cc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/pcc/cc/cc.c b/usr.bin/pcc/cc/cc.c
index 9fc1151c2f4..cd8e7109397 100644
--- a/usr.bin/pcc/cc/cc.c
+++ b/usr.bin/pcc/cc/cc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cc.c,v 1.7 2007/10/20 09:04:42 stefan Exp $ */
+/* $OpenBSD: cc.c,v 1.8 2007/10/22 21:43:51 stefan Exp $ */
/*
* Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
*
@@ -402,12 +402,9 @@ main(int argc, char *argv[])
goto com;
} else if (getsuf(clist[i])=='s') {
assource = clist[i];
- onlyas = 1;
goto assemble;
- } else if (getsuf(clist[i])=='S') {
- assource = clist[i];
+ } else if (getsuf(clist[i])=='S')
onlyas = 1;
- }
if (pflag)
tmp4 = setsuf(clist[i], 'i');
na = 0;
@@ -452,8 +449,10 @@ main(int argc, char *argv[])
{exfail++; eflag++;}
if (Eflag || Mflag)
continue;
- if (onlyas)
+ if (onlyas) {
+ assource = tmp4;
goto assemble;
+ }
/*
* C compiler
@@ -520,7 +519,7 @@ main(int argc, char *argv[])
av[na++] = outfile;
else
av[na++] = setsuf(clist[i], 'o');
- av[na++] = onlyas ? tmp4 : assource;
+ av[na++] = assource;
if (dflag)
av[na++] = alist;
av[na++] = 0;