xref: /freebsd/stand/i386/Makefile.inc (revision 13ea0450a9c8742119d36f3bf8f47accdce46e54)
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
25# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary
26# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections
27LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary
28.if ${LINKER_FEATURES:Mbuild-id} != ""
29LDFLAGS_BIN+=-Wl,--build-id=none
30.endif
31LD_FLAGS_BIN=-static -N --gc-sections
32
33.if ${MACHINE_CPUARCH} == "amd64"
34DO32=1
35.endif
36
37.if defined(LOADER_FIREWIRE_SUPPORT)
38MK_LOADER_FIREWIRE=yes
39.warning "LOADER_FIREWIRE_SUPPORT deprecated, please move to WITH_LOADER_FIREWIRE"
40.endif
41
42.include "../Makefile.inc"
43