xref: /freebsd/stand/i386/Makefile.inc (revision f8b865d1d62d17626ab993212963277c06cc25b8)
1# Common defines for all of stand/i386/
2#
3# $FreeBSD$
4
5.sinclude <bsd.linker.mk>
6
7LOADER_ADDRESS?=0x200000
8LDFLAGS+=	-nostdlib
9.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "lld"
10LDFLAGS+=	-Wl,--no-rosegment
11.endif
12
13# BTX components
14BTXDIR=		${BOOTOBJ}/i386/btx
15BTXLDR=		${BTXDIR}/btxldr/btxldr
16BTXKERN=	${BTXDIR}/btx/btx
17BTXCRT=		${BTXDIR}/lib/crt0.o
18
19BTXSRC=		${BOOTSRC}/i386/btx
20BTXLIB=		${BTXSRC}/lib
21
22CFLAGS+=	-I${BTXLIB}
23
24# compact binary with no padding between text, data, bss
25LDSCRIPT=	${BOOTSRC}/i386/boot.ldscript
26# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary
27# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections
28LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary
29LD_FLAGS_BIN=-static -N --gc-sections
30
31.if ${MACHINE_CPUARCH} == "amd64"
32DO32=1
33.endif
34
35.if defined(LOADER_FIREWIRE_SUPPORT)
36MK_LOADER_FIREWIRE=yes
37.warning "LOADER_FIREWIRE_SUPPORT deprecated, please move to WITH_LOADER_FIREWIRE"
38.endif
39
40.include "../Makefile.inc"
41