changeset 4032:e4d4e241bd4f

6546021 cw calls ld(1) for shadow build when gcc is primary compiler
author rie
date Fri, 13 Apr 2007 20:07:42 -0700
parents 7c86b30fec6f
children ce32e5a0eea0
files usr/src/tools/cw/cw.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/tools/cw/cw.c	Fri Apr 13 20:05:07 2007 -0700
+++ b/usr/src/tools/cw/cw.c	Fri Apr 13 20:07:42 2007 -0700
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -1413,12 +1413,14 @@
 			break;
 		case 'c':
 		case 'S':
-			op = CW_O_COMPILE;
+			if (strlen(arg) == 2)
+				op = CW_O_COMPILE;
 			newae(ctx->i_ae, arg);
 			break;
 		case 'E':
 		case 'P':
-			op = CW_O_PREPROCESS;
+			if (strlen(arg) == 2)
+				op = CW_O_PREPROCESS;
 		/*FALLTHROUGH*/
 		default:
 			newae(ctx->i_ae, arg);