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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to