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
This commit is contained in:
parent
30bbe52432
commit
8605c6b2ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100772
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user