- Define NO_CPU_CFLAGS during BMAKE and TMAKE (and thus XMAKE) so that
bsd.cpu.mk doesn't have to worry about compilers other than the current version. - Allow TARGET_CPUTYPE to override CPUTYPE in bsd.cpu.mk. - Treat an empty CPUTYPE the same as an undefined CPUTYPE. - For buildworld, buildkernel, etc., define TARGET_CPUTYPE to CPUTYPE for native builds and define it to be empty for cross-builds. TARGET_CPUTYPE is only defined if it is not already defined via the commandline or environment.
This commit is contained in:
parent
f568e52ec8
commit
22e256fded
@ -126,8 +126,10 @@ MAKEOBJDIRPREFIX?= /usr/obj
|
||||
TARGET_ARCH?= ${MACHINE_ARCH}
|
||||
.if ${TARGET_ARCH} == ${MACHINE_ARCH}
|
||||
TARGET?= ${MACHINE}
|
||||
TARGET_CPUTYPE?= ${CPUTYPE}
|
||||
.else
|
||||
TARGET?= ${TARGET_ARCH}
|
||||
TARGET_CPUTYPE?=
|
||||
.endif
|
||||
.if make(buildworld)
|
||||
BUILD_ARCH!= sysctl -n hw.machine_arch
|
||||
@ -184,13 +186,14 @@ BMAKEENV= MAKEOBJDIRPREFIX=${WORLDTMP} \
|
||||
INSTALL="sh ${.CURDIR}/tools/install.sh"
|
||||
BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \
|
||||
-DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \
|
||||
-DNO_WERROR
|
||||
-DNO_CPU_CFLAGS -DNO_WERROR
|
||||
|
||||
# build-tool stage
|
||||
TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
||||
DESTDIR= \
|
||||
INSTALL="sh ${.CURDIR}/tools/install.sh"
|
||||
TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING
|
||||
TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \
|
||||
-DNO_CPU_CFLAGS
|
||||
|
||||
# cross-tool stage
|
||||
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB
|
||||
|
@ -1,10 +1,16 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# Allow TARGET_CPUTYPE to override CPUTYPE to handle the cross-build case.
|
||||
|
||||
.if defined(TARGET_CPUTYPE)
|
||||
CPUTYPE = ${TARGET_CPUTYPE}
|
||||
.endif
|
||||
|
||||
# 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 !defined(CPUTYPE) || ${CPUTYPE} == ""
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
_CPUCFLAGS = -mcpu=pentiumpro
|
||||
CPUTYPE = i386
|
||||
@ -43,11 +49,7 @@ CPUTYPE = k7
|
||||
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
. if ${CPUTYPE} == "k7"
|
||||
. if defined(BOOTSTRAPPING)
|
||||
_CPUCFLAGS = -march=k6 # gcc 2.95.x didn't support athlon
|
||||
. else
|
||||
_CPUCFLAGS = -march=athlon
|
||||
. endif
|
||||
. elif ${CPUTYPE} == "k6-2"
|
||||
_CPUCFLAGS = -march=k6
|
||||
. elif ${CPUTYPE} == "k6"
|
||||
|
Loading…
Reference in New Issue
Block a user