5 .if !defined(__BOOT_MAKEFILE_INC__)
6 __BOOT_MAKEFILE_INC__=${MFILE}
12 # Add in the no float / no SIMD stuff and announce we're freestanding
13 # aarch64 and riscv don't have -msoft-float, but all others do. riscv
14 # currently has no /boot/loader, but may soon.
15 CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD}
16 .if ${MACHINE_CPUARCH} == "aarch64"
17 CFLAGS+= -mgeneral-regs-only
18 .elif ${MACHINE_CPUARCH} != "riscv"
22 .if ${MACHINE_CPUARCH} == "i386" || (${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1)
24 CFLAGS.gcc+= -mpreferred-stack-boundary=2
28 .if ${MACHINE_CPUARCH} == "arm"
29 # Do not generate movt/movw, because the relocation fixup for them does not
30 # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
31 # Also, the fpu is not available in a standalone environment.
32 .if ${COMPILER_VERSION} < 30800
33 CFLAGS.clang+= -mllvm -arm-use-movt=0
35 CFLAGS.clang+= -mno-movt
37 CFLAGS.clang+= -mfpu=none
40 # The boot loader build uses dd status=none, where possible, for reproducible
41 # build output (since performance varies from run to run). Trouble is that
42 # option was recently (10.3) added to FreeBSD and is non-standard. Only use it
43 # when this test succeeds rather than require dd to be a bootstrap tool.
44 DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true
47 .if ${MK_LOADER_FORCE_LE} != "no"
48 .if ${MACHINE_ARCH} == "powerpc64"
49 CFLAGS+= -mlittle-endian