Explicitly disable generation of Altivec instructions in the kernel on PowerPC,

and add support to allow users to set their CPUTYPE in make.conf.
This commit is contained in:
nwhitehorn 2009-02-22 18:45:30 +00:00
parent 6a9085269a
commit 8cc5991b4a
2 changed files with 4 additions and 1 deletions

View File

@ -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"

View File

@ -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