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