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