Print this page
8465 aggressive-loop-optimizations error in rt2860.c
@@ -17,10 +17,11 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
+# Copyright 2017 Gary Mills
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
@@ -66,10 +67,19 @@
CERRWARN += -_gcc=-Wno-unused-label
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-unused-value
+# Prevent the error with gcc-4.9.4: iteration 35u invokes undefined behavior
+GCC_VERS:sh = ${GCC_ROOT}/bin/gcc --version | \
+ head -1 | \
+ sed -e 's/([^(]*)//g' -e 's/^.* //'
+ADD.$(GCC_VERS) = -_gcc=-fno-aggressive-loop-optimizations
+ADD.4.4.4 =
+ADD.3.4.3 =
+$(OBJS_DIR)/rt2860.o := CFLAGS += $(ADD.$(GCC_VERS))
+
#
# Default build targets.
#
.KEEP_STATE: