From 982ee4e2f59a6838b3417f3212be7f61be61ed38 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Tue, 7 Mar 2017 19:00:27 +0000 Subject: [PATCH] Catch up with Clang 4.0.0. --- share/examples/etc/make.conf | 2 +- share/mk/bsd.cpu.mk | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf index 7dbfc511ffa5..900a77af2a22 100644 --- a/share/examples/etc/make.conf +++ b/share/examples/etc/make.conf @@ -44,7 +44,7 @@ # if omitted), ultrasparc3 # Additionally the following CPU types are recognized by clang: # Intel x86 architecture (for both amd64 and i386): -# (AMD CPUs) bdver4, bdver3, bdver2, bdver1, btver2, btver1 +# (AMD CPUs) znver1, bdver4, bdver3, bdver2, bdver1, btver2, btver1 # (Intel CPUs) skylake, knl, broadwell, haswell, ivybridge, # sandybridge, westmere, nehalem, silvermont, bonnell # diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 79c37664849f..46251af65b31 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -173,7 +173,9 @@ _CPUCFLAGS = -mcpu=${CPUTYPE} ########## i386 . if ${MACHINE_CPUARCH} == "i386" -. if ${CPUTYPE} == "bdver4" +. if ${CPUTYPE} == "znver1" +MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 +. elif ${CPUTYPE} == "bdver4" MACHINE_CPU = xop avx2 avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ ${CPUTYPE} == "bdver1" @@ -242,7 +244,9 @@ MACHINE_CPU = mmx MACHINE_CPU += i486 ########## amd64 . elif ${MACHINE_CPUARCH} == "amd64" -. if ${CPUTYPE} == "bdver4" +. if ${CPUTYPE} == "znver1" +MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse4a sse3 +. elif ${CPUTYPE} == "bdver4" MACHINE_CPU = xop avx2 avx sse42 sse41 ssse3 sse4a sse3 . elif ${CPUTYPE} == "bdver3" || ${CPUTYPE} == "bdver2" || \ ${CPUTYPE} == "bdver1"