Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Sep 2020 11:53:26 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r365247 - head/share/mk
Message-ID:  <202009021153.082BrQEO070867@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Wed Sep  2 11:53:26 2020
New Revision: 365247
URL: https://svnweb.freebsd.org/changeset/base/365247

Log:
  When CPUTYPE is an architecture name use -march
  
  Allow architecture names to be passed in to the build system via CPUTYPE.
  This allows the user to use values such as armv8.1-a or armv8-a+crc as
  the CPUTYPE.
  
  Sponsored by:	Innovate UK

Modified:
  head/share/mk/bsd.cpu.mk

Modified: head/share/mk/bsd.cpu.mk
==============================================================================
--- head/share/mk/bsd.cpu.mk	Wed Sep  2 11:49:22 2020	(r365246)
+++ head/share/mk/bsd.cpu.mk	Wed Sep  2 11:53:26 2020	(r365247)
@@ -145,7 +145,13 @@ _CPUCFLAGS = -march=${CPUTYPE}
 _CPUCFLAGS = -march=${CPUTYPE:S/^mips//}
 . endif
 . elif ${MACHINE_CPUARCH} == "aarch64"
+.  if ${CPUTYPE:Marmv*} != ""
+# Use -march when the CPU type is an architecture value, e.g. armv8.1-a
+_CPUCFLAGS = -march=${CPUTYPE}
+.  else
+# Otherwise assume we have a CPU type
 _CPUCFLAGS = -mcpu=${CPUTYPE}
+.  endif
 . endif
 
 # Set up the list of CPU features based on the CPU type.  This is an



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