summaryrefslogtreecommitdiffstats
path: root/share/mk
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-06-11 02:43:36 +0000
committerimp <imp@FreeBSD.org>2010-06-11 02:43:36 +0000
commitb82249f8597eca0e13cf8a873bf8349a56942e41 (patch)
treeb657adb038c37000e363007920f7a1e533cf5bdb /share/mk
parentfb3bba8d11f9304a4157de4ae2bcb8bf940f4efc (diff)
downloadFreeBSD-src-b82249f8597eca0e13cf8a873bf8349a56942e41.zip
FreeBSD-src-b82249f8597eca0e13cf8a873bf8349a56942e41.tar.gz
Merge from tbemd branch:
Introduce MACHINE_CPUARCH. Many different MACHINE_ARCHs will be built from one MACHINE_CPUARCH. This will allow us to move to a more standard MACHINE_ARCH for mips and arm which exist in many different endian variants, and for powerpc where both 32 and 64 bit binaries are generated from the same sources. Reviewed by: arch@ (mostly silence though)
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/sys.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 80ad3fa..ac77b25 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -4,6 +4,18 @@
unix ?= We run FreeBSD, not UNIX.
.FreeBSD ?= true
+.if !defined(%POSIX)
+#
+# MACHINE_CPUARCH defines a collection of MACHINE_ARCH. Machines with
+# the same MACHINE_ARCH can run reach-other's binaries, so it
+# necessarily has word size and endian swizzled in. However, support
+# files for these machines often are shared amongst all combinations
+# of size and/or endian. This is called MACHINE_CPU in NetBSD, but
+# that's used for something different in FreeBSD.
+#
+MACHINE_CPUARCH=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/}
+.endif
+
# If the special target .POSIX appears (without prerequisites or
# commands) before the first noncomment line in the makefile, make shall
# process the makefile as specified by the Posix 1003.2 specification.
@@ -35,7 +47,7 @@ CC ?= c89
CFLAGS ?= -O
.else
CC ?= cc
-.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips"
+.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
CFLAGS ?= -O -pipe
.else
CFLAGS ?= -O2 -pipe
OpenPOWER on IntegriCloud