Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2016 17:31:57 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307942 - in head/sys/boot: common efi/libefi ficl ficl32 i386/libi386 i386/loader
Message-ID:  <201610251731.u9PHVvjj084243@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Tue Oct 25 17:31:57 2016
New Revision: 307942
URL: https://svnweb.freebsd.org/changeset/base/307942

Log:
  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).

Modified:
  head/sys/boot/common/Makefile.inc
  head/sys/boot/common/pnp.c
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/ficl/Makefile
  head/sys/boot/ficl32/Makefile
  head/sys/boot/i386/libi386/biospci.c
  head/sys/boot/i386/loader/Makefile

Modified: head/sys/boot/common/Makefile.inc
==============================================================================
--- head/sys/boot/common/Makefile.inc	Tue Oct 25 17:16:58 2016	(r307941)
+++ head/sys/boot/common/Makefile.inc	Tue Oct 25 17:31:57 2016	(r307942)
@@ -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)

Modified: head/sys/boot/common/pnp.c
==============================================================================
--- head/sys/boot/common/pnp.c	Tue Oct 25 17:16:58 2016	(r307941)
+++ head/sys/boot/common/pnp.c	Tue Oct 25 17:31:57 2016	(r307942)
@@ -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 *
 }
 
 FICL_COMPILE_SET(ficlCompilePnp);
+#endif

Modified: head/sys/boot/efi/libefi/Makefile
==============================================================================
--- head/sys/boot/efi/libefi/Makefile	Tue Oct 25 17:16:58 2016	(r307941)
+++ head/sys/boot/efi/libefi/Makefile	Tue Oct 25 17:31:57 2016	(r307942)
@@ -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

Modified: head/sys/boot/ficl/Makefile
==============================================================================
--- head/sys/boot/ficl/Makefile	Tue Oct 25 17:16:58 2016	(r307941)
+++ head/sys/boot/ficl/Makefile	Tue Oct 25 17:31:57 2016	(r307942)
@@ -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
 # 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

Modified: head/sys/boot/ficl32/Makefile
==============================================================================
--- head/sys/boot/ficl32/Makefile	Tue Oct 25 17:16:58 2016	(r307941)
+++ head/sys/boot/ficl32/Makefile	Tue Oct 25 17:31:57 2016	(r307942)
@@ -1,8 +1,5 @@
 # $FreeBSD$
 
 FICL32=
-FICLDIR=	${.CURDIR}/../ficl
 
-.PATH:	${FICLDIR}
-
-.include "${FICLDIR}/Makefile"
+.include "${.CURDIR}/../ficl/Makefile"

Modified: head/sys/boot/i386/libi386/biospci.c
==============================================================================
--- head/sys/boot/i386/libi386/biospci.c	Tue Oct 25 17:16:58 2016	(r307941)
+++ head/sys/boot/i386/libi386/biospci.c	Tue Oct 25 17:31:57 2016	(r307942)
@@ -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_SYST
 }
 
 FICL_COMPILE_SET(ficlCompilePciBios);
+#endif

Modified: head/sys/boot/i386/loader/Makefile
==============================================================================
--- head/sys/boot/i386/loader/Makefile	Tue Oct 25 17:16:58 2016	(r307941)
+++ head/sys/boot/i386/loader/Makefile	Tue Oct 25 17:31:57 2016	(r307942)
@@ -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>
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610251731.u9PHVvjj084243>