Build a 32-bit EFI loader on amd64. This to match the rest of the
code that is used to construct a loader (e.g. libstand, ficl, etc). There is such a thing as a 64-bit EFI application, but it's not as standard as 32-bit is. Let's make the 32-bit functional (as in we can load and actualy boot a kernel) before solving the 64-bit loader problem.
This commit is contained in:
parent
d81535d1f9
commit
e7babf043f
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
BINDIR?= /boot
|
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
|
# Options used when building app-specific efi components
|
||||||
CFLAGS+= -ffreestanding -fshort-wchar -Wformat
|
CFLAGS+= -ffreestanding -fshort-wchar -Wformat
|
||||||
LDFLAGS+= -nostdlib
|
LDFLAGS+= -nostdlib
|
||||||
|
@ -35,7 +35,7 @@ CFLAGS+= -I${.CURDIR}/../../common
|
|||||||
FILES= loader.efi
|
FILES= loader.efi
|
||||||
FILESMODE_loader.efi= ${BINMODE}
|
FILESMODE_loader.efi= ${BINMODE}
|
||||||
|
|
||||||
LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH}
|
LDSCRIPT= ${.CURDIR}/ldscript.i386
|
||||||
LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic
|
LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic
|
||||||
|
|
||||||
${PROG}: ${LDSCRIPT}
|
${PROG}: ${LDSCRIPT}
|
||||||
@ -64,6 +64,13 @@ CFLAGS+= -I${.CURDIR}/../libi386
|
|||||||
CFLAGS+= -I${.CURDIR}/../btx/lib
|
CFLAGS+= -I${.CURDIR}/../btx/lib
|
||||||
|
|
||||||
DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
|
DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
|
||||||
LDADD= ${LIBFICL} ${LIBEFI} -lstand
|
LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
|
||||||
|
.if ${MACHINE_CPUARCH} == "amd64"
|
||||||
|
CFLAGS+= -I.
|
||||||
|
beforedepend ${OBJS}: machine
|
||||||
|
machine:
|
||||||
|
ln -sf ${.CURDIR}/../../../i386/include machine
|
||||||
|
.endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user