summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2012-04-20 15:01:23 +0000
committermarcel <marcel@FreeBSD.org>2012-04-20 15:01:23 +0000
commit58d2e125c4d6dc16535d5d50b8fa3eab9b287353 (patch)
treee441a6211ccc260a51d31fd5c650d98b87b5fdd9 /sys/boot/i386
parent3463f3d087f68b3d32ecd9ccc77f8a2f8aef482d (diff)
downloadFreeBSD-src-58d2e125c4d6dc16535d5d50b8fa3eab9b287353.zip
FreeBSD-src-58d2e125c4d6dc16535d5d50b8fa3eab9b287353.tar.gz
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.
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/efi/Makefile11
1 files changed, 9 insertions, 2 deletions
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
OpenPOWER on IntegriCloud