libc/nls: Sync with FreeBSD.
[dragonfly.git] / share / mk / bsd.cpu.clang.mk
blobf8359e3bbf908aafc44a0e134a742a5c5887fa2c
1 # Set default CPU compile flags and baseline CPUTYPE for each arch. The
2 # compile flags must support the minimum CPU type for each architecture but
3 # may tune support for more advanced processors.
5 generic_x86_64= x86_64 mmx sse sse2
6 generic_i386= i386
8 .if !defined(CPUTYPE) || empty(CPUTYPE) || ${CPUTYPE} == "native"
10 . if defined(CPUTYPE) && ${CPUTYPE:Mnative}
11 _CPUCFLAGS= -march=native
12 . else
13 _CPUCFLAGS=
14 . endif
16 MACHINE_CPU= ${generic_${MACHINE_ARCH}}
18 .else
20 known_x86_64= x86_64 i386
21 known_i386= i386
23 . if defined(known_${MACHINE_ARCH}) && \
24 !empty(known_${MACHINE_ARCH}:M${CPUTYPE}) # CID: Check CPUTYPE
26 # i386 used for 32-bit BIOS-based boot loaders
28 C_x86_64= ${generic_x86_64}
29 C_i386= ${generic_i386}
31 _CPUCFLAGS= -march=${CPUTYPE}
32 MACHINE_CPU= ${C_${CPUTYPE:S|-||}}
34 . else # CID: Check CPUTYPE
36 # CPUTYPE was defined and was not empty, but the value does not match known
37 # CPU types of the defined MACHINE_ARCH. Set -march to native and define
38 # generic features based on MACHINE_ARCH
40 _CPUCFLAGS= -march=native
41 MACHINE_CPU= ${generic_${MACHINE_ARCH}}
43 . endif # CID: Check CPUTYPE
45 .endif