summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-07-31 03:56:03 +0000
committerjhb <jhb@FreeBSD.org>2002-07-31 03:56:03 +0000
commit7385ed2e47f089a6ba2e554d39c1bd446e88eb6b (patch)
treef1a3fc2fe20ea1fd661ed237f12d471bb73911ab /share
parent31ed4bc0c01c00d57f26e48632be3c6225b99713 (diff)
downloadFreeBSD-src-7385ed2e47f089a6ba2e554d39c1bd446e88eb6b.zip
FreeBSD-src-7385ed2e47f089a6ba2e554d39c1bd446e88eb6b.tar.gz
- 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.
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.cpu.mk12
1 files changed, 7 insertions, 5 deletions
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index 14be1b4..7a9d7e2 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -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"
OpenPOWER on IntegriCloud