diff options
author | jhb <jhb@FreeBSD.org> | 2002-07-27 22:04:05 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-07-27 22:04:05 +0000 |
commit | af1f8a2d2a282b542e5a8b338a7a578ba3c754df (patch) | |
tree | cf56c2b35a741af529ae85a2e99f2f0146b58833 | |
parent | d1139f54e73daf43c9c802ca80dd8005fac399c0 (diff) | |
download | FreeBSD-src-af1f8a2d2a282b542e5a8b338a7a578ba3c754df.zip FreeBSD-src-af1f8a2d2a282b542e5a8b338a7a578ba3c754df.tar.gz |
If there is not a CPUTYPE defined by default, then allow for _CPUCFLAGS
to tune for more advanced processors while still supporting the minimum
processor in an architecture. We can do this with the '-mtune=' option
to gcc for alpha, sparc64, and powerpc and with the mis-named '-mcpu='
option for i386.
This defaults to tuning i386 builds for i686 machines though not using
any instructions that aren't found on an 80386. For alpha it defaults
to tuning for an EV5.
Approved by: peter
Peril sensitive sunglasses borrowed from: peter
-rw-r--r-- | share/mk/bsd.cpu.mk | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index c320052..f4eef7a 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -1,17 +1,24 @@ # $FreeBSD$ -# Set default baseline values of CPUTYPE based on MACHINE_ARCH -- this is -# the minimum CPU type we support for each architecture +# Set default CPU compile flags and baseline CPUTYPE for each arch. The +# compile flags must support the minimum CPU type for each architecture but +# may tune support for more advanced processors. +.if !defined(CPUTYPE) .if ${MACHINE_ARCH} == "i386" -CPUTYPE ?= i386 +_CPUCFLAGS = -mcpu=pentiumpro +CPUTYPE = i386 .elif ${MACHINE_ARCH} == "alpha" -CPUTYPE ?= ev5 +_CPUCFLAGS = -mcpu=ev4 -mtune=ev5 +CPUTYPE = ev4 .elif ${MACHINE_ARCH} == "ia64" -CPUTYPE ?= itanium +_CPUCFLAGS = +CPUTYPE = itanium .elif ${MACHINE_ARCH} == "sparc64" -CPUTYPE ?= ultrasparc +_CPUCFLAGS = +CPUTYPE = ultrasparc .endif +.else # Handle aliases (not documented in make.conf to avoid user confusion # between e.g. i586 and pentium) @@ -79,6 +86,7 @@ _CPUCFLAGS = -mcpu=ev4 . endif . endif .endif +.endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/Makefile.<arch> |