Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Feb 2009 18:45:30 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188923 - in head: share/mk sys/conf
Message-ID:  <200902221845.n1MIjUTM003527@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sun Feb 22 18:45:30 2009
New Revision: 188923
URL: http://svn.freebsd.org/changeset/base/188923

Log:
  Explicitly disable generation of Altivec instructions in the kernel on PowerPC,
  and add support to allow users to set their CPUTYPE in make.conf.

Modified:
  head/share/mk/bsd.cpu.mk
  head/sys/conf/kern.mk

Modified: head/share/mk/bsd.cpu.mk
==============================================================================
--- head/share/mk/bsd.cpu.mk	Sun Feb 22 18:22:21 2009	(r188922)
+++ head/share/mk/bsd.cpu.mk	Sun Feb 22 18:45:30 2009	(r188923)
@@ -118,6 +118,8 @@ _CPUCFLAGS = -mcpu=${CPUTYPE}
 .  if ${CPUTYPE} == "e500"
 MACHINE_CPU = booke
 _CPUCFLAGS = -Wa,-me500 -msoft-float
+.  else
+_CPUCFLAGS = -mcpu=${CPUTYPE}
 .  endif
 . elif ${MACHINE_ARCH} == "mips"
 .  if ${CPUTYPE} == "mips32"

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Sun Feb 22 18:22:21 2009	(r188922)
+++ head/sys/conf/kern.mk	Sun Feb 22 18:45:30 2009	(r188923)
@@ -78,9 +78,10 @@ INLINE_LIMIT?=	8000
 #
 # For PowerPC we tell gcc to use floating point emulation.  This avoids using
 # floating point registers for integer operations which it has a tendency to do.
+# Also explicitly disable Altivec instructions inside the kernel.
 #
 .if ${MACHINE_ARCH} == "powerpc"
-CFLAGS+=	-msoft-float
+CFLAGS+=	-msoft-float -mno-altivec
 INLINE_LIMIT?=	15000
 .endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902221845.n1MIjUTM003527>