Print this page
5196 The cw wrapper restricts gcc to -O2

@@ -18,10 +18,11 @@
 #
 # CDDL HEADER END
 #
 
 #
+# Copyright 2014 Gary Mills
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
 include $(SRC)/cmd/Makefile.cmd

@@ -56,11 +57,11 @@
 
 # The DTrace tests rely on "normal" behaviour from the compiler which
 # agressive optimization of small, simple, one compilation-unit programs may
 # utterly subvert.  We force the compiler to not optimize rather than engage
 # in an arms race with increasingly belligerent optimizers.
-COPTFLAG=       -xO0
+COPTFLAG=       -_cc=-xO0 -_gcc=-O0
 
 CERRWARN +=     -_gcc=-Wno-switch
 CERRWARN +=     -_gcc=-Wno-unused-variable
 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
 CERRWARN +=     -_gcc=-Wno-unused-function