From owner-svn-src-all@freebsd.org Thu Nov 21 06:44:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CB041B0838; Thu, 21 Nov 2019 06:44:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47JVQr1kG4z3x2v; Thu, 21 Nov 2019 06:44:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A4E974FA; Thu, 21 Nov 2019 06:44:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAL6iJkW087733; Thu, 21 Nov 2019 06:44:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAL6iJPW087732; Thu, 21 Nov 2019 06:44:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201911210644.xAL6iJPW087732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 Nov 2019 06:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354936 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 354936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2019 06:44:20 -0000 Author: imp Date: Thu Nov 21 06:44:19 2019 New Revision: 354936 URL: https://svnweb.freebsd.org/changeset/base/354936 Log: Add table for MACHINE_CPUARCH Add table and also some additional verbage of which one to use. Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Thu Nov 21 04:12:08 2019 (r354935) +++ head/share/man/man7/arch.7 Thu Nov 21 06:44:19 2019 (r354936) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd November 20, 2019 .Dt ARCH 7 .Os .Sh NAME @@ -347,6 +347,24 @@ Unless the make variable is defined, make universe will not build mips, powerpc, nor sparc64 architectures unless the xtoolchain binaries have been installed for the architecture. +.Ss MACHINE_ARCH vs MACHINE_CPUARCH +.Dv MACHINE_CPUARCH +should be preferred in Makefiles when the generic +architecture is being tested. +.Dv MACHINE_ARCH +should be preferred when there is something specific to a particular type of +architecture where there is a choice of many, or could be a choice of many. +.Bl -column -offset indent "Dv MACHINE" "Dv MACHINE_CPUARCH" "Dv MACHINE_ARCH" +.It Dv MACHINE Ta Dv MACHINE_CPUARCH Ta Dv MACHINE_ARCH +.It arm64 Ta aarch64 Ta aarch64 +.It amd64 Ta amd64 Ta amd64 +.It arm Ta arm Ta arm, armv6, armv7 +.It i386 Ta i386 Ta i386 +.It mips Ta mips Ta mips, mipsel, mips64, mips64el, mipshf, mipselhf, mips64elhf, mipsn32 +.It powerpc Ta powerpc Ta powerpc, powerpcspe, powerpc64 +.It riscv Ta riscv Ta riscv64, riscv64sf +.It sparc64 Ta sparc64 Ta sparc64 +.El .Ss Predefined Macros The compiler provides a number of predefined macros. Some of these provide architecture-specific details and are explained below. @@ -473,6 +491,8 @@ There is no standard name for the processor: each OS s conventions. .It Dv MACHINE_CPUARCH Represents the source location for a given .Dv MACHINE_ARCH . +It is generally the common prefix for all the MACHINE_ARCH that +share the same implementation, though 'riscv' breaks this rule. For example, .Dv MACHINE_CPUARCH is defined to be mips for all the flavors of mips that we support