Print this page
5196 The cw wrapper restricts gcc to -O2
@@ -18,10 +18,12 @@
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Gary Mills
+ *
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
@@ -31,11 +33,11 @@
* Since the translation is inexact, this is something of a work-in-progress.
*
*/
/* If you modify this file, you must increment CW_VERSION */
-#define CW_VERSION "1.29"
+#define CW_VERSION "1.30"
/*
* -# Verbose mode
* -### Show compiler commands built by driver, no compilation
* -A<name[(tokens)]> Preprocessor predicate assertion
@@ -532,20 +534,10 @@
*/
newae(h, "-Wall");
newae(h, "-Wextra");
}
-static void
-optim_disable(struct aelist *h, int level)
-{
- if (level >= 2) {
- newae(h, "-fno-strict-aliasing");
- newae(h, "-fno-unit-at-a-time");
- newae(h, "-fno-optimize-sibling-calls");
- }
-}
-
/* ARGSUSED */
static void
Xamode(struct aelist *h)
{
}
@@ -1303,22 +1295,10 @@
nomem();
level = atoi(arg + 3);
if (level > 5)
error(arg);
- if (level >= 2) {
- /*
- * For gcc-3.4.x at -O2 we
- * need to disable optimizations
- * that break ON.
- */
- optim_disable(ctx->i_ae, level);
- /*
- * limit -xO3 to -O2 as well.
- */
- level = 2;
- }
(void) snprintf(s, len, "-O%d", level);
newae(ctx->i_ae, s);
free(s);
break;
}