diff options
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/efi/Makefile.inc | 7 | ||||
-rw-r--r-- | sys/boot/i386/efi/Makefile | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/boot/efi/Makefile.inc b/sys/boot/efi/Makefile.inc index fdfd59c..7e75a6c 100644 --- a/sys/boot/efi/Makefile.inc +++ b/sys/boot/efi/Makefile.inc @@ -2,6 +2,13 @@ BINDIR?= /boot +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -m32 -march=i386 +ACFLAGS+= -m32 +LDFLAGS+= -m elf_i386_fbsd +AFLAGS+= --32 +.endif + # Options used when building app-specific efi components CFLAGS+= -ffreestanding -fshort-wchar -Wformat LDFLAGS+= -nostdlib diff --git a/sys/boot/i386/efi/Makefile b/sys/boot/i386/efi/Makefile index 943de11..95c219d 100644 --- a/sys/boot/i386/efi/Makefile +++ b/sys/boot/i386/efi/Makefile @@ -35,7 +35,7 @@ CFLAGS+= -I${.CURDIR}/../../common FILES= loader.efi FILESMODE_loader.efi= ${BINMODE} -LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} +LDSCRIPT= ${.CURDIR}/ldscript.i386 LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic ${PROG}: ${LDSCRIPT} @@ -64,6 +64,13 @@ CFLAGS+= -I${.CURDIR}/../libi386 CFLAGS+= -I${.CURDIR}/../btx/lib DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBEFI} -lstand +LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} .include <bsd.prog.mk> + +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -I. +beforedepend ${OBJS}: machine +machine: + ln -sf ${.CURDIR}/../../../i386/include machine +.endif |