Invent new LDR_INTERP for the loader interpreter to use. Use this in

preference to LIBFICL{,32}. LIBFICL{,32} are now always defined, but
LDR_INTERP{,32} is defined empty when building w/o forth (aka the
simple interpreter) and defined to LIBFICL{,32} when we are building
forth.
This commit is contained in:
imp 2018-02-02 15:40:49 +00:00
parent d37e00ee47
commit 6e1d5f978e
11 changed files with 24 additions and 23 deletions

View File

@ -41,8 +41,8 @@ LDFLAGS+= -Wl,-znotext
CFLAGS+= -fPIC
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
DPADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}

View File

@ -119,8 +119,8 @@ loader.efi: ${PROG}
LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a
DPADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA} \
DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA} \
${LDSCRIPT}
LDADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA}
.include <bsd.prog.mk>

View File

@ -71,8 +71,8 @@ FILESMODE_${LOADER}= ${BINMODE} -b
# XXX crt0.o needs to be first for pxeboot(8) to work
OBJS= ${BTXCRT}
DPADD= ${LIBFICL32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
LDADD= ${LIBFICL32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSA32}
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -DLOADER_PREFER_AMD64

View File

@ -128,14 +128,15 @@ LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
.endif
.endif
# NB: The makefiles depend on these being empty when we don't build forth.
.if ${MK_FORTH} != "no"
LIBFICL= ${BOOTOBJ}/ficl/libficl.a
.if ${MACHINE} == "i386"
LIBFICL32= ${LIBFICL}
.else
LIBFICL32= ${BOOTOBJ}/ficl32/libficl.a
.endif
.if ${MK_FORTH} != no
LDR_INTERP= ${LIBFICL}
LDR_INTERP32= ${LIBFICL32}
.endif
CLEANFILES+= vers.c

View File

@ -87,8 +87,8 @@ LDFLAGS+= -static \
-L${.CURDIR} \
-e __start
DPADD= ${LIBFICL} ${LIBSA}
LDADD= ${LIBFICL} ${LIBSA}
DPADD= ${LDR_INTERP} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBSA}
.if defined(LOADER_USB_SUPPORT)
# Do garbage collection

View File

@ -35,8 +35,8 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
.include "${BOOTSRC}/uboot.mk"
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
DPADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}

View File

@ -39,7 +39,7 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
# 64-bit bridge extensions
CFLAGS+= -Wa,-mppc64bridge
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
.include <bsd.prog.mk>

View File

@ -46,7 +46,7 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
LIBOFW= ${BOOTOBJ}/ofw/libofw/libofw.a
CFLAGS+= -I${BOOTSRC}/ofw/libofw
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBFDT} ${LIBSA}
.include <bsd.prog.mk>

View File

@ -27,7 +27,7 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc
.include "${BOOTSRC}/uboot.mk"
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
DPADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
.include <bsd.prog.mk>

View File

@ -40,7 +40,7 @@ LDFLAGS+= -static
LIBOFW= ${BOOTOBJ}/ofw/libofw/libofw.a
CFLAGS+= -I${BOOTSRC}/ofw/libofw/
DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
DPADD= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
LDADD= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
.include <bsd.prog.mk>

View File

@ -43,10 +43,10 @@ CFLAGS+= -DUSERBOOT_ZFS_SUPPORT
LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
.endif
# Always add MI sources
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA}
LDADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA}
DPADD+= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBSA}
LDADD+= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBSA}
.include <bsd.lib.mk>