Really make WITHOUT_FORTH (MK_FORTH==no) work. The recent inclusion of
FICL definitions not in ficl/ficl32 files broke this generally. This makes that stuff conditional on BOOT_FORTH. Also, move definitions related to the architecture (FICL_CPUARCH and friends) into Makefile.ficl that all parts of the tree that include files with ficl need to include (but only if MK_FORTH == yes). In addition, had to fix library ordering issue with LIBSTAND to keep it last. Without boot forth, there's no references to memset to bring in memset.o from libstand.a to satisfy libgeliboot.a's use of it. Listing libstand last solves this issue (and it's the proper place for libstand to boot).
This commit is contained in:
parent
42854d99e8
commit
75a63b2de3
@ -60,6 +60,7 @@ SRCS+= pnp.c
|
||||
# Forth interpreter
|
||||
.if defined(BOOT_FORTH)
|
||||
SRCS+= interp_forth.c
|
||||
.include "${SRCTOP}/sys/boot/Makefile.ficl"
|
||||
.endif
|
||||
|
||||
.if defined(BOOT_PROMPT_123)
|
||||
|
@ -17,7 +17,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stand.h>
|
||||
#include <string.h>
|
||||
#include <bootstrap.h>
|
||||
#ifdef BOOT_FORTH
|
||||
#include "ficl.h"
|
||||
#endif
|
||||
|
||||
static struct pnpinfo_stql pnp_devices;
|
||||
static int pnp_devices_initted = 0;
|
||||
@ -186,6 +188,7 @@ pnp_eisaformat(u_int8_t *data)
|
||||
return(idbuf);
|
||||
}
|
||||
|
||||
#ifdef BOOT_FORTH
|
||||
void
|
||||
ficlPnpdevices(FICL_VM *pVM)
|
||||
{
|
||||
@ -230,3 +233,4 @@ static void ficlCompilePnp(FICL_SYSTEM *pSys)
|
||||
}
|
||||
|
||||
FICL_COMPILE_SET(ficlCompilePnp);
|
||||
#endif
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.if ${MK_FORTH} != "no"
|
||||
.include "${.CURDIR}/../../Makefile.ficl"
|
||||
.endif
|
||||
|
||||
LIB= efi
|
||||
INTERNALLIB=
|
||||
WARNS?= 2
|
||||
@ -16,8 +20,6 @@ SRCS+= time_event.c
|
||||
.endif
|
||||
.if ${MK_FORTH} != "no"
|
||||
SRCS+= env.c
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl
|
||||
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
|
||||
.endif
|
||||
|
||||
# We implement a slightly non-standard %S in that it always takes a
|
||||
|
@ -1,15 +1,8 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
FICLDIR?= ${.CURDIR}
|
||||
.include "${.CURDIR}/../Makefile.ficl"
|
||||
|
||||
.if defined(FICL32)
|
||||
.PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/}
|
||||
.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
|
||||
.PATH: ${FICLDIR}/mips64
|
||||
.else
|
||||
.PATH: ${FICLDIR}/${MACHINE_CPUARCH}
|
||||
.endif
|
||||
BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
|
||||
prefix.c search.c stack.c tools.c vm.c words.c
|
||||
|
||||
@ -41,42 +34,6 @@ SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
|
||||
# Optional OO extension softwords
|
||||
#SOFTWORDS+= oo.fr classes.fr
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64"
|
||||
.if defined(FICL32)
|
||||
CFLAGS+= -m32 -I.
|
||||
.else
|
||||
CFLAGS+= -fPIC
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} == "powerpc64"
|
||||
CFLAGS+= -m32 -mcpu=powerpc -I.
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
|
||||
FICL_CPUARCH= i386
|
||||
.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
|
||||
FICL_CPUARCH= mips64
|
||||
.else
|
||||
FICL_CPUARCH= ${MACHINE_CPUARCH}
|
||||
.endif
|
||||
|
||||
CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
|
||||
-I${FICLDIR}/../common
|
||||
|
||||
softcore.c: ${SOFTWORDS} softcore.awk
|
||||
(cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \
|
||||
| awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
|
||||
.if !exists(machine)
|
||||
${SRCS:M*.c:R:S/$/.o/g}: machine
|
||||
|
||||
beforedepend ${OBJS}: machine
|
||||
.endif
|
||||
|
||||
machine: .NOMETA
|
||||
ln -sf ${.CURDIR}/../../i386/include machine
|
||||
|
||||
CLEANFILES+= machine
|
||||
.endif
|
||||
|
@ -1,8 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
FICL32=
|
||||
FICLDIR= ${.CURDIR}/../ficl
|
||||
|
||||
.PATH: ${FICLDIR}
|
||||
|
||||
.include "${FICLDIR}/Makefile"
|
||||
.include "${.CURDIR}/../ficl/Makefile"
|
||||
|
@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <isapnp.h>
|
||||
#include <btxv86.h>
|
||||
#include "libi386.h"
|
||||
#ifdef BOOT_FORTH
|
||||
#include "ficl.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Stupid PCI BIOS interface doesn't let you simply enumerate everything
|
||||
@ -429,6 +431,7 @@ biospci_count_device_type(uint32_t devid)
|
||||
return i;
|
||||
}
|
||||
|
||||
#ifdef BOOT_FORTH
|
||||
/*
|
||||
* pcibios-device-count (devid -- count)
|
||||
*
|
||||
@ -582,3 +585,4 @@ static void ficlCompilePciBios(FICL_SYSTEM *pSys)
|
||||
}
|
||||
|
||||
FICL_COMPILE_SET(ficlCompilePciBios);
|
||||
#endif
|
||||
|
@ -123,8 +123,8 @@ FILES+= loader.rc menu.rc
|
||||
# XXX crt0.o needs to be first for pxeboot(8) to work
|
||||
OBJS= ${BTXCRT}
|
||||
|
||||
DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} ${LIBGELIBOOT}
|
||||
LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} ${LIBGELIBOOT}
|
||||
DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSTAND}
|
||||
LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSTAND}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user