freebsd-dev/sys/boot/i386/Makefile.inc
Dimitry Andric d5c1aaf2fb For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).

This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.

MFC after:	3 days
2013-12-30 19:05:50 +00:00

32 lines
670 B
Makefile

# Common defines for all of /sys/boot/i386/
#
# $FreeBSD$
BINDIR?= /boot
LOADER_ADDRESS?=0x200000
CFLAGS+= -march=i386 -ffreestanding
CFLAGS.gcc+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
LDFLAGS+= -nostdlib
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -m32
ACFLAGS+= -m32
# LD_FLAGS is passed directly to ${LD}, not via ${CC}:
LD_FLAGS+= -m elf_i386_fbsd
AFLAGS+= --32
.endif
# 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
.include "../Makefile.inc"