25 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
27 .elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
31 # We implement a slightly non-standard %S in that it always takes a
32 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
33 # seems to matter on arm64 where wchar_t defaults to an int instead
34 # of a short. There's no good cast to use here so just ignore the
36 CWARNFLAGS.efinet.c+= -Wno-format
37 CWARNFLAGS.efipart.c+= -Wno-format
38 CWARNFLAGS.env.c+= -Wno-format
40 .if ${MACHINE_CPUARCH} == "aarch64"
41 CFLAGS+= -mgeneral-regs-only
43 .if ${MACHINE_ARCH} == "amd64"
44 CFLAGS+= -fPIC -mno-red-zone
47 CFLAGS+= -I${EFIINCMD}
48 .if ${MK_LOADER_ZFS} != "no"
50 CFLAGS+= -DEFI_ZFS_BOOT
53 # Pick up the bootstrap header for some interface items
56 # Handle FreeBSD specific %b and %D printf format specifiers
57 CFLAGS+= ${FORMAT_EXTENSIONS}
59 # Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console
60 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"