summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2009-02-22 18:45:30 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2009-02-22 18:45:30 +0000
commit8cc5991b4aaa44c076454048cfebbc09541dda7c (patch)
tree712718b6901afa06165496c957f29e512a78983c
parent6a9085269a24320c84de5ae2d53cca3a30c4b8e2 (diff)
downloadFreeBSD-src-8cc5991b4aaa44c076454048cfebbc09541dda7c.zip
FreeBSD-src-8cc5991b4aaa44c076454048cfebbc09541dda7c.tar.gz
Explicitly disable generation of Altivec instructions in the kernel on PowerPC,
and add support to allow users to set their CPUTYPE in make.conf.
-rw-r--r--share/mk/bsd.cpu.mk2
-rw-r--r--sys/conf/kern.mk3
2 files changed, 4 insertions, 1 deletions
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index 631d054..b1b06cf 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -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"
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 4a97c23..67bce9f 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -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
OpenPOWER on IntegriCloud