diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2020-09-02 11:53:26 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2020-09-02 11:53:26 +0000 |
commit | d14897f960ed0bc4d65e67d7a40f10fd89651d16 (patch) | |
tree | a5326367b3750c7d06a71e02e042ffc16f81d46d /share/mk | |
parent | 51e805c43c6f9ab096e5ef8a4e79d515a2b4cbb6 (diff) | |
download | src-test2-d14897f960ed0bc4d65e67d7a40f10fd89651d16.tar.gz src-test2-d14897f960ed0bc4d65e67d7a40f10fd89651d16.zip |
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
Notes
Notes:
svn path=/head/; revision=365247
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.cpu.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 3198f80c4ca1..923dcf49bdda 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -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 |