svn commit: r224882 - head/sys/conf

Nathan Whitehorn nwhitehorn at FreeBSD.org
Mon Aug 15 13:33:15 UTC 2011


Author: nwhitehorn
Date: Mon Aug 15 13:33:14 2011
New Revision: 224882
URL: http://svn.freebsd.org/changeset/base/224882

Log:
  Use a maximum of -O on PowerPC kernels instead of -O2 to prevent a rare
  bug that could cause intermittent memory corruption on PowerPC SMP
  systems using non-debug kernels. This is a temporary change until the
  real problem is fixed.
  
  Approved by:	re (kib)

Modified:
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Mon Aug 15 13:27:02 2011	(r224881)
+++ head/sys/conf/kern.pre.mk	Mon Aug 15 13:33:14 2011	(r224882)
@@ -27,8 +27,12 @@ SIZE?=		size
 _MINUS_O=	-O
 CTFFLAGS+=	-g
 .else
+.if ${MACHINE_CPUARCH} == "powerpc"
+_MINUS_O=	-O	# gcc miscompiles some code at -O2
+.else
 _MINUS_O=	-O2
 .endif
+.endif
 .if ${MACHINE_CPUARCH} == "amd64"
 COPTFLAGS?=-O2 -frename-registers -pipe
 .else


More information about the svn-src-all mailing list