Convert several instances of MACHINE_ARCH to MACHINE_CPUARCH and use the

correct compiler flags on 64-bit PowerPC.
This commit is contained in:
nwhitehorn 2010-07-13 13:11:18 +00:00
parent 71f078a5ea
commit 2c328ad6ae
4 changed files with 13 additions and 13 deletions

View File

@ -74,7 +74,7 @@ INLINE_LIMIT?= 8000
# 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"
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -msoft-float -mno-altivec
INLINE_LIMIT?= 15000
.endif

View File

@ -166,8 +166,8 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND} ${CFILES} \
mv .newdep .depend
_ILINKS= machine
.if ${MACHINE} != ${MACHINE_ARCH}
_ILINKS+= ${MACHINE_ARCH}
.if ${MACHINE} != ${MACHINE_CPUARCH}
_ILINKS+= ${MACHINE_CPUARCH}
.endif
# Ensure that the link exists without depending on it when it exists.
@ -181,8 +181,8 @@ ${_ILINKS}:
@case ${.TARGET} in \
machine) \
path=${S}/${MACHINE}/include ;; \
${MACHINE_ARCH}) \
path=${S}/${MACHINE_ARCH}/include ;; \
${MACHINE_CPUARCH}) \
path=${S}/${MACHINE_CPUARCH}/include ;; \
esac ; \
${ECHO} ${.TARGET} "->" $$path ; \
ln -s $$path ${.TARGET}

View File

@ -12,7 +12,7 @@ KODIR?= /boot/${KERNEL}
LDSCRIPT_NAME?= ldscript.$M
LDSCRIPT?= $S/conf/${LDSCRIPT_NAME}
M= ${MACHINE_ARCH}
M= ${MACHINE_CPUARCH}
AWK?= awk
LINT?= lint

View File

@ -129,7 +129,7 @@ CFLAGS+= ${DEBUG_FLAGS}
CFLAGS+= -fno-omit-frame-pointer
.endif
.if ${MACHINE_ARCH} == "powerpc"
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -mlongcall -fno-omit-frame-pointer
.endif
@ -226,8 +226,8 @@ ${FULLPROG}: ${OBJS}
.endif
_ILINKS=@ machine
.if ${MACHINE} != ${MACHINE_ARCH}
_ILINKS+=${MACHINE_ARCH}
.if ${MACHINE} != ${MACHINE_CPUARCH}
_ILINKS+=${MACHINE_CPUARCH}
.endif
all: objwarn ${PROG}
@ -254,8 +254,8 @@ SYSDIR= ${_dir}
${_ILINKS}:
@case ${.TARGET} in \
${MACHINE_ARCH}) \
path=${SYSDIR}/${MACHINE_ARCH}/include ;; \
${MACHINE_CPUARCH}) \
path=${SYSDIR}/${MACHINE_CPUARCH}/include ;; \
machine) \
path=${SYSDIR}/${MACHINE}/include ;; \
@) \
@ -451,11 +451,11 @@ assym.s: @/kern/genassym.sh
.endif
sh @/kern/genassym.sh genassym.o > ${.TARGET}
.if exists(@)
genassym.o: @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c
genassym.o: @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c
.endif
genassym.o: @ machine ${SRCS:Mopt_*.h}
${CC} -c ${CFLAGS:N-fno-common} \
@/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c
@/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c
.endif
lint: ${SRCS}