Prefer MACHINE_CPUARCH over MACHINE_ARCH

This commit is contained in:
Warner Losh 2010-09-13 07:27:03 +00:00
parent a157e42516
commit c614f4e2db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212542

View File

@ -29,7 +29,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
# operations inside the kernel itself. These operations are exclusively
# reserved for user applications.
#
.if ${MACHINE_ARCH} == "i386" && ${CC:T:Micc} != "icc"
.if ${MACHINE_CPUARCH} == "i386" && ${CC:T:Micc} != "icc"
.if ${CC:T:Mclang} != "clang"
CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2
.endif
@ -37,14 +37,14 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
INLINE_LIMIT?= 8000
.endif
.if ${MACHINE_ARCH} == "arm"
.if ${MACHINE_CPUARCH} == "arm"
INLINE_LIMIT?= 8000
.endif
#
# For IA-64, we use r13 for the kernel globals pointer and we only use
# a very small subset of float registers for integer divides.
#
.if ${MACHINE_ARCH} == "ia64"
.if ${MACHINE_CPUARCH} == "ia64"
CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127 -fpic #-mno-sdata
INLINE_LIMIT?= 15000
.endif
@ -54,7 +54,7 @@ INLINE_LIMIT?= 15000
# point emulation. This avoids using floating point registers for integer
# operations which it has a tendency to do.
#
.if ${MACHINE_ARCH} == "sparc64"
.if ${MACHINE_CPUARCH} == "sparc64"
CFLAGS+= -mcmodel=medany -msoft-float
INLINE_LIMIT?= 15000
.endif
@ -64,7 +64,7 @@ INLINE_LIMIT?= 15000
# operations inside the kernel itself. These operations are exclusively
# reserved for user applications.
#
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -mcmodel=kernel -mno-red-zone \
-mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow \
-msoft-float -fno-asynchronous-unwind-tables
@ -76,7 +76,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" || ${MACHINE_ARCH} == "powerpc64"
.if ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+= -msoft-float -mno-altivec
INLINE_LIMIT?= 15000
.endif
@ -84,7 +84,7 @@ INLINE_LIMIT?= 15000
#
# For MIPS we also tell gcc to use floating point emulation
#
.if ${MACHINE_ARCH} == "mips"
.if ${MACHINE_CPUARCH} == "mips"
CFLAGS+= -msoft-float
INLINE_LIMIT?= 8000
.endif
@ -106,8 +106,9 @@ CFLAGS+= -restrict
#
# GCC SSP support.
#
.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && ${MACHINE_ARCH} != "ia64" && \
${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips"
.if ${MK_SSP} != "no" && ${CC:T:Micc} != "icc" && \
${MACHINE_CPUARCH} != "ia64" && ${MACHINE_CPUARCH} != "arm" && \
${MACHINE_CPUARCH} != "mips"
CFLAGS+= -fstack-protector
.endif