2000-03-28 01:19:53 +00:00
|
|
|
# Common defines for all of /sys/boot/i386/
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2004-02-06 12:58:32 +00:00
|
|
|
BINDIR?= /boot
|
|
|
|
|
2004-02-06 21:58:32 +00:00
|
|
|
LOADER_ADDRESS?=0x200000
|
2013-12-26 11:32:39 +00:00
|
|
|
CFLAGS+= -march=i386 -ffreestanding
|
|
|
|
CFLAGS.gcc+= -mpreferred-stack-boundary=2
|
2015-08-27 23:46:42 +00:00
|
|
|
CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float
|
2004-02-09 14:11:58 +00:00
|
|
|
LDFLAGS+= -nostdlib
|
2003-06-26 03:51:57 +00:00
|
|
|
|
2010-08-23 01:42:09 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
2012-10-20 16:57:23 +00:00
|
|
|
CFLAGS+= -m32
|
2011-07-17 13:50:21 +00:00
|
|
|
ACFLAGS+= -m32
|
2013-12-30 19:05:50 +00:00
|
|
|
# LD_FLAGS is passed directly to ${LD}, not via ${CC}:
|
|
|
|
LD_FLAGS+= -m elf_i386_fbsd
|
2004-02-06 21:58:32 +00:00
|
|
|
AFLAGS+= --32
|
2003-06-26 03:51:57 +00:00
|
|
|
.endif
|
2004-02-06 21:58:32 +00:00
|
|
|
|
|
|
|
# BTX components
|
|
|
|
.if exists(${.OBJDIR}/../btx)
|
|
|
|
BTXDIR= ${.OBJDIR}/../btx
|
|
|
|
.else
|
|
|
|
BTXDIR= ${.CURDIR}/../btx
|
|
|
|
.endif
|
|
|
|
BTXLDR= ${BTXDIR}/btxldr/btxldr
|
|
|
|
BTXKERN= ${BTXDIR}/btx/btx
|
|
|
|
BTXCRT= ${BTXDIR}/lib/crt0.o
|
2008-06-25 21:33:28 +00:00
|
|
|
|
2016-09-03 15:26:28 +00:00
|
|
|
# compact binary with no padding between text, data, bss
|
|
|
|
LDSCRIPT= ${SRCTOP}/sys/boot/i386/boot.ldscript
|
2016-10-26 05:26:58 +00:00
|
|
|
# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary
|
|
|
|
# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections
|
|
|
|
LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary
|
|
|
|
LD_FLAGS_BIN=-static -N --gc-sections
|
2016-09-03 15:26:28 +00:00
|
|
|
|
2008-06-25 21:33:28 +00:00
|
|
|
.include "../Makefile.inc"
|