2008-06-25 21:33:28 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-09-29 06:36:19 +00:00
|
|
|
.include <src.opts.mk>
|
2016-02-11 20:16:11 +00:00
|
|
|
|
2017-10-09 22:12:32 +00:00
|
|
|
.if !defined(__BOOT_MAKEFILE_INC__)
|
|
|
|
__BOOT_MAKEFILE_INC__=${MFILE}
|
|
|
|
|
|
|
|
SASRC=${SRCTOP}/lib/libstand
|
2017-10-10 04:53:26 +00:00
|
|
|
# Normal standalone library
|
2017-10-09 22:12:53 +00:00
|
|
|
LIBSA=${OBJTOP}/sys/boot/libsa/libstand.a
|
2017-10-10 04:53:26 +00:00
|
|
|
# Standalone library compiled for 32-bit version of the processor
|
2017-10-09 22:12:46 +00:00
|
|
|
LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a
|
2017-10-10 04:53:26 +00:00
|
|
|
# Standalone library compiled for userboot
|
2017-10-09 22:12:46 +00:00
|
|
|
LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a
|
2017-10-09 22:12:32 +00:00
|
|
|
|
2017-10-10 01:31:44 +00:00
|
|
|
CFLAGS+=-I${SASRC}
|
|
|
|
|
2009-02-21 15:04:31 +00:00
|
|
|
SSP_CFLAGS=
|
2016-02-09 00:15:41 +00:00
|
|
|
|
|
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
|
|
|
# Do not generate movt/movw, because the relocation fixup for them does not
|
|
|
|
# translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
|
|
|
|
# Also, the fpu is not available in a standalone environment.
|
2016-02-11 20:16:11 +00:00
|
|
|
.if ${COMPILER_VERSION} < 30800
|
|
|
|
CFLAGS.clang+= -mllvm -arm-use-movt=0
|
|
|
|
.else
|
|
|
|
CFLAGS.clang+= -mno-movt
|
|
|
|
.endif
|
2016-02-09 00:15:41 +00:00
|
|
|
CFLAGS.clang+= -mfpu=none
|
|
|
|
.endif
|
2016-12-02 14:44:38 +00:00
|
|
|
|
|
|
|
# The boot loader build uses dd status=none, where possible, for reproducible
|
|
|
|
# build output (since performance varies from run to run). Trouble is that
|
|
|
|
# option was recently (10.3) added to FreeBSD and is non-standard. Only use it
|
|
|
|
# when this test succeeds rather than require dd to be a bootstrap tool.
|
|
|
|
DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true
|
|
|
|
DD=dd ${DD_NOSTATUS}
|
2017-09-29 06:36:19 +00:00
|
|
|
|
|
|
|
.if ${MK_LOADER_FORCE_LE} != "no"
|
|
|
|
.if ${MACHINE_ARCH} == "powerpc64"
|
|
|
|
CFLAGS+= -mlittle-endian
|
|
|
|
.endif
|
2017-10-09 22:12:32 +00:00
|
|
|
.endif
|
2017-09-29 06:36:19 +00:00
|
|
|
|
|
|
|
.endif
|