Index: share/examples/etc/make.conf =================================================================== --- share/examples/etc/make.conf (revision 243665) +++ share/examples/etc/make.conf (working copy) @@ -31,21 +31,25 @@ # Currently the following CPU types are recognized by gcc: # Intel x86 architecture: # (AMD CPUs) opteron-sse3, athlon64-sse3, k8-sse3, opteron, -# athlon64, k8, athlon-mp, athlon-xp, athlon-4, -# athlon-tbird, athlon, k7, geode, k6-3, k6-2, k6, k5 +# athlon64, athlon-fx, k8, athlon-mp, athlon-xp, +# athlon-4, athlon-tbird, athlon, k7, geode, k6-3, +# k6-2, k6, k5 # (Intel CPUs) core2, core, nocona, pentium4m, pentium4, prescott, # pentium3m, pentium3, pentium-m, pentium2, -# pentiumpro, pentium-mmx, pentium, i486, i386 +# pentiumpro, pentium-mmx, pentium, i486 # (VIA CPUs) c7, c3-2, c3 # AMD64 architecture: opteron-sse3, athlon64-sse3, k8-sse3, opteron, -# athlon64, k8, core2, nocona, prescott +# athlon64, k8, core2, nocona # Intel ia64 architecture: itanium2, itanium # SPARC-V9 architecture: v9 (generic 64-bit V9), ultrasparc (default # if omitted), ultrasparc3 # Additionally the following CPU types are recognized by clang: -# Intel x86 architecture (for both amd64 and i386): +# Intel x86 architecture: # (AMD CPUs) bdver2, bdver1, btver1, amdfam10 -# (Intel CPUs) core-avx-i, corei7-avx, corei7 +# (Intel CPUs) core-avx2, core-avx-i, corei7-avx, corei7, penryn, +# yonah +# AMD64 architecture: bdver2, bdver1, btver1, amdfam10, core-avx2, +# core-avx-i, corei7-avx, corei7, penryn # # (?= allows to buildworld for a different CPUTYPE.) # Index: share/mk/bsd.cpu.mk =================================================================== --- share/mk/bsd.cpu.mk (revision 243665) +++ share/mk/bsd.cpu.mk (working copy) @@ -27,11 +27,7 @@ MACHINE_CPU = mips # between e.g. i586 and pentium) . if ${MACHINE_CPUARCH} == "i386" -. if ${CPUTYPE} == "nocona" || ${CPUTYPE} == "core" || \ - ${CPUTYPE} == "core2" || ${CPUTYPE} == "corei7" || \ - ${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i" -CPUTYPE = prescott -. elif ${CPUTYPE} == "p4" +. if ${CPUTYPE} == "p4" CPUTYPE = pentium4 . elif ${CPUTYPE} == "p4m" CPUTYPE = pentium4m @@ -49,15 +45,6 @@ CPUTYPE = pentiumpro CPUTYPE = pentium-mmx . elif ${CPUTYPE} == "i586" CPUTYPE = pentium -. elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" || \ - ${CPUTYPE} == "k8-sse3" || ${CPUTYPE} == "amdfam10" || \ - ${CPUTYPE} == "btver1" || ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2" -CPUTYPE = prescott -. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ - ${CPUTYPE} == "k8" -CPUTYPE = athlon-mp -. elif ${CPUTYPE} == "k7" -CPUTYPE = athlon . endif . elif ${MACHINE_CPUARCH} == "amd64" . if ${CPUTYPE} == "prescott" @@ -87,8 +74,6 @@ CPUTYPE = ultrasparc3 _CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 . elif ${CPUTYPE} == "k5" _CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "core2" -_CPUCFLAGS = -march=prescott . else _CPUCFLAGS = -march=${CPUTYPE} . endif # GCC on 'i386' @@ -145,59 +130,59 @@ _CPUCFLAGS = -mcpu=ultrasparc3 . if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2" MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 -MACHINE_CPU += i486 i386 . elif ${CPUTYPE} == "btver1" -MACHINE_CPU = ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 i486 i386 +MACHINE_CPU = ssse3 sse4a sse3 sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "amdfam10" MACHINE_CPU = athlon-xp athlon k7 3dnow sse4a sse3 sse2 sse mmx k6 k5 i586 -MACHINE_CPU += i486 i386 . elif ${CPUTYPE} == "opteron-sse3" || ${CPUTYPE} == "athlon64-sse3" -MACHINE_CPU = athlon-xp athlon k7 3dnow sse3 sse2 sse mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" -MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386 +MACHINE_CPU = athlon-xp athlon k7 3dnow sse3 sse2 sse mmx k6 k5 i586 +. elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ + ${CPUTYPE} == "athlon-fx" +MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 . elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ ${CPUTYPE} == "athlon-4" -MACHINE_CPU = athlon-xp athlon k7 3dnow sse mmx k6 k5 i586 i486 i386 +MACHINE_CPU = athlon-xp athlon k7 3dnow sse mmx k6 k5 i586 . elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird" -MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386 +MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 . elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2" || ${CPUTYPE} == "geode" -MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386 +MACHINE_CPU = 3dnow mmx k6 k5 i586 . elif ${CPUTYPE} == "k6" -MACHINE_CPU = mmx k6 k5 i586 i486 i386 +MACHINE_CPU = mmx k6 k5 i586 . elif ${CPUTYPE} == "k5" -MACHINE_CPU = k5 i586 i486 i386 +MACHINE_CPU = k5 i586 . elif ${CPUTYPE} == "c3" -MACHINE_CPU = 3dnow mmx i586 i486 i386 +MACHINE_CPU = 3dnow mmx i586 . elif ${CPUTYPE} == "c3-2" -MACHINE_CPU = sse mmx i586 i486 i386 +MACHINE_CPU = sse mmx i586 . elif ${CPUTYPE} == "c7" -MACHINE_CPU = sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse3 sse2 sse i686 mmx i586 +. elif ${CPUTYPE} == "core-avx2" +MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i" -MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = avx sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "corei7" -MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "core2" -MACHINE_CPU = ssse3 sse3 sse2 sse i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "prescott" -MACHINE_CPU = sse3 sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse42 sse41 ssse3 sse3 sse2 sse i686 mmx i586 +. elif ${CPUTYPE} == "penryn" +MACHINE_CPU = sse41 ssse3 sse3 sse2 sse i686 mmx i586 +. elif ${CPUTYPE} == "atom" || ${CPUTYPE} == "core2" +MACHINE_CPU = ssse3 sse3 sse2 sse i686 mmx i586 +. elif ${CPUTYPE} == "prescott" || ${CPUTYPE} == "yonah" +MACHINE_CPU = sse3 sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" || \ ${CPUTYPE} == "pentium-m" -MACHINE_CPU = sse2 sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse2 sse i686 mmx i586 . elif ${CPUTYPE} == "pentium3" || ${CPUTYPE} == "pentium3m" -MACHINE_CPU = sse i686 mmx i586 i486 i386 +MACHINE_CPU = sse i686 mmx i586 . elif ${CPUTYPE} == "pentium2" -MACHINE_CPU = i686 mmx i586 i486 i386 +MACHINE_CPU = i686 mmx i586 . elif ${CPUTYPE} == "pentiumpro" -MACHINE_CPU = i686 i586 i486 i386 +MACHINE_CPU = i686 i586 . elif ${CPUTYPE} == "pentium-mmx" -MACHINE_CPU = mmx i586 i486 i386 +MACHINE_CPU = mmx i586 . elif ${CPUTYPE} == "pentium" -MACHINE_CPU = i586 i486 i386 -. elif ${CPUTYPE} == "i486" -MACHINE_CPU = i486 i386 -. elif ${CPUTYPE} == "i386" -MACHINE_CPU = i386 +MACHINE_CPU = i586 . endif +MACHINE_CPU += i486 . elif ${MACHINE_CPUARCH} == "amd64" . if ${CPUTYPE} == "bdver1" || ${CPUTYPE} == "bdver2" MACHINE_CPU = xop avx sse42 sse41 ssse3 sse4a sse3 @@ -209,13 +194,17 @@ MACHINE_CPU = k8 3dnow sse4a sse3 ${CPUTYPE} == "k8-sse3" MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \ - ${CPUTYPE} == "k8" + ${CPUTYPE} == "athlon-fx" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow +. elif ${CPUTYPE} == "core-avx2" +MACHINE_CPU = avx2 avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "corei7-avx" || ${CPUTYPE} == "core-avx-i" MACHINE_CPU = avx sse42 sse41 ssse3 sse3 . elif ${CPUTYPE} == "corei7" MACHINE_CPU = sse42 sse41 ssse3 sse3 -. elif ${CPUTYPE} == "core2" +. elif ${CPUTYPE} == "penryn" +MACHINE_CPU = sse41 ssse3 sse3 +. elif ${CPUTYPE} == "atom" || ${CPUTYPE} == "core2" MACHINE_CPU = ssse3 sse3 . elif ${CPUTYPE} == "nocona" MACHINE_CPU = sse3 Index: usr.bin/make/main.c =================================================================== --- usr.bin/make/main.c (revision 243665) +++ usr.bin/make/main.c (working copy) @@ -975,8 +975,8 @@ main(int argc, char **argv) * on the target architecture, if not already set. */ if ((machine_cpu = getenv("MACHINE_CPU")) == NULL) { - if (!strcmp(machine_arch, "i386")) - machine_cpu = "i386"; + if (!strcmp(machine_arch, "i486")) + machine_cpu = "i486"; else machine_cpu = "unknown"; }