2017-11-14 23:02:19 +00:00
|
|
|
# Common defines for all of stand/i386/
|
2000-03-28 01:19:53 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2018-11-23 13:50:18 +00:00
|
|
|
.include "bsd.linker.mk"
|
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
LOADER_ADDRESS?=0x200000
|
2004-02-09 14:11:58 +00:00
|
|
|
LDFLAGS+= -nostdlib
|
2018-04-19 20:58:09 +00:00
|
|
|
LDFLAGS.lld+= -Wl,--no-rosegment
|
2019-02-15 22:22:38 +00:00
|
|
|
MK_PIE:= no
|
2003-06-26 03:51:57 +00:00
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
# BTX components
|
2017-10-30 23:14:37 +00:00
|
|
|
BTXDIR= ${BOOTOBJ}/i386/btx
|
2004-02-06 21:58:32 +00:00
|
|
|
BTXLDR= ${BTXDIR}/btxldr/btxldr
|
|
|
|
BTXKERN= ${BTXDIR}/btx/btx
|
|
|
|
BTXCRT= ${BTXDIR}/lib/crt0.o
|
2008-06-25 21:33:28 +00:00
|
|
|
|
2017-10-30 23:14:37 +00:00
|
|
|
BTXSRC= ${BOOTSRC}/i386/btx
|
|
|
|
BTXLIB= ${BTXSRC}/lib
|
|
|
|
|
2017-12-19 04:06:02 +00:00
|
|
|
CFLAGS+= -I${BTXLIB}
|
|
|
|
|
2016-09-03 15:26:28 +00:00
|
|
|
# compact binary with no padding between text, data, bss
|
2017-10-22 22:50:23 +00:00
|
|
|
LDSCRIPT= ${BOOTSRC}/i386/boot.ldscript
|
2020-03-04 21:01:22 +00:00
|
|
|
LDFLAGS_ORG= -Wl,--defsym,ORG=${ORG},-T,${LDSCRIPT}
|
|
|
|
LDFLAGS_BIN= -e start ${LDFLAGS_ORG} -Wl,-N,-S,--oformat,binary
|
2018-11-23 13:50:18 +00:00
|
|
|
.if ${LINKER_FEATURES:Mbuild-id} != ""
|
2020-03-04 21:01:22 +00:00
|
|
|
LDFLAGS_BIN+= -Wl,--build-id=none
|
2018-11-23 13:50:18 +00:00
|
|
|
.endif
|
2020-03-04 21:01:22 +00:00
|
|
|
LD_FLAGS_BIN= -static -N --gc-sections
|
2016-09-03 15:26:28 +00:00
|
|
|
|
2017-10-30 23:14:37 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
2017-11-06 15:22:04 +00:00
|
|
|
DO32=1
|
2017-10-30 23:14:37 +00:00
|
|
|
.endif
|
|
|
|
|
2017-11-10 23:54:41 +00:00
|
|
|
.if defined(LOADER_FIREWIRE_SUPPORT)
|
|
|
|
MK_LOADER_FIREWIRE=yes
|
|
|
|
.warning "LOADER_FIREWIRE_SUPPORT deprecated, please move to WITH_LOADER_FIREWIRE"
|
|
|
|
.endif
|
|
|
|
|
2008-06-25 21:33:28 +00:00
|
|
|
.include "../Makefile.inc"
|