Print this page
5196 The cw wrapper restricts gcc to -O2
*** 18,27 ****
--- 18,29 ----
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Gary Mills
+ *
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*** 31,41 ****
* 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"
/*
* -# Verbose mode
* -### Show compiler commands built by driver, no compilation
* -A<name[(tokens)]> Preprocessor predicate assertion
--- 33,43 ----
* 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.30"
/*
* -# Verbose mode
* -### Show compiler commands built by driver, no compilation
* -A<name[(tokens)]> Preprocessor predicate assertion
*** 532,551 ****
*/
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)
{
}
--- 534,543 ----
*** 1303,1324 ****
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;
}
--- 1295,1304 ----