Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 02:43:36 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209024 - head/share/mk
Message-ID:  <201006110243.o5B2ha7H041451@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Jun 11 02:43:36 2010
New Revision: 209024
URL: http://svn.freebsd.org/changeset/base/209024

Log:
  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)

Modified:
  head/share/mk/sys.mk

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk	Fri Jun 11 02:09:18 2010	(r209023)
+++ head/share/mk/sys.mk	Fri Jun 11 02:43:36 2010	(r209024)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006110243.o5B2ha7H041451>