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
8 .if !defined(CPUTYPE) || empty(CPUTYPE) || ${CPUTYPE} == "native"
10 . if defined(CPUTYPE) && ${CPUTYPE:Mnative}
11 _CPUCFLAGS= -march=native
16 MACHINE_CPU= ${generic_${MACHINE_ARCH}}
20 known_x86_64= x86_64 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